~ubuntu-branches/ubuntu/gutsy/cairo-java/gutsy

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-04-16 16:15:30 UTC
  • Revision ID: james.westby@ubuntu.com-20060416161530-avdw6l5vg6n2kosy
Tags: upstream-1.0.3
ImportĀ upstreamĀ versionĀ 1.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# generated automatically by aclocal 1.9.4 -*- Autoconf -*-
 
2
 
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
 
4
# Free Software Foundation, Inc.
 
5
# This file is free software; the Free Software Foundation
 
6
# gives unlimited permission to copy and/or distribute it,
 
7
# with or without modifications, as long as this notice is preserved.
 
8
 
 
9
# This program is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 
12
# PARTICULAR PURPOSE.
 
13
 
 
14
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
15
 
 
16
# serial 47 AC_PROG_LIBTOOL
 
17
 
 
18
 
 
19
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
 
20
# -----------------------------------------------------------
 
21
# If this macro is not defined by Autoconf, define it here.
 
22
m4_ifdef([AC_PROVIDE_IFELSE],
 
23
         [],
 
24
         [m4_define([AC_PROVIDE_IFELSE],
 
25
                 [m4_ifdef([AC_PROVIDE_$1],
 
26
                           [$2], [$3])])])
 
27
 
 
28
 
 
29
# AC_PROG_LIBTOOL
 
30
# ---------------
 
31
AC_DEFUN([AC_PROG_LIBTOOL],
 
32
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
 
33
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
 
34
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
 
35
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
36
    [AC_LIBTOOL_CXX],
 
37
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
 
38
  ])])
 
39
dnl And a similar setup for Fortran 77 support
 
40
  AC_PROVIDE_IFELSE([AC_PROG_F77],
 
41
    [AC_LIBTOOL_F77],
 
42
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
 
43
])])
 
44
 
 
45
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
 
46
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
 
47
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
 
48
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
 
49
    [AC_LIBTOOL_GCJ],
 
50
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
 
51
      [AC_LIBTOOL_GCJ],
 
52
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
 
53
        [AC_LIBTOOL_GCJ],
 
54
      [ifdef([AC_PROG_GCJ],
 
55
             [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
56
       ifdef([A][M_PROG_GCJ],
 
57
             [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
58
       ifdef([LT_AC_PROG_GCJ],
 
59
             [define([LT_AC_PROG_GCJ],
 
60
                defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
 
61
])])# AC_PROG_LIBTOOL
 
62
 
 
63
 
 
64
# _AC_PROG_LIBTOOL
 
65
# ----------------
 
66
AC_DEFUN([_AC_PROG_LIBTOOL],
 
67
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
 
68
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
 
69
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
 
70
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
 
71
 
 
72
# This can be used to rebuild libtool when needed
 
73
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
 
74
 
 
75
# Always use our own libtool.
 
76
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
77
AC_SUBST(LIBTOOL)dnl
 
78
 
 
79
# Prevent multiple expansion
 
80
define([AC_PROG_LIBTOOL], [])
 
81
])# _AC_PROG_LIBTOOL
 
82
 
 
83
 
 
84
# AC_LIBTOOL_SETUP
 
85
# ----------------
 
86
AC_DEFUN([AC_LIBTOOL_SETUP],
 
87
[AC_PREREQ(2.50)dnl
 
88
AC_REQUIRE([AC_ENABLE_SHARED])dnl
 
89
AC_REQUIRE([AC_ENABLE_STATIC])dnl
 
90
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
 
91
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
92
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
93
AC_REQUIRE([AC_PROG_CC])dnl
 
94
AC_REQUIRE([AC_PROG_LD])dnl
 
95
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
 
96
AC_REQUIRE([AC_PROG_NM])dnl
 
97
 
 
98
AC_REQUIRE([AC_PROG_LN_S])dnl
 
99
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
 
100
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
 
101
AC_REQUIRE([AC_OBJEXT])dnl
 
102
AC_REQUIRE([AC_EXEEXT])dnl
 
103
dnl
 
104
 
 
105
AC_LIBTOOL_SYS_MAX_CMD_LEN
 
106
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
107
AC_LIBTOOL_OBJDIR
 
108
 
 
109
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
110
_LT_AC_PROG_ECHO_BACKSLASH
 
111
 
 
112
case $host_os in
 
113
aix3*)
 
114
  # AIX sometimes has problems with the GCC collect2 program.  For some
 
115
  # reason, if we set the COLLECT_NAMES environment variable, the problems
 
116
  # vanish in a puff of smoke.
 
117
  if test "X${COLLECT_NAMES+set}" != Xset; then
 
118
    COLLECT_NAMES=
 
119
    export COLLECT_NAMES
 
120
  fi
 
121
  ;;
 
122
esac
 
123
 
 
124
# Sed substitution that helps us do robust quoting.  It backslashifies
 
125
# metacharacters that are still active within double-quoted strings.
 
126
Xsed='sed -e 1s/^X//'
 
127
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
 
128
 
 
129
# Same as above, but do not quote variable references.
 
130
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
 
131
 
 
132
# Sed substitution to delay expansion of an escaped shell variable in a
 
133
# double_quote_subst'ed string.
 
134
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
135
 
 
136
# Sed substitution to avoid accidental globbing in evaled expressions
 
137
no_glob_subst='s/\*/\\\*/g'
 
138
 
 
139
# Constants:
 
140
rm="rm -f"
 
141
 
 
142
# Global variables:
 
143
default_ofile=libtool
 
144
can_build_shared=yes
 
145
 
 
146
# All known linkers require a `.a' archive for static linking (except M$VC,
 
147
# which needs '.lib').
 
148
libext=a
 
149
ltmain="$ac_aux_dir/ltmain.sh"
 
150
ofile="$default_ofile"
 
151
with_gnu_ld="$lt_cv_prog_gnu_ld"
 
152
 
 
153
AC_CHECK_TOOL(AR, ar, false)
 
154
AC_CHECK_TOOL(RANLIB, ranlib, :)
 
155
AC_CHECK_TOOL(STRIP, strip, :)
 
156
 
 
157
old_CC="$CC"
 
158
old_CFLAGS="$CFLAGS"
 
159
 
 
160
# Set sane defaults for various variables
 
161
test -z "$AR" && AR=ar
 
162
test -z "$AR_FLAGS" && AR_FLAGS=cru
 
163
test -z "$AS" && AS=as
 
164
test -z "$CC" && CC=cc
 
165
test -z "$LTCC" && LTCC=$CC
 
166
test -z "$DLLTOOL" && DLLTOOL=dlltool
 
167
test -z "$LD" && LD=ld
 
168
test -z "$LN_S" && LN_S="ln -s"
 
169
test -z "$MAGIC_CMD" && MAGIC_CMD=file
 
170
test -z "$NM" && NM=nm
 
171
test -z "$SED" && SED=sed
 
172
test -z "$OBJDUMP" && OBJDUMP=objdump
 
173
test -z "$RANLIB" && RANLIB=:
 
174
test -z "$STRIP" && STRIP=:
 
175
test -z "$ac_objext" && ac_objext=o
 
176
 
 
177
# Determine commands to create old-style static archives.
 
178
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
 
179
old_postinstall_cmds='chmod 644 $oldlib'
 
180
old_postuninstall_cmds=
 
181
 
 
182
if test -n "$RANLIB"; then
 
183
  case $host_os in
 
184
  openbsd*)
 
185
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
 
186
    ;;
 
187
  *)
 
188
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
 
189
    ;;
 
190
  esac
 
191
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 
192
fi
 
193
 
 
194
_LT_CC_BASENAME([$compiler])
 
195
 
 
196
# Only perform the check for file, if the check method requires it
 
197
case $deplibs_check_method in
 
198
file_magic*)
 
199
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
 
200
    AC_PATH_MAGIC
 
201
  fi
 
202
  ;;
 
203
esac
 
204
 
 
205
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
 
206
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
 
207
enable_win32_dll=yes, enable_win32_dll=no)
 
208
 
 
209
AC_ARG_ENABLE([libtool-lock],
 
210
    [AC_HELP_STRING([--disable-libtool-lock],
 
211
        [avoid locking (might break parallel builds)])])
 
212
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
213
 
 
214
AC_ARG_WITH([pic],
 
215
    [AC_HELP_STRING([--with-pic],
 
216
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
 
217
    [pic_mode="$withval"],
 
218
    [pic_mode=default])
 
219
test -z "$pic_mode" && pic_mode=default
 
220
 
 
221
# Check if we have a version mismatch between libtool.m4 and ltmain.sh.
 
222
#
 
223
# Note:  This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined.
 
224
#        We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually
 
225
#        calls AC_LIBTOOL_CONFIG and creates libtool.
 
226
#
 
227
_LT_VERSION_CHECK
 
228
 
 
229
# Use C for the default configuration in the libtool script
 
230
tagname=
 
231
AC_LIBTOOL_LANG_C_CONFIG
 
232
_LT_AC_TAGCONFIG
 
233
])# AC_LIBTOOL_SETUP
 
234
 
 
235
 
 
236
# _LT_VERSION_CHECK
 
237
# -----------------
 
238
AC_DEFUN([_LT_VERSION_CHECK],
 
239
[AC_MSG_CHECKING([for correct ltmain.sh version])
 
240
if test -z "$ltmain"; then
 
241
  AC_MSG_RESULT(no)
 
242
  echo
 
243
  echo "*** [Gentoo] sanity check failed! ***"
 
244
  echo "*** \$ltmain is not defined, please check the patch for consistency! ***"
 
245
  echo
 
246
  exit 1
 
247
fi
 
248
gentoo_lt_version="1.5.18"
 
249
gentoo_ltmain_version=`grep '^[[:space:]]*VERSION=' $ltmain | sed -e 's|^[[:space:]]*VERSION=||'`
 
250
if test "$gentoo_lt_version" != "$gentoo_ltmain_version"; then
 
251
  AC_MSG_RESULT(no)
 
252
  echo
 
253
  echo "*** [Gentoo] sanity check failed! ***"
 
254
  echo "*** libtool.m4 and ltmain.sh have a version mismatch! ***"
 
255
  echo "*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) ***"
 
256
  echo
 
257
  echo "Please run:"
 
258
  echo
 
259
  echo "  libtoolize --copy --force"
 
260
  echo
 
261
  echo "if appropriate, please contact the maintainer of this"
 
262
  echo "package (or your distribution) for help."
 
263
  echo
 
264
  exit 1
 
265
else
 
266
  AC_MSG_RESULT(yes)
 
267
fi
 
268
])# _LT_VERSION_CHECK
 
269
 
 
270
 
 
271
# _LT_AC_SYS_COMPILER
 
272
# -------------------
 
273
AC_DEFUN([_LT_AC_SYS_COMPILER],
 
274
[AC_REQUIRE([AC_PROG_CC])dnl
 
275
 
 
276
# If no C compiler was specified, use CC.
 
277
LTCC=${LTCC-"$CC"}
 
278
 
 
279
# Allow CC to be a program name with arguments.
 
280
compiler=$CC
 
281
])# _LT_AC_SYS_COMPILER
 
282
 
 
283
 
 
284
# _LT_CC_BASENAME(CC)
 
285
# -------------------
 
286
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
 
287
AC_DEFUN([_LT_CC_BASENAME],
 
288
[for cc_temp in $1""; do
 
289
  case $cc_temp in
 
290
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
 
291
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
 
292
    \-*) ;;
 
293
    *) break;;
 
294
  esac
 
295
done
 
296
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
297
])
 
298
 
 
299
 
 
300
# _LT_COMPILER_BOILERPLATE
 
301
# ------------------------
 
302
# Check for compiler boilerplate output or warnings with
 
303
# the simple compiler test code.
 
304
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
 
305
[ac_outfile=conftest.$ac_objext
 
306
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
 
307
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
 
308
_lt_compiler_boilerplate=`cat conftest.err`
 
309
$rm conftest*
 
310
])# _LT_COMPILER_BOILERPLATE
 
311
 
 
312
 
 
313
# _LT_LINKER_BOILERPLATE
 
314
# ----------------------
 
315
# Check for linker boilerplate output or warnings with
 
316
# the simple link test code.
 
317
AC_DEFUN([_LT_LINKER_BOILERPLATE],
 
318
[ac_outfile=conftest.$ac_objext
 
319
printf "$lt_simple_link_test_code" >conftest.$ac_ext
 
320
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
 
321
_lt_linker_boilerplate=`cat conftest.err`
 
322
$rm conftest*
 
323
])# _LT_LINKER_BOILERPLATE
 
324
 
 
325
 
 
326
# _LT_AC_SYS_LIBPATH_AIX
 
327
# ----------------------
 
328
# Links a minimal program and checks the executable
 
329
# for the system default hardcoded library path. In most cases,
 
330
# this is /usr/lib:/lib, but when the MPI compilers are used
 
331
# the location of the communication and MPI libs are included too.
 
332
# If we don't find anything, use the default library path according
 
333
# to the aix ld manual.
 
334
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
 
335
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
 
336
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 
337
}'`
 
338
# Check for a 64-bit object if we didn't find anything.
 
339
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 
340
}'`; fi],[])
 
341
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
342
])# _LT_AC_SYS_LIBPATH_AIX
 
343
 
 
344
 
 
345
# _LT_AC_SHELL_INIT(ARG)
 
346
# ----------------------
 
347
AC_DEFUN([_LT_AC_SHELL_INIT],
 
348
[ifdef([AC_DIVERSION_NOTICE],
 
349
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
 
350
         [AC_DIVERT_PUSH(NOTICE)])
 
351
$1
 
352
AC_DIVERT_POP
 
353
])# _LT_AC_SHELL_INIT
 
354
 
 
355
 
 
356
# _LT_AC_PROG_ECHO_BACKSLASH
 
357
# --------------------------
 
358
# Add some code to the start of the generated configure script which
 
359
# will find an echo command which doesn't interpret backslashes.
 
360
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
 
361
[_LT_AC_SHELL_INIT([
 
362
# Check that we are running under the correct shell.
 
363
SHELL=${CONFIG_SHELL-/bin/sh}
 
364
 
 
365
case X$ECHO in
 
366
X*--fallback-echo)
 
367
  # Remove one level of quotation (which was required for Make).
 
368
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
 
369
  ;;
 
370
esac
 
371
 
 
372
echo=${ECHO-echo}
 
373
if test "X[$]1" = X--no-reexec; then
 
374
  # Discard the --no-reexec flag, and continue.
 
375
  shift
 
376
elif test "X[$]1" = X--fallback-echo; then
 
377
  # Avoid inline document here, it may be left over
 
378
  :
 
379
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
 
380
  # Yippee, $echo works!
 
381
  :
 
382
else
 
383
  # Restart under the correct shell.
 
384
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
385
fi
 
386
 
 
387
if test "X[$]1" = X--fallback-echo; then
 
388
  # used as fallback echo
 
389
  shift
 
390
  cat <<EOF
 
391
[$]*
 
392
EOF
 
393
  exit 0
 
394
fi
 
395
 
 
396
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
397
# if CDPATH is set.
 
398
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
399
 
 
400
if test -z "$ECHO"; then
 
401
if test "X${echo_test_string+set}" != Xset; then
 
402
# find a string as large as possible, as long as the shell can cope with it
 
403
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
 
404
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
 
405
    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
 
406
       echo_test_string="`eval $cmd`" &&
 
407
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
 
408
    then
 
409
      break
 
410
    fi
 
411
  done
 
412
fi
 
413
 
 
414
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
 
415
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
 
416
   test "X$echo_testing_string" = "X$echo_test_string"; then
 
417
  :
 
418
else
 
419
  # The Solaris, AIX, and Digital Unix default echo programs unquote
 
420
  # backslashes.  This makes it impossible to quote backslashes using
 
421
  #   echo "$something" | sed 's/\\/\\\\/g'
 
422
  #
 
423
  # So, first we look for a working echo in the user's PATH.
 
424
 
 
425
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
426
  for dir in $PATH /usr/ucb; do
 
427
    IFS="$lt_save_ifs"
 
428
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
 
429
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
 
430
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
 
431
       test "X$echo_testing_string" = "X$echo_test_string"; then
 
432
      echo="$dir/echo"
 
433
      break
 
434
    fi
 
435
  done
 
436
  IFS="$lt_save_ifs"
 
437
 
 
438
  if test "X$echo" = Xecho; then
 
439
    # We didn't find a better echo, so look for alternatives.
 
440
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
 
441
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
 
442
       test "X$echo_testing_string" = "X$echo_test_string"; then
 
443
      # This shell has a builtin print -r that does the trick.
 
444
      echo='print -r'
 
445
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
 
446
         test "X$CONFIG_SHELL" != X/bin/ksh; then
 
447
      # If we have ksh, try running configure again with it.
 
448
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
 
449
      export ORIGINAL_CONFIG_SHELL
 
450
      CONFIG_SHELL=/bin/ksh
 
451
      export CONFIG_SHELL
 
452
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
453
    else
 
454
      # Try using printf.
 
455
      echo='printf %s\n'
 
456
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
 
457
         echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
 
458
         test "X$echo_testing_string" = "X$echo_test_string"; then
 
459
        # Cool, printf works
 
460
        :
 
461
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
462
           test "X$echo_testing_string" = 'X\t' &&
 
463
           echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
464
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
465
        CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
 
466
        export CONFIG_SHELL
 
467
        SHELL="$CONFIG_SHELL"
 
468
        export SHELL
 
469
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
 
470
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
471
           test "X$echo_testing_string" = 'X\t' &&
 
472
           echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
473
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
474
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
 
475
      else
 
476
        # maybe with a smaller string...
 
477
        prev=:
 
478
 
 
479
        for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
 
480
          if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
 
481
          then
 
482
            break
 
483
          fi
 
484
          prev="$cmd"
 
485
        done
 
486
 
 
487
        if test "$prev" != 'sed 50q "[$]0"'; then
 
488
          echo_test_string=`eval $prev`
 
489
          export echo_test_string
 
490
          exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
 
491
        else
 
492
          # Oops.  We lost completely, so just stick with echo.
 
493
          echo=echo
 
494
        fi
 
495
      fi
 
496
    fi
 
497
  fi
 
498
fi
 
499
fi
 
500
 
 
501
# Copy echo and quote the copy suitably for passing to libtool from
 
502
# the Makefile, instead of quoting the original, which is used later.
 
503
ECHO=$echo
 
504
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
 
505
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
 
506
fi
 
507
 
 
508
AC_SUBST(ECHO)
 
509
])])# _LT_AC_PROG_ECHO_BACKSLASH
 
510
 
 
511
 
 
512
# _LT_AC_LOCK
 
513
# -----------
 
514
AC_DEFUN([_LT_AC_LOCK],
 
515
[AC_ARG_ENABLE([libtool-lock],
 
516
    [AC_HELP_STRING([--disable-libtool-lock],
 
517
        [avoid locking (might break parallel builds)])])
 
518
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
519
 
 
520
# Some flags need to be propagated to the compiler or linker for good
 
521
# libtool support.
 
522
case $host in
 
523
ia64-*-hpux*)
 
524
  # Find out which ABI we are using.
 
525
  echo 'int i;' > conftest.$ac_ext
 
526
  if AC_TRY_EVAL(ac_compile); then
 
527
    case `/usr/bin/file conftest.$ac_objext` in
 
528
    *ELF-32*)
 
529
      HPUX_IA64_MODE="32"
 
530
      ;;
 
531
    *ELF-64*)
 
532
      HPUX_IA64_MODE="64"
 
533
      ;;
 
534
    esac
 
535
  fi
 
536
  rm -rf conftest*
 
537
  ;;
 
538
*-*-irix6*)
 
539
  # Find out which ABI we are using.
 
540
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
 
541
  if AC_TRY_EVAL(ac_compile); then
 
542
   if test "$lt_cv_prog_gnu_ld" = yes; then
 
543
    case `/usr/bin/file conftest.$ac_objext` in
 
544
    *32-bit*)
 
545
      LD="${LD-ld} -melf32bsmip"
 
546
      ;;
 
547
    *N32*)
 
548
      LD="${LD-ld} -melf32bmipn32"
 
549
      ;;
 
550
    *64-bit*)
 
551
      LD="${LD-ld} -melf64bmip"
 
552
      ;;
 
553
    esac
 
554
   else
 
555
    case `/usr/bin/file conftest.$ac_objext` in
 
556
    *32-bit*)
 
557
      LD="${LD-ld} -32"
 
558
      ;;
 
559
    *N32*)
 
560
      LD="${LD-ld} -n32"
 
561
      ;;
 
562
    *64-bit*)
 
563
      LD="${LD-ld} -64"
 
564
      ;;
 
565
    esac
 
566
   fi
 
567
  fi
 
568
  rm -rf conftest*
 
569
  ;;
 
570
 
 
571
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
 
572
  # Find out which ABI we are using.
 
573
  echo 'int i;' > conftest.$ac_ext
 
574
  if AC_TRY_EVAL(ac_compile); then
 
575
    case "`/usr/bin/file conftest.o`" in
 
576
    *32-bit*)
 
577
      case $host in
 
578
        x86_64-*linux*)
 
579
          LD="${LD-ld} -m elf_i386"
 
580
          ;;
 
581
        ppc64-*linux*|powerpc64-*linux*)
 
582
          LD="${LD-ld} -m elf32ppclinux"
 
583
          ;;
 
584
        s390x-*linux*)
 
585
          LD="${LD-ld} -m elf_s390"
 
586
          ;;
 
587
        sparc64-*linux*)
 
588
          LD="${LD-ld} -m elf32_sparc"
 
589
          ;;
 
590
      esac
 
591
      ;;
 
592
    *64-bit*)
 
593
      case $host in
 
594
        x86_64-*linux*)
 
595
          LD="${LD-ld} -m elf_x86_64"
 
596
          ;;
 
597
        ppc*-*linux*|powerpc*-*linux*)
 
598
          LD="${LD-ld} -m elf64ppc"
 
599
          ;;
 
600
        s390*-*linux*)
 
601
          LD="${LD-ld} -m elf64_s390"
 
602
          ;;
 
603
        sparc*-*linux*)
 
604
          LD="${LD-ld} -m elf64_sparc"
 
605
          ;;
 
606
      esac
 
607
      ;;
 
608
    esac
 
609
  fi
 
610
  rm -rf conftest*
 
611
  ;;
 
612
 
 
613
*-*-linux*)
 
614
  # Test if the compiler is 64bit
 
615
  echo 'int i;' > conftest.$ac_ext
 
616
  lt_cv_cc_64bit_output=no
 
617
  if AC_TRY_EVAL(ac_compile); then
 
618
    case `/usr/bin/file conftest.$ac_objext` in
 
619
    *"ELF 64"*)
 
620
      lt_cv_cc_64bit_output=yes
 
621
      ;;
 
622
    esac
 
623
  fi
 
624
  rm -rf conftest*
 
625
  ;;
 
626
  
 
627
*-*-sco3.2v5*)
 
628
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
 
629
  SAVE_CFLAGS="$CFLAGS"
 
630
  CFLAGS="$CFLAGS -belf"
 
631
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
 
632
    [AC_LANG_PUSH(C)
 
633
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
 
634
     AC_LANG_POP])
 
635
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
 
636
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
 
637
    CFLAGS="$SAVE_CFLAGS"
 
638
  fi
 
639
  ;;
 
640
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
 
641
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
 
642
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
 
643
  AC_CHECK_TOOL(AS, as, false)
 
644
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
 
645
  ;;
 
646
  ])
 
647
esac
 
648
 
 
649
need_locks="$enable_libtool_lock"
 
650
 
 
651
])# _LT_AC_LOCK
 
652
 
 
653
 
 
654
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
655
#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
 
656
# ----------------------------------------------------------------
 
657
# Check whether the given compiler option works
 
658
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
 
659
[AC_REQUIRE([LT_AC_PROG_SED])
 
660
AC_CACHE_CHECK([$1], [$2],
 
661
  [$2=no
 
662
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
 
663
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
664
   lt_compiler_flag="$3"
 
665
   # Insert the option either (1) after the last *FLAGS variable, or
 
666
   # (2) before a word containing "conftest.", or (3) at the end.
 
667
   # Note that $ac_compile itself does not contain backslashes and begins
 
668
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
669
   # The option is referenced via a variable to avoid confusing sed.
 
670
   lt_compile=`echo "$ac_compile" | $SED \
 
671
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
 
672
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
673
   -e 's:$: $lt_compiler_flag:'`
 
674
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
675
   (eval "$lt_compile" 2>conftest.err)
 
676
   ac_status=$?
 
677
   cat conftest.err >&AS_MESSAGE_LOG_FD
 
678
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
679
   if (exit $ac_status) && test -s "$ac_outfile"; then
 
680
     # The compiler can only warn and ignore the option if not recognized
 
681
     # So say no if there are warnings other than the usual output.
 
682
     $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
 
683
     $SED '/^$/d' conftest.err >conftest.er2
 
684
     if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
 
685
       $2=yes
 
686
     fi
 
687
   fi
 
688
   $rm conftest*
 
689
])
 
690
 
 
691
if test x"[$]$2" = xyes; then
 
692
    ifelse([$5], , :, [$5])
 
693
else
 
694
    ifelse([$6], , :, [$6])
 
695
fi
 
696
])# AC_LIBTOOL_COMPILER_OPTION
 
697
 
 
698
 
 
699
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
700
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
 
701
# ------------------------------------------------------------
 
702
# Check whether the given compiler option works
 
703
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
 
704
[AC_CACHE_CHECK([$1], [$2],
 
705
  [$2=no
 
706
   save_LDFLAGS="$LDFLAGS"
 
707
   LDFLAGS="$LDFLAGS $3"
 
708
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
 
709
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
 
710
     # The compiler can only warn and ignore the option if not recognized
 
711
     # So say no if there are warnings
 
712
     if test -s conftest.err; then
 
713
       # Append any errors to the config.log.
 
714
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
 
715
       $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
 
716
       $SED '/^$/d' conftest.err >conftest.er2
 
717
       if diff conftest.exp conftest.er2 >/dev/null; then
 
718
         $2=yes
 
719
       fi
 
720
     else
 
721
       $2=yes
 
722
     fi
 
723
   fi
 
724
   $rm conftest*
 
725
   LDFLAGS="$save_LDFLAGS"
 
726
])
 
727
 
 
728
if test x"[$]$2" = xyes; then
 
729
    ifelse([$4], , :, [$4])
 
730
else
 
731
    ifelse([$5], , :, [$5])
 
732
fi
 
733
])# AC_LIBTOOL_LINKER_OPTION
 
734
 
 
735
 
 
736
# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
737
# --------------------------
 
738
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
 
739
[# find the maximum length of command line arguments
 
740
AC_MSG_CHECKING([the maximum length of command line arguments])
 
741
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
 
742
  i=0
 
743
  teststring="ABCD"
 
744
 
 
745
  case $build_os in
 
746
  msdosdjgpp*)
 
747
    # On DJGPP, this test can blow up pretty badly due to problems in libc
 
748
    # (any single argument exceeding 2000 bytes causes a buffer overrun
 
749
    # during glob expansion).  Even if it were fixed, the result of this
 
750
    # check would be larger than it should be.
 
751
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
 
752
    ;;
 
753
 
 
754
  gnu*)
 
755
    # Under GNU Hurd, this test is not required because there is
 
756
    # no limit to the length of command line arguments.
 
757
    # Libtool will interpret -1 as no limit whatsoever
 
758
    lt_cv_sys_max_cmd_len=-1;
 
759
    ;;
 
760
 
 
761
  cygwin* | mingw*)
 
762
    # On Win9x/ME, this test blows up -- it succeeds, but takes
 
763
    # about 5 minutes as the teststring grows exponentially.
 
764
    # Worse, since 9x/ME are not pre-emptively multitasking,
 
765
    # you end up with a "frozen" computer, even though with patience
 
766
    # the test eventually succeeds (with a max line length of 256k).
 
767
    # Instead, let's just punt: use the minimum linelength reported by
 
768
    # all of the supported platforms: 8192 (on NT/2K/XP).
 
769
    lt_cv_sys_max_cmd_len=8192;
 
770
    ;;
 
771
 
 
772
  amigaos*)
 
773
    # On AmigaOS with pdksh, this test takes hours, literally.
 
774
    # So we just punt and use a minimum line length of 8192.
 
775
    lt_cv_sys_max_cmd_len=8192;
 
776
    ;;
 
777
 
 
778
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
 
779
    # This has been around since 386BSD, at least.  Likely further.
 
780
    if test -x /sbin/sysctl; then
 
781
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
 
782
    elif test -x /usr/sbin/sysctl; then
 
783
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
 
784
    else
 
785
      lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
 
786
    fi
 
787
    # And add a safety zone
 
788
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
 
789
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
 
790
    ;;
 
791
  osf*)
 
792
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
 
793
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
 
794
    # nice to cause kernel panics so lets avoid the loop below.
 
795
    # First set a reasonable default.
 
796
    lt_cv_sys_max_cmd_len=16384
 
797
    # 
 
798
    if test -x /sbin/sysconfig; then
 
799
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
 
800
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
 
801
      esac
 
802
    fi
 
803
    ;;
 
804
  *)
 
805
    # If test is not a shell built-in, we'll probably end up computing a
 
806
    # maximum length that is only half of the actual maximum length, but
 
807
    # we can't tell.
 
808
    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
 
809
    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
 
810
               = "XX$teststring") >/dev/null 2>&1 &&
 
811
            new_result=`expr "X$teststring" : ".*" 2>&1` &&
 
812
            lt_cv_sys_max_cmd_len=$new_result &&
 
813
            test $i != 17 # 1/2 MB should be enough
 
814
    do
 
815
      i=`expr $i + 1`
 
816
      teststring=$teststring$teststring
 
817
    done
 
818
    teststring=
 
819
    # Add a significant safety factor because C++ compilers can tack on massive
 
820
    # amounts of additional arguments before passing them to the linker.
 
821
    # It appears as though 1/2 is a usable value.
 
822
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
 
823
    ;;
 
824
  esac
 
825
])
 
826
if test -n $lt_cv_sys_max_cmd_len ; then
 
827
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 
828
else
 
829
  AC_MSG_RESULT(none)
 
830
fi
 
831
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
832
 
 
833
 
 
834
# _LT_AC_CHECK_DLFCN
 
835
# --------------------
 
836
AC_DEFUN([_LT_AC_CHECK_DLFCN],
 
837
[AC_CHECK_HEADERS(dlfcn.h)dnl
 
838
])# _LT_AC_CHECK_DLFCN
 
839
 
 
840
 
 
841
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
 
842
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
 
843
# ------------------------------------------------------------------
 
844
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
 
845
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
846
if test "$cross_compiling" = yes; then :
 
847
  [$4]
 
848
else
 
849
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
850
  lt_status=$lt_dlunknown
 
851
  cat > conftest.$ac_ext <<EOF
 
852
[#line __oline__ "configure"
 
853
#include "confdefs.h"
 
854
 
 
855
#if HAVE_DLFCN_H
 
856
#include <dlfcn.h>
 
857
#endif
 
858
 
 
859
#include <stdio.h>
 
860
 
 
861
#ifdef RTLD_GLOBAL
 
862
#  define LT_DLGLOBAL           RTLD_GLOBAL
 
863
#else
 
864
#  ifdef DL_GLOBAL
 
865
#    define LT_DLGLOBAL         DL_GLOBAL
 
866
#  else
 
867
#    define LT_DLGLOBAL         0
 
868
#  endif
 
869
#endif
 
870
 
 
871
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
 
872
   find out it does not work in some platform. */
 
873
#ifndef LT_DLLAZY_OR_NOW
 
874
#  ifdef RTLD_LAZY
 
875
#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
 
876
#  else
 
877
#    ifdef DL_LAZY
 
878
#      define LT_DLLAZY_OR_NOW          DL_LAZY
 
879
#    else
 
880
#      ifdef RTLD_NOW
 
881
#        define LT_DLLAZY_OR_NOW        RTLD_NOW
 
882
#      else
 
883
#        ifdef DL_NOW
 
884
#          define LT_DLLAZY_OR_NOW      DL_NOW
 
885
#        else
 
886
#          define LT_DLLAZY_OR_NOW      0
 
887
#        endif
 
888
#      endif
 
889
#    endif
 
890
#  endif
 
891
#endif
 
892
 
 
893
#ifdef __cplusplus
 
894
extern "C" void exit (int);
 
895
#endif
 
896
 
 
897
void fnord() { int i=42;}
 
898
int main ()
 
899
{
 
900
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
 
901
  int status = $lt_dlunknown;
 
902
 
 
903
  if (self)
 
904
    {
 
905
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
 
906
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
 
907
      /* dlclose (self); */
 
908
    }
 
909
 
 
910
    exit (status);
 
911
}]
 
912
EOF
 
913
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
 
914
    (./conftest; exit; ) 2>/dev/null
 
915
    lt_status=$?
 
916
    case x$lt_status in
 
917
      x$lt_dlno_uscore) $1 ;;
 
918
      x$lt_dlneed_uscore) $2 ;;
 
919
      x$lt_unknown|x*) $3 ;;
 
920
    esac
 
921
  else :
 
922
    # compilation failed
 
923
    $3
 
924
  fi
 
925
fi
 
926
rm -fr conftest*
 
927
])# _LT_AC_TRY_DLOPEN_SELF
 
928
 
 
929
 
 
930
# AC_LIBTOOL_DLOPEN_SELF
 
931
# -------------------
 
932
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
 
933
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
934
if test "x$enable_dlopen" != xyes; then
 
935
  enable_dlopen=unknown
 
936
  enable_dlopen_self=unknown
 
937
  enable_dlopen_self_static=unknown
 
938
else
 
939
  lt_cv_dlopen=no
 
940
  lt_cv_dlopen_libs=
 
941
 
 
942
  case $host_os in
 
943
  beos*)
 
944
    lt_cv_dlopen="load_add_on"
 
945
    lt_cv_dlopen_libs=
 
946
    lt_cv_dlopen_self=yes
 
947
    ;;
 
948
 
 
949
  mingw* | pw32*)
 
950
    lt_cv_dlopen="LoadLibrary"
 
951
    lt_cv_dlopen_libs=
 
952
   ;;
 
953
 
 
954
  cygwin*)
 
955
    lt_cv_dlopen="dlopen"
 
956
    lt_cv_dlopen_libs=
 
957
   ;;
 
958
 
 
959
  darwin*)
 
960
  # if libdl is installed we need to link against it
 
961
    AC_CHECK_LIB([dl], [dlopen],
 
962
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
 
963
    lt_cv_dlopen="dyld"
 
964
    lt_cv_dlopen_libs=
 
965
    lt_cv_dlopen_self=yes
 
966
    ])
 
967
   ;;
 
968
 
 
969
  *)
 
970
    AC_CHECK_FUNC([shl_load],
 
971
          [lt_cv_dlopen="shl_load"],
 
972
      [AC_CHECK_LIB([dld], [shl_load],
 
973
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
 
974
        [AC_CHECK_FUNC([dlopen],
 
975
              [lt_cv_dlopen="dlopen"],
 
976
          [AC_CHECK_LIB([dl], [dlopen],
 
977
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
 
978
            [AC_CHECK_LIB([svld], [dlopen],
 
979
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 
980
              [AC_CHECK_LIB([dld], [dld_link],
 
981
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
 
982
              ])
 
983
            ])
 
984
          ])
 
985
        ])
 
986
      ])
 
987
    ;;
 
988
  esac
 
989
 
 
990
  if test "x$lt_cv_dlopen" != xno; then
 
991
    enable_dlopen=yes
 
992
  else
 
993
    enable_dlopen=no
 
994
  fi
 
995
 
 
996
  case $lt_cv_dlopen in
 
997
  dlopen)
 
998
    save_CPPFLAGS="$CPPFLAGS"
 
999
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
1000
 
 
1001
    save_LDFLAGS="$LDFLAGS"
 
1002
    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
1003
 
 
1004
    save_LIBS="$LIBS"
 
1005
    LIBS="$lt_cv_dlopen_libs $LIBS"
 
1006
 
 
1007
    AC_CACHE_CHECK([whether a program can dlopen itself],
 
1008
          lt_cv_dlopen_self, [dnl
 
1009
          _LT_AC_TRY_DLOPEN_SELF(
 
1010
            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
 
1011
            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
 
1012
    ])
 
1013
 
 
1014
    if test "x$lt_cv_dlopen_self" = xyes; then
 
1015
      LDFLAGS="$LDFLAGS $link_static_flag"
 
1016
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
 
1017
          lt_cv_dlopen_self_static, [dnl
 
1018
          _LT_AC_TRY_DLOPEN_SELF(
 
1019
            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
 
1020
            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
 
1021
      ])
 
1022
    fi
 
1023
 
 
1024
    CPPFLAGS="$save_CPPFLAGS"
 
1025
    LDFLAGS="$save_LDFLAGS"
 
1026
    LIBS="$save_LIBS"
 
1027
    ;;
 
1028
  esac
 
1029
 
 
1030
  case $lt_cv_dlopen_self in
 
1031
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
 
1032
  *) enable_dlopen_self=unknown ;;
 
1033
  esac
 
1034
 
 
1035
  case $lt_cv_dlopen_self_static in
 
1036
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
 
1037
  *) enable_dlopen_self_static=unknown ;;
 
1038
  esac
 
1039
fi
 
1040
])# AC_LIBTOOL_DLOPEN_SELF
 
1041
 
 
1042
 
 
1043
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
 
1044
# ---------------------------------
 
1045
# Check to see if options -c and -o are simultaneously supported by compiler
 
1046
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
 
1047
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
1048
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
 
1049
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
 
1050
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
 
1051
   $rm -r conftest 2>/dev/null
 
1052
   mkdir conftest
 
1053
   cd conftest
 
1054
   mkdir out
 
1055
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
1056
 
 
1057
   lt_compiler_flag="-o out/conftest2.$ac_objext"
 
1058
   # Insert the option either (1) after the last *FLAGS variable, or
 
1059
   # (2) before a word containing "conftest.", or (3) at the end.
 
1060
   # Note that $ac_compile itself does not contain backslashes and begins
 
1061
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
1062
   lt_compile=`echo "$ac_compile" | $SED \
 
1063
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
 
1064
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
1065
   -e 's:$: $lt_compiler_flag:'`
 
1066
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
1067
   (eval "$lt_compile" 2>out/conftest.err)
 
1068
   ac_status=$?
 
1069
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
 
1070
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
1071
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
 
1072
   then
 
1073
     # The compiler can only warn and ignore the option if not recognized
 
1074
     # So say no if there are warnings
 
1075
     $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
 
1076
     $SED '/^$/d' out/conftest.err >out/conftest.er2
 
1077
     if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
 
1078
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
1079
     fi
 
1080
   fi
 
1081
   chmod u+w .
 
1082
   $rm conftest*
 
1083
   # SGI C++ compiler will create directory out/ii_files/ for
 
1084
   # template instantiation
 
1085
   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
 
1086
   $rm out/* && rmdir out
 
1087
   cd ..
 
1088
   rmdir conftest
 
1089
   $rm conftest*
 
1090
])
 
1091
])# AC_LIBTOOL_PROG_CC_C_O
 
1092
 
 
1093
 
 
1094
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
 
1095
# -----------------------------------------
 
1096
# Check to see if we can do hard links to lock some files if needed
 
1097
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
 
1098
[AC_REQUIRE([_LT_AC_LOCK])dnl
 
1099
 
 
1100
hard_links="nottested"
 
1101
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
 
1102
  # do not overwrite the value of need_locks provided by the user
 
1103
  AC_MSG_CHECKING([if we can lock with hard links])
 
1104
  hard_links=yes
 
1105
  $rm conftest*
 
1106
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
1107
  touch conftest.a
 
1108
  ln conftest.a conftest.b 2>&5 || hard_links=no
 
1109
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
1110
  AC_MSG_RESULT([$hard_links])
 
1111
  if test "$hard_links" = no; then
 
1112
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
 
1113
    need_locks=warn
 
1114
  fi
 
1115
else
 
1116
  need_locks=no
 
1117
fi
 
1118
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
 
1119
 
 
1120
 
 
1121
# AC_LIBTOOL_OBJDIR
 
1122
# -----------------
 
1123
AC_DEFUN([AC_LIBTOOL_OBJDIR],
 
1124
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
 
1125
[rm -f .libs 2>/dev/null
 
1126
mkdir .libs 2>/dev/null
 
1127
if test -d .libs; then
 
1128
  lt_cv_objdir=.libs
 
1129
else
 
1130
  # MS-DOS does not allow filenames that begin with a dot.
 
1131
  lt_cv_objdir=_libs
 
1132
fi
 
1133
rmdir .libs 2>/dev/null])
 
1134
objdir=$lt_cv_objdir
 
1135
])# AC_LIBTOOL_OBJDIR
 
1136
 
 
1137
 
 
1138
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
 
1139
# ----------------------------------------------
 
1140
# Check hardcoding attributes.
 
1141
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
 
1142
[AC_MSG_CHECKING([how to hardcode library paths into programs])
 
1143
_LT_AC_TAGVAR(hardcode_action, $1)=
 
1144
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
 
1145
   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
 
1146
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
 
1147
 
 
1148
  # We can hardcode non-existant directories.
 
1149
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
 
1150
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
 
1151
     # have to relink, otherwise we might link with an installed library
 
1152
     # when we should be linking with a yet-to-be-installed one
 
1153
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
 
1154
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
 
1155
    # Linking always hardcodes the temporary library directory.
 
1156
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
 
1157
  else
 
1158
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
 
1159
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
 
1160
  fi
 
1161
else
 
1162
  # We cannot hardcode anything, or else we can only hardcode existing
 
1163
  # directories.
 
1164
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
 
1165
fi
 
1166
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
 
1167
 
 
1168
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
 
1169
  # Fast installation is not supported
 
1170
  enable_fast_install=no
 
1171
elif test "$shlibpath_overrides_runpath" = yes ||
 
1172
     test "$enable_shared" = no; then
 
1173
  # Fast installation is not necessary
 
1174
  enable_fast_install=needless
 
1175
fi
 
1176
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
 
1177
 
 
1178
 
 
1179
# AC_LIBTOOL_SYS_LIB_STRIP
 
1180
# ------------------------
 
1181
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
 
1182
[striplib=
 
1183
old_striplib=
 
1184
AC_MSG_CHECKING([whether stripping libraries is possible])
 
1185
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
 
1186
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
 
1187
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
 
1188
  AC_MSG_RESULT([yes])
 
1189
else
 
1190
# FIXME - insert some real tests, host_os isn't really good enough
 
1191
  case $host_os in
 
1192
   darwin*)
 
1193
       if test -n "$STRIP" ; then
 
1194
         striplib="$STRIP -x"
 
1195
         AC_MSG_RESULT([yes])
 
1196
       else
 
1197
  AC_MSG_RESULT([no])
 
1198
fi
 
1199
       ;;
 
1200
   *)
 
1201
  AC_MSG_RESULT([no])
 
1202
    ;;
 
1203
  esac
 
1204
fi
 
1205
])# AC_LIBTOOL_SYS_LIB_STRIP
 
1206
 
 
1207
 
 
1208
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
1209
# -----------------------------
 
1210
# PORTME Fill in your ld.so characteristics
 
1211
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
 
1212
[AC_MSG_CHECKING([dynamic linker characteristics])
 
1213
library_names_spec=
 
1214
libname_spec='lib$name'
 
1215
soname_spec=
 
1216
shrext_cmds=".so"
 
1217
postinstall_cmds=
 
1218
postuninstall_cmds=
 
1219
finish_cmds=
 
1220
finish_eval=
 
1221
shlibpath_var=
 
1222
shlibpath_overrides_runpath=unknown
 
1223
version_type=none
 
1224
dynamic_linker="$host_os ld.so"
 
1225
sys_lib_dlsearch_path_spec="/lib /usr/lib"
 
1226
if test "$GCC" = yes; then
 
1227
  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
1228
  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
 
1229
    # if the path contains ";" then we assume it to be the separator
 
1230
    # otherwise default to the standard path separator (i.e. ":") - it is
 
1231
    # assumed that no part of a normal pathname contains ";" but that should
 
1232
    # okay in the real world where ";" in dirpaths is itself problematic.
 
1233
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
1234
  else
 
1235
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
1236
  fi
 
1237
else
 
1238
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 
1239
fi
 
1240
need_lib_prefix=unknown
 
1241
hardcode_into_libs=no
 
1242
 
 
1243
# when you set need_version to no, make sure it does not cause -set_version
 
1244
# flags to be left without arguments
 
1245
need_version=unknown
 
1246
 
 
1247
case $host_os in
 
1248
aix3*)
 
1249
  version_type=linux
 
1250
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
 
1251
  shlibpath_var=LIBPATH
 
1252
 
 
1253
  # AIX 3 has no versioning support, so we append a major version to the name.
 
1254
  soname_spec='${libname}${release}${shared_ext}$major'
 
1255
  ;;
 
1256
 
 
1257
aix4* | aix5*)
 
1258
  version_type=linux
 
1259
  need_lib_prefix=no
 
1260
  need_version=no
 
1261
  hardcode_into_libs=yes
 
1262
  if test "$host_cpu" = ia64; then
 
1263
    # AIX 5 supports IA64
 
1264
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
 
1265
    shlibpath_var=LD_LIBRARY_PATH
 
1266
  else
 
1267
    # With GCC up to 2.95.x, collect2 would create an import file
 
1268
    # for dependence libraries.  The import file would start with
 
1269
    # the line `#! .'.  This would cause the generated library to
 
1270
    # depend on `.', always an invalid library.  This was fixed in
 
1271
    # development snapshots of GCC prior to 3.0.
 
1272
    case $host_os in
 
1273
      aix4 | aix4.[[01]] | aix4.[[01]].*)
 
1274
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 
1275
           echo ' yes '
 
1276
           echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
 
1277
        :
 
1278
      else
 
1279
        can_build_shared=no
 
1280
      fi
 
1281
      ;;
 
1282
    esac
 
1283
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
 
1284
    # soname into executable. Probably we can add versioning support to
 
1285
    # collect2, so additional links can be useful in future.
 
1286
    if test "$aix_use_runtimelinking" = yes; then
 
1287
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
 
1288
      # instead of lib<name>.a to let people know that these are not
 
1289
      # typical AIX shared libraries.
 
1290
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1291
    else
 
1292
      # We preserve .a as extension for shared libraries through AIX4.2
 
1293
      # and later when we are not doing run time linking.
 
1294
      library_names_spec='${libname}${release}.a $libname.a'
 
1295
      soname_spec='${libname}${release}${shared_ext}$major'
 
1296
    fi
 
1297
    shlibpath_var=LIBPATH
 
1298
  fi
 
1299
  ;;
 
1300
 
 
1301
amigaos*)
 
1302
  library_names_spec='$libname.ixlibrary $libname.a'
 
1303
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
 
1304
  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'
 
1305
  ;;
 
1306
 
 
1307
beos*)
 
1308
  library_names_spec='${libname}${shared_ext}'
 
1309
  dynamic_linker="$host_os ld.so"
 
1310
  shlibpath_var=LIBRARY_PATH
 
1311
  ;;
 
1312
 
 
1313
bsdi[[45]]*)
 
1314
  version_type=linux
 
1315
  need_version=no
 
1316
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1317
  soname_spec='${libname}${release}${shared_ext}$major'
 
1318
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
 
1319
  shlibpath_var=LD_LIBRARY_PATH
 
1320
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
 
1321
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
 
1322
  # the default ld.so.conf also contains /usr/contrib/lib and
 
1323
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
 
1324
  # libtool to hard-code these into programs
 
1325
  ;;
 
1326
 
 
1327
cygwin* | mingw* | pw32*)
 
1328
  version_type=windows
 
1329
  shrext_cmds=".dll"
 
1330
  need_version=no
 
1331
  need_lib_prefix=no
 
1332
 
 
1333
  case $GCC,$host_os in
 
1334
  yes,cygwin* | yes,mingw* | yes,pw32*)
 
1335
    library_names_spec='$libname.dll.a'
 
1336
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
 
1337
    postinstall_cmds='base_file=`basename \${file}`~
 
1338
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
 
1339
      dldir=$destdir/`dirname \$dlpath`~
 
1340
      test -d \$dldir || mkdir -p \$dldir~
 
1341
      $install_prog $dir/$dlname \$dldir/$dlname'
 
1342
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
1343
      dlpath=$dir/\$dldll~
 
1344
       $rm \$dlpath'
 
1345
    shlibpath_overrides_runpath=yes
 
1346
 
 
1347
    case $host_os in
 
1348
    cygwin*)
 
1349
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
 
1350
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
1351
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
 
1352
      ;;
 
1353
    mingw*)
 
1354
      # MinGW DLLs use traditional 'lib' prefix
 
1355
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
1356
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
1357
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
 
1358
        # It is most probably a Windows format PATH printed by
 
1359
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
 
1360
        # path with ; separators, and with drive letters. We can handle the
 
1361
        # drive letters (cygwin fileutils understands them), so leave them,
 
1362
        # especially as we might pass files found there to a mingw objdump,
 
1363
        # which wouldn't understand a cygwinified path. Ahh.
 
1364
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
1365
      else
 
1366
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
1367
      fi
 
1368
      ;;
 
1369
    pw32*)
 
1370
      # pw32 DLLs use 'pw' prefix rather than 'lib'
 
1371
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
1372
      ;;
 
1373
    esac
 
1374
    ;;
 
1375
 
 
1376
  linux*)
 
1377
    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
 
1378
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
1379
      supports_anon_versioning=no
 
1380
      case `$LD -v 2>/dev/null` in
 
1381
        *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
 
1382
        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
 
1383
        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
 
1384
        *\ 2.11.*) ;; # other 2.11 versions
 
1385
        *) supports_anon_versioning=yes ;;
 
1386
      esac
 
1387
      if test $supports_anon_versioning = yes; then
 
1388
        archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
 
1389
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
1390
$echo "local: *; };" >> $output_objdir/$libname.ver~
 
1391
        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 
1392
      else
 
1393
        $archive_expsym_cmds="$archive_cmds"
 
1394
      fi
 
1395
    else
 
1396
      ld_shlibs=no
 
1397
    fi
 
1398
    ;;
 
1399
 
 
1400
  *)
 
1401
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
 
1402
    ;;
 
1403
  esac
 
1404
  dynamic_linker='Win32 ld.exe'
 
1405
  # FIXME: first we should search . and the directory the executable is in
 
1406
  shlibpath_var=PATH
 
1407
  ;;
 
1408
 
 
1409
darwin* | rhapsody*)
 
1410
  dynamic_linker="$host_os dyld"
 
1411
  version_type=darwin
 
1412
  need_lib_prefix=no
 
1413
  need_version=no
 
1414
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
 
1415
  soname_spec='${libname}${release}${major}$shared_ext'
 
1416
  shlibpath_overrides_runpath=yes
 
1417
  shlibpath_var=DYLD_LIBRARY_PATH
 
1418
  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
 
1419
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
 
1420
  if test "$GCC" = yes; then
 
1421
    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
 
1422
  else
 
1423
    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
 
1424
  fi
 
1425
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
 
1426
  ;;
 
1427
 
 
1428
dgux*)
 
1429
  version_type=linux
 
1430
  need_lib_prefix=no
 
1431
  need_version=no
 
1432
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
 
1433
  soname_spec='${libname}${release}${shared_ext}$major'
 
1434
  shlibpath_var=LD_LIBRARY_PATH
 
1435
  ;;
 
1436
 
 
1437
freebsd1*)
 
1438
  dynamic_linker=no
 
1439
  ;;
 
1440
 
 
1441
kfreebsd*-gnu)
 
1442
  version_type=linux
 
1443
  need_lib_prefix=no
 
1444
  need_version=no
 
1445
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
1446
  soname_spec='${libname}${release}${shared_ext}$major'
 
1447
  shlibpath_var=LD_LIBRARY_PATH
 
1448
  shlibpath_overrides_runpath=no
 
1449
  hardcode_into_libs=yes
 
1450
  dynamic_linker='GNU ld.so'
 
1451
  ;;
 
1452
 
 
1453
freebsd* | dragonfly*)
 
1454
  # DragonFly does not have aout.  When/if they implement a new
 
1455
  # versioning mechanism, adjust this.
 
1456
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 
1457
  version_type=freebsd-$objformat
 
1458
  case $version_type in
 
1459
    freebsd-elf*)
 
1460
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
1461
      need_version=no
 
1462
      need_lib_prefix=no
 
1463
      ;;
 
1464
    freebsd-*)
 
1465
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
 
1466
      need_version=yes
 
1467
      ;;
 
1468
  esac
 
1469
  shlibpath_var=LD_LIBRARY_PATH
 
1470
  case $host_os in
 
1471
  freebsd2*)
 
1472
    shlibpath_overrides_runpath=yes
 
1473
    ;;
 
1474
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
 
1475
    shlibpath_overrides_runpath=yes
 
1476
    hardcode_into_libs=yes
 
1477
    ;;
 
1478
  *) # from 3.2 on
 
1479
    shlibpath_overrides_runpath=no
 
1480
    hardcode_into_libs=yes
 
1481
    ;;
 
1482
  esac
 
1483
  ;;
 
1484
 
 
1485
gnu*)
 
1486
  version_type=linux
 
1487
  need_lib_prefix=no
 
1488
  need_version=no
 
1489
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
1490
  soname_spec='${libname}${release}${shared_ext}$major'
 
1491
  shlibpath_var=LD_LIBRARY_PATH
 
1492
  hardcode_into_libs=yes
 
1493
  ;;
 
1494
 
 
1495
hpux9* | hpux10* | hpux11*)
 
1496
  # Give a soname corresponding to the major version so that dld.sl refuses to
 
1497
  # link against other versions.
 
1498
  version_type=sunos
 
1499
  need_lib_prefix=no
 
1500
  need_version=no
 
1501
  case "$host_cpu" in
 
1502
  ia64*)
 
1503
    shrext_cmds='.so'
 
1504
    hardcode_into_libs=yes
 
1505
    dynamic_linker="$host_os dld.so"
 
1506
    shlibpath_var=LD_LIBRARY_PATH
 
1507
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
1508
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1509
    soname_spec='${libname}${release}${shared_ext}$major'
 
1510
    if test "X$HPUX_IA64_MODE" = X32; then
 
1511
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
 
1512
    else
 
1513
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
 
1514
    fi
 
1515
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
1516
    ;;
 
1517
   hppa*64*)
 
1518
     shrext_cmds='.sl'
 
1519
     hardcode_into_libs=yes
 
1520
     dynamic_linker="$host_os dld.sl"
 
1521
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
 
1522
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
1523
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1524
     soname_spec='${libname}${release}${shared_ext}$major'
 
1525
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
 
1526
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
1527
     ;;
 
1528
   *)
 
1529
    shrext_cmds='.sl'
 
1530
    dynamic_linker="$host_os dld.sl"
 
1531
    shlibpath_var=SHLIB_PATH
 
1532
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 
1533
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1534
    soname_spec='${libname}${release}${shared_ext}$major'
 
1535
    ;;
 
1536
  esac
 
1537
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
 
1538
  postinstall_cmds='chmod 555 $lib'
 
1539
  ;;
 
1540
 
 
1541
irix5* | irix6* | nonstopux*)
 
1542
  case $host_os in
 
1543
    nonstopux*) version_type=nonstopux ;;
 
1544
    *)
 
1545
        if test "$lt_cv_prog_gnu_ld" = yes; then
 
1546
                version_type=linux
 
1547
        else
 
1548
                version_type=irix
 
1549
        fi ;;
 
1550
  esac
 
1551
  need_lib_prefix=no
 
1552
  need_version=no
 
1553
  soname_spec='${libname}${release}${shared_ext}$major'
 
1554
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
 
1555
  case $host_os in
 
1556
  irix5* | nonstopux*)
 
1557
    libsuff= shlibsuff=
 
1558
    ;;
 
1559
  *)
 
1560
    case $LD in # libtool.m4 will add one of these switches to LD
 
1561
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
 
1562
      libsuff= shlibsuff= libmagic=32-bit;;
 
1563
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
 
1564
      libsuff=32 shlibsuff=N32 libmagic=N32;;
 
1565
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
 
1566
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
 
1567
    *) libsuff= shlibsuff= libmagic=never-match;;
 
1568
    esac
 
1569
    ;;
 
1570
  esac
 
1571
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
 
1572
  shlibpath_overrides_runpath=no
 
1573
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 
1574
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
1575
  hardcode_into_libs=yes
 
1576
  ;;
 
1577
 
 
1578
# No shared lib support for Linux oldld, aout, or coff.
 
1579
linux*oldld* | linux*aout* | linux*coff*)
 
1580
  dynamic_linker=no
 
1581
  ;;
 
1582
 
 
1583
# This must be Linux ELF.
 
1584
linux*)
 
1585
  version_type=linux
 
1586
  need_lib_prefix=no
 
1587
  need_version=no
 
1588
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1589
  soname_spec='${libname}${release}${shared_ext}$major'
 
1590
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 
1591
  shlibpath_var=LD_LIBRARY_PATH
 
1592
  shlibpath_overrides_runpath=no
 
1593
  # This implies no fast_install, which is unacceptable.
 
1594
  # Some rework will be needed to allow for fast_install
 
1595
  # before this can be enabled.
 
1596
  hardcode_into_libs=yes
 
1597
 
 
1598
  # Append ld.so.conf contents to the search path
 
1599
  if test -f /etc/ld.so.conf; then
 
1600
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,    ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
 
1601
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
 
1602
  fi
 
1603
 
 
1604
  case $host_cpu:$lt_cv_cc_64bit_output in
 
1605
  powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
 
1606
    sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64"
 
1607
    sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64 /usr/X11R6/lib64"
 
1608
    ;;
 
1609
  esac
 
1610
 
 
1611
  # We used to test for /lib/ld.so.1 and disable shared libraries on
 
1612
  # powerpc, because MkLinux only supported shared libraries with the
 
1613
  # GNU dynamic linker.  Since this was broken with cross compilers,
 
1614
  # most powerpc-linux boxes support dynamic linking these days and
 
1615
  # people can always --disable-shared, the test was removed, and we
 
1616
  # assume the GNU/Linux dynamic linker is in use.
 
1617
  dynamic_linker='GNU/Linux ld.so'
 
1618
 
 
1619
  # Find out which ABI we are using (multilib Linux x86_64 hack).
 
1620
  libsuff=
 
1621
  case "$host_cpu" in
 
1622
  x86_64*)
 
1623
    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
 
1624
    if AC_TRY_EVAL(ac_compile); then
 
1625
      case `/usr/bin/file conftest.$ac_objext` in
 
1626
      *64-bit*)
 
1627
        libsuff=64
 
1628
        ;;
 
1629
      esac
 
1630
    fi
 
1631
    rm -rf conftest*
 
1632
    ;;
 
1633
  *)
 
1634
    ;;
 
1635
  esac
 
1636
  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
 
1637
  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
 
1638
  ;;
 
1639
 
 
1640
knetbsd*-gnu)
 
1641
  version_type=linux
 
1642
  need_lib_prefix=no
 
1643
  need_version=no
 
1644
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
1645
  soname_spec='${libname}${release}${shared_ext}$major'
 
1646
  shlibpath_var=LD_LIBRARY_PATH
 
1647
  shlibpath_overrides_runpath=no
 
1648
  hardcode_into_libs=yes
 
1649
  dynamic_linker='GNU ld.so'
 
1650
  ;;
 
1651
 
 
1652
netbsd*)
 
1653
  version_type=sunos
 
1654
  need_lib_prefix=no
 
1655
  need_version=no
 
1656
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
1657
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
1658
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
1659
    dynamic_linker='NetBSD (a.out) ld.so'
 
1660
  else
 
1661
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
1662
    soname_spec='${libname}${release}${shared_ext}$major'
 
1663
    dynamic_linker='NetBSD ld.elf_so'
 
1664
  fi
 
1665
  shlibpath_var=LD_LIBRARY_PATH
 
1666
  shlibpath_overrides_runpath=yes
 
1667
  hardcode_into_libs=yes
 
1668
  ;;
 
1669
 
 
1670
newsos6)
 
1671
  version_type=linux
 
1672
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1673
  shlibpath_var=LD_LIBRARY_PATH
 
1674
  shlibpath_overrides_runpath=yes
 
1675
  ;;
 
1676
 
 
1677
nto-qnx*)
 
1678
  version_type=linux
 
1679
  need_lib_prefix=no
 
1680
  need_version=no
 
1681
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1682
  soname_spec='${libname}${release}${shared_ext}$major'
 
1683
  shlibpath_var=LD_LIBRARY_PATH
 
1684
  shlibpath_overrides_runpath=yes
 
1685
  ;;
 
1686
 
 
1687
openbsd*)
 
1688
  version_type=sunos
 
1689
  need_lib_prefix=no
 
1690
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
 
1691
  case $host_os in
 
1692
    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
 
1693
    *)                         need_version=no  ;;
 
1694
  esac
 
1695
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
1696
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
1697
  shlibpath_var=LD_LIBRARY_PATH
 
1698
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
1699
    case $host_os in
 
1700
      openbsd2.[[89]] | openbsd2.[[89]].*)
 
1701
        shlibpath_overrides_runpath=no
 
1702
        ;;
 
1703
      *)
 
1704
        shlibpath_overrides_runpath=yes
 
1705
        ;;
 
1706
      esac
 
1707
  else
 
1708
    shlibpath_overrides_runpath=yes
 
1709
  fi
 
1710
  ;;
 
1711
 
 
1712
os2*)
 
1713
  libname_spec='$name'
 
1714
  shrext_cmds=".dll"
 
1715
  need_lib_prefix=no
 
1716
  library_names_spec='$libname${shared_ext} $libname.a'
 
1717
  dynamic_linker='OS/2 ld.exe'
 
1718
  shlibpath_var=LIBPATH
 
1719
  ;;
 
1720
 
 
1721
osf3* | osf4* | osf5*)
 
1722
  version_type=osf
 
1723
  need_lib_prefix=no
 
1724
  need_version=no
 
1725
  soname_spec='${libname}${release}${shared_ext}$major'
 
1726
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1727
  shlibpath_var=LD_LIBRARY_PATH
 
1728
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
 
1729
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
 
1730
  ;;
 
1731
 
 
1732
sco3.2v5*)
 
1733
  version_type=osf
 
1734
  soname_spec='${libname}${release}${shared_ext}$major'
 
1735
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1736
  shlibpath_var=LD_LIBRARY_PATH
 
1737
  ;;
 
1738
 
 
1739
solaris*)
 
1740
  version_type=linux
 
1741
  need_lib_prefix=no
 
1742
  need_version=no
 
1743
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1744
  soname_spec='${libname}${release}${shared_ext}$major'
 
1745
  shlibpath_var=LD_LIBRARY_PATH
 
1746
  shlibpath_overrides_runpath=yes
 
1747
  hardcode_into_libs=yes
 
1748
  # ldd complains unless libraries are executable
 
1749
  postinstall_cmds='chmod +x $lib'
 
1750
  ;;
 
1751
 
 
1752
sunos4*)
 
1753
  version_type=sunos
 
1754
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
1755
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
 
1756
  shlibpath_var=LD_LIBRARY_PATH
 
1757
  shlibpath_overrides_runpath=yes
 
1758
  if test "$with_gnu_ld" = yes; then
 
1759
    need_lib_prefix=no
 
1760
  fi
 
1761
  need_version=yes
 
1762
  ;;
 
1763
 
 
1764
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
1765
  version_type=linux
 
1766
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1767
  soname_spec='${libname}${release}${shared_ext}$major'
 
1768
  shlibpath_var=LD_LIBRARY_PATH
 
1769
  case $host_vendor in
 
1770
    sni)
 
1771
      shlibpath_overrides_runpath=no
 
1772
      need_lib_prefix=no
 
1773
      export_dynamic_flag_spec='${wl}-Blargedynsym'
 
1774
      runpath_var=LD_RUN_PATH
 
1775
      ;;
 
1776
    siemens)
 
1777
      need_lib_prefix=no
 
1778
      ;;
 
1779
    motorola)
 
1780
      need_lib_prefix=no
 
1781
      need_version=no
 
1782
      shlibpath_overrides_runpath=no
 
1783
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
 
1784
      ;;
 
1785
  esac
 
1786
  ;;
 
1787
 
 
1788
sysv4*MP*)
 
1789
  if test -d /usr/nec ;then
 
1790
    version_type=linux
 
1791
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
 
1792
    soname_spec='$libname${shared_ext}.$major'
 
1793
    shlibpath_var=LD_LIBRARY_PATH
 
1794
  fi
 
1795
  ;;
 
1796
 
 
1797
uts4*)
 
1798
  version_type=linux
 
1799
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1800
  soname_spec='${libname}${release}${shared_ext}$major'
 
1801
  shlibpath_var=LD_LIBRARY_PATH
 
1802
  ;;
 
1803
 
 
1804
*)
 
1805
  dynamic_linker=no
 
1806
  ;;
 
1807
esac
 
1808
AC_MSG_RESULT([$dynamic_linker])
 
1809
test "$dynamic_linker" = no && can_build_shared=no
 
1810
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
1811
 
 
1812
 
 
1813
# _LT_AC_TAGCONFIG
 
1814
# ----------------
 
1815
AC_DEFUN([_LT_AC_TAGCONFIG],
 
1816
[AC_ARG_WITH([tags],
 
1817
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
 
1818
        [include additional configurations @<:@automatic@:>@])],
 
1819
    [tagnames="$withval"])
 
1820
 
 
1821
if test -f "$ltmain" && test -n "$tagnames"; then
 
1822
  if test ! -f "${ofile}"; then
 
1823
    AC_MSG_WARN([output file `$ofile' does not exist])
 
1824
  fi
 
1825
 
 
1826
  if test -z "$LTCC"; then
 
1827
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
 
1828
    if test -z "$LTCC"; then
 
1829
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
 
1830
    else
 
1831
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
 
1832
    fi
 
1833
  fi
 
1834
 
 
1835
  # Extract list of available tagged configurations in $ofile.
 
1836
  # Note that this assumes the entire list is on one line.
 
1837
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
 
1838
 
 
1839
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
1840
  for tagname in $tagnames; do
 
1841
    IFS="$lt_save_ifs"
 
1842
    # Check whether tagname contains only valid characters
 
1843
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
 
1844
    "") ;;
 
1845
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
 
1846
        ;;
 
1847
    esac
 
1848
 
 
1849
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
 
1850
    then
 
1851
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
 
1852
    fi
 
1853
 
 
1854
    # Update the list of available tags.
 
1855
    if test -n "$tagname"; then
 
1856
      echo appending configuration tag \"$tagname\" to $ofile
 
1857
 
 
1858
      case $tagname in
 
1859
      CXX)
 
1860
        if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
 
1861
            ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
 
1862
            (test "X$CXX" != "Xg++"))) ; then
 
1863
          AC_LIBTOOL_LANG_CXX_CONFIG
 
1864
        else
 
1865
          tagname=""
 
1866
        fi
 
1867
        ;;
 
1868
 
 
1869
      F77)
 
1870
        if test -n "$F77" && test "X$F77" != "Xno"; then
 
1871
          AC_LIBTOOL_LANG_F77_CONFIG
 
1872
        else
 
1873
          tagname=""
 
1874
        fi
 
1875
        ;;
 
1876
 
 
1877
      GCJ)
 
1878
        if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
 
1879
          AC_LIBTOOL_LANG_GCJ_CONFIG
 
1880
        else
 
1881
          tagname=""
 
1882
        fi
 
1883
        ;;
 
1884
 
 
1885
      RC)
 
1886
        AC_LIBTOOL_LANG_RC_CONFIG
 
1887
        ;;
 
1888
 
 
1889
      *)
 
1890
        AC_MSG_ERROR([Unsupported tag name: $tagname])
 
1891
        ;;
 
1892
      esac
 
1893
 
 
1894
      # Append the new tag name to the list of available tags.
 
1895
      if test -n "$tagname" ; then
 
1896
      available_tags="$available_tags $tagname"
 
1897
    fi
 
1898
    fi
 
1899
  done
 
1900
  IFS="$lt_save_ifs"
 
1901
 
 
1902
  # Now substitute the updated list of available tags.
 
1903
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
 
1904
    mv "${ofile}T" "$ofile"
 
1905
    chmod +x "$ofile"
 
1906
  else
 
1907
    rm -f "${ofile}T"
 
1908
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
 
1909
  fi
 
1910
fi
 
1911
])# _LT_AC_TAGCONFIG
 
1912
 
 
1913
 
 
1914
# AC_LIBTOOL_DLOPEN
 
1915
# -----------------
 
1916
# enable checks for dlopen support
 
1917
AC_DEFUN([AC_LIBTOOL_DLOPEN],
 
1918
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
 
1919
])# AC_LIBTOOL_DLOPEN
 
1920
 
 
1921
 
 
1922
# AC_LIBTOOL_WIN32_DLL
 
1923
# --------------------
 
1924
# declare package support for building win32 dll's
 
1925
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
 
1926
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
 
1927
])# AC_LIBTOOL_WIN32_DLL
 
1928
 
 
1929
 
 
1930
# AC_ENABLE_SHARED([DEFAULT])
 
1931
# ---------------------------
 
1932
# implement the --enable-shared flag
 
1933
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
1934
AC_DEFUN([AC_ENABLE_SHARED],
 
1935
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
 
1936
AC_ARG_ENABLE([shared],
 
1937
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
 
1938
        [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
 
1939
    [p=${PACKAGE-default}
 
1940
    case $enableval in
 
1941
    yes) enable_shared=yes ;;
 
1942
    no) enable_shared=no ;;
 
1943
    *)
 
1944
      enable_shared=no
 
1945
      # Look at the argument we got.  We use all the common list separators.
 
1946
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
1947
      for pkg in $enableval; do
 
1948
        IFS="$lt_save_ifs"
 
1949
        if test "X$pkg" = "X$p"; then
 
1950
          enable_shared=yes
 
1951
        fi
 
1952
      done
 
1953
      IFS="$lt_save_ifs"
 
1954
      ;;
 
1955
    esac],
 
1956
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
 
1957
])# AC_ENABLE_SHARED
 
1958
 
 
1959
 
 
1960
# AC_DISABLE_SHARED
 
1961
# -----------------
 
1962
#- set the default shared flag to --disable-shared
 
1963
AC_DEFUN([AC_DISABLE_SHARED],
 
1964
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
1965
AC_ENABLE_SHARED(no)
 
1966
])# AC_DISABLE_SHARED
 
1967
 
 
1968
 
 
1969
# AC_ENABLE_STATIC([DEFAULT])
 
1970
# ---------------------------
 
1971
# implement the --enable-static flag
 
1972
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
1973
AC_DEFUN([AC_ENABLE_STATIC],
 
1974
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
 
1975
AC_ARG_ENABLE([static],
 
1976
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
 
1977
        [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
 
1978
    [p=${PACKAGE-default}
 
1979
    case $enableval in
 
1980
    yes) enable_static=yes ;;
 
1981
    no) enable_static=no ;;
 
1982
    *)
 
1983
     enable_static=no
 
1984
      # Look at the argument we got.  We use all the common list separators.
 
1985
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
1986
      for pkg in $enableval; do
 
1987
        IFS="$lt_save_ifs"
 
1988
        if test "X$pkg" = "X$p"; then
 
1989
          enable_static=yes
 
1990
        fi
 
1991
      done
 
1992
      IFS="$lt_save_ifs"
 
1993
      ;;
 
1994
    esac],
 
1995
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
 
1996
])# AC_ENABLE_STATIC
 
1997
 
 
1998
 
 
1999
# AC_DISABLE_STATIC
 
2000
# -----------------
 
2001
# set the default static flag to --disable-static
 
2002
AC_DEFUN([AC_DISABLE_STATIC],
 
2003
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
2004
AC_ENABLE_STATIC(no)
 
2005
])# AC_DISABLE_STATIC
 
2006
 
 
2007
 
 
2008
# AC_ENABLE_FAST_INSTALL([DEFAULT])
 
2009
# ---------------------------------
 
2010
# implement the --enable-fast-install flag
 
2011
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
2012
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
 
2013
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
 
2014
AC_ARG_ENABLE([fast-install],
 
2015
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
 
2016
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
 
2017
    [p=${PACKAGE-default}
 
2018
    case $enableval in
 
2019
    yes) enable_fast_install=yes ;;
 
2020
    no) enable_fast_install=no ;;
 
2021
    *)
 
2022
      enable_fast_install=no
 
2023
      # Look at the argument we got.  We use all the common list separators.
 
2024
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
2025
      for pkg in $enableval; do
 
2026
        IFS="$lt_save_ifs"
 
2027
        if test "X$pkg" = "X$p"; then
 
2028
          enable_fast_install=yes
 
2029
        fi
 
2030
      done
 
2031
      IFS="$lt_save_ifs"
 
2032
      ;;
 
2033
    esac],
 
2034
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
 
2035
])# AC_ENABLE_FAST_INSTALL
 
2036
 
 
2037
 
 
2038
# AC_DISABLE_FAST_INSTALL
 
2039
# -----------------------
 
2040
# set the default to --disable-fast-install
 
2041
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
 
2042
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
2043
AC_ENABLE_FAST_INSTALL(no)
 
2044
])# AC_DISABLE_FAST_INSTALL
 
2045
 
 
2046
 
 
2047
# AC_LIBTOOL_PICMODE([MODE])
 
2048
# --------------------------
 
2049
# implement the --with-pic flag
 
2050
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
 
2051
AC_DEFUN([AC_LIBTOOL_PICMODE],
 
2052
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
2053
pic_mode=ifelse($#,1,$1,default)
 
2054
])# AC_LIBTOOL_PICMODE
 
2055
 
 
2056
 
 
2057
# AC_PROG_EGREP
 
2058
# -------------
 
2059
# This is predefined starting with Autoconf 2.54, so this conditional
 
2060
# definition can be removed once we require Autoconf 2.54 or later.
 
2061
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
 
2062
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
 
2063
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
 
2064
    then ac_cv_prog_egrep='grep -E'
 
2065
    else ac_cv_prog_egrep='egrep'
 
2066
    fi])
 
2067
 EGREP=$ac_cv_prog_egrep
 
2068
 AC_SUBST([EGREP])
 
2069
])])
 
2070
 
 
2071
 
 
2072
# AC_PATH_TOOL_PREFIX
 
2073
# -------------------
 
2074
# find a file program which can recognise shared library
 
2075
AC_DEFUN([AC_PATH_TOOL_PREFIX],
 
2076
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
2077
AC_MSG_CHECKING([for $1])
 
2078
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 
2079
[case $MAGIC_CMD in
 
2080
[[\\/*] |  ?:[\\/]*])
 
2081
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
 
2082
  ;;
 
2083
*)
 
2084
  lt_save_MAGIC_CMD="$MAGIC_CMD"
 
2085
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
2086
dnl $ac_dummy forces splitting on constant user-supplied paths.
 
2087
dnl POSIX.2 word splitting is done only on the output of word expansions,
 
2088
dnl not every word.  This closes a longstanding sh security hole.
 
2089
  ac_dummy="ifelse([$2], , $PATH, [$2])"
 
2090
  for ac_dir in $ac_dummy; do
 
2091
    IFS="$lt_save_ifs"
 
2092
    test -z "$ac_dir" && ac_dir=.
 
2093
    if test -f $ac_dir/$1; then
 
2094
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
 
2095
      if test -n "$file_magic_test_file"; then
 
2096
        case $deplibs_check_method in
 
2097
        "file_magic "*)
 
2098
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
 
2099
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
2100
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 
2101
            $EGREP "$file_magic_regex" > /dev/null; then
 
2102
            :
 
2103
          else
 
2104
            cat <<EOF 1>&2
 
2105
 
 
2106
*** Warning: the command libtool uses to detect shared libraries,
 
2107
*** $file_magic_cmd, produces output that libtool cannot recognize.
 
2108
*** The result is that libtool may fail to recognize shared libraries
 
2109
*** as such.  This will affect the creation of libtool libraries that
 
2110
*** depend on shared libraries, but programs linked with such libtool
 
2111
*** libraries will work regardless of this problem.  Nevertheless, you
 
2112
*** may want to report the problem to your system manager and/or to
 
2113
*** bug-libtool@gnu.org
 
2114
 
 
2115
EOF
 
2116
          fi ;;
 
2117
        esac
 
2118
      fi
 
2119
      break
 
2120
    fi
 
2121
  done
 
2122
  IFS="$lt_save_ifs"
 
2123
  MAGIC_CMD="$lt_save_MAGIC_CMD"
 
2124
  ;;
 
2125
esac])
 
2126
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
2127
if test -n "$MAGIC_CMD"; then
 
2128
  AC_MSG_RESULT($MAGIC_CMD)
 
2129
else
 
2130
  AC_MSG_RESULT(no)
 
2131
fi
 
2132
])# AC_PATH_TOOL_PREFIX
 
2133
 
 
2134
 
 
2135
# AC_PATH_MAGIC
 
2136
# -------------
 
2137
# find a file program which can recognise a shared library
 
2138
AC_DEFUN([AC_PATH_MAGIC],
 
2139
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 
2140
if test -z "$lt_cv_path_MAGIC_CMD"; then
 
2141
  if test -n "$ac_tool_prefix"; then
 
2142
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
 
2143
  else
 
2144
    MAGIC_CMD=:
 
2145
  fi
 
2146
fi
 
2147
])# AC_PATH_MAGIC
 
2148
 
 
2149
 
 
2150
# AC_PROG_LD
 
2151
# ----------
 
2152
# find the pathname to the GNU or non-GNU linker
 
2153
AC_DEFUN([AC_PROG_LD],
 
2154
[AC_ARG_WITH([gnu-ld],
 
2155
    [AC_HELP_STRING([--with-gnu-ld],
 
2156
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
 
2157
    [test "$withval" = no || with_gnu_ld=yes],
 
2158
    [with_gnu_ld=no])
 
2159
AC_REQUIRE([LT_AC_PROG_SED])dnl
 
2160
AC_REQUIRE([AC_PROG_CC])dnl
 
2161
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
2162
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
2163
ac_prog=ld
 
2164
if test "$GCC" = yes; then
 
2165
  # Check if gcc -print-prog-name=ld gives a path.
 
2166
  AC_MSG_CHECKING([for ld used by $CC])
 
2167
  case $host in
 
2168
  *-*-mingw*)
 
2169
    # gcc leaves a trailing carriage return which upsets mingw
 
2170
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
2171
  *)
 
2172
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
2173
  esac
 
2174
  case $ac_prog in
 
2175
    # Accept absolute paths.
 
2176
    [[\\/]]* | ?:[[\\/]]*)
 
2177
      re_direlt='/[[^/]][[^/]]*/\.\./'
 
2178
      # Canonicalize the pathname of ld
 
2179
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
 
2180
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
 
2181
        ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
 
2182
      done
 
2183
      test -z "$LD" && LD="$ac_prog"
 
2184
      ;;
 
2185
  "")
 
2186
    # If it fails, then pretend we aren't using GCC.
 
2187
    ac_prog=ld
 
2188
    ;;
 
2189
  *)
 
2190
    # If it is relative, then search for the first ld in PATH.
 
2191
    with_gnu_ld=unknown
 
2192
    ;;
 
2193
  esac
 
2194
elif test "$with_gnu_ld" = yes; then
 
2195
  AC_MSG_CHECKING([for GNU ld])
 
2196
else
 
2197
  AC_MSG_CHECKING([for non-GNU ld])
 
2198
fi
 
2199
AC_CACHE_VAL(lt_cv_path_LD,
 
2200
[if test -z "$LD"; then
 
2201
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
2202
  for ac_dir in $PATH; do
 
2203
    IFS="$lt_save_ifs"
 
2204
    test -z "$ac_dir" && ac_dir=.
 
2205
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
2206
      lt_cv_path_LD="$ac_dir/$ac_prog"
 
2207
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
2208
      # but apparently some GNU ld's only accept -v.
 
2209
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
2210
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
 
2211
      *GNU* | *'with BFD'*)
 
2212
        test "$with_gnu_ld" != no && break
 
2213
        ;;
 
2214
      *)
 
2215
        test "$with_gnu_ld" != yes && break
 
2216
        ;;
 
2217
      esac
 
2218
    fi
 
2219
  done
 
2220
  IFS="$lt_save_ifs"
 
2221
else
 
2222
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
 
2223
fi])
 
2224
LD="$lt_cv_path_LD"
 
2225
if test -n "$LD"; then
 
2226
  AC_MSG_RESULT($LD)
 
2227
else
 
2228
  AC_MSG_RESULT(no)
 
2229
fi
 
2230
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
2231
AC_PROG_LD_GNU
 
2232
])# AC_PROG_LD
 
2233
 
 
2234
 
 
2235
# AC_PROG_LD_GNU
 
2236
# --------------
 
2237
AC_DEFUN([AC_PROG_LD_GNU],
 
2238
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
2239
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
 
2240
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 
2241
case `$LD -v 2>&1 </dev/null` in
 
2242
*GNU* | *'with BFD'*)
 
2243
  lt_cv_prog_gnu_ld=yes
 
2244
  ;;
 
2245
*)
 
2246
  lt_cv_prog_gnu_ld=no
 
2247
  ;;
 
2248
esac])
 
2249
with_gnu_ld=$lt_cv_prog_gnu_ld
 
2250
])# AC_PROG_LD_GNU
 
2251
 
 
2252
 
 
2253
# AC_PROG_LD_RELOAD_FLAG
 
2254
# ----------------------
 
2255
# find reload flag for linker
 
2256
#   -- PORTME Some linkers may need a different reload flag.
 
2257
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
 
2258
[AC_CACHE_CHECK([for $LD option to reload object files],
 
2259
  lt_cv_ld_reload_flag,
 
2260
  [lt_cv_ld_reload_flag='-r'])
 
2261
reload_flag=$lt_cv_ld_reload_flag
 
2262
case $reload_flag in
 
2263
"" | " "*) ;;
 
2264
*) reload_flag=" $reload_flag" ;;
 
2265
esac
 
2266
reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
2267
case $host_os in
 
2268
  darwin*)
 
2269
    if test "$GCC" = yes; then
 
2270
      reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
 
2271
    else
 
2272
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
2273
    fi
 
2274
    ;;
 
2275
esac
 
2276
])# AC_PROG_LD_RELOAD_FLAG
 
2277
 
 
2278
 
 
2279
# AC_DEPLIBS_CHECK_METHOD
 
2280
# -----------------------
 
2281
# how to check for library dependencies
 
2282
#  -- PORTME fill in with the dynamic library characteristics
 
2283
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
 
2284
[AC_CACHE_CHECK([how to recognise dependent libraries],
 
2285
lt_cv_deplibs_check_method,
 
2286
[lt_cv_file_magic_cmd='$MAGIC_CMD'
 
2287
lt_cv_file_magic_test_file=
 
2288
lt_cv_deplibs_check_method='unknown'
 
2289
# Need to set the preceding variable on all platforms that support
 
2290
# interlibrary dependencies.
 
2291
# 'none' -- dependencies not supported.
 
2292
# `unknown' -- same as none, but documents that we really don't know.
 
2293
# 'pass_all' -- all dependencies passed with no checks.
 
2294
# 'test_compile' -- check by making test program.
 
2295
# 'file_magic [[regex]]' -- check by looking for files in library path
 
2296
# which responds to the $file_magic_cmd with a given extended regex.
 
2297
# If you have `file' or equivalent on your system and you're not sure
 
2298
# whether `pass_all' will *always* work, you probably want this one.
 
2299
 
 
2300
case $host_os in
 
2301
aix4* | aix5*)
 
2302
  lt_cv_deplibs_check_method=pass_all
 
2303
  ;;
 
2304
 
 
2305
beos*)
 
2306
  lt_cv_deplibs_check_method=pass_all
 
2307
  ;;
 
2308
 
 
2309
bsdi[[45]]*)
 
2310
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
 
2311
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
2312
  lt_cv_file_magic_test_file=/shlib/libc.so
 
2313
  ;;
 
2314
 
 
2315
cygwin*)
 
2316
  # func_win32_libid is a shell function defined in ltmain.sh
 
2317
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
2318
  lt_cv_file_magic_cmd='func_win32_libid'
 
2319
  ;;
 
2320
 
 
2321
mingw* | pw32*)
 
2322
  # Base MSYS/MinGW do not provide the 'file' command needed by
 
2323
  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
 
2324
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
 
2325
  lt_cv_file_magic_cmd='$OBJDUMP -f'
 
2326
  ;;
 
2327
 
 
2328
darwin* | rhapsody*)
 
2329
  lt_cv_deplibs_check_method=pass_all
 
2330
  ;;
 
2331
 
 
2332
freebsd* | kfreebsd*-gnu | dragonfly*)
 
2333
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
2334
    case $host_cpu in
 
2335
    i*86 )
 
2336
      # Not sure whether the presence of OpenBSD here was a mistake.
 
2337
      # Let's accept both of them until this is cleared up.
 
2338
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
 
2339
      lt_cv_file_magic_cmd=/usr/bin/file
 
2340
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
2341
      ;;
 
2342
    esac
 
2343
  else
 
2344
    lt_cv_deplibs_check_method=pass_all
 
2345
  fi
 
2346
  ;;
 
2347
 
 
2348
gnu*)
 
2349
  lt_cv_deplibs_check_method=pass_all
 
2350
  ;;
 
2351
 
 
2352
hpux10.20* | hpux11*)
 
2353
  lt_cv_file_magic_cmd=/usr/bin/file
 
2354
  case "$host_cpu" in
 
2355
  ia64*)
 
2356
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
 
2357
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
 
2358
    ;;
 
2359
  hppa*64*)
 
2360
    [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]']
 
2361
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
 
2362
    ;;
 
2363
  *)
 
2364
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
 
2365
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
 
2366
    ;;
 
2367
  esac
 
2368
  ;;
 
2369
 
 
2370
irix5* | irix6* | nonstopux*)
 
2371
  case $LD in
 
2372
  *-32|*"-32 ") libmagic=32-bit;;
 
2373
  *-n32|*"-n32 ") libmagic=N32;;
 
2374
  *-64|*"-64 ") libmagic=64-bit;;
 
2375
  *) libmagic=never-match;;
 
2376
  esac
 
2377
  lt_cv_deplibs_check_method=pass_all
 
2378
  ;;
 
2379
 
 
2380
# This must be Linux ELF.
 
2381
linux*)
 
2382
  lt_cv_deplibs_check_method=pass_all
 
2383
  ;;
 
2384
 
 
2385
netbsd*)
 
2386
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
2387
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
2388
  else
 
2389
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
 
2390
  fi
 
2391
  ;;
 
2392
 
 
2393
newos6*)
 
2394
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
 
2395
  lt_cv_file_magic_cmd=/usr/bin/file
 
2396
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
 
2397
  ;;
 
2398
 
 
2399
nto-qnx*)
 
2400
  lt_cv_deplibs_check_method=unknown
 
2401
  ;;
 
2402
 
 
2403
openbsd*)
 
2404
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
2405
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
 
2406
  else
 
2407
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
2408
  fi
 
2409
  ;;
 
2410
 
 
2411
osf3* | osf4* | osf5*)
 
2412
  lt_cv_deplibs_check_method=pass_all
 
2413
  ;;
 
2414
 
 
2415
sco3.2v5*)
 
2416
  lt_cv_deplibs_check_method=pass_all
 
2417
  ;;
 
2418
 
 
2419
solaris*)
 
2420
  lt_cv_deplibs_check_method=pass_all
 
2421
  ;;
 
2422
 
 
2423
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
2424
  case $host_vendor in
 
2425
  motorola)
 
2426
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
 
2427
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
 
2428
    ;;
 
2429
  ncr)
 
2430
    lt_cv_deplibs_check_method=pass_all
 
2431
    ;;
 
2432
  sequent)
 
2433
    lt_cv_file_magic_cmd='/bin/file'
 
2434
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
 
2435
    ;;
 
2436
  sni)
 
2437
    lt_cv_file_magic_cmd='/bin/file'
 
2438
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
 
2439
    lt_cv_file_magic_test_file=/lib/libc.so
 
2440
    ;;
 
2441
  siemens)
 
2442
    lt_cv_deplibs_check_method=pass_all
 
2443
    ;;
 
2444
  esac
 
2445
  ;;
 
2446
 
 
2447
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
 
2448
  lt_cv_deplibs_check_method=pass_all
 
2449
  ;;
 
2450
esac
 
2451
])
 
2452
file_magic_cmd=$lt_cv_file_magic_cmd
 
2453
deplibs_check_method=$lt_cv_deplibs_check_method
 
2454
test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
2455
])# AC_DEPLIBS_CHECK_METHOD
 
2456
 
 
2457
 
 
2458
# AC_PROG_NM
 
2459
# ----------
 
2460
# find the pathname to a BSD-compatible name lister
 
2461
AC_DEFUN([AC_PROG_NM],
 
2462
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
 
2463
[if test -n "$NM"; then
 
2464
  # Let the user override the test.
 
2465
  lt_cv_path_NM="$NM"
 
2466
else
 
2467
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
2468
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
 
2469
    IFS="$lt_save_ifs"
 
2470
    test -z "$ac_dir" && ac_dir=.
 
2471
    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
 
2472
    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
 
2473
      # Check to see if the nm accepts a BSD-compat flag.
 
2474
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
 
2475
      #   nm: unknown option "B" ignored
 
2476
      # Tru64's nm complains that /dev/null is an invalid object file
 
2477
      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
 
2478
      */dev/null* | *'Invalid file or object type'*)
 
2479
        lt_cv_path_NM="$tmp_nm -B"
 
2480
        break
 
2481
        ;;
 
2482
      *)
 
2483
        case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 
2484
        */dev/null*)
 
2485
          lt_cv_path_NM="$tmp_nm -p"
 
2486
          break
 
2487
          ;;
 
2488
        *)
 
2489
          lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 
2490
          continue # so that we can try to find one that supports BSD flags
 
2491
          ;;
 
2492
        esac
 
2493
      esac
 
2494
    fi
 
2495
  done
 
2496
  IFS="$lt_save_ifs"
 
2497
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
 
2498
fi])
 
2499
NM="$lt_cv_path_NM"
 
2500
])# AC_PROG_NM
 
2501
 
 
2502
 
 
2503
# AC_CHECK_LIBM
 
2504
# -------------
 
2505
# check for math library
 
2506
AC_DEFUN([AC_CHECK_LIBM],
 
2507
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
2508
LIBM=
 
2509
case $host in
 
2510
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
 
2511
  # These system don't have libm, or don't need it
 
2512
  ;;
 
2513
*-ncr-sysv4.3*)
 
2514
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
 
2515
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
 
2516
  ;;
 
2517
*)
 
2518
  AC_CHECK_LIB(m, cos, LIBM="-lm")
 
2519
  ;;
 
2520
esac
 
2521
])# AC_CHECK_LIBM
 
2522
 
 
2523
 
 
2524
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
 
2525
# -----------------------------------
 
2526
# sets LIBLTDL to the link flags for the libltdl convenience library and
 
2527
# LTDLINCL to the include flags for the libltdl header and adds
 
2528
# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
 
2529
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
 
2530
# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
 
2531
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
 
2532
# '${top_srcdir}/' (note the single quotes!).  If your package is not
 
2533
# flat and you're not using automake, define top_builddir and
 
2534
# top_srcdir appropriately in the Makefiles.
 
2535
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
 
2536
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
2537
  case $enable_ltdl_convenience in
 
2538
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
 
2539
  "") enable_ltdl_convenience=yes
 
2540
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
 
2541
  esac
 
2542
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
 
2543
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
2544
  # For backwards non-gettext consistent compatibility...
 
2545
  INCLTDL="$LTDLINCL"
 
2546
])# AC_LIBLTDL_CONVENIENCE
 
2547
 
 
2548
 
 
2549
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
 
2550
# -----------------------------------
 
2551
# sets LIBLTDL to the link flags for the libltdl installable library and
 
2552
# LTDLINCL to the include flags for the libltdl header and adds
 
2553
# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
 
2554
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
 
2555
# DIRECTORY is not provided and an installed libltdl is not found, it is
 
2556
# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
 
2557
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
 
2558
# quotes!).  If your package is not flat and you're not using automake,
 
2559
# define top_builddir and top_srcdir appropriately in the Makefiles.
 
2560
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
 
2561
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
 
2562
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
2563
  AC_CHECK_LIB(ltdl, lt_dlinit,
 
2564
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
 
2565
  [if test x"$enable_ltdl_install" = xno; then
 
2566
     AC_MSG_WARN([libltdl not installed, but installation disabled])
 
2567
   else
 
2568
     enable_ltdl_install=yes
 
2569
   fi
 
2570
  ])
 
2571
  if test x"$enable_ltdl_install" = x"yes"; then
 
2572
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
 
2573
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
 
2574
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
2575
  else
 
2576
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
 
2577
    LIBLTDL="-lltdl"
 
2578
    LTDLINCL=
 
2579
  fi
 
2580
  # For backwards non-gettext consistent compatibility...
 
2581
  INCLTDL="$LTDLINCL"
 
2582
])# AC_LIBLTDL_INSTALLABLE
 
2583
 
 
2584
 
 
2585
# AC_LIBTOOL_CXX
 
2586
# --------------
 
2587
# enable support for C++ libraries
 
2588
AC_DEFUN([AC_LIBTOOL_CXX],
 
2589
[AC_REQUIRE([_LT_AC_LANG_CXX])
 
2590
])# AC_LIBTOOL_CXX
 
2591
 
 
2592
 
 
2593
# _LT_AC_LANG_CXX
 
2594
# ---------------
 
2595
AC_DEFUN([_LT_AC_LANG_CXX],
 
2596
[AC_REQUIRE([AC_PROG_CXX])
 
2597
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
 
2598
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
 
2599
])# _LT_AC_LANG_CXX
 
2600
 
 
2601
# _LT_AC_PROG_CXXCPP
 
2602
# ---------------
 
2603
AC_DEFUN([_LT_AC_PROG_CXXCPP],
 
2604
[
 
2605
AC_REQUIRE([AC_PROG_CXX])
 
2606
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
 
2607
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
 
2608
    (test "X$CXX" != "Xg++"))) ; then
 
2609
  AC_PROG_CXXCPP
 
2610
fi
 
2611
])# _LT_AC_PROG_CXXCPP
 
2612
 
 
2613
# AC_LIBTOOL_F77
 
2614
# --------------
 
2615
# enable support for Fortran 77 libraries
 
2616
AC_DEFUN([AC_LIBTOOL_F77],
 
2617
[AC_REQUIRE([_LT_AC_LANG_F77])
 
2618
])# AC_LIBTOOL_F77
 
2619
 
 
2620
 
 
2621
# _LT_AC_LANG_F77
 
2622
# ---------------
 
2623
AC_DEFUN([_LT_AC_LANG_F77],
 
2624
[AC_REQUIRE([AC_PROG_F77])
 
2625
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
 
2626
])# _LT_AC_LANG_F77
 
2627
 
 
2628
 
 
2629
# AC_LIBTOOL_GCJ
 
2630
# --------------
 
2631
# enable support for GCJ libraries
 
2632
AC_DEFUN([AC_LIBTOOL_GCJ],
 
2633
[AC_REQUIRE([_LT_AC_LANG_GCJ])
 
2634
])# AC_LIBTOOL_GCJ
 
2635
 
 
2636
 
 
2637
# _LT_AC_LANG_GCJ
 
2638
# ---------------
 
2639
AC_DEFUN([_LT_AC_LANG_GCJ],
 
2640
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
 
2641
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
 
2642
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
 
2643
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
 
2644
         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
 
2645
           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
 
2646
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
 
2647
])# _LT_AC_LANG_GCJ
 
2648
 
 
2649
 
 
2650
# AC_LIBTOOL_RC
 
2651
# --------------
 
2652
# enable support for Windows resource files
 
2653
AC_DEFUN([AC_LIBTOOL_RC],
 
2654
[AC_REQUIRE([LT_AC_PROG_RC])
 
2655
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
 
2656
])# AC_LIBTOOL_RC
 
2657
 
 
2658
 
 
2659
# AC_LIBTOOL_LANG_C_CONFIG
 
2660
# ------------------------
 
2661
# Ensure that the configuration vars for the C compiler are
 
2662
# suitably defined.  Those variables are subsequently used by
 
2663
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
2664
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
 
2665
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
 
2666
[lt_save_CC="$CC"
 
2667
AC_LANG_PUSH(C)
 
2668
 
 
2669
# Source file extension for C test sources.
 
2670
ac_ext=c
 
2671
 
 
2672
# Object file extension for compiled C test sources.
 
2673
objext=o
 
2674
_LT_AC_TAGVAR(objext, $1)=$objext
 
2675
 
 
2676
# Code to be used in simple compile tests
 
2677
lt_simple_compile_test_code="int some_variable = 0;\n"
 
2678
 
 
2679
# Code to be used in simple link tests
 
2680
lt_simple_link_test_code='int main(){return(0);}\n'
 
2681
 
 
2682
_LT_AC_SYS_COMPILER
 
2683
 
 
2684
# save warnings/boilerplate of simple test code
 
2685
_LT_COMPILER_BOILERPLATE
 
2686
_LT_LINKER_BOILERPLATE
 
2687
 
 
2688
#
 
2689
# Check for any special shared library compilation flags.
 
2690
#
 
2691
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
 
2692
if test "$GCC" = no; then
 
2693
  case $host_os in
 
2694
  sco3.2v5*)
 
2695
    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
 
2696
    ;;
 
2697
  esac
 
2698
fi
 
2699
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
 
2700
  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
 
2701
  if echo "$old_CC $old_CFLAGS " | grep "[[     ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[        ]]" >/dev/null; then :
 
2702
  else
 
2703
    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
 
2704
    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
 
2705
  fi
 
2706
fi
 
2707
 
 
2708
 
 
2709
#
 
2710
# Check to make sure the static flag actually works.
 
2711
#
 
2712
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
 
2713
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
 
2714
  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
 
2715
  [],
 
2716
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
 
2717
 
 
2718
 
 
2719
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
2720
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
2721
AC_LIBTOOL_PROG_CC_C_O($1)
 
2722
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
2723
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
2724
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
2725
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
2726
AC_LIBTOOL_SYS_LIB_STRIP
 
2727
AC_LIBTOOL_DLOPEN_SELF($1)
 
2728
 
 
2729
# Report which librarie types wil actually be built
 
2730
AC_MSG_CHECKING([if libtool supports shared libraries])
 
2731
AC_MSG_RESULT([$can_build_shared])
 
2732
 
 
2733
AC_MSG_CHECKING([whether to build shared libraries])
 
2734
test "$can_build_shared" = "no" && enable_shared=no
 
2735
 
 
2736
# On AIX, shared libraries and static libraries use the same namespace, and
 
2737
# are all built from PIC.
 
2738
case "$host_os" in
 
2739
aix3*)
 
2740
  test "$enable_shared" = yes && enable_static=no
 
2741
  if test -n "$RANLIB"; then
 
2742
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
2743
    postinstall_cmds='$RANLIB $lib'
 
2744
  fi
 
2745
  ;;
 
2746
 
 
2747
aix4* | aix5*)
 
2748
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
2749
    test "$enable_shared" = yes && enable_static=no
 
2750
  fi
 
2751
    ;;
 
2752
esac
 
2753
AC_MSG_RESULT([$enable_shared])
 
2754
 
 
2755
AC_MSG_CHECKING([whether to build static libraries])
 
2756
# Make sure either enable_shared or enable_static is yes.
 
2757
test "$enable_shared" = yes || enable_static=yes
 
2758
AC_MSG_RESULT([$enable_static])
 
2759
 
 
2760
AC_LIBTOOL_CONFIG($1)
 
2761
 
 
2762
AC_LANG_POP
 
2763
CC="$lt_save_CC"
 
2764
])# AC_LIBTOOL_LANG_C_CONFIG
 
2765
 
 
2766
 
 
2767
# AC_LIBTOOL_LANG_CXX_CONFIG
 
2768
# --------------------------
 
2769
# Ensure that the configuration vars for the C compiler are
 
2770
# suitably defined.  Those variables are subsequently used by
 
2771
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
2772
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
 
2773
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
 
2774
[AC_LANG_PUSH(C++)
 
2775
AC_REQUIRE([AC_PROG_CXX])
 
2776
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
 
2777
 
 
2778
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
2779
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
2780
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
2781
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
2782
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
2783
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
2784
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
2785
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
2786
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
2787
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
2788
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
2789
_LT_AC_TAGVAR(module_cmds, $1)=
 
2790
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
2791
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
2792
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
2793
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
2794
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
2795
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
2796
 
 
2797
# Dependencies to place before and after the object being linked:
 
2798
_LT_AC_TAGVAR(predep_objects, $1)=
 
2799
_LT_AC_TAGVAR(postdep_objects, $1)=
 
2800
_LT_AC_TAGVAR(predeps, $1)=
 
2801
_LT_AC_TAGVAR(postdeps, $1)=
 
2802
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
 
2803
 
 
2804
# Source file extension for C++ test sources.
 
2805
ac_ext=cc
 
2806
 
 
2807
# Object file extension for compiled C++ test sources.
 
2808
objext=o
 
2809
_LT_AC_TAGVAR(objext, $1)=$objext
 
2810
 
 
2811
# Code to be used in simple compile tests
 
2812
lt_simple_compile_test_code="int some_variable = 0;\n"
 
2813
 
 
2814
# Code to be used in simple link tests
 
2815
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
 
2816
 
 
2817
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
2818
_LT_AC_SYS_COMPILER
 
2819
 
 
2820
# save warnings/boilerplate of simple test code
 
2821
_LT_COMPILER_BOILERPLATE
 
2822
_LT_LINKER_BOILERPLATE
 
2823
 
 
2824
# Allow CC to be a program name with arguments.
 
2825
lt_save_CC=$CC
 
2826
lt_save_LD=$LD
 
2827
lt_save_GCC=$GCC
 
2828
GCC=$GXX
 
2829
lt_save_with_gnu_ld=$with_gnu_ld
 
2830
lt_save_path_LD=$lt_cv_path_LD
 
2831
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
 
2832
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
 
2833
else
 
2834
  unset lt_cv_prog_gnu_ld
 
2835
fi
 
2836
if test -n "${lt_cv_path_LDCXX+set}"; then
 
2837
  lt_cv_path_LD=$lt_cv_path_LDCXX
 
2838
else
 
2839
  unset lt_cv_path_LD
 
2840
fi
 
2841
test -z "${LDCXX+set}" || LD=$LDCXX
 
2842
CC=${CXX-"c++"}
 
2843
compiler=$CC
 
2844
_LT_AC_TAGVAR(compiler, $1)=$CC
 
2845
_LT_CC_BASENAME([$compiler])
 
2846
 
 
2847
# We don't want -fno-exception wen compiling C++ code, so set the
 
2848
# no_builtin_flag separately
 
2849
if test "$GXX" = yes; then
 
2850
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
2851
else
 
2852
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
2853
fi
 
2854
 
 
2855
if test "$GXX" = yes; then
 
2856
  # Set up default GNU C++ configuration
 
2857
 
 
2858
  AC_PROG_LD
 
2859
 
 
2860
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
 
2861
  # archiving commands below assume that GNU ld is being used.
 
2862
  if test "$with_gnu_ld" = yes; then
 
2863
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
2864
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
2865
 
 
2866
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
2867
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
2868
 
 
2869
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
2870
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
 
2871
    #     investigate it a little bit more. (MM)
 
2872
    wlarc='${wl}'
 
2873
 
 
2874
    # ancient GNU ld didn't support --whole-archive et. al.
 
2875
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
 
2876
        grep 'no-whole-archive' > /dev/null; then
 
2877
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
2878
    else
 
2879
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
2880
    fi
 
2881
  else
 
2882
    with_gnu_ld=no
 
2883
    wlarc=
 
2884
 
 
2885
    # A generic and very simple default shared library creation
 
2886
    # command for GNU C++ for the case where it uses the native
 
2887
    # linker, instead of GNU ld.  If possible, this setting should
 
2888
    # overridden to take advantage of the native linker features on
 
2889
    # the platform it is being used on.
 
2890
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
2891
  fi
 
2892
 
 
2893
  # Commands to make compiler produce verbose output that lists
 
2894
  # what "hidden" libraries, object files and flags are used when
 
2895
  # linking a shared library.
 
2896
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
2897
 
 
2898
else
 
2899
  GXX=no
 
2900
  with_gnu_ld=no
 
2901
  wlarc=
 
2902
fi
 
2903
 
 
2904
# PORTME: fill in a description of your system's C++ link characteristics
 
2905
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
2906
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
2907
case $host_os in
 
2908
  aix3*)
 
2909
    # FIXME: insert proper C++ library support
 
2910
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
2911
    ;;
 
2912
  aix4* | aix5*)
 
2913
    if test "$host_cpu" = ia64; then
 
2914
      # On IA64, the linker does run time linking by default, so we don't
 
2915
      # have to do anything special.
 
2916
      aix_use_runtimelinking=no
 
2917
      exp_sym_flag='-Bexport'
 
2918
      no_entry_flag=""
 
2919
    else
 
2920
      aix_use_runtimelinking=no
 
2921
 
 
2922
      # Test if we are trying to use run time linking or normal
 
2923
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
2924
      # need to do runtime linking.
 
2925
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
 
2926
        for ld_flag in $LDFLAGS; do
 
2927
          case $ld_flag in
 
2928
          *-brtl*)
 
2929
            aix_use_runtimelinking=yes
 
2930
            break
 
2931
            ;;
 
2932
          esac
 
2933
        done
 
2934
      esac
 
2935
 
 
2936
      exp_sym_flag='-bexport'
 
2937
      no_entry_flag='-bnoentry'
 
2938
    fi
 
2939
 
 
2940
    # When large executables or shared objects are built, AIX ld can
 
2941
    # have problems creating the table of contents.  If linking a library
 
2942
    # or program results in "error TOC overflow" add -mminimal-toc to
 
2943
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
2944
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
2945
 
 
2946
    _LT_AC_TAGVAR(archive_cmds, $1)=''
 
2947
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
2948
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
2949
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
2950
 
 
2951
    if test "$GXX" = yes; then
 
2952
      case $host_os in aix4.[[012]]|aix4.[[012]].*)
 
2953
      # We only want to do this on AIX 4.2 and lower, the check
 
2954
      # below for broken collect2 doesn't work under 4.3+
 
2955
        collect2name=`${CC} -print-prog-name=collect2`
 
2956
        if test -f "$collect2name" && \
 
2957
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
2958
        then
 
2959
          # We have reworked collect2
 
2960
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
2961
        else
 
2962
          # We have old collect2
 
2963
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
2964
          # It fails to find uninstalled libraries when the uninstalled
 
2965
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
2966
          # to unsupported forces relinking
 
2967
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
2968
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
2969
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
2970
        fi
 
2971
      esac
 
2972
      shared_flag='-shared'
 
2973
      if test "$aix_use_runtimelinking" = yes; then
 
2974
        shared_flag="$shared_flag "'${wl}-G'
 
2975
      fi
 
2976
    else
 
2977
      # not using gcc
 
2978
      if test "$host_cpu" = ia64; then
 
2979
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
2980
        # chokes on -Wl,-G. The following line is correct:
 
2981
        shared_flag='-G'
 
2982
      else
 
2983
        if test "$aix_use_runtimelinking" = yes; then
 
2984
          shared_flag='${wl}-G'
 
2985
        else
 
2986
          shared_flag='${wl}-bM:SRE'
 
2987
        fi
 
2988
      fi
 
2989
    fi
 
2990
 
 
2991
    # It seems that -bexpall does not export symbols beginning with
 
2992
    # underscore (_), so it is better to generate a list of symbols to export.
 
2993
    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
2994
    if test "$aix_use_runtimelinking" = yes; then
 
2995
      # Warning - without using the other runtime loading flags (-brtl),
 
2996
      # -berok will link without error, but may produce a broken library.
 
2997
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
2998
      # Determine the default libpath from the value encoded in an empty executable.
 
2999
      _LT_AC_SYS_LIBPATH_AIX
 
3000
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
3001
 
 
3002
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
3003
     else
 
3004
      if test "$host_cpu" = ia64; then
 
3005
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
3006
        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
3007
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 
3008
      else
 
3009
        # Determine the default libpath from the value encoded in an empty executable.
 
3010
        _LT_AC_SYS_LIBPATH_AIX
 
3011
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
3012
        # Warning - without using the other run time loading flags,
 
3013
        # -berok will link without error, but may produce a broken library.
 
3014
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
3015
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
3016
        # -bexpall does not export symbols beginning with underscore (_)
 
3017
        _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
3018
        # Exported symbols can be pulled into shared objects from archives
 
3019
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
3020
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
3021
        # This is similar to how AIX traditionally builds it's shared libraries.
 
3022
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
3023
      fi
 
3024
    fi
 
3025
    ;;
 
3026
  chorus*)
 
3027
    case $cc_basename in
 
3028
      *)
 
3029
        # FIXME: insert proper C++ library support
 
3030
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3031
        ;;
 
3032
    esac
 
3033
    ;;
 
3034
 
 
3035
 
 
3036
  cygwin* | mingw* | pw32*)
 
3037
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
3038
    # as there is no search path for DLLs.
 
3039
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
3040
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
3041
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
3042
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
3043
 
 
3044
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 
3045
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
3046
      # If the export-symbols file already is a .def file (1st line
 
3047
      # is EXPORTS), use it as is; otherwise, prepend...
 
3048
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
3049
        cp $export_symbols $output_objdir/$soname.def;
 
3050
      else
 
3051
        echo EXPORTS > $output_objdir/$soname.def;
 
3052
        cat $export_symbols >> $output_objdir/$soname.def;
 
3053
      fi~
 
3054
      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
3055
    else
 
3056
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3057
    fi
 
3058
  ;;
 
3059
      darwin* | rhapsody*)
 
3060
        case "$host_os" in
 
3061
        rhapsody* | darwin1.[[012]])
 
3062
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
 
3063
         ;;
 
3064
       *) # Darwin 1.3 on
 
3065
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
3066
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
3067
         else
 
3068
           case ${MACOSX_DEPLOYMENT_TARGET} in
 
3069
             10.[[012]])
 
3070
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
3071
               ;;
 
3072
             10.*)
 
3073
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
 
3074
               ;;
 
3075
           esac
 
3076
         fi
 
3077
         ;;
 
3078
        esac
 
3079
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3080
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3081
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
3082
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
3083
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
 
3084
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
3085
 
 
3086
    if test "$GXX" = yes ; then
 
3087
      lt_int_apple_cc_single_mod=no
 
3088
      output_verbose_link_cmd='echo'
 
3089
      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
 
3090
       lt_int_apple_cc_single_mod=yes
 
3091
      fi
 
3092
      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
3093
       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
3094
      else
 
3095
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
3096
        fi
 
3097
        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
3098
        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
3099
          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
3100
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
3101
          else
 
3102
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
3103
          fi
 
3104
            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
3105
      else
 
3106
      case $cc_basename in
 
3107
        xlc*)
 
3108
         output_verbose_link_cmd='echo'
 
3109
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
 
3110
          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
3111
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
3112
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
3113
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
3114
          ;;
 
3115
       *)
 
3116
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3117
          ;;
 
3118
      esac
 
3119
      fi
 
3120
        ;;
 
3121
 
 
3122
  dgux*)
 
3123
    case $cc_basename in
 
3124
      ec++*)
 
3125
        # FIXME: insert proper C++ library support
 
3126
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3127
        ;;
 
3128
      ghcx*)
 
3129
        # Green Hills C++ Compiler
 
3130
        # FIXME: insert proper C++ library support
 
3131
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3132
        ;;
 
3133
      *)
 
3134
        # FIXME: insert proper C++ library support
 
3135
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3136
        ;;
 
3137
    esac
 
3138
    ;;
 
3139
  freebsd[[12]]*)
 
3140
    # C++ shared libraries reported to be fairly broken before switch to ELF
 
3141
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3142
    ;;
 
3143
  freebsd-elf*)
 
3144
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3145
    ;;
 
3146
  freebsd* | kfreebsd*-gnu | dragonfly*)
 
3147
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
 
3148
    # conventions
 
3149
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
3150
    ;;
 
3151
  gnu*)
 
3152
    ;;
 
3153
  hpux9*)
 
3154
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3155
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3156
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
3157
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3158
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
3159
                                # but as the default
 
3160
                                # location of the library.
 
3161
 
 
3162
    case $cc_basename in
 
3163
    CC*)
 
3164
      # FIXME: insert proper C++ library support
 
3165
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3166
      ;;
 
3167
    aCC*)
 
3168
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
3169
      # Commands to make compiler produce verbose output that lists
 
3170
      # what "hidden" libraries, object files and flags are used when
 
3171
      # linking a shared library.
 
3172
      #
 
3173
      # There doesn't appear to be a way to prevent this compiler from
 
3174
      # explicitly linking system object files so we need to strip them
 
3175
      # from the output so that they don't get included in the library
 
3176
      # dependencies.
 
3177
      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
3178
      ;;
 
3179
    *)
 
3180
      if test "$GXX" = yes; then
 
3181
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
3182
      else
 
3183
        # FIXME: insert proper C++ library support
 
3184
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3185
      fi
 
3186
      ;;
 
3187
    esac
 
3188
    ;;
 
3189
  hpux10*|hpux11*)
 
3190
    if test $with_gnu_ld = no; then
 
3191
      case "$host_cpu" in
 
3192
      hppa*64*)
 
3193
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3194
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
3195
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3196
        ;;
 
3197
      ia64*)
 
3198
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
3199
        ;;
 
3200
      *)
 
3201
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3202
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3203
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
3204
        ;;
 
3205
      esac
 
3206
    fi
 
3207
    case "$host_cpu" in
 
3208
    hppa*64*)
 
3209
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3210
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3211
      ;;
 
3212
    ia64*)
 
3213
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3214
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3215
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
3216
                                              # but as the default
 
3217
                                              # location of the library.
 
3218
      ;;
 
3219
    *)
 
3220
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3221
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
3222
                                              # but as the default
 
3223
                                              # location of the library.
 
3224
      ;;
 
3225
    esac
 
3226
 
 
3227
    case $cc_basename in
 
3228
      CC*)
 
3229
        # FIXME: insert proper C++ library support
 
3230
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3231
        ;;
 
3232
      aCC*)
 
3233
        case "$host_cpu" in
 
3234
        hppa*64*|ia64*)
 
3235
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
3236
          ;;
 
3237
        *)
 
3238
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
3239
          ;;
 
3240
        esac
 
3241
        # Commands to make compiler produce verbose output that lists
 
3242
        # what "hidden" libraries, object files and flags are used when
 
3243
        # linking a shared library.
 
3244
        #
 
3245
        # There doesn't appear to be a way to prevent this compiler from
 
3246
        # explicitly linking system object files so we need to strip them
 
3247
        # from the output so that they don't get included in the library
 
3248
        # dependencies.
 
3249
        output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
3250
        ;;
 
3251
      *)
 
3252
        if test "$GXX" = yes; then
 
3253
          if test $with_gnu_ld = no; then
 
3254
            case "$host_cpu" in
 
3255
            ia64*|hppa*64*)
 
3256
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
3257
              ;;
 
3258
            *)
 
3259
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
3260
              ;;
 
3261
            esac
 
3262
          fi
 
3263
        else
 
3264
          # FIXME: insert proper C++ library support
 
3265
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3266
        fi
 
3267
        ;;
 
3268
    esac
 
3269
    ;;
 
3270
  irix5* | irix6*)
 
3271
    case $cc_basename in
 
3272
      CC*)
 
3273
        # SGI C++
 
3274
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
3275
 
 
3276
        # Archives containing C++ object files must be created using
 
3277
        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
 
3278
        # necessary to make sure instantiated templates are included
 
3279
        # in the archive.
 
3280
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
 
3281
        ;;
 
3282
      *)
 
3283
        if test "$GXX" = yes; then
 
3284
          if test "$with_gnu_ld" = no; then
 
3285
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
3286
          else
 
3287
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
 
3288
          fi
 
3289
        fi
 
3290
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
3291
        ;;
 
3292
    esac
 
3293
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
3294
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3295
    ;;
 
3296
  linux*)
 
3297
    case $cc_basename in
 
3298
      KCC*)
 
3299
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
3300
 
 
3301
        # KCC will only create a shared library if the output file
 
3302
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
3303
        # to its proper name (with version) after linking.
 
3304
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
3305
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
 
3306
        # Commands to make compiler produce verbose output that lists
 
3307
        # what "hidden" libraries, object files and flags are used when
 
3308
        # linking a shared library.
 
3309
        #
 
3310
        # There doesn't appear to be a way to prevent this compiler from
 
3311
        # explicitly linking system object files so we need to strip them
 
3312
        # from the output so that they don't get included in the library
 
3313
        # dependencies.
 
3314
        output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
3315
 
 
3316
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
 
3317
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
3318
 
 
3319
        # Archives containing C++ object files must be created using
 
3320
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
3321
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
3322
        ;;
 
3323
      icpc*)
 
3324
        # Intel C++
 
3325
        with_gnu_ld=yes
 
3326
        # version 8.0 and above of icpc choke on multiply defined symbols
 
3327
        # if we add $predep_objects and $postdep_objects, however 7.1 and
 
3328
        # earlier do not add the objects themselves.
 
3329
        case `$CC -V 2>&1` in
 
3330
        *"Version 7."*)
 
3331
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
3332
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
3333
          ;;
 
3334
        *)  # Version 8.0 or newer
 
3335
          tmp_idyn=
 
3336
          case $host_cpu in
 
3337
            ia64*) tmp_idyn=' -i_dynamic';;
 
3338
          esac
 
3339
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
3340
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
3341
          ;;
 
3342
        esac
 
3343
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3344
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
3345
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
3346
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
3347
        ;;
 
3348
      pgCC*)
 
3349
        # Portland Group C++ compiler
 
3350
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 
3351
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
 
3352
 
 
3353
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
3354
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
3355
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
3356
        ;;
 
3357
      cxx*)
 
3358
        # Compaq C++
 
3359
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
3360
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
 
3361
 
 
3362
        runpath_var=LD_RUN_PATH
 
3363
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
3364
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3365
 
 
3366
        # Commands to make compiler produce verbose output that lists
 
3367
        # what "hidden" libraries, object files and flags are used when
 
3368
        # linking a shared library.
 
3369
        #
 
3370
        # There doesn't appear to be a way to prevent this compiler from
 
3371
        # explicitly linking system object files so we need to strip them
 
3372
        # from the output so that they don't get included in the library
 
3373
        # dependencies.
 
3374
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
3375
        ;;
 
3376
    esac
 
3377
    ;;
 
3378
  lynxos*)
 
3379
    # FIXME: insert proper C++ library support
 
3380
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3381
    ;;
 
3382
  m88k*)
 
3383
    # FIXME: insert proper C++ library support
 
3384
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3385
    ;;
 
3386
  mvs*)
 
3387
    case $cc_basename in
 
3388
      cxx*)
 
3389
        # FIXME: insert proper C++ library support
 
3390
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3391
        ;;
 
3392
      *)
 
3393
        # FIXME: insert proper C++ library support
 
3394
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3395
        ;;
 
3396
    esac
 
3397
    ;;
 
3398
  netbsd*)
 
3399
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
3400
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
 
3401
      wlarc=
 
3402
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
3403
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3404
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3405
    fi
 
3406
    # Workaround some broken pre-1.5 toolchains
 
3407
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
 
3408
    ;;
 
3409
  openbsd2*)
 
3410
    # C++ shared libraries are fairly broken
 
3411
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3412
    ;;
 
3413
  openbsd*)
 
3414
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3415
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3416
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
3417
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
3418
    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
3419
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
 
3420
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
3421
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
3422
    fi
 
3423
    output_verbose_link_cmd='echo'
 
3424
    ;;
 
3425
  osf3*)
 
3426
    case $cc_basename in
 
3427
      KCC*)
 
3428
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
3429
 
 
3430
        # KCC will only create a shared library if the output file
 
3431
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
3432
        # to its proper name (with version) after linking.
 
3433
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
3434
 
 
3435
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
3436
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3437
 
 
3438
        # Archives containing C++ object files must be created using
 
3439
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
3440
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
3441
 
 
3442
        ;;
 
3443
      RCC*)
 
3444
        # Rational C++ 2.4.1
 
3445
        # FIXME: insert proper C++ library support
 
3446
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3447
        ;;
 
3448
      cxx*)
 
3449
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
3450
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
3451
 
 
3452
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
3453
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3454
 
 
3455
        # Commands to make compiler produce verbose output that lists
 
3456
        # what "hidden" libraries, object files and flags are used when
 
3457
        # linking a shared library.
 
3458
        #
 
3459
        # There doesn't appear to be a way to prevent this compiler from
 
3460
        # explicitly linking system object files so we need to strip them
 
3461
        # from the output so that they don't get included in the library
 
3462
        # dependencies.
 
3463
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
3464
        ;;
 
3465
      *)
 
3466
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
3467
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
3468
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
3469
 
 
3470
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
3471
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3472
 
 
3473
          # Commands to make compiler produce verbose output that lists
 
3474
          # what "hidden" libraries, object files and flags are used when
 
3475
          # linking a shared library.
 
3476
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
3477
 
 
3478
        else
 
3479
          # FIXME: insert proper C++ library support
 
3480
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3481
        fi
 
3482
        ;;
 
3483
    esac
 
3484
    ;;
 
3485
  osf4* | osf5*)
 
3486
    case $cc_basename in
 
3487
      KCC*)
 
3488
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
3489
 
 
3490
        # KCC will only create a shared library if the output file
 
3491
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
3492
        # to its proper name (with version) after linking.
 
3493
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
3494
 
 
3495
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
3496
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3497
 
 
3498
        # Archives containing C++ object files must be created using
 
3499
        # the KAI C++ compiler.
 
3500
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
 
3501
        ;;
 
3502
      RCC*)
 
3503
        # Rational C++ 2.4.1
 
3504
        # FIXME: insert proper C++ library support
 
3505
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3506
        ;;
 
3507
      cxx*)
 
3508
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
3509
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
3510
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
 
3511
          echo "-hidden">> $lib.exp~
 
3512
          $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~
 
3513
          $rm $lib.exp'
 
3514
 
 
3515
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
3516
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3517
 
 
3518
        # Commands to make compiler produce verbose output that lists
 
3519
        # what "hidden" libraries, object files and flags are used when
 
3520
        # linking a shared library.
 
3521
        #
 
3522
        # There doesn't appear to be a way to prevent this compiler from
 
3523
        # explicitly linking system object files so we need to strip them
 
3524
        # from the output so that they don't get included in the library
 
3525
        # dependencies.
 
3526
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
3527
        ;;
 
3528
      *)
 
3529
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
3530
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
3531
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
3532
 
 
3533
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
3534
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3535
 
 
3536
          # Commands to make compiler produce verbose output that lists
 
3537
          # what "hidden" libraries, object files and flags are used when
 
3538
          # linking a shared library.
 
3539
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
3540
 
 
3541
        else
 
3542
          # FIXME: insert proper C++ library support
 
3543
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3544
        fi
 
3545
        ;;
 
3546
    esac
 
3547
    ;;
 
3548
  psos*)
 
3549
    # FIXME: insert proper C++ library support
 
3550
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3551
    ;;
 
3552
  sco*)
 
3553
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3554
    case $cc_basename in
 
3555
      CC*)
 
3556
        # FIXME: insert proper C++ library support
 
3557
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3558
        ;;
 
3559
      *)
 
3560
        # FIXME: insert proper C++ library support
 
3561
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3562
        ;;
 
3563
    esac
 
3564
    ;;
 
3565
  sunos4*)
 
3566
    case $cc_basename in
 
3567
      CC*)
 
3568
        # Sun C++ 4.x
 
3569
        # FIXME: insert proper C++ library support
 
3570
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3571
        ;;
 
3572
      lcc*)
 
3573
        # Lucid
 
3574
        # FIXME: insert proper C++ library support
 
3575
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3576
        ;;
 
3577
      *)
 
3578
        # FIXME: insert proper C++ library support
 
3579
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3580
        ;;
 
3581
    esac
 
3582
    ;;
 
3583
  solaris*)
 
3584
    case $cc_basename in
 
3585
      CC*)
 
3586
        # Sun C++ 4.2, 5.x and Centerline C++
 
3587
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
3588
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
3589
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
3590
        $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
3591
 
 
3592
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
3593
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3594
        case $host_os in
 
3595
          solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
3596
          *)
 
3597
            # The C++ compiler is used as linker so we must use $wl
 
3598
            # flag to pass the commands to the underlying system
 
3599
            # linker. We must also pass each convience library through
 
3600
            # to the system linker between allextract/defaultextract.
 
3601
            # The C++ compiler will combine linker options so we
 
3602
            # cannot just pass the convience library names through
 
3603
            # without $wl.
 
3604
            # Supported since Solaris 2.6 (maybe 2.5.1?)
 
3605
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
 
3606
            ;;
 
3607
        esac
 
3608
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
3609
 
 
3610
        # Commands to make compiler produce verbose output that lists
 
3611
        # what "hidden" libraries, object files and flags are used when
 
3612
        # linking a shared library.
 
3613
        #
 
3614
        # There doesn't appear to be a way to prevent this compiler from
 
3615
        # explicitly linking system object files so we need to strip them
 
3616
        # from the output so that they don't get included in the library
 
3617
        # dependencies.
 
3618
        output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
3619
 
 
3620
        # Archives containing C++ object files must be created using
 
3621
        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
3622
        # necessary to make sure instantiated templates are included
 
3623
        # in the archive.
 
3624
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
3625
        ;;
 
3626
      gcx*)
 
3627
        # Green Hills C++ Compiler
 
3628
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
3629
 
 
3630
        # The C++ compiler must be used to create the archive.
 
3631
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 
3632
        ;;
 
3633
      *)
 
3634
        # GNU C++ compiler with Solaris linker
 
3635
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
3636
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
 
3637
          if $CC --version | grep -v '^2\.7' > /dev/null; then
 
3638
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
3639
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
3640
                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
3641
 
 
3642
            # Commands to make compiler produce verbose output that lists
 
3643
            # what "hidden" libraries, object files and flags are used when
 
3644
            # linking a shared library.
 
3645
            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
 
3646
          else
 
3647
            # g++ 2.7 appears to require `-G' NOT `-shared' on this
 
3648
            # platform.
 
3649
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
3650
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
3651
                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
3652
 
 
3653
            # Commands to make compiler produce verbose output that lists
 
3654
            # what "hidden" libraries, object files and flags are used when
 
3655
            # linking a shared library.
 
3656
            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
 
3657
          fi
 
3658
 
 
3659
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
 
3660
        fi
 
3661
        ;;
 
3662
    esac
 
3663
    ;;
 
3664
  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
 
3665
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3666
    ;;
 
3667
  tandem*)
 
3668
    case $cc_basename in
 
3669
      NCC*)
 
3670
        # NonStop-UX NCC 3.20
 
3671
        # FIXME: insert proper C++ library support
 
3672
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3673
        ;;
 
3674
      *)
 
3675
        # FIXME: insert proper C++ library support
 
3676
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3677
        ;;
 
3678
    esac
 
3679
    ;;
 
3680
  vxworks*)
 
3681
    # FIXME: insert proper C++ library support
 
3682
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3683
    ;;
 
3684
  *)
 
3685
    # FIXME: insert proper C++ library support
 
3686
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3687
    ;;
 
3688
esac
 
3689
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
3690
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
3691
 
 
3692
_LT_AC_TAGVAR(GCC, $1)="$GXX"
 
3693
_LT_AC_TAGVAR(LD, $1)="$LD"
 
3694
 
 
3695
AC_LIBTOOL_POSTDEP_PREDEP($1)
 
3696
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
3697
AC_LIBTOOL_PROG_CC_C_O($1)
 
3698
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
3699
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
3700
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
3701
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
3702
AC_LIBTOOL_SYS_LIB_STRIP
 
3703
AC_LIBTOOL_DLOPEN_SELF($1)
 
3704
 
 
3705
AC_LIBTOOL_CONFIG($1)
 
3706
 
 
3707
AC_LANG_POP
 
3708
CC=$lt_save_CC
 
3709
LDCXX=$LD
 
3710
LD=$lt_save_LD
 
3711
GCC=$lt_save_GCC
 
3712
with_gnu_ldcxx=$with_gnu_ld
 
3713
with_gnu_ld=$lt_save_with_gnu_ld
 
3714
lt_cv_path_LDCXX=$lt_cv_path_LD
 
3715
lt_cv_path_LD=$lt_save_path_LD
 
3716
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
 
3717
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
 
3718
])# AC_LIBTOOL_LANG_CXX_CONFIG
 
3719
 
 
3720
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
 
3721
# ------------------------
 
3722
# Figure out "hidden" library dependencies from verbose
 
3723
# compiler output when linking a shared library.
 
3724
# Parse the compiler output and extract the necessary
 
3725
# objects, libraries and library flags.
 
3726
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
 
3727
dnl we can't use the lt_simple_compile_test_code here,
 
3728
dnl because it contains code intended for an executable,
 
3729
dnl not a library.  It's possible we should let each
 
3730
dnl tag define a new lt_????_link_test_code variable,
 
3731
dnl but it's only used here...
 
3732
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
 
3733
int a;
 
3734
void foo (void) { a = 0; }
 
3735
EOF
 
3736
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
 
3737
class Foo
 
3738
{
 
3739
public:
 
3740
  Foo (void) { a = 0; }
 
3741
private:
 
3742
  int a;
 
3743
};
 
3744
EOF
 
3745
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
 
3746
      subroutine foo
 
3747
      implicit none
 
3748
      integer*4 a
 
3749
      a=0
 
3750
      return
 
3751
      end
 
3752
EOF
 
3753
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
 
3754
public class foo {
 
3755
  private int a;
 
3756
  public void bar (void) {
 
3757
    a = 0;
 
3758
  }
 
3759
};
 
3760
EOF
 
3761
])
 
3762
dnl Parse the compiler output and extract the necessary
 
3763
dnl objects, libraries and library flags.
 
3764
if AC_TRY_EVAL(ac_compile); then
 
3765
  # Parse the compiler output and extract the necessary
 
3766
  # objects, libraries and library flags.
 
3767
 
 
3768
  # Sentinel used to keep track of whether or not we are before
 
3769
  # the conftest object file.
 
3770
  pre_test_object_deps_done=no
 
3771
 
 
3772
  # The `*' in the case matches for architectures that use `case' in
 
3773
  # $output_verbose_cmd can trigger glob expansion during the loop
 
3774
  # eval without this substitution.
 
3775
  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
 
3776
 
 
3777
  for p in `eval $output_verbose_link_cmd`; do
 
3778
    case $p in
 
3779
 
 
3780
    -L* | -R* | -l*)
 
3781
       # Some compilers place space between "-{L,R}" and the path.
 
3782
       # Remove the space.
 
3783
       if test $p = "-L" \
 
3784
          || test $p = "-R"; then
 
3785
         prev=$p
 
3786
         continue
 
3787
       else
 
3788
         prev=
 
3789
       fi
 
3790
 
 
3791
       if test "$pre_test_object_deps_done" = no; then
 
3792
         case $p in
 
3793
         -L* | -R*)
 
3794
           # Internal compiler library paths should come after those
 
3795
           # provided the user.  The postdeps already come after the
 
3796
           # user supplied libs so there is no need to process them.
 
3797
           if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
 
3798
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
 
3799
           else
 
3800
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
 
3801
           fi
 
3802
           ;;
 
3803
         # The "-l" case would never come before the object being
 
3804
         # linked, so don't bother handling this case.
 
3805
         esac
 
3806
       else
 
3807
         if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
 
3808
           _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
 
3809
         else
 
3810
           _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
 
3811
         fi
 
3812
       fi
 
3813
       ;;
 
3814
 
 
3815
    *.$objext)
 
3816
       # This assumes that the test object file only shows up
 
3817
       # once in the compiler output.
 
3818
       if test "$p" = "conftest.$objext"; then
 
3819
         pre_test_object_deps_done=yes
 
3820
         continue
 
3821
       fi
 
3822
 
 
3823
       if test "$pre_test_object_deps_done" = no; then
 
3824
         if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
 
3825
           _LT_AC_TAGVAR(predep_objects, $1)="$p"
 
3826
         else
 
3827
           _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
 
3828
         fi
 
3829
       else
 
3830
         if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
 
3831
           _LT_AC_TAGVAR(postdep_objects, $1)="$p"
 
3832
         else
 
3833
           _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
 
3834
         fi
 
3835
       fi
 
3836
       ;;
 
3837
 
 
3838
    *) ;; # Ignore the rest.
 
3839
 
 
3840
    esac
 
3841
  done
 
3842
 
 
3843
  # Clean up.
 
3844
  rm -f a.out a.exe
 
3845
else
 
3846
  echo "libtool.m4: error: problem compiling $1 test program"
 
3847
fi
 
3848
 
 
3849
$rm -f confest.$objext
 
3850
 
 
3851
case " $_LT_AC_TAGVAR(postdeps, $1) " in
 
3852
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
 
3853
esac
 
3854
])# AC_LIBTOOL_POSTDEP_PREDEP
 
3855
 
 
3856
# AC_LIBTOOL_LANG_F77_CONFIG
 
3857
# ------------------------
 
3858
# Ensure that the configuration vars for the C compiler are
 
3859
# suitably defined.  Those variables are subsequently used by
 
3860
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
3861
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
 
3862
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
 
3863
[AC_REQUIRE([AC_PROG_F77])
 
3864
AC_LANG_PUSH(Fortran 77)
 
3865
 
 
3866
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3867
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
3868
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
3869
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
3870
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
3871
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3872
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
3873
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
3874
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
3875
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
3876
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
3877
_LT_AC_TAGVAR(module_cmds, $1)=
 
3878
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
3879
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
3880
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
3881
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
3882
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
3883
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
3884
 
 
3885
# Source file extension for f77 test sources.
 
3886
ac_ext=f
 
3887
 
 
3888
# Object file extension for compiled f77 test sources.
 
3889
objext=o
 
3890
_LT_AC_TAGVAR(objext, $1)=$objext
 
3891
 
 
3892
# Code to be used in simple compile tests
 
3893
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
 
3894
 
 
3895
# Code to be used in simple link tests
 
3896
lt_simple_link_test_code="      program t\n      end\n"
 
3897
 
 
3898
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
3899
_LT_AC_SYS_COMPILER
 
3900
 
 
3901
# save warnings/boilerplate of simple test code
 
3902
_LT_COMPILER_BOILERPLATE
 
3903
_LT_LINKER_BOILERPLATE
 
3904
 
 
3905
# Allow CC to be a program name with arguments.
 
3906
lt_save_CC="$CC"
 
3907
CC=${F77-"f77"}
 
3908
compiler=$CC
 
3909
_LT_AC_TAGVAR(compiler, $1)=$CC
 
3910
_LT_CC_BASENAME([$compiler])
 
3911
 
 
3912
AC_MSG_CHECKING([if libtool supports shared libraries])
 
3913
AC_MSG_RESULT([$can_build_shared])
 
3914
 
 
3915
AC_MSG_CHECKING([whether to build shared libraries])
 
3916
test "$can_build_shared" = "no" && enable_shared=no
 
3917
 
 
3918
# On AIX, shared libraries and static libraries use the same namespace, and
 
3919
# are all built from PIC.
 
3920
case "$host_os" in
 
3921
aix3*)
 
3922
  test "$enable_shared" = yes && enable_static=no
 
3923
  if test -n "$RANLIB"; then
 
3924
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
3925
    postinstall_cmds='$RANLIB $lib'
 
3926
  fi
 
3927
  ;;
 
3928
aix4* | aix5*)
 
3929
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
3930
    test "$enable_shared" = yes && enable_static=no
 
3931
  fi
 
3932
  ;;
 
3933
esac
 
3934
AC_MSG_RESULT([$enable_shared])
 
3935
 
 
3936
AC_MSG_CHECKING([whether to build static libraries])
 
3937
# Make sure either enable_shared or enable_static is yes.
 
3938
test "$enable_shared" = yes || enable_static=yes
 
3939
AC_MSG_RESULT([$enable_static])
 
3940
 
 
3941
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
3942
 
 
3943
_LT_AC_TAGVAR(GCC, $1)="$G77"
 
3944
_LT_AC_TAGVAR(LD, $1)="$LD"
 
3945
 
 
3946
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
3947
AC_LIBTOOL_PROG_CC_C_O($1)
 
3948
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
3949
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
3950
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
3951
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
3952
AC_LIBTOOL_SYS_LIB_STRIP
 
3953
 
 
3954
 
 
3955
AC_LIBTOOL_CONFIG($1)
 
3956
 
 
3957
AC_LANG_POP
 
3958
CC="$lt_save_CC"
 
3959
])# AC_LIBTOOL_LANG_F77_CONFIG
 
3960
 
 
3961
 
 
3962
# AC_LIBTOOL_LANG_GCJ_CONFIG
 
3963
# --------------------------
 
3964
# Ensure that the configuration vars for the C compiler are
 
3965
# suitably defined.  Those variables are subsequently used by
 
3966
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
3967
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
 
3968
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
 
3969
[AC_LANG_SAVE
 
3970
 
 
3971
# Source file extension for Java test sources.
 
3972
ac_ext=java
 
3973
 
 
3974
# Object file extension for compiled Java test sources.
 
3975
objext=o
 
3976
_LT_AC_TAGVAR(objext, $1)=$objext
 
3977
 
 
3978
# Code to be used in simple compile tests
 
3979
lt_simple_compile_test_code="class foo {}\n"
 
3980
 
 
3981
# Code to be used in simple link tests
 
3982
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
 
3983
 
 
3984
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
3985
_LT_AC_SYS_COMPILER
 
3986
 
 
3987
# save warnings/boilerplate of simple test code
 
3988
_LT_COMPILER_BOILERPLATE
 
3989
_LT_LINKER_BOILERPLATE
 
3990
 
 
3991
# Allow CC to be a program name with arguments.
 
3992
lt_save_CC="$CC"
 
3993
CC=${GCJ-"gcj"}
 
3994
compiler=$CC
 
3995
_LT_AC_TAGVAR(compiler, $1)=$CC
 
3996
_LT_CC_BASENAME([$compiler])
 
3997
 
 
3998
# GCJ did not exist at the time GCC didn't implicitly link libc in.
 
3999
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
4000
 
 
4001
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
4002
 
 
4003
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
4004
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
4005
AC_LIBTOOL_PROG_CC_C_O($1)
 
4006
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
4007
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
4008
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
4009
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
4010
AC_LIBTOOL_SYS_LIB_STRIP
 
4011
AC_LIBTOOL_DLOPEN_SELF($1)
 
4012
 
 
4013
AC_LIBTOOL_CONFIG($1)
 
4014
 
 
4015
AC_LANG_RESTORE
 
4016
CC="$lt_save_CC"
 
4017
])# AC_LIBTOOL_LANG_GCJ_CONFIG
 
4018
 
 
4019
 
 
4020
# AC_LIBTOOL_LANG_RC_CONFIG
 
4021
# --------------------------
 
4022
# Ensure that the configuration vars for the Windows resource compiler are
 
4023
# suitably defined.  Those variables are subsequently used by
 
4024
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
4025
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
 
4026
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
 
4027
[AC_LANG_SAVE
 
4028
 
 
4029
# Source file extension for RC test sources.
 
4030
ac_ext=rc
 
4031
 
 
4032
# Object file extension for compiled RC test sources.
 
4033
objext=o
 
4034
_LT_AC_TAGVAR(objext, $1)=$objext
 
4035
 
 
4036
# Code to be used in simple compile tests
 
4037
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
 
4038
 
 
4039
# Code to be used in simple link tests
 
4040
lt_simple_link_test_code="$lt_simple_compile_test_code"
 
4041
 
 
4042
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
4043
_LT_AC_SYS_COMPILER
 
4044
 
 
4045
# save warnings/boilerplate of simple test code
 
4046
_LT_COMPILER_BOILERPLATE
 
4047
_LT_LINKER_BOILERPLATE
 
4048
 
 
4049
# Allow CC to be a program name with arguments.
 
4050
lt_save_CC="$CC"
 
4051
CC=${RC-"windres"}
 
4052
compiler=$CC
 
4053
_LT_AC_TAGVAR(compiler, $1)=$CC
 
4054
_LT_CC_BASENAME([$compiler])
 
4055
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
4056
 
 
4057
AC_LIBTOOL_CONFIG($1)
 
4058
 
 
4059
AC_LANG_RESTORE
 
4060
CC="$lt_save_CC"
 
4061
])# AC_LIBTOOL_LANG_RC_CONFIG
 
4062
 
 
4063
 
 
4064
# AC_LIBTOOL_CONFIG([TAGNAME])
 
4065
# ----------------------------
 
4066
# If TAGNAME is not passed, then create an initial libtool script
 
4067
# with a default configuration from the untagged config vars.  Otherwise
 
4068
# add code to config.status for appending the configuration named by
 
4069
# TAGNAME from the matching tagged config vars.
 
4070
AC_DEFUN([AC_LIBTOOL_CONFIG],
 
4071
[# The else clause should only fire when bootstrapping the
 
4072
# libtool distribution, otherwise you forgot to ship ltmain.sh
 
4073
# with your package, and you will get complaints that there are
 
4074
# no rules to generate ltmain.sh.
 
4075
if test -f "$ltmain"; then
 
4076
  # See if we are running on zsh, and set the options which allow our commands through
 
4077
  # without removal of \ escapes.
 
4078
  if test -n "${ZSH_VERSION+set}" ; then
 
4079
    setopt NO_GLOB_SUBST
 
4080
  fi
 
4081
  # Now quote all the things that may contain metacharacters while being
 
4082
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
 
4083
  # variables and quote the copies for generation of the libtool script.
 
4084
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
 
4085
    SED SHELL STRIP \
 
4086
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
 
4087
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
 
4088
    deplibs_check_method reload_flag reload_cmds need_locks \
 
4089
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
 
4090
    lt_cv_sys_global_symbol_to_c_name_address \
 
4091
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
 
4092
    old_postinstall_cmds old_postuninstall_cmds \
 
4093
    _LT_AC_TAGVAR(compiler, $1) \
 
4094
    _LT_AC_TAGVAR(CC, $1) \
 
4095
    _LT_AC_TAGVAR(LD, $1) \
 
4096
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
 
4097
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
 
4098
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
 
4099
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
 
4100
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
 
4101
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
 
4102
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
 
4103
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
 
4104
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
 
4105
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
 
4106
    _LT_AC_TAGVAR(predep_objects, $1) \
 
4107
    _LT_AC_TAGVAR(postdep_objects, $1) \
 
4108
    _LT_AC_TAGVAR(predeps, $1) \
 
4109
    _LT_AC_TAGVAR(postdeps, $1) \
 
4110
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
 
4111
    _LT_AC_TAGVAR(archive_cmds, $1) \
 
4112
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
 
4113
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
 
4114
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
 
4115
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
 
4116
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
 
4117
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
 
4118
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
 
4119
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
 
4120
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
 
4121
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
 
4122
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
 
4123
    _LT_AC_TAGVAR(module_cmds, $1) \
 
4124
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
 
4125
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
 
4126
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
 
4127
    _LT_AC_TAGVAR(include_expsyms, $1); do
 
4128
 
 
4129
    case $var in
 
4130
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
 
4131
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
 
4132
    _LT_AC_TAGVAR(archive_cmds, $1) | \
 
4133
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
 
4134
    _LT_AC_TAGVAR(module_cmds, $1) | \
 
4135
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
 
4136
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
 
4137
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
 
4138
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
 
4139
    postinstall_cmds | postuninstall_cmds | \
 
4140
    old_postinstall_cmds | old_postuninstall_cmds | \
 
4141
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
 
4142
      # Double-quote double-evaled strings.
 
4143
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
 
4144
      ;;
 
4145
    *)
 
4146
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
 
4147
      ;;
 
4148
    esac
 
4149
  done
 
4150
 
 
4151
  case $lt_echo in
 
4152
  *'\[$]0 --fallback-echo"')
 
4153
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
 
4154
    ;;
 
4155
  esac
 
4156
 
 
4157
ifelse([$1], [],
 
4158
  [cfgfile="${ofile}T"
 
4159
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
 
4160
  $rm -f "$cfgfile"
 
4161
  AC_MSG_NOTICE([creating $ofile])],
 
4162
  [cfgfile="$ofile"])
 
4163
 
 
4164
  cat <<__EOF__ >> "$cfgfile"
 
4165
ifelse([$1], [],
 
4166
[#! $SHELL
 
4167
 
 
4168
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
 
4169
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
 
4170
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
4171
#
 
4172
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
 
4173
# Free Software Foundation, Inc.
 
4174
#
 
4175
# This file is part of GNU Libtool:
 
4176
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 
4177
#
 
4178
# This program is free software; you can redistribute it and/or modify
 
4179
# it under the terms of the GNU General Public License as published by
 
4180
# the Free Software Foundation; either version 2 of the License, or
 
4181
# (at your option) any later version.
 
4182
#
 
4183
# This program is distributed in the hope that it will be useful, but
 
4184
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
4185
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
4186
# General Public License for more details.
 
4187
#
 
4188
# You should have received a copy of the GNU General Public License
 
4189
# along with this program; if not, write to the Free Software
 
4190
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
4191
#
 
4192
# As a special exception to the GNU General Public License, if you
 
4193
# distribute this file as part of a program that contains a
 
4194
# configuration script generated by Autoconf, you may include it under
 
4195
# the same distribution terms that you use for the rest of that program.
 
4196
 
 
4197
# A sed program that does not truncate output.
 
4198
SED=$lt_SED
 
4199
 
 
4200
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
 
4201
Xsed="$SED -e 1s/^X//"
 
4202
 
 
4203
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
4204
# if CDPATH is set.
 
4205
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
4206
 
 
4207
# The names of the tagged configurations supported by this script.
 
4208
available_tags=
 
4209
 
 
4210
# ### BEGIN LIBTOOL CONFIG],
 
4211
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
 
4212
 
 
4213
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
4214
 
 
4215
# Shell to use when invoking shell scripts.
 
4216
SHELL=$lt_SHELL
 
4217
 
 
4218
# Whether or not to build shared libraries.
 
4219
build_libtool_libs=$enable_shared
 
4220
 
 
4221
# Whether or not to build static libraries.
 
4222
build_old_libs=$enable_static
 
4223
 
 
4224
# Whether or not to add -lc for building shared libraries.
 
4225
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
 
4226
 
 
4227
# Whether or not to disallow shared libs when runtime libs are static
 
4228
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
 
4229
 
 
4230
# Whether or not to optimize for fast installation.
 
4231
fast_install=$enable_fast_install
 
4232
 
 
4233
# The host system.
 
4234
host_alias=$host_alias
 
4235
host=$host
 
4236
host_os=$host_os
 
4237
 
 
4238
# The build system.
 
4239
build_alias=$build_alias
 
4240
build=$build
 
4241
build_os=$build_os
 
4242
 
 
4243
# An echo program that does not interpret backslashes.
 
4244
echo=$lt_echo
 
4245
 
 
4246
# The archiver.
 
4247
AR=$lt_AR
 
4248
AR_FLAGS=$lt_AR_FLAGS
 
4249
 
 
4250
# A C compiler.
 
4251
LTCC=$lt_LTCC
 
4252
 
 
4253
# A language-specific compiler.
 
4254
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
 
4255
 
 
4256
# Is the compiler the GNU C compiler?
 
4257
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
 
4258
 
 
4259
# An ERE matcher.
 
4260
EGREP=$lt_EGREP
 
4261
 
 
4262
# The linker used to build libraries.
 
4263
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
 
4264
 
 
4265
# Whether we need hard or soft links.
 
4266
LN_S=$lt_LN_S
 
4267
 
 
4268
# A BSD-compatible nm program.
 
4269
NM=$lt_NM
 
4270
 
 
4271
# A symbol stripping program
 
4272
STRIP=$lt_STRIP
 
4273
 
 
4274
# Used to examine libraries when file_magic_cmd begins "file"
 
4275
MAGIC_CMD=$MAGIC_CMD
 
4276
 
 
4277
# Used on cygwin: DLL creation program.
 
4278
DLLTOOL="$DLLTOOL"
 
4279
 
 
4280
# Used on cygwin: object dumper.
 
4281
OBJDUMP="$OBJDUMP"
 
4282
 
 
4283
# Used on cygwin: assembler.
 
4284
AS="$AS"
 
4285
 
 
4286
# The name of the directory that contains temporary libtool files.
 
4287
objdir=$objdir
 
4288
 
 
4289
# How to create reloadable object files.
 
4290
reload_flag=$lt_reload_flag
 
4291
reload_cmds=$lt_reload_cmds
 
4292
 
 
4293
# How to pass a linker flag through the compiler.
 
4294
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
4295
 
 
4296
# Object file suffix (normally "o").
 
4297
objext="$ac_objext"
 
4298
 
 
4299
# Old archive suffix (normally "a").
 
4300
libext="$libext"
 
4301
 
 
4302
# Shared library suffix (normally ".so").
 
4303
shrext_cmds='$shrext_cmds'
 
4304
 
 
4305
# Executable file suffix (normally "").
 
4306
exeext="$exeext"
 
4307
 
 
4308
# Additional compiler flags for building library objects.
 
4309
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
 
4310
pic_mode=$pic_mode
 
4311
 
 
4312
# What is the maximum length of a command?
 
4313
max_cmd_len=$lt_cv_sys_max_cmd_len
 
4314
 
 
4315
# Does compiler simultaneously support -c and -o options?
 
4316
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
 
4317
 
 
4318
# Must we lock files when doing compilation?
 
4319
need_locks=$lt_need_locks
 
4320
 
 
4321
# Do we need the lib prefix for modules?
 
4322
need_lib_prefix=$need_lib_prefix
 
4323
 
 
4324
# Do we need a version for libraries?
 
4325
need_version=$need_version
 
4326
 
 
4327
# Whether dlopen is supported.
 
4328
dlopen_support=$enable_dlopen
 
4329
 
 
4330
# Whether dlopen of programs is supported.
 
4331
dlopen_self=$enable_dlopen_self
 
4332
 
 
4333
# Whether dlopen of statically linked programs is supported.
 
4334
dlopen_self_static=$enable_dlopen_self_static
 
4335
 
 
4336
# Compiler flag to prevent dynamic linking.
 
4337
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
 
4338
 
 
4339
# Compiler flag to turn off builtin functions.
 
4340
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
 
4341
 
 
4342
# Compiler flag to allow reflexive dlopens.
 
4343
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
 
4344
 
 
4345
# Compiler flag to generate shared objects directly from archives.
 
4346
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
 
4347
 
 
4348
# Compiler flag to generate thread-safe objects.
 
4349
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
 
4350
 
 
4351
# Library versioning type.
 
4352
version_type=$version_type
 
4353
 
 
4354
# Format of library name prefix.
 
4355
libname_spec=$lt_libname_spec
 
4356
 
 
4357
# List of archive names.  First name is the real one, the rest are links.
 
4358
# The last name is the one that the linker finds with -lNAME.
 
4359
library_names_spec=$lt_library_names_spec
 
4360
 
 
4361
# The coded name of the library, if different from the real name.
 
4362
soname_spec=$lt_soname_spec
 
4363
 
 
4364
# Commands used to build and install an old-style archive.
 
4365
RANLIB=$lt_RANLIB
 
4366
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
 
4367
old_postinstall_cmds=$lt_old_postinstall_cmds
 
4368
old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
4369
 
 
4370
# Create an old-style archive from a shared archive.
 
4371
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
 
4372
 
 
4373
# Create a temporary old-style archive to link instead of a shared archive.
 
4374
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
 
4375
 
 
4376
# Commands used to build and install a shared archive.
 
4377
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
 
4378
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
 
4379
postinstall_cmds=$lt_postinstall_cmds
 
4380
postuninstall_cmds=$lt_postuninstall_cmds
 
4381
 
 
4382
# Commands used to build a loadable module (assumed same as above if empty)
 
4383
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
 
4384
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
 
4385
 
 
4386
# Commands to strip libraries.
 
4387
old_striplib=$lt_old_striplib
 
4388
striplib=$lt_striplib
 
4389
 
 
4390
# Dependencies to place before the objects being linked to create a
 
4391
# shared library.
 
4392
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
 
4393
 
 
4394
# Dependencies to place after the objects being linked to create a
 
4395
# shared library.
 
4396
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
 
4397
 
 
4398
# Dependencies to place before the objects being linked to create a
 
4399
# shared library.
 
4400
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
 
4401
 
 
4402
# Dependencies to place after the objects being linked to create a
 
4403
# shared library.
 
4404
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
 
4405
 
 
4406
# The library search path used internally by the compiler when linking
 
4407
# a shared library.
 
4408
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
 
4409
 
 
4410
# Method to check whether dependent libraries are shared objects.
 
4411
deplibs_check_method=$lt_deplibs_check_method
 
4412
 
 
4413
# Command to use when deplibs_check_method == file_magic.
 
4414
file_magic_cmd=$lt_file_magic_cmd
 
4415
 
 
4416
# Flag that allows shared libraries with undefined symbols to be built.
 
4417
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
4418
 
 
4419
# Flag that forces no undefined symbols.
 
4420
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
 
4421
 
 
4422
# Commands used to finish a libtool library installation in a directory.
 
4423
finish_cmds=$lt_finish_cmds
 
4424
 
 
4425
# Same as above, but a single script fragment to be evaled but not shown.
 
4426
finish_eval=$lt_finish_eval
 
4427
 
 
4428
# Take the output of nm and produce a listing of raw symbols and C names.
 
4429
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 
4430
 
 
4431
# Transform the output of nm in a proper C declaration
 
4432
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
4433
 
 
4434
# Transform the output of nm in a C name address pair
 
4435
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
4436
 
 
4437
# This is the shared library runtime path variable.
 
4438
runpath_var=$runpath_var
 
4439
 
 
4440
# This is the shared library path variable.
 
4441
shlibpath_var=$shlibpath_var
 
4442
 
 
4443
# Is shlibpath searched before the hard-coded library search path?
 
4444
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 
4445
 
 
4446
# How to hardcode a shared library path into an executable.
 
4447
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
 
4448
 
 
4449
# Whether we should hardcode library paths into libraries.
 
4450
hardcode_into_libs=$hardcode_into_libs
 
4451
 
 
4452
# Flag to hardcode \$libdir into a binary during linking.
 
4453
# This must work even if \$libdir does not exist.
 
4454
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
 
4455
 
 
4456
# If ld is used when linking, flag to hardcode \$libdir into
 
4457
# a binary during linking. This must work even if \$libdir does
 
4458
# not exist.
 
4459
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
 
4460
 
 
4461
# Whether we need a single -rpath flag with a separated argument.
 
4462
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
 
4463
 
 
4464
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
 
4465
# resulting binary.
 
4466
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
 
4467
 
 
4468
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
 
4469
# resulting binary.
 
4470
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
 
4471
 
 
4472
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
 
4473
# the resulting binary.
 
4474
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
 
4475
 
 
4476
# Set to yes if building a shared library automatically hardcodes DIR into the library
 
4477
# and all subsequent libraries and executables linked against it.
 
4478
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
 
4479
 
 
4480
# Variables whose values should be saved in libtool wrapper scripts and
 
4481
# restored at relink time.
 
4482
variables_saved_for_relink="$variables_saved_for_relink"
 
4483
 
 
4484
# Whether libtool must link a program against all its dependency libraries.
 
4485
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
 
4486
 
 
4487
# Compile-time system search path for libraries
 
4488
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
4489
 
 
4490
# Run-time system search path for libraries
 
4491
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
4492
 
 
4493
# Fix the shell variable \$srcfile for the compiler.
 
4494
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
 
4495
 
 
4496
# Set to yes if exported symbols are required.
 
4497
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
 
4498
 
 
4499
# The commands to list exported symbols.
 
4500
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
 
4501
 
 
4502
# The commands to extract the exported symbol list from a shared archive.
 
4503
extract_expsyms_cmds=$lt_extract_expsyms_cmds
 
4504
 
 
4505
# Symbols that should not be listed in the preloaded symbols.
 
4506
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
 
4507
 
 
4508
# Symbols that must always be exported.
 
4509
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
 
4510
 
 
4511
ifelse([$1],[],
 
4512
[# ### END LIBTOOL CONFIG],
 
4513
[# ### END LIBTOOL TAG CONFIG: $tagname])
 
4514
 
 
4515
__EOF__
 
4516
 
 
4517
ifelse([$1],[], [
 
4518
  case $host_os in
 
4519
  aix3*)
 
4520
    cat <<\EOF >> "$cfgfile"
 
4521
 
 
4522
# AIX sometimes has problems with the GCC collect2 program.  For some
 
4523
# reason, if we set the COLLECT_NAMES environment variable, the problems
 
4524
# vanish in a puff of smoke.
 
4525
if test "X${COLLECT_NAMES+set}" != Xset; then
 
4526
  COLLECT_NAMES=
 
4527
  export COLLECT_NAMES
 
4528
fi
 
4529
EOF
 
4530
    ;;
 
4531
  esac
 
4532
 
 
4533
  # We use sed instead of cat because bash on DJGPP gets confused if
 
4534
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
 
4535
  # text mode, it properly converts lines to CR/LF.  This bash problem
 
4536
  # is reportedly fixed, but why not run on old versions too?
 
4537
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
 
4538
 
 
4539
  mv -f "$cfgfile" "$ofile" || \
 
4540
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
 
4541
  chmod +x "$ofile"
 
4542
])
 
4543
else
 
4544
  # If there is no Makefile yet, we rely on a make rule to execute
 
4545
  # `config.status --recheck' to rerun these tests and create the
 
4546
  # libtool script then.
 
4547
  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
 
4548
  if test -f "$ltmain_in"; then
 
4549
    test -f Makefile && make "$ltmain"
 
4550
  fi
 
4551
fi
 
4552
])# AC_LIBTOOL_CONFIG
 
4553
 
 
4554
 
 
4555
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
 
4556
# -------------------------------------------
 
4557
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
 
4558
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
4559
 
 
4560
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
4561
 
 
4562
if test "$GCC" = yes; then
 
4563
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
4564
 
 
4565
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
 
4566
    lt_cv_prog_compiler_rtti_exceptions,
 
4567
    [-fno-rtti -fno-exceptions], [],
 
4568
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
 
4569
fi
 
4570
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
 
4571
 
 
4572
 
 
4573
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
4574
# ---------------------------------
 
4575
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
 
4576
[AC_REQUIRE([AC_CANONICAL_HOST])
 
4577
AC_REQUIRE([AC_PROG_NM])
 
4578
AC_REQUIRE([AC_OBJEXT])
 
4579
# Check for command to grab the raw symbol name followed by C symbol from nm.
 
4580
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
 
4581
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
 
4582
[
 
4583
# These are sane defaults that work on at least a few old systems.
 
4584
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
4585
 
 
4586
# Character class describing NM global symbol codes.
 
4587
symcode='[[BCDEGRST]]'
 
4588
 
 
4589
# Regexp to match symbols that can be accessed directly from C.
 
4590
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
4591
 
 
4592
# Transform an extracted symbol line into a proper C declaration
 
4593
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
 
4594
 
 
4595
# Transform an extracted symbol line into symbol name and symbol address
 
4596
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
 
4597
 
 
4598
# Define system-specific variables.
 
4599
case $host_os in
 
4600
aix*)
 
4601
  symcode='[[BCDT]]'
 
4602
  ;;
 
4603
cygwin* | mingw* | pw32*)
 
4604
  symcode='[[ABCDGISTW]]'
 
4605
  ;;
 
4606
hpux*) # Its linker distinguishes data from code symbols
 
4607
  if test "$host_cpu" = ia64; then
 
4608
    symcode='[[ABCDEGRST]]'
 
4609
  fi
 
4610
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
4611
  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
 
4612
  ;;
 
4613
linux*)
 
4614
  if test "$host_cpu" = ia64; then
 
4615
    symcode='[[ABCDGIRSTW]]'
 
4616
    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
4617
    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
 
4618
  fi
 
4619
  ;;
 
4620
irix* | nonstopux*)
 
4621
  symcode='[[BCDEGRST]]'
 
4622
  ;;
 
4623
osf*)
 
4624
  symcode='[[BCDEGQRST]]'
 
4625
  ;;
 
4626
solaris* | sysv5*)
 
4627
  symcode='[[BDRT]]'
 
4628
  ;;
 
4629
sysv4)
 
4630
  symcode='[[DFNSTU]]'
 
4631
  ;;
 
4632
esac
 
4633
 
 
4634
# Handle CRLF in mingw tool chain
 
4635
opt_cr=
 
4636
case $build_os in
 
4637
mingw*)
 
4638
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
 
4639
  ;;
 
4640
esac
 
4641
 
 
4642
# If we're using GNU nm, then use its standard symbol codes.
 
4643
case `$NM -V 2>&1` in
 
4644
*GNU* | *'with BFD'*)
 
4645
  symcode='[[ABCDGIRSTW]]' ;;
 
4646
esac
 
4647
 
 
4648
# Try without a prefix undercore, then with it.
 
4649
for ac_symprfx in "" "_"; do
 
4650
 
 
4651
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
 
4652
  symxfrm="\\1 $ac_symprfx\\2 \\2"
 
4653
 
 
4654
  # Write the raw and C identifiers.
 
4655
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
 
4656
 
 
4657
  # Check to see that the pipe works correctly.
 
4658
  pipe_works=no
 
4659
 
 
4660
  rm -f conftest*
 
4661
  cat > conftest.$ac_ext <<EOF
 
4662
#ifdef __cplusplus
 
4663
extern "C" {
 
4664
#endif
 
4665
char nm_test_var;
 
4666
void nm_test_func(){}
 
4667
#ifdef __cplusplus
 
4668
}
 
4669
#endif
 
4670
int main(){nm_test_var='a';nm_test_func();return(0);}
 
4671
EOF
 
4672
 
 
4673
  if AC_TRY_EVAL(ac_compile); then
 
4674
    # Now try to grab the symbols.
 
4675
    nlist=conftest.nm
 
4676
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
 
4677
      # Try sorting and uniquifying the output.
 
4678
      if sort "$nlist" | uniq > "$nlist"T; then
 
4679
        mv -f "$nlist"T "$nlist"
 
4680
      else
 
4681
        rm -f "$nlist"T
 
4682
      fi
 
4683
 
 
4684
      # Make sure that we snagged all the symbols we need.
 
4685
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
 
4686
        if grep ' nm_test_func$' "$nlist" >/dev/null; then
 
4687
          cat <<EOF > conftest.$ac_ext
 
4688
#ifdef __cplusplus
 
4689
extern "C" {
 
4690
#endif
 
4691
 
 
4692
EOF
 
4693
          # Now generate the symbol file.
 
4694
          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
 
4695
 
 
4696
          cat <<EOF >> conftest.$ac_ext
 
4697
#if defined (__STDC__) && __STDC__
 
4698
# define lt_ptr_t void *
 
4699
#else
 
4700
# define lt_ptr_t char *
 
4701
# define const
 
4702
#endif
 
4703
 
 
4704
/* The mapping between symbol names and symbols. */
 
4705
const struct {
 
4706
  const char *name;
 
4707
  lt_ptr_t address;
 
4708
}
 
4709
lt_preloaded_symbols[[]] =
 
4710
{
 
4711
EOF
 
4712
          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
 
4713
          cat <<\EOF >> conftest.$ac_ext
 
4714
  {0, (lt_ptr_t) 0}
 
4715
};
 
4716
 
 
4717
#ifdef __cplusplus
 
4718
}
 
4719
#endif
 
4720
EOF
 
4721
          # Now try linking the two files.
 
4722
          mv conftest.$ac_objext conftstm.$ac_objext
 
4723
          lt_save_LIBS="$LIBS"
 
4724
          lt_save_CFLAGS="$CFLAGS"
 
4725
          LIBS="conftstm.$ac_objext"
 
4726
          CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
 
4727
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 
4728
            pipe_works=yes
 
4729
          fi
 
4730
          LIBS="$lt_save_LIBS"
 
4731
          CFLAGS="$lt_save_CFLAGS"
 
4732
        else
 
4733
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 
4734
        fi
 
4735
      else
 
4736
        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
 
4737
      fi
 
4738
    else
 
4739
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
 
4740
    fi
 
4741
  else
 
4742
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
 
4743
    cat conftest.$ac_ext >&5
 
4744
  fi
 
4745
  rm -f conftest* conftst*
 
4746
 
 
4747
  # Do not use the global_symbol_pipe unless it works.
 
4748
  if test "$pipe_works" = yes; then
 
4749
    break
 
4750
  else
 
4751
    lt_cv_sys_global_symbol_pipe=
 
4752
  fi
 
4753
done
 
4754
])
 
4755
if test -z "$lt_cv_sys_global_symbol_pipe"; then
 
4756
  lt_cv_sys_global_symbol_to_cdecl=
 
4757
fi
 
4758
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
 
4759
  AC_MSG_RESULT(failed)
 
4760
else
 
4761
  AC_MSG_RESULT(ok)
 
4762
fi
 
4763
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
4764
 
 
4765
 
 
4766
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
 
4767
# ---------------------------------------
 
4768
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
 
4769
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
 
4770
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
4771
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
 
4772
 
 
4773
AC_MSG_CHECKING([for $compiler option to produce PIC])
 
4774
 ifelse([$1],[CXX],[
 
4775
  # C++ specific cases for pic, static, wl, etc.
 
4776
  if test "$GXX" = yes; then
 
4777
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4778
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4779
 
 
4780
    case $host_os in
 
4781
    aix*)
 
4782
      # All AIX code is PIC.
 
4783
      if test "$host_cpu" = ia64; then
 
4784
        # AIX 5 now supports IA64 processor
 
4785
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4786
      fi
 
4787
      ;;
 
4788
    amigaos*)
 
4789
      # FIXME: we need at least 68020 code to build shared libraries, but
 
4790
      # adding the `-m68020' flag to GCC prevents building anything better,
 
4791
      # like `-m68040'.
 
4792
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
4793
      ;;
 
4794
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
4795
      # PIC is the default for these OSes.
 
4796
      ;;
 
4797
    mingw* | os2* | pw32*)
 
4798
      # This hack is so that the source file can tell whether it is being
 
4799
      # built for inclusion in a dll (and should export symbols for example).
 
4800
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
4801
      ;;
 
4802
    darwin* | rhapsody*)
 
4803
      # PIC is the default on this platform
 
4804
      # Common symbols not allowed in MH_DYLIB files
 
4805
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
4806
      ;;
 
4807
    *djgpp*)
 
4808
      # DJGPP does not support shared libraries at all
 
4809
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
4810
      ;;
 
4811
    sysv4*MP*)
 
4812
      if test -d /usr/nec; then
 
4813
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
4814
      fi
 
4815
      ;;
 
4816
    hpux*)
 
4817
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
4818
      # not for PA HP-UX.
 
4819
      case "$host_cpu" in
 
4820
      hppa*64*|ia64*)
 
4821
        ;;
 
4822
      *)
 
4823
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4824
        ;;
 
4825
      esac
 
4826
      ;;
 
4827
    *)
 
4828
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4829
      ;;
 
4830
    esac
 
4831
  else
 
4832
    case $host_os in
 
4833
      aix4* | aix5*)
 
4834
        # All AIX code is PIC.
 
4835
        if test "$host_cpu" = ia64; then
 
4836
          # AIX 5 now supports IA64 processor
 
4837
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4838
        else
 
4839
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
4840
        fi
 
4841
        ;;
 
4842
      chorus*)
 
4843
        case $cc_basename in
 
4844
        cxch68*)
 
4845
          # Green Hills C++ Compiler
 
4846
          # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
 
4847
          ;;
 
4848
        esac
 
4849
        ;;
 
4850
       darwin*)
 
4851
         # PIC is the default on this platform
 
4852
         # Common symbols not allowed in MH_DYLIB files
 
4853
         case $cc_basename in
 
4854
           xlc*)
 
4855
           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
 
4856
           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4857
           ;;
 
4858
         esac
 
4859
       ;;
 
4860
      dgux*)
 
4861
        case $cc_basename in
 
4862
          ec++*)
 
4863
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4864
            ;;
 
4865
          ghcx*)
 
4866
            # Green Hills C++ Compiler
 
4867
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
4868
            ;;
 
4869
          *)
 
4870
            ;;
 
4871
        esac
 
4872
        ;;
 
4873
      freebsd* | kfreebsd*-gnu | dragonfly*)
 
4874
        # FreeBSD uses GNU C++
 
4875
        ;;
 
4876
      hpux9* | hpux10* | hpux11*)
 
4877
        case $cc_basename in
 
4878
          CC*)
 
4879
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4880
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
4881
            if test "$host_cpu" != ia64; then
 
4882
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
4883
            fi
 
4884
            ;;
 
4885
          aCC*)
 
4886
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4887
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
4888
            case "$host_cpu" in
 
4889
            hppa*64*|ia64*)
 
4890
              # +Z the default
 
4891
              ;;
 
4892
            *)
 
4893
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
4894
              ;;
 
4895
            esac
 
4896
            ;;
 
4897
          *)
 
4898
            ;;
 
4899
        esac
 
4900
        ;;
 
4901
      irix5* | irix6* | nonstopux*)
 
4902
        case $cc_basename in
 
4903
          CC*)
 
4904
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4905
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
4906
            # CC pic flag -KPIC is the default.
 
4907
            ;;
 
4908
          *)
 
4909
            ;;
 
4910
        esac
 
4911
        ;;
 
4912
      linux*)
 
4913
        case $cc_basename in
 
4914
          KCC*)
 
4915
            # KAI C++ Compiler
 
4916
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
4917
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4918
            ;;
 
4919
          icpc* | ecpc*)
 
4920
            # Intel C++
 
4921
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4922
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4923
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4924
            ;;
 
4925
          pgCC*)
 
4926
            # Portland Group C++ compiler.
 
4927
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4928
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
4929
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4930
            ;;
 
4931
          cxx*)
 
4932
            # Compaq C++
 
4933
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
4934
            # Linux and Compaq Tru64 Unix objects are PIC.
 
4935
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
4936
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
4937
            ;;
 
4938
          *)
 
4939
            ;;
 
4940
        esac
 
4941
        ;;
 
4942
      lynxos*)
 
4943
        ;;
 
4944
      m88k*)
 
4945
        ;;
 
4946
      mvs*)
 
4947
        case $cc_basename in
 
4948
          cxx*)
 
4949
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
 
4950
            ;;
 
4951
          *)
 
4952
            ;;
 
4953
        esac
 
4954
        ;;
 
4955
      netbsd*)
 
4956
        ;;
 
4957
      osf3* | osf4* | osf5*)
 
4958
        case $cc_basename in
 
4959
          KCC*)
 
4960
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
4961
            ;;
 
4962
          RCC*)
 
4963
            # Rational C++ 2.4.1
 
4964
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
4965
            ;;
 
4966
          cxx*)
 
4967
            # Digital/Compaq C++
 
4968
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4969
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
4970
            # Linux and Compaq Tru64 Unix objects are PIC.
 
4971
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
4972
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
4973
            ;;
 
4974
          *)
 
4975
            ;;
 
4976
        esac
 
4977
        ;;
 
4978
      psos*)
 
4979
        ;;
 
4980
      sco*)
 
4981
        case $cc_basename in
 
4982
          CC*)
 
4983
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4984
            ;;
 
4985
          *)
 
4986
            ;;
 
4987
        esac
 
4988
        ;;
 
4989
      solaris*)
 
4990
        case $cc_basename in
 
4991
          CC*)
 
4992
            # Sun C++ 4.2, 5.x and Centerline C++
 
4993
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4994
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4995
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
4996
            ;;
 
4997
          gcx*)
 
4998
            # Green Hills C++ Compiler
 
4999
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
5000
            ;;
 
5001
          *)
 
5002
            ;;
 
5003
        esac
 
5004
        ;;
 
5005
      sunos4*)
 
5006
        case $cc_basename in
 
5007
          CC*)
 
5008
            # Sun C++ 4.x
 
5009
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5010
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5011
            ;;
 
5012
          lcc*)
 
5013
            # Lucid
 
5014
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5015
            ;;
 
5016
          *)
 
5017
            ;;
 
5018
        esac
 
5019
        ;;
 
5020
      tandem*)
 
5021
        case $cc_basename in
 
5022
          NCC*)
 
5023
            # NonStop-UX NCC 3.20
 
5024
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5025
            ;;
 
5026
          *)
 
5027
            ;;
 
5028
        esac
 
5029
        ;;
 
5030
      unixware*)
 
5031
        ;;
 
5032
      vxworks*)
 
5033
        ;;
 
5034
      *)
 
5035
        _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5036
        ;;
 
5037
    esac
 
5038
  fi
 
5039
],
 
5040
[
 
5041
  if test "$GCC" = yes; then
 
5042
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5043
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5044
 
 
5045
    case $host_os in
 
5046
      aix*)
 
5047
      # All AIX code is PIC.
 
5048
      if test "$host_cpu" = ia64; then
 
5049
        # AIX 5 now supports IA64 processor
 
5050
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5051
      fi
 
5052
      ;;
 
5053
 
 
5054
    amigaos*)
 
5055
      # FIXME: we need at least 68020 code to build shared libraries, but
 
5056
      # adding the `-m68020' flag to GCC prevents building anything better,
 
5057
      # like `-m68040'.
 
5058
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
5059
      ;;
 
5060
 
 
5061
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
5062
      # PIC is the default for these OSes.
 
5063
      ;;
 
5064
 
 
5065
    mingw* | pw32* | os2*)
 
5066
      # This hack is so that the source file can tell whether it is being
 
5067
      # built for inclusion in a dll (and should export symbols for example).
 
5068
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
5069
      ;;
 
5070
 
 
5071
    darwin* | rhapsody*)
 
5072
      # PIC is the default on this platform
 
5073
      # Common symbols not allowed in MH_DYLIB files
 
5074
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
5075
      ;;
 
5076
 
 
5077
    msdosdjgpp*)
 
5078
      # Just because we use GCC doesn't mean we suddenly get shared libraries
 
5079
      # on systems that don't support them.
 
5080
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5081
      enable_shared=no
 
5082
      ;;
 
5083
 
 
5084
    sysv4*MP*)
 
5085
      if test -d /usr/nec; then
 
5086
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
5087
      fi
 
5088
      ;;
 
5089
 
 
5090
    hpux*)
 
5091
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
5092
      # not for PA HP-UX.
 
5093
      case "$host_cpu" in
 
5094
      hppa*64*|ia64*)
 
5095
        # +Z the default
 
5096
        ;;
 
5097
      *)
 
5098
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5099
        ;;
 
5100
      esac
 
5101
      ;;
 
5102
 
 
5103
    *)
 
5104
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5105
      ;;
 
5106
    esac
 
5107
  else
 
5108
    # PORTME Check for flag to pass linker flags through the system compiler.
 
5109
    case $host_os in
 
5110
    aix*)
 
5111
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5112
      if test "$host_cpu" = ia64; then
 
5113
        # AIX 5 now supports IA64 processor
 
5114
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5115
      else
 
5116
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
5117
      fi
 
5118
      ;;
 
5119
      darwin*)
 
5120
        # PIC is the default on this platform
 
5121
        # Common symbols not allowed in MH_DYLIB files
 
5122
       case $cc_basename in
 
5123
         xlc*)
 
5124
         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
 
5125
         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5126
         ;;
 
5127
       esac
 
5128
       ;;
 
5129
 
 
5130
    mingw* | pw32* | os2*)
 
5131
      # This hack is so that the source file can tell whether it is being
 
5132
      # built for inclusion in a dll (and should export symbols for example).
 
5133
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
5134
      ;;
 
5135
 
 
5136
    hpux9* | hpux10* | hpux11*)
 
5137
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5138
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
5139
      # not for PA HP-UX.
 
5140
      case "$host_cpu" in
 
5141
      hppa*64*|ia64*)
 
5142
        # +Z the default
 
5143
        ;;
 
5144
      *)
 
5145
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
5146
        ;;
 
5147
      esac
 
5148
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
 
5149
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
5150
      ;;
 
5151
 
 
5152
    irix5* | irix6* | nonstopux*)
 
5153
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5154
      # PIC (with -KPIC) is the default.
 
5155
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5156
      ;;
 
5157
 
 
5158
    newsos6)
 
5159
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5160
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5161
      ;;
 
5162
 
 
5163
    linux*)
 
5164
      case $cc_basename in
 
5165
      icc* | ecc*)
 
5166
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5167
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5168
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5169
        ;;
 
5170
      pgcc* | pgf77* | pgf90*)
 
5171
        # Portland Group compilers (*not* the Pentium gcc compiler,
 
5172
        # which looks to be a dead project)
 
5173
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5174
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
5175
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5176
        ;;
 
5177
      ccc*)
 
5178
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5179
        # All Alpha code is PIC.
 
5180
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5181
        ;;
 
5182
      esac
 
5183
      ;;
 
5184
 
 
5185
    osf3* | osf4* | osf5*)
 
5186
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5187
      # All OSF/1 code is PIC.
 
5188
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5189
      ;;
 
5190
 
 
5191
    sco3.2v5*)
 
5192
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
 
5193
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
 
5194
      ;;
 
5195
 
 
5196
    solaris*)
 
5197
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5198
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5199
      case $cc_basename in
 
5200
      f77* | f90* | f95*)
 
5201
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
 
5202
      *)
 
5203
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
 
5204
      esac
 
5205
      ;;
 
5206
 
 
5207
    sunos4*)
 
5208
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
5209
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
5210
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5211
      ;;
 
5212
 
 
5213
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
5214
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5215
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5216
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5217
      ;;
 
5218
 
 
5219
    sysv4*MP*)
 
5220
      if test -d /usr/nec ;then
 
5221
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
 
5222
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5223
      fi
 
5224
      ;;
 
5225
 
 
5226
    unicos*)
 
5227
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5228
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5229
      ;;
 
5230
 
 
5231
    uts4*)
 
5232
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5233
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5234
      ;;
 
5235
 
 
5236
    *)
 
5237
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5238
      ;;
 
5239
    esac
 
5240
  fi
 
5241
])
 
5242
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
 
5243
 
 
5244
#
 
5245
# Check to make sure the PIC flag actually works.
 
5246
#
 
5247
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
 
5248
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
 
5249
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
 
5250
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
 
5251
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
 
5252
     "" | " "*) ;;
 
5253
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
 
5254
     esac],
 
5255
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
5256
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
 
5257
fi
 
5258
case "$host_os" in
 
5259
  # For platforms which do not support PIC, -DPIC is meaningless:
 
5260
  *djgpp*)
 
5261
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
5262
    ;;
 
5263
  *)
 
5264
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
 
5265
    ;;
 
5266
esac
 
5267
])
 
5268
 
 
5269
 
 
5270
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
 
5271
# ------------------------------------
 
5272
# See if the linker supports building shared libraries.
 
5273
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
 
5274
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
5275
ifelse([$1],[CXX],[
 
5276
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5277
  case $host_os in
 
5278
  aix4* | aix5*)
 
5279
    # If we're using GNU nm, then we don't want the "-C" option.
 
5280
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
5281
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 
5282
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
5283
    else
 
5284
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
5285
    fi
 
5286
    ;;
 
5287
  pw32*)
 
5288
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
 
5289
  ;;
 
5290
  cygwin* | mingw*)
 
5291
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
 
5292
  ;;
 
5293
  *)
 
5294
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5295
  ;;
 
5296
  esac
 
5297
],[
 
5298
  runpath_var=
 
5299
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
5300
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
5301
  _LT_AC_TAGVAR(archive_cmds, $1)=
 
5302
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
5303
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
 
5304
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
 
5305
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
5306
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
5307
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
 
5308
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
5309
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
5310
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
5311
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5312
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
5313
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
5314
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
5315
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
5316
  _LT_AC_TAGVAR(module_cmds, $1)=
 
5317
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
5318
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
5319
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5320
  # include_expsyms should be a list of space-separated symbols to be *always*
 
5321
  # included in the symbol list
 
5322
  _LT_AC_TAGVAR(include_expsyms, $1)=
 
5323
  # exclude_expsyms can be an extended regexp of symbols to exclude
 
5324
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
 
5325
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
 
5326
  # as well as any symbol that contains `d'.
 
5327
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
 
5328
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
 
5329
  # platforms (ab)use it in PIC code, but their linkers get confused if
 
5330
  # the symbol is explicitly referenced.  Since portable code cannot
 
5331
  # rely on this symbol name, it's probably fine to never include it in
 
5332
  # preloaded symbol tables.
 
5333
  extract_expsyms_cmds=
 
5334
  # Just being paranoid about ensuring that cc_basename is set.
 
5335
  _LT_CC_BASENAME([$compiler])
 
5336
  case $host_os in
 
5337
  cygwin* | mingw* | pw32*)
 
5338
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
 
5339
    # When not using gcc, we currently assume that we are using
 
5340
    # Microsoft Visual C++.
 
5341
    if test "$GCC" != yes; then
 
5342
      with_gnu_ld=no
 
5343
    fi
 
5344
    ;;
 
5345
  openbsd*)
 
5346
    with_gnu_ld=no
 
5347
    ;;
 
5348
  esac
 
5349
 
 
5350
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
5351
  if test "$with_gnu_ld" = yes; then
 
5352
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
5353
    wlarc='${wl}'
 
5354
    
 
5355
    # Set some defaults for GNU ld with shared library support. These
 
5356
    # are reset later if shared libraries are not supported. Putting them
 
5357
    # here allows them to be overridden if necessary.
 
5358
    runpath_var=LD_RUN_PATH
 
5359
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
5360
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
5361
    # ancient GNU ld didn't support --whole-archive et. al.
 
5362
    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
 
5363
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
5364
      else
 
5365
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
5366
    fi
 
5367
    supports_anon_versioning=no
 
5368
    case `$LD -v 2>/dev/null` in
 
5369
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
 
5370
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
 
5371
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
 
5372
      *\ 2.11.*) ;; # other 2.11 versions
 
5373
      *) supports_anon_versioning=yes ;;
 
5374
    esac
 
5375
    
 
5376
    # See if GNU ld supports shared libraries.
 
5377
    case $host_os in
 
5378
    aix3* | aix4* | aix5*)
 
5379
      # On AIX/PPC, the GNU linker is very broken
 
5380
      if test "$host_cpu" != ia64; then
 
5381
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5382
        cat <<EOF 1>&2
 
5383
 
 
5384
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
 
5385
*** to be unable to reliably create shared libraries on AIX.
 
5386
*** Therefore, libtool is disabling shared libraries support.  If you
 
5387
*** really care for shared libraries, you may want to modify your PATH
 
5388
*** so that a non-GNU linker is found, and then restart.
 
5389
 
 
5390
EOF
 
5391
      fi
 
5392
      ;;
 
5393
 
 
5394
    amigaos*)
 
5395
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 
5396
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5397
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5398
 
 
5399
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
 
5400
      # that the semantics of dynamic libraries on AmigaOS, at least up
 
5401
      # to version 4, is to share data among multiple programs linked
 
5402
      # with the same dynamic library.  Since this doesn't match the
 
5403
      # behavior of shared libraries on other platforms, we can't use
 
5404
      # them.
 
5405
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5406
      ;;
 
5407
 
 
5408
    beos*)
 
5409
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
5410
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5411
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
5412
        # support --undefined.  This deserves some investigation.  FIXME
 
5413
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5414
      else
 
5415
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5416
      fi
 
5417
      ;;
 
5418
 
 
5419
    cygwin* | mingw* | pw32*)
 
5420
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
5421
      # as there is no search path for DLLs.
 
5422
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5423
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5424
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
5425
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
5426
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
 
5427
 
 
5428
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 
5429
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
5430
        # If the export-symbols file already is a .def file (1st line
 
5431
        # is EXPORTS), use it as is; otherwise, prepend...
 
5432
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
5433
          cp $export_symbols $output_objdir/$soname.def;
 
5434
        else
 
5435
          echo EXPORTS > $output_objdir/$soname.def;
 
5436
          cat $export_symbols >> $output_objdir/$soname.def;
 
5437
        fi~
 
5438
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
 
5439
      else
 
5440
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5441
      fi
 
5442
      ;;
 
5443
 
 
5444
    linux*)
 
5445
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
5446
        tmp_addflag=
 
5447
        case $cc_basename,$host_cpu in
 
5448
        pgcc*)                          # Portland Group C compiler
 
5449
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
5450
          tmp_addflag=' $pic_flag'
 
5451
          ;;
 
5452
        pgf77* | pgf90* )                       # Portland Group f77 and f90 compilers
 
5453
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
5454
          tmp_addflag=' $pic_flag -Mnomain' ;;
 
5455
        ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
 
5456
          tmp_addflag=' -i_dynamic' ;;
 
5457
        efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
 
5458
          tmp_addflag=' -i_dynamic -nofor_main' ;;
 
5459
        ifc* | ifort*)                  # Intel Fortran compiler
 
5460
          tmp_addflag=' -nofor_main' ;;
 
5461
        esac
 
5462
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5463
 
 
5464
        if test $supports_anon_versioning = yes; then
 
5465
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
 
5466
  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
5467
  $echo "local: *; };" >> $output_objdir/$libname.ver~
 
5468
          $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 
5469
        fi
 
5470
      else
 
5471
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5472
      fi
 
5473
      ;;
 
5474
 
 
5475
    netbsd*)
 
5476
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
5477
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 
5478
        wlarc=
 
5479
      else
 
5480
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5481
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
5482
      fi
 
5483
      ;;
 
5484
 
 
5485
    solaris* | sysv5*)
 
5486
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
 
5487
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5488
        cat <<EOF 1>&2
 
5489
 
 
5490
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
 
5491
*** create shared libraries on Solaris systems.  Therefore, libtool
 
5492
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
5493
*** binutils to release 2.9.1 or newer.  Another option is to modify
 
5494
*** your PATH or compiler configuration so that the native linker is
 
5495
*** used, and then restart.
 
5496
 
 
5497
EOF
 
5498
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
5499
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5500
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
5501
      else
 
5502
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5503
      fi
 
5504
      ;;
 
5505
 
 
5506
    sunos4*)
 
5507
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
5508
      wlarc=
 
5509
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5510
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5511
      ;;
 
5512
 
 
5513
    *)
 
5514
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
5515
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5516
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
5517
      else
 
5518
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5519
      fi
 
5520
      ;;
 
5521
    esac
 
5522
 
 
5523
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
 
5524
      runpath_var=
 
5525
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
5526
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
5527
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
5528
    fi
 
5529
  else
 
5530
    # PORTME fill in a description of your system's linker (not GNU ld)
 
5531
    case $host_os in
 
5532
    aix3*)
 
5533
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5534
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
5535
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
 
5536
      # Note: this linker hardcodes the directories in LIBPATH if there
 
5537
      # are no directories specified by -L.
 
5538
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5539
      if test "$GCC" = yes && test -z "$link_static_flag"; then
 
5540
        # Neither direct hardcoding nor static linking is supported with a
 
5541
        # broken collect2.
 
5542
        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
5543
      fi
 
5544
      ;;
 
5545
 
 
5546
    aix4* | aix5*)
 
5547
      if test "$host_cpu" = ia64; then
 
5548
        # On IA64, the linker does run time linking by default, so we don't
 
5549
        # have to do anything special.
 
5550
        aix_use_runtimelinking=no
 
5551
        exp_sym_flag='-Bexport'
 
5552
        no_entry_flag=""
 
5553
      else
 
5554
        # If we're using GNU nm, then we don't want the "-C" option.
 
5555
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
5556
        if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 
5557
          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
5558
        else
 
5559
          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
5560
        fi
 
5561
        aix_use_runtimelinking=no
 
5562
 
 
5563
        # Test if we are trying to use run time linking or normal
 
5564
        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
5565
        # need to do runtime linking.
 
5566
        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
 
5567
          for ld_flag in $LDFLAGS; do
 
5568
          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
 
5569
            aix_use_runtimelinking=yes
 
5570
            break
 
5571
          fi
 
5572
          done
 
5573
        esac
 
5574
 
 
5575
        exp_sym_flag='-bexport'
 
5576
        no_entry_flag='-bnoentry'
 
5577
      fi
 
5578
 
 
5579
      # When large executables or shared objects are built, AIX ld can
 
5580
      # have problems creating the table of contents.  If linking a library
 
5581
      # or program results in "error TOC overflow" add -mminimal-toc to
 
5582
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
5583
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
5584
 
 
5585
      _LT_AC_TAGVAR(archive_cmds, $1)=''
 
5586
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5587
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
5588
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
5589
 
 
5590
      if test "$GCC" = yes; then
 
5591
        case $host_os in aix4.[[012]]|aix4.[[012]].*)
 
5592
        # We only want to do this on AIX 4.2 and lower, the check
 
5593
        # below for broken collect2 doesn't work under 4.3+
 
5594
          collect2name=`${CC} -print-prog-name=collect2`
 
5595
          if test -f "$collect2name" && \
 
5596
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
5597
          then
 
5598
          # We have reworked collect2
 
5599
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5600
          else
 
5601
          # We have old collect2
 
5602
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
5603
          # It fails to find uninstalled libraries when the uninstalled
 
5604
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
5605
          # to unsupported forces relinking
 
5606
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5607
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5608
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
5609
          fi
 
5610
        esac
 
5611
        shared_flag='-shared'
 
5612
        if test "$aix_use_runtimelinking" = yes; then
 
5613
          shared_flag="$shared_flag "'${wl}-G'
 
5614
        fi
 
5615
      else
 
5616
        # not using gcc
 
5617
        if test "$host_cpu" = ia64; then
 
5618
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
5619
        # chokes on -Wl,-G. The following line is correct:
 
5620
          shared_flag='-G'
 
5621
        else
 
5622
        if test "$aix_use_runtimelinking" = yes; then
 
5623
            shared_flag='${wl}-G'
 
5624
          else
 
5625
            shared_flag='${wl}-bM:SRE'
 
5626
        fi
 
5627
        fi
 
5628
      fi
 
5629
 
 
5630
      # It seems that -bexpall does not export symbols beginning with
 
5631
      # underscore (_), so it is better to generate a list of symbols to export.
 
5632
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
5633
      if test "$aix_use_runtimelinking" = yes; then
 
5634
        # Warning - without using the other runtime loading flags (-brtl),
 
5635
        # -berok will link without error, but may produce a broken library.
 
5636
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
5637
       # Determine the default libpath from the value encoded in an empty executable.
 
5638
       _LT_AC_SYS_LIBPATH_AIX
 
5639
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
5640
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
5641
       else
 
5642
        if test "$host_cpu" = ia64; then
 
5643
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
5644
          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
5645
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 
5646
        else
 
5647
         # Determine the default libpath from the value encoded in an empty executable.
 
5648
         _LT_AC_SYS_LIBPATH_AIX
 
5649
         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
5650
          # Warning - without using the other run time loading flags,
 
5651
          # -berok will link without error, but may produce a broken library.
 
5652
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
5653
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
5654
          # -bexpall does not export symbols beginning with underscore (_)
 
5655
          _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
5656
          # Exported symbols can be pulled into shared objects from archives
 
5657
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
5658
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
5659
          # This is similar to how AIX traditionally builds it's shared libraries.
 
5660
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
5661
        fi
 
5662
      fi
 
5663
      ;;
 
5664
 
 
5665
    amigaos*)
 
5666
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 
5667
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5668
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5669
      # see comment about different semantics on the GNU ld section
 
5670
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5671
      ;;
 
5672
 
 
5673
    bsdi[[45]]*)
 
5674
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
 
5675
      ;;
 
5676
 
 
5677
    cygwin* | mingw* | pw32*)
 
5678
      # When not using gcc, we currently assume that we are using
 
5679
      # Microsoft Visual C++.
 
5680
      # hardcode_libdir_flag_spec is actually meaningless, as there is
 
5681
      # no search path for DLLs.
 
5682
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
5683
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5684
      # Tell ltmain to make .lib files, not .a files.
 
5685
      libext=lib
 
5686
      # Tell ltmain to make .dll files, not .so files.
 
5687
      shrext_cmds=".dll"
 
5688
      # FIXME: Setting linknames here is a bad hack.
 
5689
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
 
5690
      # The linker will automatically build a .lib file if we build a DLL.
 
5691
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
 
5692
      # FIXME: Should let the user specify the lib program.
 
5693
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
 
5694
      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
 
5695
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
5696
      ;;
 
5697
 
 
5698
    darwin* | rhapsody*)
 
5699
      case "$host_os" in
 
5700
        rhapsody* | darwin1.[[012]])
 
5701
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
 
5702
         ;;
 
5703
       *) # Darwin 1.3 on
 
5704
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
5705
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
5706
         else
 
5707
           case ${MACOSX_DEPLOYMENT_TARGET} in
 
5708
             10.[[012]])
 
5709
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
5710
               ;;
 
5711
             10.*)
 
5712
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
 
5713
               ;;
 
5714
           esac
 
5715
         fi
 
5716
         ;;
 
5717
      esac
 
5718
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
5719
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5720
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
5721
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
5722
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
 
5723
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
5724
    if test "$GCC" = yes ; then
 
5725
        output_verbose_link_cmd='echo'
 
5726
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
5727
      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
5728
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
5729
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
5730
      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
5731
    else
 
5732
      case $cc_basename in
 
5733
        xlc*)
 
5734
         output_verbose_link_cmd='echo'
 
5735
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
 
5736
         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
5737
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
5738
         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
5739
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
5740
          ;;
 
5741
       *)
 
5742
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5743
          ;;
 
5744
      esac
 
5745
    fi
 
5746
      ;;
 
5747
 
 
5748
    dgux*)
 
5749
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5750
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5751
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5752
      ;;
 
5753
 
 
5754
    freebsd1*)
 
5755
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5756
      ;;
 
5757
 
 
5758
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
 
5759
    # support.  Future versions do this automatically, but an explicit c++rt0.o
 
5760
    # does not break anything, and helps significantly (at the cost of a little
 
5761
    # extra space).
 
5762
    freebsd2.2*)
 
5763
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 
5764
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
5765
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5766
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5767
      ;;
 
5768
 
 
5769
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
 
5770
    freebsd2*)
 
5771
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
5772
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5773
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5774
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5775
      ;;
 
5776
 
 
5777
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
 
5778
    freebsd* | kfreebsd*-gnu | dragonfly*)
 
5779
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
5780
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
5781
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5782
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5783
      ;;
 
5784
 
 
5785
    hpux9*)
 
5786
      if test "$GCC" = yes; then
 
5787
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
5788
      else
 
5789
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
5790
      fi
 
5791
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
5792
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5793
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5794
 
 
5795
      # hardcode_minus_L: Not really in the search PATH,
 
5796
      # but as the default location of the library.
 
5797
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5798
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5799
      ;;
 
5800
 
 
5801
    hpux10* | hpux11*)
 
5802
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
5803
        case "$host_cpu" in
 
5804
        hppa*64*|ia64*)
 
5805
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
5806
          ;;
 
5807
        *)
 
5808
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
5809
          ;;
 
5810
        esac
 
5811
      else
 
5812
        case "$host_cpu" in
 
5813
        hppa*64*|ia64*)
 
5814
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5815
          ;;
 
5816
        *)
 
5817
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
5818
          ;;
 
5819
        esac
 
5820
      fi
 
5821
      if test "$with_gnu_ld" = no; then
 
5822
        case "$host_cpu" in
 
5823
        hppa*64*)
 
5824
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
5825
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
5826
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5827
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5828
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5829
          ;;
 
5830
        ia64*)
 
5831
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5832
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5833
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5834
 
 
5835
          # hardcode_minus_L: Not really in the search PATH,
 
5836
          # but as the default location of the library.
 
5837
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5838
          ;;
 
5839
        *)
 
5840
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
5841
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5842
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5843
          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5844
 
 
5845
          # hardcode_minus_L: Not really in the search PATH,
 
5846
          # but as the default location of the library.
 
5847
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5848
          ;;
 
5849
        esac
 
5850
      fi
 
5851
      ;;
 
5852
 
 
5853
    irix5* | irix6* | nonstopux*)
 
5854
      if test "$GCC" = yes; then
 
5855
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
5856
      else
 
5857
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
5858
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
 
5859
      fi
 
5860
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5861
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5862
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
5863
      ;;
 
5864
 
 
5865
    netbsd*)
 
5866
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
5867
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
 
5868
      else
 
5869
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
 
5870
      fi
 
5871
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
5872
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5873
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5874
      ;;
 
5875
 
 
5876
    newsos6)
 
5877
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5878
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5879
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5880
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5881
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5882
      ;;
 
5883
 
 
5884
    openbsd*)
 
5885
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5886
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5887
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
5888
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
5889
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
 
5890
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
5891
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5892
      else
 
5893
       case $host_os in
 
5894
         openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
 
5895
           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
5896
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
5897
           ;;
 
5898
         *)
 
5899
           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
5900
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
5901
           ;;
 
5902
       esac
 
5903
      fi
 
5904
      ;;
 
5905
 
 
5906
    os2*)
 
5907
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5908
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5909
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5910
      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
 
5911
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
 
5912
      ;;
 
5913
 
 
5914
    osf3*)
 
5915
      if test "$GCC" = yes; then
 
5916
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
5917
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
5918
      else
 
5919
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
5920
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
5921
      fi
 
5922
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5923
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5924
      ;;
 
5925
 
 
5926
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
 
5927
      if test "$GCC" = yes; then
 
5928
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
5929
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
5930
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5931
      else
 
5932
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
5933
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
5934
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
 
5935
        $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
 
5936
 
 
5937
        # Both c and cxx compiler support -rpath directly
 
5938
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
5939
      fi
 
5940
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5941
      ;;
 
5942
 
 
5943
    sco3.2v5*)
 
5944
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5945
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5946
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
5947
      runpath_var=LD_RUN_PATH
 
5948
      hardcode_runpath_var=yes
 
5949
      ;;
 
5950
 
 
5951
    solaris*)
 
5952
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
5953
      if test "$GCC" = yes; then
 
5954
        wlarc='${wl}'
 
5955
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
5956
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
5957
          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
 
5958
      else
 
5959
        wlarc=''
 
5960
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5961
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
5962
        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
5963
      fi
 
5964
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
5965
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5966
      case $host_os in
 
5967
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
5968
      *)
 
5969
        # The compiler driver will combine linker options so we
 
5970
        # cannot just pass the convience library names through
 
5971
        # without $wl, iff we do not link with $LD.
 
5972
        # Luckily, gcc supports the same syntax we need for Sun Studio.
 
5973
        # Supported since Solaris 2.6 (maybe 2.5.1?)
 
5974
        case $wlarc in
 
5975
        '')
 
5976
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
 
5977
        *)
 
5978
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
 
5979
        esac ;;
 
5980
      esac
 
5981
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
5982
      ;;
 
5983
 
 
5984
    sunos4*)
 
5985
      if test "x$host_vendor" = xsequent; then
 
5986
        # Use $CC to link under sequent, because it throws in some extra .o
 
5987
        # files that make .init and .fini sections work.
 
5988
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
5989
      else
 
5990
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
 
5991
      fi
 
5992
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5993
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5994
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5995
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5996
      ;;
 
5997
 
 
5998
    sysv4)
 
5999
      case $host_vendor in
 
6000
        sni)
 
6001
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6002
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
 
6003
        ;;
 
6004
        siemens)
 
6005
          ## LD is ld it makes a PLAMLIB
 
6006
          ## CC just makes a GrossModule.
 
6007
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
6008
          _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
 
6009
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
6010
        ;;
 
6011
        motorola)
 
6012
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6013
          _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
 
6014
        ;;
 
6015
      esac
 
6016
      runpath_var='LD_RUN_PATH'
 
6017
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6018
      ;;
 
6019
 
 
6020
    sysv4.3*)
 
6021
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6022
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6023
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
 
6024
      ;;
 
6025
 
 
6026
    sysv4*MP*)
 
6027
      if test -d /usr/nec; then
 
6028
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6029
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6030
        runpath_var=LD_RUN_PATH
 
6031
        hardcode_runpath_var=yes
 
6032
        _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
6033
      fi
 
6034
      ;;
 
6035
 
 
6036
    sysv4.2uw2*)
 
6037
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
6038
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6039
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
6040
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6041
      hardcode_runpath_var=yes
 
6042
      runpath_var=LD_RUN_PATH
 
6043
      ;;
 
6044
 
 
6045
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
 
6046
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
 
6047
      if test "$GCC" = yes; then
 
6048
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6049
      else
 
6050
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6051
      fi
 
6052
      runpath_var='LD_RUN_PATH'
 
6053
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6054
      ;;
 
6055
 
 
6056
    sysv5*)
 
6057
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
6058
      # $CC -shared without GNU ld will not create a library from C++
 
6059
      # object files and a static libstdc++, better avoid it by now
 
6060
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6061
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
6062
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
6063
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
6064
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6065
      runpath_var='LD_RUN_PATH'
 
6066
      ;;
 
6067
 
 
6068
    uts4*)
 
6069
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6070
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6071
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6072
      ;;
 
6073
 
 
6074
    *)
 
6075
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
6076
      ;;
 
6077
    esac
 
6078
  fi
 
6079
])
 
6080
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
6081
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
6082
 
 
6083
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 
6084
if test "$GCC" = yes; then
 
6085
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
6086
fi
 
6087
 
 
6088
#
 
6089
# Do we need to explicitly link libc?
 
6090
#
 
6091
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
 
6092
x|xyes)
 
6093
  # Assume -lc should be added
 
6094
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
6095
 
 
6096
  if test "$enable_shared" = yes && test "$GCC" = yes; then
 
6097
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
 
6098
    *'~'*)
 
6099
      # FIXME: we may have to deal with multi-command sequences.
 
6100
      ;;
 
6101
    '$CC '*)
 
6102
      # Test whether the compiler implicitly links with -lc since on some
 
6103
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
 
6104
      # to ld, don't add -lc before -lgcc.
 
6105
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
 
6106
      $rm conftest*
 
6107
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
6108
 
 
6109
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
 
6110
        soname=conftest
 
6111
        lib=conftest
 
6112
        libobjs=conftest.$ac_objext
 
6113
        deplibs=
 
6114
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
6115
        compiler_flags=-v
 
6116
        linker_flags=-v
 
6117
        verstring=
 
6118
        output_objdir=.
 
6119
        libname=conftest
 
6120
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
6121
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
6122
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
 
6123
        then
 
6124
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
6125
        else
 
6126
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
6127
        fi
 
6128
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
 
6129
      else
 
6130
        cat conftest.err 1>&5
 
6131
      fi
 
6132
      $rm conftest*
 
6133
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
 
6134
      ;;
 
6135
    esac
 
6136
  fi
 
6137
  ;;
 
6138
esac
 
6139
])# AC_LIBTOOL_PROG_LD_SHLIBS
 
6140
 
 
6141
 
 
6142
# _LT_AC_FILE_LTDLL_C
 
6143
# -------------------
 
6144
# Be careful that the start marker always follows a newline.
 
6145
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
 
6146
# /* ltdll.c starts here */
 
6147
# #define WIN32_LEAN_AND_MEAN
 
6148
# #include <windows.h>
 
6149
# #undef WIN32_LEAN_AND_MEAN
 
6150
# #include <stdio.h>
 
6151
#
 
6152
# #ifndef __CYGWIN__
 
6153
# #  ifdef __CYGWIN32__
 
6154
# #    define __CYGWIN__ __CYGWIN32__
 
6155
# #  endif
 
6156
# #endif
 
6157
#
 
6158
# #ifdef __cplusplus
 
6159
# extern "C" {
 
6160
# #endif
 
6161
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
 
6162
# #ifdef __cplusplus
 
6163
# }
 
6164
# #endif
 
6165
#
 
6166
# #ifdef __CYGWIN__
 
6167
# #include <cygwin/cygwin_dll.h>
 
6168
# DECLARE_CYGWIN_DLL( DllMain );
 
6169
# #endif
 
6170
# HINSTANCE __hDllInstance_base;
 
6171
#
 
6172
# BOOL APIENTRY
 
6173
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
 
6174
# {
 
6175
#   __hDllInstance_base = hInst;
 
6176
#   return TRUE;
 
6177
# }
 
6178
# /* ltdll.c ends here */
 
6179
])# _LT_AC_FILE_LTDLL_C
 
6180
 
 
6181
 
 
6182
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
 
6183
# ---------------------------------
 
6184
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
 
6185
 
 
6186
 
 
6187
# old names
 
6188
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
 
6189
AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
 
6190
AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
 
6191
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
 
6192
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
 
6193
AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
 
6194
AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
 
6195
 
 
6196
# This is just to silence aclocal about the macro not being used
 
6197
ifelse([AC_DISABLE_FAST_INSTALL])
 
6198
 
 
6199
AC_DEFUN([LT_AC_PROG_GCJ],
 
6200
[AC_CHECK_TOOL(GCJ, gcj, no)
 
6201
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
 
6202
  AC_SUBST(GCJFLAGS)
 
6203
])
 
6204
 
 
6205
AC_DEFUN([LT_AC_PROG_RC],
 
6206
[AC_CHECK_TOOL(RC, windres, no)
 
6207
])
 
6208
 
 
6209
# NOTE: This macro has been submitted for inclusion into   #
 
6210
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
 
6211
#  a released version of Autoconf we should remove this    #
 
6212
#  macro and use it instead.                               #
 
6213
# LT_AC_PROG_SED
 
6214
# --------------
 
6215
# Check for a fully-functional sed program, that truncates
 
6216
# as few characters as possible.  Prefer GNU sed if found.
 
6217
AC_DEFUN([LT_AC_PROG_SED],
 
6218
[AC_MSG_CHECKING([for a sed that does not truncate output])
 
6219
AC_CACHE_VAL(lt_cv_path_SED,
 
6220
[# Loop through the user's path and test for sed and gsed.
 
6221
# Then use that list of sed's as ones to test for truncation.
 
6222
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
6223
for as_dir in $PATH
 
6224
do
 
6225
  IFS=$as_save_IFS
 
6226
  test -z "$as_dir" && as_dir=.
 
6227
  for lt_ac_prog in sed gsed; do
 
6228
    for ac_exec_ext in '' $ac_executable_extensions; do
 
6229
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
 
6230
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
 
6231
      fi
 
6232
    done
 
6233
  done
 
6234
done
 
6235
lt_ac_max=0
 
6236
lt_ac_count=0
 
6237
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
 
6238
# along with /bin/sed that truncates output.
 
6239
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
 
6240
  test ! -f $lt_ac_sed && continue
 
6241
  cat /dev/null > conftest.in
 
6242
  lt_ac_count=0
 
6243
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
 
6244
  # Check for GNU sed and select it if it is found.
 
6245
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
 
6246
    lt_cv_path_SED=$lt_ac_sed
 
6247
    break
 
6248
  fi
 
6249
  while true; do
 
6250
    cat conftest.in conftest.in >conftest.tmp
 
6251
    mv conftest.tmp conftest.in
 
6252
    cp conftest.in conftest.nl
 
6253
    echo >>conftest.nl
 
6254
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
 
6255
    cmp -s conftest.out conftest.nl || break
 
6256
    # 10000 chars as input seems more than enough
 
6257
    test $lt_ac_count -gt 10 && break
 
6258
    lt_ac_count=`expr $lt_ac_count + 1`
 
6259
    if test $lt_ac_count -gt $lt_ac_max; then
 
6260
      lt_ac_max=$lt_ac_count
 
6261
      lt_cv_path_SED=$lt_ac_sed
 
6262
    fi
 
6263
  done
 
6264
done
 
6265
])
 
6266
SED=$lt_cv_path_SED
 
6267
AC_MSG_RESULT([$SED])
 
6268
])
 
6269
 
 
6270
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
6271
 
6272
# Copyright Ā© 2004 Scott James Remnant <scott@netsplit.com>.
 
6273
#
 
6274
# This program is free software; you can redistribute it and/or modify
 
6275
# it under the terms of the GNU General Public License as published by
 
6276
# the Free Software Foundation; either version 2 of the License, or
 
6277
# (at your option) any later version.
 
6278
#
 
6279
# This program is distributed in the hope that it will be useful, but
 
6280
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
6281
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
6282
# General Public License for more details.
 
6283
#
 
6284
# You should have received a copy of the GNU General Public License
 
6285
# along with this program; if not, write to the Free Software
 
6286
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
6287
#
 
6288
# As a special exception to the GNU General Public License, if you
 
6289
# distribute this file as part of a program that contains a
 
6290
# configuration script generated by Autoconf, you may include it under
 
6291
# the same distribution terms that you use for the rest of that program.
 
6292
 
 
6293
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
6294
# ----------------------------------
 
6295
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
6296
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
6297
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
 
6298
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
 
6299
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
6300
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
6301
fi
 
6302
if test -n "$PKG_CONFIG"; then
 
6303
        _pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
 
6304
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
6305
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
6306
                AC_MSG_RESULT([yes])
 
6307
        else
 
6308
                AC_MSG_RESULT([no])
 
6309
                PKG_CONFIG=""
 
6310
        fi
 
6311
                
 
6312
fi[]dnl
 
6313
])# PKG_PROG_PKG_CONFIG
 
6314
 
 
6315
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
6316
#
 
6317
# Check to see whether a particular set of modules exists.  Similar
 
6318
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
6319
#
 
6320
#
 
6321
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
 
6322
# this or PKG_CHECK_MODULES is called, or make sure to call
 
6323
# PKG_CHECK_EXISTS manually
 
6324
# --------------------------------------------------------------
 
6325
AC_DEFUN([PKG_CHECK_EXISTS],
 
6326
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
6327
if test -n "$PKG_CONFIG" && \
 
6328
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
6329
  m4_ifval([$2], [$2], [:])
 
6330
m4_ifvaln([$3], [else
 
6331
  $3])dnl
 
6332
fi])
 
6333
 
 
6334
 
 
6335
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
6336
# ---------------------------------------------
 
6337
m4_define([_PKG_CONFIG],
 
6338
[if test -n "$PKG_CONFIG"; then
 
6339
        PKG_CHECK_EXISTS([$3],
 
6340
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
6341
                         [pkg_failed=yes])
 
6342
else
 
6343
        pkg_failed=untried
 
6344
fi[]dnl
 
6345
])# _PKG_CONFIG
 
6346
 
 
6347
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
6348
# [ACTION-IF-NOT-FOUND])
 
6349
#
 
6350
#
 
6351
# Note that if there is a possibility the first call to
 
6352
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
6353
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
6354
#
 
6355
#
 
6356
# --------------------------------------------------------------
 
6357
AC_DEFUN([PKG_CHECK_MODULES],
 
6358
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
6359
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
6360
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
6361
 
 
6362
pkg_failed=no
 
6363
AC_MSG_CHECKING([for $1])
 
6364
 
 
6365
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
6366
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
6367
 
 
6368
if test $pkg_failed = yes; then
 
6369
        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
6370
        # Put the nasty error message in config.log where it belongs
 
6371
        echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
 
6372
 
 
6373
        ifelse([$4], , [AC_MSG_ERROR(dnl
 
6374
[Package requirements ($2) were not met.
 
6375
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
6376
installed software in a non-standard prefix.
 
6377
 
 
6378
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
 
6379
to avoid the need to call pkg-config.  See the pkg-config man page for
 
6380
more details.])],
 
6381
                [$4])
 
6382
elif test $pkg_failed = untried; then
 
6383
        ifelse([$4], , [AC_MSG_FAILURE(dnl
 
6384
[The pkg-config script could not be found or is too old.  Make sure it
 
6385
is in your PATH or set the PKG_CONFIG environment variable to the full
 
6386
path to pkg-config.
 
6387
 
 
6388
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
 
6389
to avoid the need to call pkg-config.  See the pkg-config man page for
 
6390
more details.
 
6391
 
 
6392
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
 
6393
                [$4])
 
6394
else
 
6395
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
6396
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
6397
        AC_MSG_RESULT([yes])
 
6398
        ifelse([$3], , :, [$3])
 
6399
fi[]dnl
 
6400
])# PKG_CHECK_MODULES
 
6401
 
 
6402
#                                                        -*- Autoconf -*-
 
6403
# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 
6404
# Generated from amversion.in; do not edit by hand.
 
6405
 
 
6406
# This program is free software; you can redistribute it and/or modify
 
6407
# it under the terms of the GNU General Public License as published by
 
6408
# the Free Software Foundation; either version 2, or (at your option)
 
6409
# any later version.
 
6410
 
 
6411
# This program is distributed in the hope that it will be useful,
 
6412
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
6413
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
6414
# GNU General Public License for more details.
 
6415
 
 
6416
# You should have received a copy of the GNU General Public License
 
6417
# along with this program; if not, write to the Free Software
 
6418
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
6419
 
 
6420
# AM_AUTOMAKE_VERSION(VERSION)
 
6421
# ----------------------------
 
6422
# Automake X.Y traces this macro to ensure aclocal.m4 has been
 
6423
# generated from the m4 files accompanying Automake X.Y.
 
6424
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
 
6425
 
 
6426
# AM_SET_CURRENT_AUTOMAKE_VERSION
 
6427
# -------------------------------
 
6428
# Call AM_AUTOMAKE_VERSION so it can be traced.
 
6429
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 
6430
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 
6431
         [AM_AUTOMAKE_VERSION([1.9.4])])
 
6432
 
 
6433
# AM_AUX_DIR_EXPAND
 
6434
 
 
6435
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
 
6436
 
 
6437
# This program is free software; you can redistribute it and/or modify
 
6438
# it under the terms of the GNU General Public License as published by
 
6439
# the Free Software Foundation; either version 2, or (at your option)
 
6440
# any later version.
 
6441
 
 
6442
# This program is distributed in the hope that it will be useful,
 
6443
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
6444
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
6445
# GNU General Public License for more details.
 
6446
 
 
6447
# You should have received a copy of the GNU General Public License
 
6448
# along with this program; if not, write to the Free Software
 
6449
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
6450
# 02111-1307, USA.
 
6451
 
 
6452
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 
6453
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 
6454
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 
6455
#
 
6456
# Of course, Automake must honor this variable whenever it calls a
 
6457
# tool from the auxiliary directory.  The problem is that $srcdir (and
 
6458
# therefore $ac_aux_dir as well) can be either absolute or relative,
 
6459
# depending on how configure is run.  This is pretty annoying, since
 
6460
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
 
6461
# source directory, any form will work fine, but in subdirectories a
 
6462
# relative path needs to be adjusted first.
 
6463
#
 
6464
# $ac_aux_dir/missing
 
6465
#    fails when called from a subdirectory if $ac_aux_dir is relative
 
6466
# $top_srcdir/$ac_aux_dir/missing
 
6467
#    fails if $ac_aux_dir is absolute,
 
6468
#    fails when called from a subdirectory in a VPATH build with
 
6469
#          a relative $ac_aux_dir
 
6470
#
 
6471
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 
6472
# are both prefixed by $srcdir.  In an in-source build this is usually
 
6473
# harmless because $srcdir is `.', but things will broke when you
 
6474
# start a VPATH build or use an absolute $srcdir.
 
6475
#
 
6476
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 
6477
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 
6478
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 
6479
# and then we would define $MISSING as
 
6480
#   MISSING="\${SHELL} $am_aux_dir/missing"
 
6481
# This will work as long as MISSING is not called from configure, because
 
6482
# unfortunately $(top_srcdir) has no meaning in configure.
 
6483
# However there are other variables, like CC, which are often used in
 
6484
# configure, and could therefore not use this "fixed" $ac_aux_dir.
 
6485
#
 
6486
# Another solution, used here, is to always expand $ac_aux_dir to an
 
6487
# absolute PATH.  The drawback is that using absolute paths prevent a
 
6488
# configured tree to be moved without reconfiguration.
 
6489
 
 
6490
AC_DEFUN([AM_AUX_DIR_EXPAND],
 
6491
[dnl Rely on autoconf to set up CDPATH properly.
 
6492
AC_PREREQ([2.50])dnl
 
6493
# expand $ac_aux_dir to an absolute path
 
6494
am_aux_dir=`cd $ac_aux_dir && pwd`
 
6495
])
 
6496
 
 
6497
# AM_CONDITIONAL                                              -*- Autoconf -*-
 
6498
 
 
6499
# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
 
6500
 
 
6501
# This program is free software; you can redistribute it and/or modify
 
6502
# it under the terms of the GNU General Public License as published by
 
6503
# the Free Software Foundation; either version 2, or (at your option)
 
6504
# any later version.
 
6505
 
 
6506
# This program is distributed in the hope that it will be useful,
 
6507
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
6508
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
6509
# GNU General Public License for more details.
 
6510
 
 
6511
# You should have received a copy of the GNU General Public License
 
6512
# along with this program; if not, write to the Free Software
 
6513
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
6514
# 02111-1307, USA.
 
6515
 
 
6516
# serial 6
 
6517
 
 
6518
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
6519
# -------------------------------------
 
6520
# Define a conditional.
 
6521
AC_DEFUN([AM_CONDITIONAL],
 
6522
[AC_PREREQ(2.52)dnl
 
6523
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
6524
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
6525
AC_SUBST([$1_TRUE])
 
6526
AC_SUBST([$1_FALSE])
 
6527
if $2; then
 
6528
  $1_TRUE=
 
6529
  $1_FALSE='#'
 
6530
else
 
6531
  $1_TRUE='#'
 
6532
  $1_FALSE=
 
6533
fi
 
6534
AC_CONFIG_COMMANDS_PRE(
 
6535
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
6536
  AC_MSG_ERROR([[conditional "$1" was never defined.
 
6537
Usually this means the macro was only invoked conditionally.]])
 
6538
fi])])
 
6539
 
 
6540
# serial 7                                              -*- Autoconf -*-
 
6541
 
 
6542
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
 
6543
# Free Software Foundation, Inc.
 
6544
 
 
6545
# This program is free software; you can redistribute it and/or modify
 
6546
# it under the terms of the GNU General Public License as published by
 
6547
# the Free Software Foundation; either version 2, or (at your option)
 
6548
# any later version.
 
6549
 
 
6550
# This program is distributed in the hope that it will be useful,
 
6551
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
6552
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
6553
# GNU General Public License for more details.
 
6554
 
 
6555
# You should have received a copy of the GNU General Public License
 
6556
# along with this program; if not, write to the Free Software
 
6557
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
6558
# 02111-1307, USA.
 
6559
 
 
6560
 
 
6561
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
6562
# written in clear, in which case automake, when reading aclocal.m4,
 
6563
# will think it sees a *use*, and therefore will trigger all it's
 
6564
# C support machinery.  Also note that it means that autoscan, seeing
 
6565
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
6566
 
 
6567
 
 
6568
 
 
6569
# _AM_DEPENDENCIES(NAME)
 
6570
# ----------------------
 
6571
# See how the compiler implements dependency checking.
 
6572
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
6573
# We try a few techniques and use that to set a single cache variable.
 
6574
#
 
6575
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 
6576
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 
6577
# dependency, and given that the user is not expected to run this macro,
 
6578
# just rely on AC_PROG_CC.
 
6579
AC_DEFUN([_AM_DEPENDENCIES],
 
6580
[AC_REQUIRE([AM_SET_DEPDIR])dnl
 
6581
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 
6582
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 
6583
AC_REQUIRE([AM_DEP_TRACK])dnl
 
6584
 
 
6585
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 
6586
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 
6587
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
6588
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
6589
                   [depcc="$$1"   am_compiler_list=])
 
6590
 
 
6591
AC_CACHE_CHECK([dependency style of $depcc],
 
6592
               [am_cv_$1_dependencies_compiler_type],
 
6593
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 
6594
  # We make a subdir and do the tests there.  Otherwise we can end up
 
6595
  # making bogus files that we don't know about and never remove.  For
 
6596
  # instance it was reported that on HP-UX the gcc test will end up
 
6597
  # making a dummy file named `D' -- because `-MD' means `put the output
 
6598
  # in D'.
 
6599
  mkdir conftest.dir
 
6600
  # Copy depcomp to subdir because otherwise we won't find it if we're
 
6601
  # using a relative directory.
 
6602
  cp "$am_depcomp" conftest.dir
 
6603
  cd conftest.dir
 
6604
  # We will build objects and dependencies in a subdirectory because
 
6605
  # it helps to detect inapplicable dependency modes.  For instance
 
6606
  # both Tru64's cc and ICC support -MD to output dependencies as a
 
6607
  # side effect of compilation, but ICC will put the dependencies in
 
6608
  # the current directory while Tru64 will put them in the object
 
6609
  # directory.
 
6610
  mkdir sub
 
6611
 
 
6612
  am_cv_$1_dependencies_compiler_type=none
 
6613
  if test "$am_compiler_list" = ""; then
 
6614
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 
6615
  fi
 
6616
  for depmode in $am_compiler_list; do
 
6617
    # Setup a source with many dependencies, because some compilers
 
6618
    # like to wrap large dependency lists on column 80 (with \), and
 
6619
    # we should not choose a depcomp mode which is confused by this.
 
6620
    #
 
6621
    # We need to recreate these files for each test, as the compiler may
 
6622
    # overwrite some of them when testing with obscure command lines.
 
6623
    # This happens at least with the AIX C compiler.
 
6624
    : > sub/conftest.c
 
6625
    for i in 1 2 3 4 5 6; do
 
6626
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
 
6627
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 
6628
      # Solaris 8's {/usr,}/bin/sh.
 
6629
      touch sub/conftst$i.h
 
6630
    done
 
6631
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
6632
 
 
6633
    case $depmode in
 
6634
    nosideeffect)
 
6635
      # after this tag, mechanisms are not by side-effect, so they'll
 
6636
      # only be used when explicitly requested
 
6637
      if test "x$enable_dependency_tracking" = xyes; then
 
6638
        continue
 
6639
      else
 
6640
        break
 
6641
      fi
 
6642
      ;;
 
6643
    none) break ;;
 
6644
    esac
 
6645
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
6646
    # mode.  It turns out that the SunPro C++ compiler does not properly
 
6647
    # handle `-M -o', and we need to detect this.
 
6648
    if depmode=$depmode \
 
6649
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
 
6650
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 
6651
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
 
6652
         >/dev/null 2>conftest.err &&
 
6653
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 
6654
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
 
6655
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 
6656
      # icc doesn't choke on unknown options, it will just issue warnings
 
6657
      # or remarks (even with -Werror).  So we grep stderr for any message
 
6658
      # that says an option was ignored or not supported.
 
6659
      # When given -MP, icc 7.0 and 7.1 complain thusly:
 
6660
      #   icc: Command line warning: ignoring option '-M'; no argument required
 
6661
      # The diagnosis changed in icc 8.0:
 
6662
      #   icc: Command line remark: option '-MP' not supported
 
6663
      if (grep 'ignoring option' conftest.err ||
 
6664
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 
6665
        am_cv_$1_dependencies_compiler_type=$depmode
 
6666
        break
 
6667
      fi
 
6668
    fi
 
6669
  done
 
6670
 
 
6671
  cd ..
 
6672
  rm -rf conftest.dir
 
6673
else
 
6674
  am_cv_$1_dependencies_compiler_type=none
 
6675
fi
 
6676
])
 
6677
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
6678
AM_CONDITIONAL([am__fastdep$1], [
 
6679
  test "x$enable_dependency_tracking" != xno \
 
6680
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 
6681
])
 
6682
 
 
6683
 
 
6684
# AM_SET_DEPDIR
 
6685
# -------------
 
6686
# Choose a directory name for dependency files.
 
6687
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
6688
AC_DEFUN([AM_SET_DEPDIR],
 
6689
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
6690
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 
6691
])
 
6692
 
 
6693
 
 
6694
# AM_DEP_TRACK
 
6695
# ------------
 
6696
AC_DEFUN([AM_DEP_TRACK],
 
6697
[AC_ARG_ENABLE(dependency-tracking,
 
6698
[  --disable-dependency-tracking  speeds up one-time build
 
6699
  --enable-dependency-tracking   do not reject slow dependency extractors])
 
6700
if test "x$enable_dependency_tracking" != xno; then
 
6701
  am_depcomp="$ac_aux_dir/depcomp"
 
6702
  AMDEPBACKSLASH='\'
 
6703
fi
 
6704
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
6705
AC_SUBST([AMDEPBACKSLASH])
 
6706
])
 
6707
 
 
6708
# Generate code to set up dependency tracking.   -*- Autoconf -*-
 
6709
 
 
6710
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
 
6711
#   Free Software Foundation, Inc.
 
6712
 
 
6713
# This program is free software; you can redistribute it and/or modify
 
6714
# it under the terms of the GNU General Public License as published by
 
6715
# the Free Software Foundation; either version 2, or (at your option)
 
6716
# any later version.
 
6717
 
 
6718
# This program is distributed in the hope that it will be useful,
 
6719
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
6720
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
6721
# GNU General Public License for more details.
 
6722
 
 
6723
# You should have received a copy of the GNU General Public License
 
6724
# along with this program; if not, write to the Free Software
 
6725
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
6726
# 02111-1307, USA.
 
6727
 
 
6728
#serial 2
 
6729
 
 
6730
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
6731
# ------------------------------
 
6732
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
6733
[for mf in $CONFIG_FILES; do
 
6734
  # Strip MF so we end up with the name of the file.
 
6735
  mf=`echo "$mf" | sed -e 's/:.*$//'`
 
6736
  # Check whether this is an Automake generated Makefile or not.
 
6737
  # We used to match only the files named `Makefile.in', but
 
6738
  # some people rename them; so instead we look at the file content.
 
6739
  # Grep'ing the first line is not enough: some people post-process
 
6740
  # each Makefile.in and add a new line on top of each file to say so.
 
6741
  # So let's grep whole file.
 
6742
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
 
6743
    dirpart=`AS_DIRNAME("$mf")`
 
6744
  else
 
6745
    continue
 
6746
  fi
 
6747
  # Extract the definition of DEPDIR, am__include, and am__quote
 
6748
  # from the Makefile without running `make'.
 
6749
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
6750
  test -z "$DEPDIR" && continue
 
6751
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
6752
  test -z "am__include" && continue
 
6753
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
 
6754
  # When using ansi2knr, U may be empty or an underscore; expand it
 
6755
  U=`sed -n 's/^U = //p' < "$mf"`
 
6756
  # Find all dependency output files, they are included files with
 
6757
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
6758
  # simplest approach to changing $(DEPDIR) to its actual value in the
 
6759
  # expansion.
 
6760
  for file in `sed -n "
 
6761
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 
6762
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
6763
    # Make sure the directory exists.
 
6764
    test -f "$dirpart/$file" && continue
 
6765
    fdir=`AS_DIRNAME(["$file"])`
 
6766
    AS_MKDIR_P([$dirpart/$fdir])
 
6767
    # echo "creating $dirpart/$file"
 
6768
    echo '# dummy' > "$dirpart/$file"
 
6769
  done
 
6770
done
 
6771
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
6772
 
 
6773
 
 
6774
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
6775
# -----------------------------
 
6776
# This macro should only be invoked once -- use via AC_REQUIRE.
 
6777
#
 
6778
# This code is only required when automatic dependency tracking
 
6779
# is enabled.  FIXME.  This creates each `.P' file that we will
 
6780
# need in order to bootstrap the dependency handling code.
 
6781
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
6782
[AC_CONFIG_COMMANDS([depfiles],
 
6783
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
6784
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
6785
])
 
6786
 
 
6787
# Check for Java compiler.
 
6788
# For now we only handle the GNU compiler.
 
6789
 
 
6790
# Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
 
6791
 
 
6792
# This program is free software; you can redistribute it and/or modify
 
6793
# it under the terms of the GNU General Public License as published by
 
6794
# the Free Software Foundation; either version 2, or (at your option)
 
6795
# any later version.
 
6796
 
 
6797
# This program is distributed in the hope that it will be useful,
 
6798
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
6799
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
6800
# GNU General Public License for more details.
 
6801
 
 
6802
# You should have received a copy of the GNU General Public License
 
6803
# along with this program; if not, write to the Free Software
 
6804
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
6805
# 02111-1307, USA.
 
6806
 
 
6807
AC_DEFUN([AM_PROG_GCJ],[
 
6808
AC_CHECK_PROGS(GCJ, gcj, gcj)
 
6809
test -z "$GCJ" && AC_MSG_ERROR([no acceptable gcj found in \$PATH])
 
6810
if test "x${GCJFLAGS-unset}" = xunset; then
 
6811
   GCJFLAGS="-g -O2"
 
6812
fi
 
6813
AC_SUBST(GCJFLAGS)
 
6814
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(GCJ)])
 
6815
])
 
6816
 
 
6817
# Do all the work for Automake.                            -*- Autoconf -*-
 
6818
 
 
6819
# This macro actually does too much some checks are only needed if
 
6820
# your package does certain things.  But this isn't really a big deal.
 
6821
 
 
6822
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
 
6823
# Free Software Foundation, Inc.
 
6824
 
 
6825
# This program is free software; you can redistribute it and/or modify
 
6826
# it under the terms of the GNU General Public License as published by
 
6827
# the Free Software Foundation; either version 2, or (at your option)
 
6828
# any later version.
 
6829
 
 
6830
# This program is distributed in the hope that it will be useful,
 
6831
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
6832
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
6833
# GNU General Public License for more details.
 
6834
 
 
6835
# You should have received a copy of the GNU General Public License
 
6836
# along with this program; if not, write to the Free Software
 
6837
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
6838
# 02111-1307, USA.
 
6839
 
 
6840
# serial 11
 
6841
 
 
6842
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
6843
# AM_INIT_AUTOMAKE([OPTIONS])
 
6844
# -----------------------------------------------
 
6845
# The call with PACKAGE and VERSION arguments is the old style
 
6846
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
6847
# and VERSION should now be passed to AC_INIT and removed from
 
6848
# the call to AM_INIT_AUTOMAKE.
 
6849
# We support both call styles for the transition.  After
 
6850
# the next Automake release, Autoconf can make the AC_INIT
 
6851
# arguments mandatory, and then we can depend on a new Autoconf
 
6852
# release and drop the old call support.
 
6853
AC_DEFUN([AM_INIT_AUTOMAKE],
 
6854
[AC_PREREQ([2.58])dnl
 
6855
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 
6856
dnl the ones we care about.
 
6857
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
6858
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
6859
AC_REQUIRE([AC_PROG_INSTALL])dnl
 
6860
# test to see if srcdir already configured
 
6861
if test "`cd $srcdir && pwd`" != "`pwd`" &&
 
6862
   test -f $srcdir/config.status; then
 
6863
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
6864
fi
 
6865
 
 
6866
# test whether we have cygpath
 
6867
if test -z "$CYGPATH_W"; then
 
6868
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
6869
    CYGPATH_W='cygpath -w'
 
6870
  else
 
6871
    CYGPATH_W=echo
 
6872
  fi
 
6873
fi
 
6874
AC_SUBST([CYGPATH_W])
 
6875
 
 
6876
# Define the identity of the package.
 
6877
dnl Distinguish between old-style and new-style calls.
 
6878
m4_ifval([$2],
 
6879
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
6880
 AC_SUBST([PACKAGE], [$1])dnl
 
6881
 AC_SUBST([VERSION], [$2])],
 
6882
[_AM_SET_OPTIONS([$1])dnl
 
6883
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
6884
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
6885
 
 
6886
_AM_IF_OPTION([no-define],,
 
6887
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
6888
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
6889
 
 
6890
# Some tools Automake needs.
 
6891
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
6892
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
6893
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
6894
AM_MISSING_PROG(AUTOCONF, autoconf)
 
6895
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
6896
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
6897
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
6898
AM_PROG_INSTALL_SH
 
6899
AM_PROG_INSTALL_STRIP
 
6900
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
6901
# We need awk for the "check" target.  The system "awk" is bad on
 
6902
# some platforms.
 
6903
AC_REQUIRE([AC_PROG_AWK])dnl
 
6904
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
6905
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
6906
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 
6907
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
6908
                             [_AM_PROG_TAR([v7])])])
 
6909
_AM_IF_OPTION([no-dependencies],,
 
6910
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
6911
                  [_AM_DEPENDENCIES(CC)],
 
6912
                  [define([AC_PROG_CC],
 
6913
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
6914
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
6915
                  [_AM_DEPENDENCIES(CXX)],
 
6916
                  [define([AC_PROG_CXX],
 
6917
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
6918
])
 
6919
])
 
6920
 
 
6921
 
 
6922
# When config.status generates a header, we must update the stamp-h file.
 
6923
# This file resides in the same directory as the config header
 
6924
# that is generated.  The stamp files are numbered to have different names.
 
6925
 
 
6926
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
6927
# loop where config.status creates the headers, so we can generate
 
6928
# our stamp files there.
 
6929
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
6930
[# Compute $1's index in $config_headers.
 
6931
_am_stamp_count=1
 
6932
for _am_header in $config_headers :; do
 
6933
  case $_am_header in
 
6934
    $1 | $1:* )
 
6935
      break ;;
 
6936
    * )
 
6937
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
6938
  esac
 
6939
done
 
6940
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
6941
 
 
6942
# AM_PROG_INSTALL_SH
 
6943
# ------------------
 
6944
# Define $install_sh.
 
6945
 
 
6946
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
 
6947
 
 
6948
# This program is free software; you can redistribute it and/or modify
 
6949
# it under the terms of the GNU General Public License as published by
 
6950
# the Free Software Foundation; either version 2, or (at your option)
 
6951
# any later version.
 
6952
 
 
6953
# This program is distributed in the hope that it will be useful,
 
6954
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
6955
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
6956
# GNU General Public License for more details.
 
6957
 
 
6958
# You should have received a copy of the GNU General Public License
 
6959
# along with this program; if not, write to the Free Software
 
6960
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
6961
# 02111-1307, USA.
 
6962
 
 
6963
AC_DEFUN([AM_PROG_INSTALL_SH],
 
6964
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
6965
install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
6966
AC_SUBST(install_sh)])
 
6967
 
 
6968
#                                                          -*- Autoconf -*-
 
6969
# Copyright (C) 2003  Free Software Foundation, Inc.
 
6970
 
 
6971
# This program is free software; you can redistribute it and/or modify
 
6972
# it under the terms of the GNU General Public License as published by
 
6973
# the Free Software Foundation; either version 2, or (at your option)
 
6974
# any later version.
 
6975
 
 
6976
# This program is distributed in the hope that it will be useful,
 
6977
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
6978
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
6979
# GNU General Public License for more details.
 
6980
 
 
6981
# You should have received a copy of the GNU General Public License
 
6982
# along with this program; if not, write to the Free Software
 
6983
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
6984
# 02111-1307, USA.
 
6985
 
 
6986
# serial 1
 
6987
 
 
6988
# Check whether the underlying file-system supports filenames
 
6989
# with a leading dot.  For instance MS-DOS doesn't.
 
6990
AC_DEFUN([AM_SET_LEADING_DOT],
 
6991
[rm -rf .tst 2>/dev/null
 
6992
mkdir .tst 2>/dev/null
 
6993
if test -d .tst; then
 
6994
  am__leading_dot=.
 
6995
else
 
6996
  am__leading_dot=_
 
6997
fi
 
6998
rmdir .tst 2>/dev/null
 
6999
AC_SUBST([am__leading_dot])])
 
7000
 
 
7001
# Check to see how 'make' treats includes.      -*- Autoconf -*-
 
7002
 
 
7003
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
 
7004
 
 
7005
# This program is free software; you can redistribute it and/or modify
 
7006
# it under the terms of the GNU General Public License as published by
 
7007
# the Free Software Foundation; either version 2, or (at your option)
 
7008
# any later version.
 
7009
 
 
7010
# This program is distributed in the hope that it will be useful,
 
7011
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
7012
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
7013
# GNU General Public License for more details.
 
7014
 
 
7015
# You should have received a copy of the GNU General Public License
 
7016
# along with this program; if not, write to the Free Software
 
7017
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
7018
# 02111-1307, USA.
 
7019
 
 
7020
# serial 2
 
7021
 
 
7022
# AM_MAKE_INCLUDE()
 
7023
# -----------------
 
7024
# Check to see how make treats includes.
 
7025
AC_DEFUN([AM_MAKE_INCLUDE],
 
7026
[am_make=${MAKE-make}
 
7027
cat > confinc << 'END'
 
7028
am__doit:
 
7029
        @echo done
 
7030
.PHONY: am__doit
 
7031
END
 
7032
# If we don't find an include directive, just comment out the code.
 
7033
AC_MSG_CHECKING([for style of include used by $am_make])
 
7034
am__include="#"
 
7035
am__quote=
 
7036
_am_result=none
 
7037
# First try GNU make style include.
 
7038
echo "include confinc" > confmf
 
7039
# We grep out `Entering directory' and `Leaving directory'
 
7040
# messages which can occur if `w' ends up in MAKEFLAGS.
 
7041
# In particular we don't look at `^make:' because GNU make might
 
7042
# be invoked under some other name (usually "gmake"), in which
 
7043
# case it prints its new name instead of `make'.
 
7044
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
 
7045
   am__include=include
 
7046
   am__quote=
 
7047
   _am_result=GNU
 
7048
fi
 
7049
# Now try BSD make style include.
 
7050
if test "$am__include" = "#"; then
 
7051
   echo '.include "confinc"' > confmf
 
7052
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
 
7053
      am__include=.include
 
7054
      am__quote="\""
 
7055
      _am_result=BSD
 
7056
   fi
 
7057
fi
 
7058
AC_SUBST([am__include])
 
7059
AC_SUBST([am__quote])
 
7060
AC_MSG_RESULT([$_am_result])
 
7061
rm -f confinc confmf
 
7062
])
 
7063
 
 
7064
# serial 2
 
7065
 
 
7066
# AM_PROG_CC_C_O
 
7067
# --------------
 
7068
# Like AC_PROG_CC_C_O, but changed for automake.
 
7069
 
 
7070
# Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
 
7071
 
 
7072
# This program is free software; you can redistribute it and/or modify
 
7073
# it under the terms of the GNU General Public License as published by
 
7074
# the Free Software Foundation; either version 2, or (at your option)
 
7075
# any later version.
 
7076
 
 
7077
# This program is distributed in the hope that it will be useful,
 
7078
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
7079
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
7080
# GNU General Public License for more details.
 
7081
 
 
7082
# You should have received a copy of the GNU General Public License
 
7083
# along with this program; if not, write to the Free Software
 
7084
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
7085
# 02111-1307, USA.
 
7086
 
 
7087
AC_DEFUN([AM_PROG_CC_C_O],
 
7088
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
 
7089
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
7090
# FIXME: we rely on the cache variable name because
 
7091
# there is no other way.
 
7092
set dummy $CC
 
7093
ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
 
7094
if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
 
7095
   # Losing compiler, so override with the script.
 
7096
   # FIXME: It is wrong to rewrite CC.
 
7097
   # But if we don't then we get into trouble of one sort or another.
 
7098
   # A longer-term fix would be to have automake use am__CC in this case,
 
7099
   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
 
7100
   CC="$am_aux_dir/compile $CC"
 
7101
fi
 
7102
])
 
7103
 
 
7104
#  -*- Autoconf -*-
 
7105
 
 
7106
 
 
7107
# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
 
7108
 
 
7109
# This program is free software; you can redistribute it and/or modify
 
7110
# it under the terms of the GNU General Public License as published by
 
7111
# the Free Software Foundation; either version 2, or (at your option)
 
7112
# any later version.
 
7113
 
 
7114
# This program is distributed in the hope that it will be useful,
 
7115
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
7116
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
7117
# GNU General Public License for more details.
 
7118
 
 
7119
# You should have received a copy of the GNU General Public License
 
7120
# along with this program; if not, write to the Free Software
 
7121
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
7122
# 02111-1307, USA.
 
7123
 
 
7124
# serial 3
 
7125
 
 
7126
# AM_MISSING_PROG(NAME, PROGRAM)
 
7127
# ------------------------------
 
7128
AC_DEFUN([AM_MISSING_PROG],
 
7129
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
7130
$1=${$1-"${am_missing_run}$2"}
 
7131
AC_SUBST($1)])
 
7132
 
 
7133
 
 
7134
# AM_MISSING_HAS_RUN
 
7135
# ------------------
 
7136
# Define MISSING if not defined so far and test if it supports --run.
 
7137
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
7138
AC_DEFUN([AM_MISSING_HAS_RUN],
 
7139
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
7140
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
7141
# Use eval to expand $SHELL
 
7142
if eval "$MISSING --run true"; then
 
7143
  am_missing_run="$MISSING --run "
 
7144
else
 
7145
  am_missing_run=
 
7146
  AC_MSG_WARN([`missing' script is too old or missing])
 
7147
fi
 
7148
])
 
7149
 
 
7150
# AM_PROG_MKDIR_P
 
7151
# ---------------
 
7152
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
 
7153
 
 
7154
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
 
7155
 
 
7156
# This program is free software; you can redistribute it and/or modify
 
7157
# it under the terms of the GNU General Public License as published by
 
7158
# the Free Software Foundation; either version 2, or (at your option)
 
7159
# any later version.
 
7160
 
 
7161
# This program is distributed in the hope that it will be useful,
 
7162
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
7163
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
7164
# GNU General Public License for more details.
 
7165
 
 
7166
# You should have received a copy of the GNU General Public License
 
7167
# along with this program; if not, write to the Free Software
 
7168
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
7169
# 02111-1307, USA.
 
7170
 
 
7171
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
 
7172
# created by `make install' are always world readable, even if the
 
7173
# installer happens to have an overly restrictive umask (e.g. 077).
 
7174
# This was a mistake.  There are at least two reasons why we must not
 
7175
# use `-m 0755':
 
7176
#   - it causes special bits like SGID to be ignored,
 
7177
#   - it may be too restrictive (some setups expect 775 directories).
 
7178
#
 
7179
# Do not use -m 0755 and let people choose whatever they expect by
 
7180
# setting umask.
 
7181
#
 
7182
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
 
7183
# Some implementations (such as Solaris 8's) are not thread-safe: if a
 
7184
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
 
7185
# concurrently, both version can detect that a/ is missing, but only
 
7186
# one can create it and the other will error out.  Consequently we
 
7187
# restrict ourselves to GNU make (using the --version option ensures
 
7188
# this.)
 
7189
AC_DEFUN([AM_PROG_MKDIR_P],
 
7190
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
 
7191
  # We used to keeping the `.' as first argument, in order to
 
7192
  # allow $(mkdir_p) to be used without argument.  As in
 
7193
  #   $(mkdir_p) $(somedir)
 
7194
  # where $(somedir) is conditionally defined.  However this is wrong
 
7195
  # for two reasons:
 
7196
  #  1. if the package is installed by a user who cannot write `.'
 
7197
  #     make install will fail,
 
7198
  #  2. the above comment should most certainly read
 
7199
  #     $(mkdir_p) $(DESTDIR)$(somedir)
 
7200
  #     so it does not work when $(somedir) is undefined and
 
7201
  #     $(DESTDIR) is not.
 
7202
  #  To support the latter case, we have to write
 
7203
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
 
7204
  #  so the `.' trick is pointless.
 
7205
  mkdir_p='mkdir -p --'
 
7206
else
 
7207
  # On NextStep and OpenStep, the `mkdir' command does not
 
7208
  # recognize any option.  It will interpret all options as
 
7209
  # directories to create, and then abort because `.' already
 
7210
  # exists.
 
7211
  for d in ./-p ./--version;
 
7212
  do
 
7213
    test -d $d && rmdir $d
 
7214
  done
 
7215
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
 
7216
  if test -f "$ac_aux_dir/mkinstalldirs"; then
 
7217
    mkdir_p='$(mkinstalldirs)'
 
7218
  else
 
7219
    mkdir_p='$(install_sh) -d'
 
7220
  fi
 
7221
fi
 
7222
AC_SUBST([mkdir_p])])
 
7223
 
 
7224
# Helper functions for option handling.                    -*- Autoconf -*-
 
7225
 
 
7226
# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
 
7227
 
 
7228
# This program is free software; you can redistribute it and/or modify
 
7229
# it under the terms of the GNU General Public License as published by
 
7230
# the Free Software Foundation; either version 2, or (at your option)
 
7231
# any later version.
 
7232
 
 
7233
# This program is distributed in the hope that it will be useful,
 
7234
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
7235
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
7236
# GNU General Public License for more details.
 
7237
 
 
7238
# You should have received a copy of the GNU General Public License
 
7239
# along with this program; if not, write to the Free Software
 
7240
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
7241
# 02111-1307, USA.
 
7242
 
 
7243
# serial 2
 
7244
 
 
7245
# _AM_MANGLE_OPTION(NAME)
 
7246
# -----------------------
 
7247
AC_DEFUN([_AM_MANGLE_OPTION],
 
7248
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
7249
 
 
7250
# _AM_SET_OPTION(NAME)
 
7251
# ------------------------------
 
7252
# Set option NAME.  Presently that only means defining a flag for this option.
 
7253
AC_DEFUN([_AM_SET_OPTION],
 
7254
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
7255
 
 
7256
# _AM_SET_OPTIONS(OPTIONS)
 
7257
# ----------------------------------
 
7258
# OPTIONS is a space-separated list of Automake options.
 
7259
AC_DEFUN([_AM_SET_OPTIONS],
 
7260
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
7261
 
 
7262
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
7263
# -------------------------------------------
 
7264
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
7265
AC_DEFUN([_AM_IF_OPTION],
 
7266
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
7267
 
 
7268
#
 
7269
# Check to make sure that the build environment is sane.
 
7270
#
 
7271
 
 
7272
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
 
7273
 
 
7274
# This program is free software; you can redistribute it and/or modify
 
7275
# it under the terms of the GNU General Public License as published by
 
7276
# the Free Software Foundation; either version 2, or (at your option)
 
7277
# any later version.
 
7278
 
 
7279
# This program is distributed in the hope that it will be useful,
 
7280
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
7281
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
7282
# GNU General Public License for more details.
 
7283
 
 
7284
# You should have received a copy of the GNU General Public License
 
7285
# along with this program; if not, write to the Free Software
 
7286
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
7287
# 02111-1307, USA.
 
7288
 
 
7289
# serial 3
 
7290
 
 
7291
# AM_SANITY_CHECK
 
7292
# ---------------
 
7293
AC_DEFUN([AM_SANITY_CHECK],
 
7294
[AC_MSG_CHECKING([whether build environment is sane])
 
7295
# Just in case
 
7296
sleep 1
 
7297
echo timestamp > conftest.file
 
7298
# Do `set' in a subshell so we don't clobber the current shell's
 
7299
# arguments.  Must try -L first in case configure is actually a
 
7300
# symlink; some systems play weird games with the mod time of symlinks
 
7301
# (eg FreeBSD returns the mod time of the symlink's containing
 
7302
# directory).
 
7303
if (
 
7304
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
7305
   if test "$[*]" = "X"; then
 
7306
      # -L didn't work.
 
7307
      set X `ls -t $srcdir/configure conftest.file`
 
7308
   fi
 
7309
   rm -f conftest.file
 
7310
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
7311
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
7312
 
 
7313
      # If neither matched, then we have a broken ls.  This can happen
 
7314
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
7315
      # broken ls alias from the environment.  This has actually
 
7316
      # happened.  Such a system could not be considered "sane".
 
7317
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
7318
alias in your environment])
 
7319
   fi
 
7320
 
 
7321
   test "$[2]" = conftest.file
 
7322
   )
 
7323
then
 
7324
   # Ok.
 
7325
   :
 
7326
else
 
7327
   AC_MSG_ERROR([newly created file is older than distributed files!
 
7328
Check your system clock])
 
7329
fi
 
7330
AC_MSG_RESULT(yes)])
 
7331
 
 
7332
# AM_PROG_INSTALL_STRIP
 
7333
 
 
7334
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
 
7335
 
 
7336
# This program is free software; you can redistribute it and/or modify
 
7337
# it under the terms of the GNU General Public License as published by
 
7338
# the Free Software Foundation; either version 2, or (at your option)
 
7339
# any later version.
 
7340
 
 
7341
# This program is distributed in the hope that it will be useful,
 
7342
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
7343
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
7344
# GNU General Public License for more details.
 
7345
 
 
7346
# You should have received a copy of the GNU General Public License
 
7347
# along with this program; if not, write to the Free Software
 
7348
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
7349
# 02111-1307, USA.
 
7350
 
 
7351
# One issue with vendor `install' (even GNU) is that you can't
 
7352
# specify the program used to strip binaries.  This is especially
 
7353
# annoying in cross-compiling environments, where the build's strip
 
7354
# is unlikely to handle the host's binaries.
 
7355
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
7356
# always use install-sh in `make install-strip', and initialize
 
7357
# STRIPPROG with the value of the STRIP variable (set by the user).
 
7358
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
7359
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
7360
# Installed binaries are usually stripped using `strip' when the user
 
7361
# run `make install-strip'.  However `strip' might not be the right
 
7362
# tool to use in cross-compilation environments, therefore Automake
 
7363
# will honor the `STRIP' environment variable to overrule this program.
 
7364
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
7365
if test "$cross_compiling" != no; then
 
7366
  AC_CHECK_TOOL([STRIP], [strip], :)
 
7367
fi
 
7368
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
7369
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
7370
 
 
7371
# Check how to create a tarball.                            -*- Autoconf -*-
 
7372
 
 
7373
# Copyright (C) 2004  Free Software Foundation, Inc.
 
7374
 
 
7375
# This program is free software; you can redistribute it and/or modify
 
7376
# it under the terms of the GNU General Public License as published by
 
7377
# the Free Software Foundation; either version 2, or (at your option)
 
7378
# any later version.
 
7379
 
 
7380
# This program is distributed in the hope that it will be useful,
 
7381
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
7382
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
7383
# GNU General Public License for more details.
 
7384
 
 
7385
# You should have received a copy of the GNU General Public License
 
7386
# along with this program; if not, write to the Free Software
 
7387
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
7388
# 02111-1307, USA.
 
7389
 
 
7390
# serial 1
 
7391
 
 
7392
 
 
7393
# _AM_PROG_TAR(FORMAT)
 
7394
# --------------------
 
7395
# Check how to create a tarball in format FORMAT.
 
7396
# FORMAT should be one of `v7', `ustar', or `pax'.
 
7397
#
 
7398
# Substitute a variable $(am__tar) that is a command
 
7399
# writing to stdout a FORMAT-tarball containing the directory
 
7400
# $tardir.
 
7401
#     tardir=directory && $(am__tar) > result.tar
 
7402
#
 
7403
# Substitute a variable $(am__untar) that extract such
 
7404
# a tarball read from stdin.
 
7405
#     $(am__untar) < result.tar
 
7406
AC_DEFUN([_AM_PROG_TAR],
 
7407
[# Always define AMTAR for backward compatibility.
 
7408
AM_MISSING_PROG([AMTAR], [tar])
 
7409
m4_if([$1], [v7],
 
7410
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
7411
     [m4_case([$1], [ustar],, [pax],,
 
7412
              [m4_fatal([Unknown tar format])])
 
7413
AC_MSG_CHECKING([how to create a $1 tar archive])
 
7414
# Loop over all known methods to create a tar archive until one works.
 
7415
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
7416
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
7417
# Do not fold the above two line into one, because Tru64 sh and
 
7418
# Solaris sh will not grok spaces in the rhs of `-'.
 
7419
for _am_tool in $_am_tools
 
7420
do
 
7421
  case $_am_tool in
 
7422
  gnutar)
 
7423
    for _am_tar in tar gnutar gtar;
 
7424
    do
 
7425
      AM_RUN_LOG([$_am_tar --version]) && break
 
7426
    done
 
7427
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
7428
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
7429
    am__untar="$_am_tar -xf -"
 
7430
    ;;
 
7431
  plaintar)
 
7432
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
7433
    # ustar tarball either.
 
7434
    (tar --version) >/dev/null 2>&1 && continue
 
7435
    am__tar='tar chf - "$$tardir"'
 
7436
    am__tar_='tar chf - "$tardir"'
 
7437
    am__untar='tar xf -'
 
7438
    ;;
 
7439
  pax)
 
7440
    am__tar='pax -L -x $1 -w "$$tardir"'
 
7441
    am__tar_='pax -L -x $1 -w "$tardir"'
 
7442
    am__untar='pax -r'
 
7443
    ;;
 
7444
  cpio)
 
7445
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
7446
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
7447
    am__untar='cpio -i -H $1 -d'
 
7448
    ;;
 
7449
  none)
 
7450
    am__tar=false
 
7451
    am__tar_=false
 
7452
    am__untar=false
 
7453
    ;;
 
7454
  esac
 
7455
 
 
7456
  # If the value was cached, stop now.  We just wanted to have am__tar
 
7457
  # and am__untar set.
 
7458
  test -n "${am_cv_prog_tar_$1}" && break
 
7459
 
 
7460
  # tar/untar a dummy directory, and stop if the command works
 
7461
  rm -rf conftest.dir
 
7462
  mkdir conftest.dir
 
7463
  echo GrepMe > conftest.dir/file
 
7464
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
7465
  rm -rf conftest.dir
 
7466
  if test -s conftest.tar; then
 
7467
    AM_RUN_LOG([$am__untar <conftest.tar])
 
7468
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
7469
  fi
 
7470
done
 
7471
rm -rf conftest.dir
 
7472
 
 
7473
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
7474
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
7475
AC_SUBST([am__tar])
 
7476
AC_SUBST([am__untar])
 
7477
]) # _AM_PROG_TAR
 
7478
 
 
7479
dnl Available from the GNU Autoconf Macro Archive at:
 
7480
dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_prog_jar.html
 
7481
dnl
 
7482
AC_DEFUN([AC_PROG_JAR],[
 
7483
AC_REQUIRE([AC_EXEEXT])dnl
 
7484
if test "x$JAVAPREFIX" = x; then
 
7485
        test "x$JAR" = x && AC_CHECK_PROGS(JAR, jar$EXEEXT)
 
7486
else
 
7487
        test "x$JAR" = x && AC_CHECK_PROGS(JAR, jar, $JAVAPREFIX)
 
7488
fi
 
7489
test "x$JAR" = x && AC_MSG_ERROR([no acceptable jar program found in \$PATH])
 
7490
AC_PROVIDE([$0])dnl
 
7491
])
 
7492
 
 
7493
dnl Available from the GNU Autoconf Macro Archive at:
 
7494
dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_prog_javac.html
 
7495
dnl
 
7496
AC_DEFUN([AC_PROG_JAVAC],[
 
7497
AC_REQUIRE([AC_EXEEXT])dnl
 
7498
if test "x$JAVAPREFIX" = x; then
 
7499
        test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT)
 
7500
else
 
7501
        test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT, $JAVAPREFIX)
 
7502
fi
 
7503
test "x$JAVAC" = x && AC_MSG_ERROR([no acceptable Java compiler found in \$PATH])
 
7504
AC_PROG_JAVAC_WORKS
 
7505
AC_PROVIDE([$0])dnl
 
7506
])
 
7507
 
 
7508
dnl Available from the GNU Autoconf Macro Archive at:
 
7509
dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_prog_javac_works.html
 
7510
dnl
 
7511
AC_DEFUN([AC_PROG_JAVAC_WORKS],[
 
7512
AC_CACHE_CHECK([if $JAVAC works], ac_cv_prog_javac_works, [
 
7513
JAVA_TEST=Test.java
 
7514
CLASS_TEST=Test.class
 
7515
cat << \EOF > $JAVA_TEST
 
7516
/* [#]line __oline__ "configure" */
 
7517
public class Test {
 
7518
}
 
7519
EOF
 
7520
if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) >/dev/null 2>&1; then
 
7521
  ac_cv_prog_javac_works=yes
 
7522
else
 
7523
  AC_MSG_ERROR([The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)])
 
7524
  echo "configure: failed program was:" >&AC_FD_CC
 
7525
  cat $JAVA_TEST >&AC_FD_CC
 
7526
fi
 
7527
rm -f $JAVA_TEST $CLASS_TEST
 
7528
])
 
7529
AC_PROVIDE([$0])dnl
 
7530
])
 
7531
 
 
7532
dnl Available from the GNU Autoconf Macro Archive at:
 
7533
dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_prog_javadoc.html
 
7534
dnl
 
7535
AC_DEFUN([AC_PROG_JAVADOC],[
 
7536
AC_REQUIRE([AC_EXEEXT])dnl
 
7537
if test "x$JAVAPREFIX" = x; then
 
7538
        test "x$JAVADOC" = x && AC_CHECK_PROGS(JAVADOC, javadoc$EXEEXT)
 
7539
else
 
7540
        test "x$JAVADOC" = x && AC_CHECK_PROGS(JAVADOC, javadoc, $JAVAPREFIX)
 
7541
fi
 
7542
test "x$JAVADOC" = x && AC_MSG_ERROR([no acceptable javadoc generator found in \$PATH])
 
7543
AC_PROVIDE([$0])dnl
 
7544
])
 
7545
 
 
7546
 
 
7547
 
 
7548
AC_DEFUN([AM_PATH_DOCBOOK],[
 
7549
AC_REQUIRE([AC_EXEEXT])dnl
 
7550
AC_PATH_PROG(DB1, db2html$EXEEXT, nocommand)
 
7551
if test "$DB1" = nocommand; then
 
7552
        AC_PATH_PROG(DB2, docbook2html$EXEEXT, nocommand)
 
7553
        if test "$DB2" = nocommand; then
 
7554
                AC_MSG_WARN([Some documentation will not be installed - docbook not found in $PATH])
 
7555
        else
 
7556
                DOCBOOK=$DB2
 
7557
        fi;
 
7558
else
 
7559
  DOCBOOK=$DB1
 
7560
fi;
 
7561
AC_SUBST(DOCBOOK)
 
7562
AM_CONDITIONAL(HAVE_DOCBOOK, test $DOCBOOK != nocommand)
 
7563
])
 
7564
 
 
7565
dnl This file is part of Java-GNOME.
 
7566
dnl
 
7567
dnl Java-GNOME is free software; you can redistribute it and/or modify it
 
7568
dnl under the terms of the GNU General Public License as published by
 
7569
dnl the Free Software Foundation; either version 2, or (at your option)
 
7570
dnl any later version.
 
7571
dnl
 
7572
dnl Java-GNOME is distributed in the hope that it will be useful, but
 
7573
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
 
7574
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
7575
dnl GNU General Public License for more details.
 
7576
dnl
 
7577
dnl You should have received a copy of the GNU General Public License
 
7578
dnl along with Jade; see the file COPYING.  If not, write to
 
7579
dnl the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 
7580
 
 
7581
dnl Copied blatantly from other source.
 
7582
 
 
7583
dnl Borrowed HEAVILY from AM_PATH_GTK
 
7584
dnl
 
7585
dnl AM_PATH_GCJ([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
 
7586
dnl Test for GCJ
 
7587
dnl
 
7588
AC_DEFUN([AM_PATH_GCJ],
 
7589
[dnl 
 
7590
dnl Get the environmental variables necessary for GCJ
 
7591
dnl
 
7592
AC_ARG_WITH(gcj-prefix,[  --with-gcj-prefix=PFX   Prefix where gcj is installed (optional)],
 
7593
            gcj_prefix="$withval", gcj_prefix="")
 
7594
 
 
7595
  if test x$gcj_prefix != x ; then
 
7596
    GCJ_HOME=$gcj_prefix
 
7597
  fi
 
7598
 
 
7599
  dnl 
 
7600
  dnl CHANGE: Now FIRST put GCJ_HOME/bin in the path before testing for 
 
7601
  dnl the java executable.
 
7602
  dnl
 
7603
  if test x$GCJ_HOME != x ; then
 
7604
    echo "Add $GCJ_HOME/bin to path and check again."
 
7605
    PATH="$GCJ_HOME/bin:$PATH"
 
7606
  fi
 
7607
  AC_PATH_PROG(GCJ, gcj, no)
 
7608
 
 
7609
  min_gcj_version=ifelse([$0], ,3.0.0,$1)
 
7610
  AC_MSG_CHECKING(for GCJ - version >= $min_gcj_version)
 
7611
  min_gcj_major_version=`echo $min_gcj_version |\
 
7612
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\1/'`
 
7613
  min_gcj_minor_version=`echo $min_gcj_version |\
 
7614
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\2/'`
 
7615
  min_gcj_micro_version=`echo $min_gcj_version |\
 
7616
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\3/'`
 
7617
  if test "$GCJ" = "no" ; then
 
7618
    no_gcj=yes
 
7619
  else
 
7620
    gcj_version=`$GCJ --version 2>&1 | grep GCC | sed 's/gcj.* (GCC) \([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1.\2.\3/'`
 
7621
    gcj_major_version=`echo $gcj_version | \
 
7622
           sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
 
7623
    gcj_minor_version=`echo $gcj_version | \
 
7624
           sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
 
7625
    gcj_micro_version=`echo $gcj_version | \
 
7626
           sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
 
7627
    AC_TRY_RUN([
 
7628
#include <stdio.h>
 
7629
 
 
7630
main()
 
7631
{
 
7632
    if ((1$gcj_major_version > 1$min_gcj_major_version) ||
 
7633
        ((1$gcj_major_version == 1$min_gcj_major_version) &&
 
7634
            (1$gcj_minor_version > 1$min_gcj_minor_version)) ||
 
7635
        ((1$gcj_major_version == 1$min_gcj_major_version) &&
 
7636
            (1$gcj_minor_version == 1$min_gcj_minor_version) &&
 
7637
            (1$gcj_micro_version >= 1$min_gcj_micro_version)))
 
7638
    {
 
7639
        return(0);
 
7640
    }
 
7641
    else
 
7642
    {
 
7643
        return(1);
 
7644
    }
 
7645
}], , no_gcj=yes, [echo $ac_n "cross compiling; assumed OK... $ac_c"])
 
7646
  fi
 
7647
  if test "x$no_gcj" = x ; then
 
7648
     AC_MSG_RESULT(yes)
 
7649
     dnl
 
7650
     dnl Check for gcj executables and set appropriate viarable
 
7651
     dnl
 
7652
     AC_PATH_PROG(GCJ, gcj, no)
 
7653
     AC_PATH_PROG(JAR, jar, no)
 
7654
     dnl
 
7655
     dnl Set CLASSPATH
 
7656
     dnl
 
7657
     if test x$GCJ_HOME != x ; then
 
7658
        :
 
7659
     else
 
7660
        GCJ_HOME=`which gcj | sed 's/\(.*\).bin.*gcj/\1/'`
 
7661
     fi
 
7662
 
 
7663
        cat << EOF > Test.java
 
7664
/* [#]line __oline__ "configure" */
 
7665
public class Test {
 
7666
        public static void main(String[[]] args) {
 
7667
                System.out.println(System.getProperty("sun.boot.class.path"));
 
7668
        }
 
7669
}
 
7670
EOF
 
7671
        GCJ_JAR=`gcj -C Test.java && gij Test`
 
7672
        rm Test.java Test.class
 
7673
        if test x$GCJ_JAR == x ; then
 
7674
      GCJ_JAR=`(test -d /usr/share/local/java && find /usr/local/share/java -name libgcj-?.?.?.jar) || (test -d /usr/share/java && find /usr/share/java -name libgcj-?.?.?.jar)`
 
7675
          if test x$GCJ_JAR == x ; then
 
7676
                GCJ_JAR=`locate libgcj | grep libgcj.*\.jar`    
 
7677
      fi
 
7678
    fi
 
7679
     if test x$GCJ_JAR != x ; then
 
7680
        GCJ_CLASSPATH="${GCJ_JAR}:${CLASSPATH}"
 
7681
     else
 
7682
           echo "***"
 
7683
           echo "*** Unable to locate libgcj.jar needed by gcj"
 
7684
           echo "***"
 
7685
           ifelse([$3], , :, [$3])
 
7686
    fi  
 
7687
     AC_SUBST(GCJ_CLASSPATH)
 
7688
     ifelse([$2], , :, [$2])
 
7689
  else
 
7690
     AC_MSG_RESULT(no)
 
7691
     echo "***"
 
7692
     echo "*** If you have GCJ installed and it is a newer version than $min_gcj_version, either set"
 
7693
     echo "*** the GCJ_HOME variable or add the top directory where the GCJ binaries are to"
 
7694
     echo "*** the PATH.  Alternatively try \"./configure --with-gcj-prefix=<java_home>\","
 
7695
     echo "***"
 
7696
     echo "*** Also make sure that configure does not find the wrong version of GCJ by"
 
7697
     echo "*** looking at the output of \"which gcj\"."
 
7698
     echo "***"
 
7699
     ifelse([$3], , :, [$3])
 
7700
  fi
 
7701
])
 
7702
 
 
7703
 
 
7704
dnl
 
7705
AC_DEFUN([JG_CHECK_NATIVECOMPILE],[
 
7706
dnl Check for a GCJ native compile option
 
7707
AC_ARG_WITH(gcj_compile,[  --without-gcj-compile    Binary builds of Java-GNOME
 
7708
with gcj compiler will not be made],
 
7709
        gcj_compile="no", gcj_compile="yes")
 
7710
 
 
7711
if test $gcj_compile = "yes"; then
 
7712
        AM_PATH_GCJ(3.0.0, , AC_ERROR(Need at lease GCJ version 3.0.0))
 
7713
fi
 
7714
 
 
7715
AM_CONDITIONAL(BUILD_GCJ, test $gcj_compile = "yes")
 
7716
 
 
7717
])
 
7718
 
 
7719
 
 
7720
AC_DEFUN([JG_COMMON],[
 
7721
 
 
7722
dnl dependencies needed by most projects
 
7723
 
 
7724
dnl check to see if the user wants to generate javadoc
 
7725
AC_ARG_WITH(javadocs,[  --without-javadocs    Do not build the javadocs for the bindings],
 
7726
        javadocs=$withval, javadocs="yes")
 
7727
AM_CONDITIONAL(BUILD_JAVADOC, test $javadocs = "yes")
 
7728
 
 
7729
AC_ARG_WITH([jardir], AS_HELP_STRING([--with-jardir],
 
7730
                      [where to install jar files]),
 
7731
            [jardir="$with_jardir"], [jardir="${datadir}/java"])
 
7732
AC_SUBST(jardir)
 
7733
 
 
7734
dnl Checks for programs.
 
7735
AC_PROG_INSTALL
 
7736
AM_PATH_DOCBOOK
 
7737
AC_PROG_JAVAC
 
7738
if test $javadocs = "yes"; then
 
7739
        AC_PROG_JAVADOC
 
7740
fi
 
7741
AC_PROG_JAR
 
7742
 
 
7743
JG_CHECK_NATIVECOMPILE
 
7744
 
 
7745
dnl Check to see what platform and set jni include path
 
7746
dnl AC_CANONICAL_HOST
 
7747
AC_MSG_CHECKING([platform to setup platform specific variables])
 
7748
platform_win32="no"
 
7749
case $host in
 
7750
  *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-windows*)
 
7751
    if test $gcj_compile = "yes"; then
 
7752
      JNI_INCLUDES=
 
7753
    else
 
7754
      JNI_INCLUDES="-I$JAVA_HOME/include -I$JAVA_HOME/include/win32"
 
7755
    fi
 
7756
    platform_win32="yes"
 
7757
    PLATFORM_CFLAGS="-mms-bitfields"
 
7758
    PLATFORM_LDFLAGS="-Wl,--kill-at"
 
7759
    PLATFORM_CLASSPATH_SEPARATOR=";"
 
7760
    SOPREFIX="lib"
 
7761
    ;;
 
7762
  *-*-cygwin*)
 
7763
    if test $gcj_compile = "yes"; then
 
7764
      JNI_INCLUDES=
 
7765
    else
 
7766
      JNI_INCLUDES="-I$JAVA_HOME/include -I$JAVA_HOME/include/win32"
 
7767
    fi
 
7768
    platform_win32="yes"
 
7769
    PLATFORM_CFLAGS=
 
7770
    PLATFORM_LDFLAGS=
 
7771
    PLATFORM_CLASSPATH_SEPARATOR=":"
 
7772
    SOPREFIX="cyg"
 
7773
    ;;
 
7774
  *-*-linux*)
 
7775
    if test $gcj_compile = "yes"; then
 
7776
      JNI_INCLUDES=
 
7777
    else
 
7778
      JNI_INCLUDES="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
 
7779
    fi
 
7780
    PLATFORM_CFLAGS=
 
7781
    PLATFORM_LDFLAGS=
 
7782
    PLATFORM_CLASSPATH_SEPARATOR=":"
 
7783
    SOPREFIX=
 
7784
    ;;
 
7785
  *)
 
7786
    if test $gcj_compile = "yes"; then
 
7787
      JNI_INCLUDES=
 
7788
    else
 
7789
      JNI_INCLUDES="-I$JAVA_HOME/include -I$JAVA_HOME/include/$host_os"
 
7790
    fi
 
7791
    PLATFORM_CFLAGS=
 
7792
    PLATFORM_LDFLAGS=
 
7793
    PLATFORM_CLASSPATH_SEPARATOR=":"
 
7794
    SOPREFIX=
 
7795
    ;;
 
7796
esac
 
7797
AC_MSG_RESULT([$host_os])
 
7798
AC_SUBST(JNI_INCLUDES)
 
7799
AC_SUBST(PLATFORM_CFLAGS)
 
7800
AC_SUBST(PLATFORM_LDFLAGS)
 
7801
AC_SUBST(PLATFORM_CLASSPATH_SEPARATOR)
 
7802
AM_CONDITIONAL(WINDOWS_BUILD, test $platform_win32 = "yes")
 
7803
 
 
7804
dnl Checks for libraries.
 
7805
dnl Replace `main' with a function in -libs:
 
7806
AC_CHECK_LIB(ibs, main)
 
7807
 
 
7808
AC_SUBST(TOPLEVEL_TARGETS)
 
7809
AC_SUBST(INSTALL_TARGETS)
 
7810
AC_SUBST(UNINSTALL_TARGETS)
 
7811
AC_SUBST(MACRO_FLAG)
 
7812
 
 
7813
dnl Checks for header files.
 
7814
dnl Fails at this stage
 
7815
dnl AC_CHECK_FILE(jni.h)
 
7816
 
 
7817
dnl Checks for typedefs, structures, and compiler characteristics.
 
7818
AC_C_CONST
 
7819
 
 
7820
dnl Checks for library functions.
 
7821
AC_FUNC_ALLOCA
 
7822
 
 
7823
])
 
7824
 
 
7825
AC_DEFUN([JG_LIB],[
 
7826
 
 
7827
if test -z "$PKG_CONFIG"; then
 
7828
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
 
7829
fi
 
7830
 
 
7831
AC_MSG_CHECKING(for glib-java jar file)
 
7832
JGJAR=`$PKG_CONFIG --variable classpath glib-java`
 
7833
AC_MSG_RESULT($JGJAR)
 
7834
AC_SUBST(JGJAR)
 
7835
 
 
7836
AC_MSG_CHECKING(for glib-java library)
 
7837
JGJAVA_LIBS=`$PKG_CONFIG --libs glib-java`
 
7838
AC_MSG_RESULT($JGJAVA_LIBS)
 
7839
AC_SUBST(JGJAVA_LIBS)
 
7840
 
 
7841
AC_MSG_CHECKING(for glib-java cflags)
 
7842
JGJAVA_CFLAGS=`$PKG_CONFIG --cflags glib-java`
 
7843
AC_MSG_RESULT($JGJAVA_CFLAGS)
 
7844
AC_SUBST(JGJAVA_CFLAGS)
 
7845
 
 
7846
AC_MSG_CHECKING(for glib-java jni library)
 
7847
JGJNI_LIBS=`$PKG_CONFIG --variable jnilibs glib-java`
 
7848
AC_MSG_RESULT($JGJNI_LIBS)
 
7849
AC_SUBST(JGJNI_LIBS)
 
7850
 
 
7851
])
 
7852