~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to srclib/apr/build/libtool.m4

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
2
## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
 
3
## Free Software Foundation, Inc.
 
4
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 
5
##
 
6
## This file is free software; the Free Software Foundation gives
 
7
## unlimited permission to copy and/or distribute it, with or without
 
8
## modifications, as long as this notice is preserved.
 
9
 
 
10
# serial 47 AC_PROG_LIBTOOL
 
11
 
 
12
 
 
13
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
 
14
# -----------------------------------------------------------
 
15
# If this macro is not defined by Autoconf, define it here.
 
16
m4_ifdef([AC_PROVIDE_IFELSE],
 
17
         [],
 
18
         [m4_define([AC_PROVIDE_IFELSE],
 
19
                 [m4_ifdef([AC_PROVIDE_$1],
 
20
                           [$2], [$3])])])
 
21
 
 
22
 
 
23
# AC_PROG_LIBTOOL
 
24
# ---------------
 
25
AC_DEFUN([AC_PROG_LIBTOOL],
 
26
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
 
27
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
 
28
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
 
29
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
30
    [AC_LIBTOOL_CXX],
 
31
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
 
32
  ])])
 
33
dnl And a similar setup for Fortran 77 support
 
34
  AC_PROVIDE_IFELSE([AC_PROG_F77],
 
35
    [AC_LIBTOOL_F77],
 
36
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
 
37
])])
 
38
 
 
39
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
 
40
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
 
41
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
 
42
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
 
43
    [AC_LIBTOOL_GCJ],
 
44
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
 
45
      [AC_LIBTOOL_GCJ],
 
46
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
 
47
        [AC_LIBTOOL_GCJ],
 
48
      [ifdef([AC_PROG_GCJ],
 
49
             [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
50
       ifdef([A][M_PROG_GCJ],
 
51
             [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
52
       ifdef([LT_AC_PROG_GCJ],
 
53
             [define([LT_AC_PROG_GCJ],
 
54
                defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
 
55
])])# AC_PROG_LIBTOOL
 
56
 
 
57
 
 
58
# _AC_PROG_LIBTOOL
 
59
# ----------------
 
60
AC_DEFUN([_AC_PROG_LIBTOOL],
 
61
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
 
62
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
 
63
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
 
64
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
 
65
 
 
66
# This can be used to rebuild libtool when needed
 
67
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
 
68
 
 
69
# Always use our own libtool.
 
70
LIBTOOL='$(SHELL) $(apr_builddir)/libtool'
 
71
AC_SUBST(LIBTOOL)dnl
 
72
 
 
73
# Prevent multiple expansion
 
74
define([AC_PROG_LIBTOOL], [])
 
75
])# _AC_PROG_LIBTOOL
 
76
 
 
77
 
 
78
# AC_LIBTOOL_SETUP
 
79
# ----------------
 
80
AC_DEFUN([AC_LIBTOOL_SETUP],
 
81
[AC_PREREQ(2.50)dnl
 
82
AC_REQUIRE([AC_ENABLE_SHARED])dnl
 
83
AC_REQUIRE([AC_ENABLE_STATIC])dnl
 
84
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
 
85
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
86
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
87
AC_REQUIRE([AC_PROG_CC])dnl
 
88
AC_REQUIRE([AC_PROG_LD])dnl
 
89
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
 
90
AC_REQUIRE([AC_PROG_NM])dnl
 
91
 
 
92
AC_REQUIRE([AC_PROG_LN_S])dnl
 
93
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
 
94
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
 
95
AC_REQUIRE([AC_OBJEXT])dnl
 
96
AC_REQUIRE([AC_EXEEXT])dnl
 
97
dnl
 
98
 
 
99
AC_LIBTOOL_SYS_MAX_CMD_LEN
 
100
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
101
AC_LIBTOOL_OBJDIR
 
102
 
 
103
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
104
_LT_AC_PROG_ECHO_BACKSLASH
 
105
 
 
106
case $host_os in
 
107
aix3*)
 
108
  # AIX sometimes has problems with the GCC collect2 program.  For some
 
109
  # reason, if we set the COLLECT_NAMES environment variable, the problems
 
110
  # vanish in a puff of smoke.
 
111
  if test "X${COLLECT_NAMES+set}" != Xset; then
 
112
    COLLECT_NAMES=
 
113
    export COLLECT_NAMES
 
114
  fi
 
115
  ;;
 
116
esac
 
117
 
 
118
# Sed substitution that helps us do robust quoting.  It backslashifies
 
119
# metacharacters that are still active within double-quoted strings.
 
120
Xsed='sed -e 1s/^X//'
 
121
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
 
122
 
 
123
# Same as above, but do not quote variable references.
 
124
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
 
125
 
 
126
# Sed substitution to delay expansion of an escaped shell variable in a
 
127
# double_quote_subst'ed string.
 
128
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
129
 
 
130
# Sed substitution to avoid accidental globbing in evaled expressions
 
131
no_glob_subst='s/\*/\\\*/g'
 
132
 
 
133
# Constants:
 
134
rm="rm -f"
 
135
 
 
136
# Global variables:
 
137
default_ofile=libtool
 
138
can_build_shared=yes
 
139
 
 
140
# All known linkers require a `.a' archive for static linking (except MSVC,
 
141
# which needs '.lib').
 
142
libext=a
 
143
ltmain="$ac_aux_dir/ltmain.sh"
 
144
ofile="$default_ofile"
 
145
with_gnu_ld="$lt_cv_prog_gnu_ld"
 
146
 
 
147
AC_CHECK_TOOL(AR, ar, false)
 
148
AC_CHECK_TOOL(RANLIB, ranlib, :)
 
149
AC_CHECK_TOOL(STRIP, strip, :)
 
150
 
 
151
old_CC="$CC"
 
152
old_CFLAGS="$CFLAGS"
 
153
 
 
154
# Set sane defaults for various variables
 
155
test -z "$AR" && AR=ar
 
156
test -z "$AR_FLAGS" && AR_FLAGS=cru
 
157
test -z "$AS" && AS=as
 
158
test -z "$CC" && CC=cc
 
159
test -z "$LTCC" && LTCC=$CC
 
160
test -z "$DLLTOOL" && DLLTOOL=dlltool
 
161
test -z "$LD" && LD=ld
 
162
test -z "$LN_S" && LN_S="ln -s"
 
163
test -z "$MAGIC_CMD" && MAGIC_CMD=file
 
164
test -z "$NM" && NM=nm
 
165
test -z "$SED" && SED=sed
 
166
test -z "$OBJDUMP" && OBJDUMP=objdump
 
167
test -z "$RANLIB" && RANLIB=:
 
168
test -z "$STRIP" && STRIP=:
 
169
test -z "$ac_objext" && ac_objext=o
 
170
 
 
171
# Determine commands to create old-style static archives.
 
172
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
 
173
old_postinstall_cmds='chmod 644 $oldlib'
 
174
old_postuninstall_cmds=
 
175
 
 
176
if test -n "$RANLIB"; then
 
177
  case $host_os in
 
178
  openbsd*)
 
179
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
 
180
    ;;
 
181
  *)
 
182
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
 
183
    ;;
 
184
  esac
 
185
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 
186
fi
 
187
 
 
188
_LT_CC_BASENAME([$compiler])
 
189
 
 
190
# Only perform the check for file, if the check method requires it
 
191
case $deplibs_check_method in
 
192
file_magic*)
 
193
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
 
194
    AC_PATH_MAGIC
 
195
  fi
 
196
  ;;
 
197
esac
 
198
 
 
199
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
 
200
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
 
201
enable_win32_dll=yes, enable_win32_dll=no)
 
202
 
 
203
AC_ARG_ENABLE([libtool-lock],
 
204
    [AC_HELP_STRING([--disable-libtool-lock],
 
205
        [avoid locking (might break parallel builds)])])
 
206
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
207
 
 
208
AC_ARG_WITH([pic],
 
209
    [AC_HELP_STRING([--with-pic],
 
210
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
 
211
    [pic_mode="$withval"],
 
212
    [pic_mode=default])
 
213
test -z "$pic_mode" && pic_mode=default
 
214
 
 
215
# Use C for the default configuration in the libtool script
 
216
tagname=
 
217
AC_LIBTOOL_LANG_C_CONFIG
 
218
_LT_AC_TAGCONFIG
 
219
])# AC_LIBTOOL_SETUP
 
220
 
 
221
 
 
222
# _LT_AC_SYS_COMPILER
 
223
# -------------------
 
224
AC_DEFUN([_LT_AC_SYS_COMPILER],
 
225
[AC_REQUIRE([AC_PROG_CC])dnl
 
226
 
 
227
# If no C compiler was specified, use CC.
 
228
LTCC=${LTCC-"$CC"}
 
229
 
 
230
# Allow CC to be a program name with arguments.
 
231
compiler=$CC
 
232
])# _LT_AC_SYS_COMPILER
 
233
 
 
234
 
 
235
# _LT_CC_BASENAME(CC)
 
236
# -------------------
 
237
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
 
238
AC_DEFUN([_LT_CC_BASENAME],
 
239
[for cc_temp in $1""; do
 
240
  case $cc_temp in
 
241
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
 
242
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
 
243
    \-*) ;;
 
244
    *) break;;
 
245
  esac
 
246
done
 
247
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
248
])
 
249
 
 
250
 
 
251
# _LT_COMPILER_BOILERPLATE
 
252
# ------------------------
 
253
# Check for compiler boilerplate output or warnings with
 
254
# the simple compiler test code.
 
255
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
 
256
[ac_outfile=conftest.$ac_objext
 
257
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
 
258
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
 
259
_lt_compiler_boilerplate=`cat conftest.err`
 
260
$rm conftest*
 
261
])# _LT_COMPILER_BOILERPLATE
 
262
 
 
263
 
 
264
# _LT_LINKER_BOILERPLATE
 
265
# ----------------------
 
266
# Check for linker boilerplate output or warnings with
 
267
# the simple link test code.
 
268
AC_DEFUN([_LT_LINKER_BOILERPLATE],
 
269
[ac_outfile=conftest.$ac_objext
 
270
printf "$lt_simple_link_test_code" >conftest.$ac_ext
 
271
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
 
272
_lt_linker_boilerplate=`cat conftest.err`
 
273
$rm conftest*
 
274
])# _LT_LINKER_BOILERPLATE
 
275
 
 
276
 
 
277
# _LT_AC_SYS_LIBPATH_AIX
 
278
# ----------------------
 
279
# Links a minimal program and checks the executable
 
280
# for the system default hardcoded library path. In most cases,
 
281
# this is /usr/lib:/lib, but when the MPI compilers are used
 
282
# the location of the communication and MPI libs are included too.
 
283
# If we don't find anything, use the default library path according
 
284
# to the aix ld manual.
 
285
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
 
286
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
 
287
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 
288
}'`
 
289
# Check for a 64-bit object if we didn't find anything.
 
290
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; }
 
291
}'`; fi],[])
 
292
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
293
])# _LT_AC_SYS_LIBPATH_AIX
 
294
 
 
295
 
 
296
# _LT_AC_SHELL_INIT(ARG)
 
297
# ----------------------
 
298
AC_DEFUN([_LT_AC_SHELL_INIT],
 
299
[ifdef([AC_DIVERSION_NOTICE],
 
300
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
 
301
         [AC_DIVERT_PUSH(NOTICE)])
 
302
$1
 
303
AC_DIVERT_POP
 
304
])# _LT_AC_SHELL_INIT
 
305
 
 
306
 
 
307
# _LT_AC_PROG_ECHO_BACKSLASH
 
308
# --------------------------
 
309
# Add some code to the start of the generated configure script which
 
310
# will find an echo command which doesn't interpret backslashes.
 
311
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
 
312
[_LT_AC_SHELL_INIT([
 
313
# Check that we are running under the correct shell.
 
314
SHELL=${CONFIG_SHELL-/bin/sh}
 
315
 
 
316
case X$ECHO in
 
317
X*--fallback-echo)
 
318
  # Remove one level of quotation (which was required for Make).
 
319
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
 
320
  ;;
 
321
esac
 
322
 
 
323
echo=${ECHO-echo}
 
324
if test "X[$]1" = X--no-reexec; then
 
325
  # Discard the --no-reexec flag, and continue.
 
326
  shift
 
327
elif test "X[$]1" = X--fallback-echo; then
 
328
  # Avoid inline document here, it may be left over
 
329
  :
 
330
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
 
331
  # Yippee, $echo works!
 
332
  :
 
333
else
 
334
  # Restart under the correct shell.
 
335
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
336
fi
 
337
 
 
338
if test "X[$]1" = X--fallback-echo; then
 
339
  # used as fallback echo
 
340
  shift
 
341
  cat <<EOF
 
342
[$]*
 
343
EOF
 
344
  exit 0
 
345
fi
 
346
 
 
347
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
348
# if CDPATH is set.
 
349
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
350
 
 
351
if test -z "$ECHO"; then
 
352
if test "X${echo_test_string+set}" != Xset; then
 
353
# find a string as large as possible, as long as the shell can cope with it
 
354
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
 
355
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
 
356
    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
 
357
       echo_test_string=`eval $cmd` &&
 
358
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
 
359
    then
 
360
      break
 
361
    fi
 
362
  done
 
363
fi
 
364
 
 
365
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
 
366
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
 
367
   test "X$echo_testing_string" = "X$echo_test_string"; then
 
368
  :
 
369
else
 
370
  # The Solaris, AIX, and Digital Unix default echo programs unquote
 
371
  # backslashes.  This makes it impossible to quote backslashes using
 
372
  #   echo "$something" | sed 's/\\/\\\\/g'
 
373
  #
 
374
  # So, first we look for a working echo in the user's PATH.
 
375
 
 
376
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
377
  for dir in $PATH /usr/ucb; do
 
378
    IFS="$lt_save_ifs"
 
379
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
 
380
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
 
381
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
 
382
       test "X$echo_testing_string" = "X$echo_test_string"; then
 
383
      echo="$dir/echo"
 
384
      break
 
385
    fi
 
386
  done
 
387
  IFS="$lt_save_ifs"
 
388
 
 
389
  if test "X$echo" = Xecho; then
 
390
    # We didn't find a better echo, so look for alternatives.
 
391
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
 
392
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
 
393
       test "X$echo_testing_string" = "X$echo_test_string"; then
 
394
      # This shell has a builtin print -r that does the trick.
 
395
      echo='print -r'
 
396
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
 
397
         test "X$CONFIG_SHELL" != X/bin/ksh; then
 
398
      # If we have ksh, try running configure again with it.
 
399
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
 
400
      export ORIGINAL_CONFIG_SHELL
 
401
      CONFIG_SHELL=/bin/ksh
 
402
      export CONFIG_SHELL
 
403
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
404
    else
 
405
      # Try using printf.
 
406
      echo='printf %s\n'
 
407
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
 
408
         echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
 
409
         test "X$echo_testing_string" = "X$echo_test_string"; then
 
410
        # Cool, printf works
 
411
        :
 
412
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
413
           test "X$echo_testing_string" = 'X\t' &&
 
414
           echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
415
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
416
        CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
 
417
        export CONFIG_SHELL
 
418
        SHELL="$CONFIG_SHELL"
 
419
        export SHELL
 
420
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
 
421
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
422
           test "X$echo_testing_string" = 'X\t' &&
 
423
           echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
424
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
425
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
 
426
      else
 
427
        # maybe with a smaller string...
 
428
        prev=:
 
429
 
 
430
        for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
 
431
          if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
 
432
          then
 
433
            break
 
434
          fi
 
435
          prev="$cmd"
 
436
        done
 
437
 
 
438
        if test "$prev" != 'sed 50q "[$]0"'; then
 
439
          echo_test_string=`eval $prev`
 
440
          export echo_test_string
 
441
          exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
 
442
        else
 
443
          # Oops.  We lost completely, so just stick with echo.
 
444
          echo=echo
 
445
        fi
 
446
      fi
 
447
    fi
 
448
  fi
 
449
fi
 
450
fi
 
451
 
 
452
# Copy echo and quote the copy suitably for passing to libtool from
 
453
# the Makefile, instead of quoting the original, which is used later.
 
454
ECHO=$echo
 
455
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
 
456
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
 
457
fi
 
458
 
 
459
AC_SUBST(ECHO)
 
460
])])# _LT_AC_PROG_ECHO_BACKSLASH
 
461
 
 
462
 
 
463
# _LT_AC_LOCK
 
464
# -----------
 
465
AC_DEFUN([_LT_AC_LOCK],
 
466
[AC_ARG_ENABLE([libtool-lock],
 
467
    [AC_HELP_STRING([--disable-libtool-lock],
 
468
        [avoid locking (might break parallel builds)])])
 
469
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
470
 
 
471
# Some flags need to be propagated to the compiler or linker for good
 
472
# libtool support.
 
473
case $host in
 
474
ia64-*-hpux*)
 
475
  # Find out which ABI we are using.
 
476
  echo 'int i;' > conftest.$ac_ext
 
477
  if AC_TRY_EVAL(ac_compile); then
 
478
    case `/usr/bin/file conftest.$ac_objext` in
 
479
    *ELF-32*)
 
480
      HPUX_IA64_MODE="32"
 
481
      ;;
 
482
    *ELF-64*)
 
483
      HPUX_IA64_MODE="64"
 
484
      ;;
 
485
    esac
 
486
  fi
 
487
  rm -rf conftest*
 
488
  ;;
 
489
*-*-irix6*)
 
490
  # Find out which ABI we are using.
 
491
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
 
492
  if AC_TRY_EVAL(ac_compile); then
 
493
   if test "$lt_cv_prog_gnu_ld" = yes; then
 
494
    case `/usr/bin/file conftest.$ac_objext` in
 
495
    *32-bit*)
 
496
      LD="${LD-ld} -melf32bsmip"
 
497
      ;;
 
498
    *N32*)
 
499
      LD="${LD-ld} -melf32bmipn32"
 
500
      ;;
 
501
    *64-bit*)
 
502
      LD="${LD-ld} -melf64bmip"
 
503
      ;;
 
504
    esac
 
505
   else
 
506
    case `/usr/bin/file conftest.$ac_objext` in
 
507
    *32-bit*)
 
508
      LD="${LD-ld} -32"
 
509
      ;;
 
510
    *N32*)
 
511
      LD="${LD-ld} -n32"
 
512
      ;;
 
513
    *64-bit*)
 
514
      LD="${LD-ld} -64"
 
515
      ;;
 
516
    esac
 
517
   fi
 
518
  fi
 
519
  rm -rf conftest*
 
520
  ;;
 
521
 
 
522
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
 
523
  # Find out which ABI we are using.
 
524
  echo 'int i;' > conftest.$ac_ext
 
525
  if AC_TRY_EVAL(ac_compile); then
 
526
    case `/usr/bin/file conftest.o` in
 
527
    *32-bit*)
 
528
      case $host in
 
529
        x86_64-*linux*)
 
530
          LD="${LD-ld} -m elf_i386"
 
531
          ;;
 
532
        ppc64-*linux*|powerpc64-*linux*)
 
533
          LD="${LD-ld} -m elf32ppclinux"
 
534
          ;;
 
535
        s390x-*linux*)
 
536
          LD="${LD-ld} -m elf_s390"
 
537
          ;;
 
538
        sparc64-*linux*)
 
539
          LD="${LD-ld} -m elf32_sparc"
 
540
          ;;
 
541
      esac
 
542
      ;;
 
543
    *64-bit*)
 
544
      case $host in
 
545
        x86_64-*linux*)
 
546
          LD="${LD-ld} -m elf_x86_64"
 
547
          ;;
 
548
        ppc*-*linux*|powerpc*-*linux*)
 
549
          LD="${LD-ld} -m elf64ppc"
 
550
          ;;
 
551
        s390*-*linux*)
 
552
          LD="${LD-ld} -m elf64_s390"
 
553
          ;;
 
554
        sparc*-*linux*)
 
555
          LD="${LD-ld} -m elf64_sparc"
 
556
          ;;
 
557
      esac
 
558
      ;;
 
559
    esac
 
560
  fi
 
561
  rm -rf conftest*
 
562
  ;;
 
563
 
 
564
*-*-sco3.2v5*)
 
565
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
 
566
  SAVE_CFLAGS="$CFLAGS"
 
567
  CFLAGS="$CFLAGS -belf"
 
568
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
 
569
    [AC_LANG_PUSH(C)
 
570
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
 
571
     AC_LANG_POP])
 
572
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
 
573
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
 
574
    CFLAGS="$SAVE_CFLAGS"
 
575
  fi
 
576
  ;;
 
577
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
 
578
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
 
579
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
 
580
  AC_CHECK_TOOL(AS, as, false)
 
581
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
 
582
  ;;
 
583
  ])
 
584
esac
 
585
 
 
586
need_locks="$enable_libtool_lock"
 
587
 
 
588
])# _LT_AC_LOCK
 
589
 
 
590
 
 
591
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
592
#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
 
593
# ----------------------------------------------------------------
 
594
# Check whether the given compiler option works
 
595
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
 
596
[AC_REQUIRE([LT_AC_PROG_SED])
 
597
AC_CACHE_CHECK([$1], [$2],
 
598
  [$2=no
 
599
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
 
600
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
601
   lt_compiler_flag="$3"
 
602
   # Insert the option either (1) after the last *FLAGS variable, or
 
603
   # (2) before a word containing "conftest.", or (3) at the end.
 
604
   # Note that $ac_compile itself does not contain backslashes and begins
 
605
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
606
   # The option is referenced via a variable to avoid confusing sed.
 
607
   lt_compile=`echo "$ac_compile" | $SED \
 
608
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 
609
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
610
   -e 's:$: $lt_compiler_flag:'`
 
611
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
612
   (eval "$lt_compile" 2>conftest.err)
 
613
   ac_status=$?
 
614
   cat conftest.err >&AS_MESSAGE_LOG_FD
 
615
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
616
   if (exit $ac_status) && test -s "$ac_outfile"; then
 
617
     # The compiler can only warn and ignore the option if not recognized
 
618
     # So say no if there are warnings other than the usual output.
 
619
     $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
 
620
     $SED '/^$/d' conftest.err >conftest.er2
 
621
     if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
 
622
       $2=yes
 
623
     fi
 
624
   fi
 
625
   $rm conftest*
 
626
])
 
627
 
 
628
if test x"[$]$2" = xyes; then
 
629
    ifelse([$5], , :, [$5])
 
630
else
 
631
    ifelse([$6], , :, [$6])
 
632
fi
 
633
])# AC_LIBTOOL_COMPILER_OPTION
 
634
 
 
635
 
 
636
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
637
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
 
638
# ------------------------------------------------------------
 
639
# Check whether the given compiler option works
 
640
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
 
641
[AC_CACHE_CHECK([$1], [$2],
 
642
  [$2=no
 
643
   save_LDFLAGS="$LDFLAGS"
 
644
   LDFLAGS="$LDFLAGS $3"
 
645
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
 
646
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
 
647
     # The linker can only warn and ignore the option if not recognized
 
648
     # So say no if there are warnings
 
649
     if test -s conftest.err; then
 
650
       # Append any errors to the config.log.
 
651
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
 
652
       $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
 
653
       $SED '/^$/d' conftest.err >conftest.er2
 
654
       if diff conftest.exp conftest.er2 >/dev/null; then
 
655
         $2=yes
 
656
       fi
 
657
     else
 
658
       $2=yes
 
659
     fi
 
660
   fi
 
661
   $rm conftest*
 
662
   LDFLAGS="$save_LDFLAGS"
 
663
])
 
664
 
 
665
if test x"[$]$2" = xyes; then
 
666
    ifelse([$4], , :, [$4])
 
667
else
 
668
    ifelse([$5], , :, [$5])
 
669
fi
 
670
])# AC_LIBTOOL_LINKER_OPTION
 
671
 
 
672
 
 
673
# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
674
# --------------------------
 
675
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
 
676
[# find the maximum length of command line arguments
 
677
AC_MSG_CHECKING([the maximum length of command line arguments])
 
678
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
 
679
  i=0
 
680
  teststring="ABCD"
 
681
 
 
682
  case $build_os in
 
683
  msdosdjgpp*)
 
684
    # On DJGPP, this test can blow up pretty badly due to problems in libc
 
685
    # (any single argument exceeding 2000 bytes causes a buffer overrun
 
686
    # during glob expansion).  Even if it were fixed, the result of this
 
687
    # check would be larger than it should be.
 
688
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
 
689
    ;;
 
690
 
 
691
  gnu*)
 
692
    # Under GNU Hurd, this test is not required because there is
 
693
    # no limit to the length of command line arguments.
 
694
    # Libtool will interpret -1 as no limit whatsoever
 
695
    lt_cv_sys_max_cmd_len=-1;
 
696
    ;;
 
697
 
 
698
  cygwin* | mingw*)
 
699
    # On Win9x/ME, this test blows up -- it succeeds, but takes
 
700
    # about 5 minutes as the teststring grows exponentially.
 
701
    # Worse, since 9x/ME are not pre-emptively multitasking,
 
702
    # you end up with a "frozen" computer, even though with patience
 
703
    # the test eventually succeeds (with a max line length of 256k).
 
704
    # Instead, let's just punt: use the minimum linelength reported by
 
705
    # all of the supported platforms: 8192 (on NT/2K/XP).
 
706
    lt_cv_sys_max_cmd_len=8192;
 
707
    ;;
 
708
 
 
709
  amigaos*)
 
710
    # On AmigaOS with pdksh, this test takes hours, literally.
 
711
    # So we just punt and use a minimum line length of 8192.
 
712
    lt_cv_sys_max_cmd_len=8192;
 
713
    ;;
 
714
 
 
715
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
 
716
    # This has been around since 386BSD, at least.  Likely further.
 
717
    if test -x /sbin/sysctl; then
 
718
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
 
719
    elif test -x /usr/sbin/sysctl; then
 
720
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
 
721
    else
 
722
      lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
 
723
    fi
 
724
    # And add a safety zone
 
725
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
 
726
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
 
727
    ;;
 
728
  osf*)
 
729
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
 
730
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
 
731
    # nice to cause kernel panics so lets avoid the loop below.
 
732
    # First set a reasonable default.
 
733
    lt_cv_sys_max_cmd_len=16384
 
734
    #
 
735
    if test -x /sbin/sysconfig; then
 
736
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
 
737
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
 
738
      esac
 
739
    fi
 
740
    ;;
 
741
  *)
 
742
    # If test is not a shell built-in, we'll probably end up computing a
 
743
    # maximum length that is only half of the actual maximum length, but
 
744
    # we can't tell.
 
745
    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
 
746
    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
 
747
               = "XX$teststring") >/dev/null 2>&1 &&
 
748
            new_result=`expr "X$teststring" : ".*" 2>&1` &&
 
749
            lt_cv_sys_max_cmd_len=$new_result &&
 
750
            test $i != 17 # 1/2 MB should be enough
 
751
    do
 
752
      i=`expr $i + 1`
 
753
      teststring=$teststring$teststring
 
754
    done
 
755
    teststring=
 
756
    # Add a significant safety factor because C++ compilers can tack on massive
 
757
    # amounts of additional arguments before passing them to the linker.
 
758
    # It appears as though 1/2 is a usable value.
 
759
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
 
760
    ;;
 
761
  esac
 
762
])
 
763
if test -n $lt_cv_sys_max_cmd_len ; then
 
764
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 
765
else
 
766
  AC_MSG_RESULT(none)
 
767
fi
 
768
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
769
 
 
770
 
 
771
# _LT_AC_CHECK_DLFCN
 
772
# --------------------
 
773
AC_DEFUN([_LT_AC_CHECK_DLFCN],
 
774
[AC_CHECK_HEADERS(dlfcn.h)dnl
 
775
])# _LT_AC_CHECK_DLFCN
 
776
 
 
777
 
 
778
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
 
779
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
 
780
# ------------------------------------------------------------------
 
781
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
 
782
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
783
if test "$cross_compiling" = yes; then :
 
784
  [$4]
 
785
else
 
786
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
787
  lt_status=$lt_dlunknown
 
788
  cat > conftest.$ac_ext <<EOF
 
789
[#line __oline__ "configure"
 
790
#include "confdefs.h"
 
791
 
 
792
#if HAVE_DLFCN_H
 
793
#include <dlfcn.h>
 
794
#endif
 
795
 
 
796
#include <stdio.h>
 
797
 
 
798
#ifdef RTLD_GLOBAL
 
799
#  define LT_DLGLOBAL           RTLD_GLOBAL
 
800
#else
 
801
#  ifdef DL_GLOBAL
 
802
#    define LT_DLGLOBAL         DL_GLOBAL
 
803
#  else
 
804
#    define LT_DLGLOBAL         0
 
805
#  endif
 
806
#endif
 
807
 
 
808
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
 
809
   find out it does not work in some platform. */
 
810
#ifndef LT_DLLAZY_OR_NOW
 
811
#  ifdef RTLD_LAZY
 
812
#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
 
813
#  else
 
814
#    ifdef DL_LAZY
 
815
#      define LT_DLLAZY_OR_NOW          DL_LAZY
 
816
#    else
 
817
#      ifdef RTLD_NOW
 
818
#        define LT_DLLAZY_OR_NOW        RTLD_NOW
 
819
#      else
 
820
#        ifdef DL_NOW
 
821
#          define LT_DLLAZY_OR_NOW      DL_NOW
 
822
#        else
 
823
#          define LT_DLLAZY_OR_NOW      0
 
824
#        endif
 
825
#      endif
 
826
#    endif
 
827
#  endif
 
828
#endif
 
829
 
 
830
#ifdef __cplusplus
 
831
extern "C" void exit (int);
 
832
#endif
 
833
 
 
834
void fnord() { int i=42;}
 
835
int main ()
 
836
{
 
837
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
 
838
  int status = $lt_dlunknown;
 
839
 
 
840
  if (self)
 
841
    {
 
842
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
 
843
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
 
844
      /* dlclose (self); */
 
845
    }
 
846
 
 
847
    exit (status);
 
848
}]
 
849
EOF
 
850
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
 
851
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
 
852
    lt_status=$?
 
853
    case x$lt_status in
 
854
      x$lt_dlno_uscore) $1 ;;
 
855
      x$lt_dlneed_uscore) $2 ;;
 
856
      x$lt_unknown|x*) $3 ;;
 
857
    esac
 
858
  else :
 
859
    # compilation failed
 
860
    $3
 
861
  fi
 
862
fi
 
863
rm -fr conftest*
 
864
])# _LT_AC_TRY_DLOPEN_SELF
 
865
 
 
866
 
 
867
# AC_LIBTOOL_DLOPEN_SELF
 
868
# -------------------
 
869
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
 
870
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
871
if test "x$enable_dlopen" != xyes; then
 
872
  enable_dlopen=unknown
 
873
  enable_dlopen_self=unknown
 
874
  enable_dlopen_self_static=unknown
 
875
else
 
876
  lt_cv_dlopen=no
 
877
  lt_cv_dlopen_libs=
 
878
 
 
879
  case $host_os in
 
880
  beos*)
 
881
    lt_cv_dlopen="load_add_on"
 
882
    lt_cv_dlopen_libs=
 
883
    lt_cv_dlopen_self=yes
 
884
    ;;
 
885
 
 
886
  mingw* | pw32*)
 
887
    lt_cv_dlopen="LoadLibrary"
 
888
    lt_cv_dlopen_libs=
 
889
   ;;
 
890
 
 
891
  cygwin*)
 
892
    lt_cv_dlopen="dlopen"
 
893
    lt_cv_dlopen_libs=
 
894
   ;;
 
895
 
 
896
  darwin*)
 
897
  # if libdl is installed we need to link against it
 
898
    AC_CHECK_LIB([dl], [dlopen],
 
899
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
 
900
    lt_cv_dlopen="dyld"
 
901
    lt_cv_dlopen_libs=
 
902
    lt_cv_dlopen_self=yes
 
903
    ])
 
904
   ;;
 
905
 
 
906
  *)
 
907
    AC_CHECK_FUNC([shl_load],
 
908
          [lt_cv_dlopen="shl_load"],
 
909
      [AC_CHECK_LIB([dld], [shl_load],
 
910
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
 
911
        [AC_CHECK_FUNC([dlopen],
 
912
              [lt_cv_dlopen="dlopen"],
 
913
          [AC_CHECK_LIB([dl], [dlopen],
 
914
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
 
915
            [AC_CHECK_LIB([svld], [dlopen],
 
916
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 
917
              [AC_CHECK_LIB([dld], [dld_link],
 
918
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
 
919
              ])
 
920
            ])
 
921
          ])
 
922
        ])
 
923
      ])
 
924
    ;;
 
925
  esac
 
926
 
 
927
  if test "x$lt_cv_dlopen" != xno; then
 
928
    enable_dlopen=yes
 
929
  else
 
930
    enable_dlopen=no
 
931
  fi
 
932
 
 
933
  case $lt_cv_dlopen in
 
934
  dlopen)
 
935
    save_CPPFLAGS="$CPPFLAGS"
 
936
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
937
 
 
938
    save_LDFLAGS="$LDFLAGS"
 
939
    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
940
 
 
941
    save_LIBS="$LIBS"
 
942
    LIBS="$lt_cv_dlopen_libs $LIBS"
 
943
 
 
944
    AC_CACHE_CHECK([whether a program can dlopen itself],
 
945
          lt_cv_dlopen_self, [dnl
 
946
          _LT_AC_TRY_DLOPEN_SELF(
 
947
            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
 
948
            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
 
949
    ])
 
950
 
 
951
    if test "x$lt_cv_dlopen_self" = xyes; then
 
952
      LDFLAGS="$LDFLAGS $link_static_flag"
 
953
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
 
954
          lt_cv_dlopen_self_static, [dnl
 
955
          _LT_AC_TRY_DLOPEN_SELF(
 
956
            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
 
957
            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
 
958
      ])
 
959
    fi
 
960
 
 
961
    CPPFLAGS="$save_CPPFLAGS"
 
962
    LDFLAGS="$save_LDFLAGS"
 
963
    LIBS="$save_LIBS"
 
964
    ;;
 
965
  esac
 
966
 
 
967
  case $lt_cv_dlopen_self in
 
968
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
 
969
  *) enable_dlopen_self=unknown ;;
 
970
  esac
 
971
 
 
972
  case $lt_cv_dlopen_self_static in
 
973
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
 
974
  *) enable_dlopen_self_static=unknown ;;
 
975
  esac
 
976
fi
 
977
])# AC_LIBTOOL_DLOPEN_SELF
 
978
 
 
979
 
 
980
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
 
981
# ---------------------------------
 
982
# Check to see if options -c and -o are simultaneously supported by compiler
 
983
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
 
984
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
985
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
 
986
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
 
987
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
 
988
   $rm -r conftest 2>/dev/null
 
989
   mkdir conftest
 
990
   cd conftest
 
991
   mkdir out
 
992
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
993
 
 
994
   lt_compiler_flag="-o out/conftest2.$ac_objext"
 
995
   # Insert the option either (1) after the last *FLAGS variable, or
 
996
   # (2) before a word containing "conftest.", or (3) at the end.
 
997
   # Note that $ac_compile itself does not contain backslashes and begins
 
998
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
999
   lt_compile=`echo "$ac_compile" | $SED \
 
1000
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 
1001
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
1002
   -e 's:$: $lt_compiler_flag:'`
 
1003
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
1004
   (eval "$lt_compile" 2>out/conftest.err)
 
1005
   ac_status=$?
 
1006
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
 
1007
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
1008
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
 
1009
   then
 
1010
     # The compiler can only warn and ignore the option if not recognized
 
1011
     # So say no if there are warnings
 
1012
     $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
 
1013
     $SED '/^$/d' out/conftest.err >out/conftest.er2
 
1014
     if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
 
1015
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
1016
     fi
 
1017
   fi
 
1018
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
 
1019
   $rm conftest*
 
1020
   # SGI C++ compiler will create directory out/ii_files/ for
 
1021
   # template instantiation
 
1022
   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
 
1023
   $rm out/* && rmdir out
 
1024
   cd ..
 
1025
   rmdir conftest
 
1026
   $rm conftest*
 
1027
])
 
1028
])# AC_LIBTOOL_PROG_CC_C_O
 
1029
 
 
1030
 
 
1031
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
 
1032
# -----------------------------------------
 
1033
# Check to see if we can do hard links to lock some files if needed
 
1034
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
 
1035
[AC_REQUIRE([_LT_AC_LOCK])dnl
 
1036
 
 
1037
hard_links="nottested"
 
1038
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
 
1039
  # do not overwrite the value of need_locks provided by the user
 
1040
  AC_MSG_CHECKING([if we can lock with hard links])
 
1041
  hard_links=yes
 
1042
  $rm conftest*
 
1043
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
1044
  touch conftest.a
 
1045
  ln conftest.a conftest.b 2>&5 || hard_links=no
 
1046
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
1047
  AC_MSG_RESULT([$hard_links])
 
1048
  if test "$hard_links" = no; then
 
1049
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
 
1050
    need_locks=warn
 
1051
  fi
 
1052
else
 
1053
  need_locks=no
 
1054
fi
 
1055
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
 
1056
 
 
1057
 
 
1058
# AC_LIBTOOL_OBJDIR
 
1059
# -----------------
 
1060
AC_DEFUN([AC_LIBTOOL_OBJDIR],
 
1061
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
 
1062
[rm -f .libs 2>/dev/null
 
1063
mkdir .libs 2>/dev/null
 
1064
if test -d .libs; then
 
1065
  lt_cv_objdir=.libs
 
1066
else
 
1067
  # MS-DOS does not allow filenames that begin with a dot.
 
1068
  lt_cv_objdir=_libs
 
1069
fi
 
1070
rmdir .libs 2>/dev/null])
 
1071
objdir=$lt_cv_objdir
 
1072
])# AC_LIBTOOL_OBJDIR
 
1073
 
 
1074
 
 
1075
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
 
1076
# ----------------------------------------------
 
1077
# Check hardcoding attributes.
 
1078
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
 
1079
[AC_MSG_CHECKING([how to hardcode library paths into programs])
 
1080
_LT_AC_TAGVAR(hardcode_action, $1)=
 
1081
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
 
1082
   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
 
1083
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
 
1084
 
 
1085
  # We can hardcode non-existant directories.
 
1086
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
 
1087
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
 
1088
     # have to relink, otherwise we might link with an installed library
 
1089
     # when we should be linking with a yet-to-be-installed one
 
1090
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
 
1091
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
 
1092
    # Linking always hardcodes the temporary library directory.
 
1093
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
 
1094
  else
 
1095
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
 
1096
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
 
1097
  fi
 
1098
else
 
1099
  # We cannot hardcode anything, or else we can only hardcode existing
 
1100
  # directories.
 
1101
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
 
1102
fi
 
1103
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
 
1104
 
 
1105
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
 
1106
  # Fast installation is not supported
 
1107
  enable_fast_install=no
 
1108
elif test "$shlibpath_overrides_runpath" = yes ||
 
1109
     test "$enable_shared" = no; then
 
1110
  # Fast installation is not necessary
 
1111
  enable_fast_install=needless
 
1112
fi
 
1113
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
 
1114
 
 
1115
 
 
1116
# AC_LIBTOOL_SYS_LIB_STRIP
 
1117
# ------------------------
 
1118
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
 
1119
[striplib=
 
1120
old_striplib=
 
1121
AC_MSG_CHECKING([whether stripping libraries is possible])
 
1122
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
 
1123
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
 
1124
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
 
1125
  AC_MSG_RESULT([yes])
 
1126
else
 
1127
# FIXME - insert some real tests, host_os isn't really good enough
 
1128
  case $host_os in
 
1129
   darwin*)
 
1130
       if test -n "$STRIP" ; then
 
1131
         striplib="$STRIP -x"
 
1132
         AC_MSG_RESULT([yes])
 
1133
       else
 
1134
  AC_MSG_RESULT([no])
 
1135
fi
 
1136
       ;;
 
1137
   *)
 
1138
  AC_MSG_RESULT([no])
 
1139
    ;;
 
1140
  esac
 
1141
fi
 
1142
])# AC_LIBTOOL_SYS_LIB_STRIP
 
1143
 
 
1144
 
 
1145
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
1146
# -----------------------------
 
1147
# PORTME Fill in your ld.so characteristics
 
1148
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
 
1149
[AC_MSG_CHECKING([dynamic linker characteristics])
 
1150
library_names_spec=
 
1151
libname_spec='lib$name'
 
1152
soname_spec=
 
1153
shrext_cmds=".so"
 
1154
postinstall_cmds=
 
1155
postuninstall_cmds=
 
1156
finish_cmds=
 
1157
finish_eval=
 
1158
shlibpath_var=
 
1159
shlibpath_overrides_runpath=unknown
 
1160
version_type=none
 
1161
dynamic_linker="$host_os ld.so"
 
1162
sys_lib_dlsearch_path_spec="/lib /usr/lib"
 
1163
if test "$GCC" = yes; then
 
1164
  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
1165
  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
 
1166
    # if the path contains ";" then we assume it to be the separator
 
1167
    # otherwise default to the standard path separator (i.e. ":") - it is
 
1168
    # assumed that no part of a normal pathname contains ";" but that should
 
1169
    # okay in the real world where ";" in dirpaths is itself problematic.
 
1170
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
1171
  else
 
1172
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
1173
  fi
 
1174
else
 
1175
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 
1176
fi
 
1177
need_lib_prefix=unknown
 
1178
hardcode_into_libs=no
 
1179
 
 
1180
# when you set need_version to no, make sure it does not cause -set_version
 
1181
# flags to be left without arguments
 
1182
need_version=unknown
 
1183
 
 
1184
case $host_os in
 
1185
aix3*)
 
1186
  version_type=linux
 
1187
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
 
1188
  shlibpath_var=LIBPATH
 
1189
 
 
1190
  # AIX 3 has no versioning support, so we append a major version to the name.
 
1191
  soname_spec='${libname}${release}${shared_ext}$major'
 
1192
  ;;
 
1193
 
 
1194
aix4* | aix5*)
 
1195
  version_type=linux
 
1196
  need_lib_prefix=no
 
1197
  need_version=no
 
1198
  hardcode_into_libs=yes
 
1199
  if test "$host_cpu" = ia64; then
 
1200
    # AIX 5 supports IA64
 
1201
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
 
1202
    shlibpath_var=LD_LIBRARY_PATH
 
1203
  else
 
1204
    # With GCC up to 2.95.x, collect2 would create an import file
 
1205
    # for dependence libraries.  The import file would start with
 
1206
    # the line `#! .'.  This would cause the generated library to
 
1207
    # depend on `.', always an invalid library.  This was fixed in
 
1208
    # development snapshots of GCC prior to 3.0.
 
1209
    case $host_os in
 
1210
      aix4 | aix4.[[01]] | aix4.[[01]].*)
 
1211
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 
1212
           echo ' yes '
 
1213
           echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
 
1214
        :
 
1215
      else
 
1216
        can_build_shared=no
 
1217
      fi
 
1218
      ;;
 
1219
    esac
 
1220
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
 
1221
    # soname into executable. Probably we can add versioning support to
 
1222
    # collect2, so additional links can be useful in future.
 
1223
    if test "$aix_use_runtimelinking" = yes; then
 
1224
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
 
1225
      # instead of lib<name>.a to let people know that these are not
 
1226
      # typical AIX shared libraries.
 
1227
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1228
    else
 
1229
      # We preserve .a as extension for shared libraries through AIX4.2
 
1230
      # and later when we are not doing run time linking.
 
1231
      library_names_spec='${libname}${release}.a $libname.a'
 
1232
      soname_spec='${libname}${release}${shared_ext}$major'
 
1233
    fi
 
1234
    shlibpath_var=LIBPATH
 
1235
  fi
 
1236
  ;;
 
1237
 
 
1238
amigaos*)
 
1239
  library_names_spec='$libname.ixlibrary $libname.a'
 
1240
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
 
1241
  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'
 
1242
  ;;
 
1243
 
 
1244
beos*)
 
1245
  library_names_spec='${libname}${shared_ext}'
 
1246
  dynamic_linker="$host_os ld.so"
 
1247
  shlibpath_var=LIBRARY_PATH
 
1248
  ;;
 
1249
 
 
1250
bsdi[[45]]*)
 
1251
  version_type=linux
 
1252
  need_version=no
 
1253
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1254
  soname_spec='${libname}${release}${shared_ext}$major'
 
1255
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
 
1256
  shlibpath_var=LD_LIBRARY_PATH
 
1257
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
 
1258
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
 
1259
  # the default ld.so.conf also contains /usr/contrib/lib and
 
1260
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
 
1261
  # libtool to hard-code these into programs
 
1262
  ;;
 
1263
 
 
1264
cygwin* | mingw* | pw32*)
 
1265
  version_type=windows
 
1266
  shrext_cmds=".dll"
 
1267
  need_version=no
 
1268
  need_lib_prefix=no
 
1269
 
 
1270
  case $GCC,$host_os in
 
1271
  yes,cygwin* | yes,mingw* | yes,pw32*)
 
1272
    library_names_spec='$libname.dll.a'
 
1273
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
 
1274
    postinstall_cmds='base_file=`basename \${file}`~
 
1275
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
 
1276
      dldir=$destdir/`dirname \$dlpath`~
 
1277
      test -d \$dldir || mkdir -p \$dldir~
 
1278
      $install_prog $dir/$dlname \$dldir/$dlname~
 
1279
      chmod a+x \$dldir/$dlname'
 
1280
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
1281
      dlpath=$dir/\$dldll~
 
1282
       $rm \$dlpath'
 
1283
    shlibpath_overrides_runpath=yes
 
1284
 
 
1285
    case $host_os in
 
1286
    cygwin*)
 
1287
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
 
1288
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
1289
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
 
1290
      ;;
 
1291
    mingw*)
 
1292
      # MinGW DLLs use traditional 'lib' prefix
 
1293
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
1294
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
1295
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
 
1296
        # It is most probably a Windows format PATH printed by
 
1297
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
 
1298
        # path with ; separators, and with drive letters. We can handle the
 
1299
        # drive letters (cygwin fileutils understands them), so leave them,
 
1300
        # especially as we might pass files found there to a mingw objdump,
 
1301
        # which wouldn't understand a cygwinified path. Ahh.
 
1302
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
1303
      else
 
1304
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
1305
      fi
 
1306
      ;;
 
1307
    pw32*)
 
1308
      # pw32 DLLs use 'pw' prefix rather than 'lib'
 
1309
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
1310
      ;;
 
1311
    esac
 
1312
    ;;
 
1313
 
 
1314
  *)
 
1315
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
 
1316
    ;;
 
1317
  esac
 
1318
  dynamic_linker='Win32 ld.exe'
 
1319
  # FIXME: first we should search . and the directory the executable is in
 
1320
  shlibpath_var=PATH
 
1321
  ;;
 
1322
 
 
1323
darwin* | rhapsody*)
 
1324
  dynamic_linker="$host_os dyld"
 
1325
  version_type=darwin
 
1326
  need_lib_prefix=no
 
1327
  need_version=no
 
1328
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
 
1329
  soname_spec='${libname}${release}${major}$shared_ext'
 
1330
  shlibpath_overrides_runpath=yes
 
1331
  shlibpath_var=DYLD_LIBRARY_PATH
 
1332
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
 
1333
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
 
1334
  if test "$GCC" = yes; then
 
1335
    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"`
 
1336
  else
 
1337
    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
 
1338
  fi
 
1339
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
 
1340
  ;;
 
1341
 
 
1342
dgux*)
 
1343
  version_type=linux
 
1344
  need_lib_prefix=no
 
1345
  need_version=no
 
1346
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
 
1347
  soname_spec='${libname}${release}${shared_ext}$major'
 
1348
  shlibpath_var=LD_LIBRARY_PATH
 
1349
  ;;
 
1350
 
 
1351
freebsd1*)
 
1352
  dynamic_linker=no
 
1353
  ;;
 
1354
 
 
1355
kfreebsd*-gnu)
 
1356
  version_type=linux
 
1357
  need_lib_prefix=no
 
1358
  need_version=no
 
1359
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
1360
  soname_spec='${libname}${release}${shared_ext}$major'
 
1361
  shlibpath_var=LD_LIBRARY_PATH
 
1362
  shlibpath_overrides_runpath=no
 
1363
  hardcode_into_libs=yes
 
1364
  dynamic_linker='GNU ld.so'
 
1365
  ;;
 
1366
 
 
1367
freebsd* | dragonfly*)
 
1368
  # DragonFly does not have aout.  When/if they implement a new
 
1369
  # versioning mechanism, adjust this.
 
1370
  if test -x /usr/bin/objformat; then
 
1371
    objformat=`/usr/bin/objformat`
 
1372
  else
 
1373
    case $host_os in
 
1374
    freebsd[[123]]*) objformat=aout ;;
 
1375
    *) objformat=elf ;;
 
1376
    esac
 
1377
  fi
 
1378
  version_type=freebsd-$objformat
 
1379
  case $version_type in
 
1380
    freebsd-elf*)
 
1381
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
1382
      need_version=no
 
1383
      need_lib_prefix=no
 
1384
      ;;
 
1385
    freebsd-*)
 
1386
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
 
1387
      need_version=yes
 
1388
      ;;
 
1389
  esac
 
1390
  shlibpath_var=LD_LIBRARY_PATH
 
1391
  case $host_os in
 
1392
  freebsd2*)
 
1393
    shlibpath_overrides_runpath=yes
 
1394
    ;;
 
1395
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
 
1396
    shlibpath_overrides_runpath=yes
 
1397
    hardcode_into_libs=yes
 
1398
    ;;
 
1399
  *) # from 3.2 on
 
1400
    shlibpath_overrides_runpath=no
 
1401
    hardcode_into_libs=yes
 
1402
    ;;
 
1403
  esac
 
1404
  ;;
 
1405
 
 
1406
gnu*)
 
1407
  version_type=linux
 
1408
  need_lib_prefix=no
 
1409
  need_version=no
 
1410
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
1411
  soname_spec='${libname}${release}${shared_ext}$major'
 
1412
  shlibpath_var=LD_LIBRARY_PATH
 
1413
  hardcode_into_libs=yes
 
1414
  ;;
 
1415
 
 
1416
hpux9* | hpux10* | hpux11*)
 
1417
  # Give a soname corresponding to the major version so that dld.sl refuses to
 
1418
  # link against other versions.
 
1419
  version_type=sunos
 
1420
  need_lib_prefix=no
 
1421
  need_version=no
 
1422
  case $host_cpu in
 
1423
  ia64*)
 
1424
    shrext_cmds='.so'
 
1425
    hardcode_into_libs=yes
 
1426
    dynamic_linker="$host_os dld.so"
 
1427
    shlibpath_var=LD_LIBRARY_PATH
 
1428
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
1429
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1430
    soname_spec='${libname}${release}${shared_ext}$major'
 
1431
    if test "X$HPUX_IA64_MODE" = X32; then
 
1432
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
 
1433
    else
 
1434
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
 
1435
    fi
 
1436
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
1437
    ;;
 
1438
   hppa*64*)
 
1439
     shrext_cmds='.sl'
 
1440
     hardcode_into_libs=yes
 
1441
     dynamic_linker="$host_os dld.sl"
 
1442
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
 
1443
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
1444
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1445
     soname_spec='${libname}${release}${shared_ext}$major'
 
1446
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
 
1447
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
1448
     ;;
 
1449
   *)
 
1450
    shrext_cmds='.sl'
 
1451
    dynamic_linker="$host_os dld.sl"
 
1452
    shlibpath_var=SHLIB_PATH
 
1453
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 
1454
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1455
    soname_spec='${libname}${release}${shared_ext}$major'
 
1456
    ;;
 
1457
  esac
 
1458
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
 
1459
  postinstall_cmds='chmod 555 $lib'
 
1460
  ;;
 
1461
 
 
1462
irix5* | irix6* | nonstopux*)
 
1463
  case $host_os in
 
1464
    nonstopux*) version_type=nonstopux ;;
 
1465
    *)
 
1466
        if test "$lt_cv_prog_gnu_ld" = yes; then
 
1467
                version_type=linux
 
1468
        else
 
1469
                version_type=irix
 
1470
        fi ;;
 
1471
  esac
 
1472
  need_lib_prefix=no
 
1473
  need_version=no
 
1474
  soname_spec='${libname}${release}${shared_ext}$major'
 
1475
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
 
1476
  case $host_os in
 
1477
  irix5* | nonstopux*)
 
1478
    libsuff= shlibsuff=
 
1479
    ;;
 
1480
  *)
 
1481
    case $LD in # libtool.m4 will add one of these switches to LD
 
1482
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
 
1483
      libsuff= shlibsuff= libmagic=32-bit;;
 
1484
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
 
1485
      libsuff=32 shlibsuff=N32 libmagic=N32;;
 
1486
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
 
1487
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
 
1488
    *) libsuff= shlibsuff= libmagic=never-match;;
 
1489
    esac
 
1490
    ;;
 
1491
  esac
 
1492
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
 
1493
  shlibpath_overrides_runpath=no
 
1494
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 
1495
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
1496
  hardcode_into_libs=yes
 
1497
  ;;
 
1498
 
 
1499
# No shared lib support for Linux oldld, aout, or coff.
 
1500
linux*oldld* | linux*aout* | linux*coff*)
 
1501
  dynamic_linker=no
 
1502
  ;;
 
1503
 
 
1504
# This must be Linux ELF.
 
1505
linux*)
 
1506
  version_type=linux
 
1507
  need_lib_prefix=no
 
1508
  need_version=no
 
1509
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1510
  soname_spec='${libname}${release}${shared_ext}$major'
 
1511
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 
1512
  shlibpath_var=LD_LIBRARY_PATH
 
1513
  shlibpath_overrides_runpath=no
 
1514
  # This implies no fast_install, which is unacceptable.
 
1515
  # Some rework will be needed to allow for fast_install
 
1516
  # before this can be enabled.
 
1517
  hardcode_into_libs=yes
 
1518
 
 
1519
  # Append ld.so.conf contents to the search path
 
1520
  if test -f /etc/ld.so.conf; then
 
1521
    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' ' '`
 
1522
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
 
1523
  fi
 
1524
 
 
1525
  # We used to test for /lib/ld.so.1 and disable shared libraries on
 
1526
  # powerpc, because MkLinux only supported shared libraries with the
 
1527
  # GNU dynamic linker.  Since this was broken with cross compilers,
 
1528
  # most powerpc-linux boxes support dynamic linking these days and
 
1529
  # people can always --disable-shared, the test was removed, and we
 
1530
  # assume the GNU/Linux dynamic linker is in use.
 
1531
  dynamic_linker='GNU/Linux ld.so'
 
1532
  ;;
 
1533
 
 
1534
knetbsd*-gnu)
 
1535
  version_type=linux
 
1536
  need_lib_prefix=no
 
1537
  need_version=no
 
1538
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
1539
  soname_spec='${libname}${release}${shared_ext}$major'
 
1540
  shlibpath_var=LD_LIBRARY_PATH
 
1541
  shlibpath_overrides_runpath=no
 
1542
  hardcode_into_libs=yes
 
1543
  dynamic_linker='GNU ld.so'
 
1544
  ;;
 
1545
 
 
1546
netbsd*)
 
1547
  version_type=sunos
 
1548
  need_lib_prefix=no
 
1549
  need_version=no
 
1550
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
1551
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
1552
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
1553
    dynamic_linker='NetBSD (a.out) ld.so'
 
1554
  else
 
1555
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
1556
    soname_spec='${libname}${release}${shared_ext}$major'
 
1557
    dynamic_linker='NetBSD ld.elf_so'
 
1558
  fi
 
1559
  shlibpath_var=LD_LIBRARY_PATH
 
1560
  shlibpath_overrides_runpath=yes
 
1561
  hardcode_into_libs=yes
 
1562
  ;;
 
1563
 
 
1564
newsos6)
 
1565
  version_type=linux
 
1566
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1567
  shlibpath_var=LD_LIBRARY_PATH
 
1568
  shlibpath_overrides_runpath=yes
 
1569
  ;;
 
1570
 
 
1571
nto-qnx*)
 
1572
  version_type=linux
 
1573
  need_lib_prefix=no
 
1574
  need_version=no
 
1575
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1576
  soname_spec='${libname}${release}${shared_ext}$major'
 
1577
  shlibpath_var=LD_LIBRARY_PATH
 
1578
  shlibpath_overrides_runpath=yes
 
1579
  ;;
 
1580
 
 
1581
openbsd*)
 
1582
  version_type=sunos
 
1583
  need_lib_prefix=no
 
1584
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
 
1585
  case $host_os in
 
1586
    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
 
1587
    *)                         need_version=no  ;;
 
1588
  esac
 
1589
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
1590
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
1591
  shlibpath_var=LD_LIBRARY_PATH
 
1592
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
1593
    case $host_os in
 
1594
      openbsd2.[[89]] | openbsd2.[[89]].*)
 
1595
        shlibpath_overrides_runpath=no
 
1596
        ;;
 
1597
      *)
 
1598
        shlibpath_overrides_runpath=yes
 
1599
        ;;
 
1600
      esac
 
1601
  else
 
1602
    shlibpath_overrides_runpath=yes
 
1603
  fi
 
1604
  ;;
 
1605
 
 
1606
os2*)
 
1607
  libname_spec='$name'
 
1608
  shrext_cmds=".dll"
 
1609
  need_lib_prefix=no
 
1610
  library_names_spec='$libname${shared_ext} $libname.a'
 
1611
  dynamic_linker='OS/2 ld.exe'
 
1612
  shlibpath_var=LIBPATH
 
1613
  ;;
 
1614
 
 
1615
osf3* | osf4* | osf5*)
 
1616
  version_type=osf
 
1617
  need_lib_prefix=no
 
1618
  need_version=no
 
1619
  soname_spec='${libname}${release}${shared_ext}$major'
 
1620
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1621
  shlibpath_var=LD_LIBRARY_PATH
 
1622
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
 
1623
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
 
1624
  ;;
 
1625
 
 
1626
sco3.2v5*)
 
1627
  version_type=osf
 
1628
  soname_spec='${libname}${release}${shared_ext}$major'
 
1629
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1630
  shlibpath_var=LD_LIBRARY_PATH
 
1631
  ;;
 
1632
 
 
1633
solaris*)
 
1634
  version_type=linux
 
1635
  need_lib_prefix=no
 
1636
  need_version=no
 
1637
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1638
  soname_spec='${libname}${release}${shared_ext}$major'
 
1639
  shlibpath_var=LD_LIBRARY_PATH
 
1640
  shlibpath_overrides_runpath=yes
 
1641
  hardcode_into_libs=yes
 
1642
  # ldd complains unless libraries are executable
 
1643
  postinstall_cmds='chmod +x $lib'
 
1644
  ;;
 
1645
 
 
1646
sunos4*)
 
1647
  version_type=sunos
 
1648
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
1649
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
 
1650
  shlibpath_var=LD_LIBRARY_PATH
 
1651
  shlibpath_overrides_runpath=yes
 
1652
  if test "$with_gnu_ld" = yes; then
 
1653
    need_lib_prefix=no
 
1654
  fi
 
1655
  need_version=yes
 
1656
  ;;
 
1657
 
 
1658
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
1659
  version_type=linux
 
1660
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1661
  soname_spec='${libname}${release}${shared_ext}$major'
 
1662
  shlibpath_var=LD_LIBRARY_PATH
 
1663
  case $host_vendor in
 
1664
    sni)
 
1665
      shlibpath_overrides_runpath=no
 
1666
      need_lib_prefix=no
 
1667
      export_dynamic_flag_spec='${wl}-Blargedynsym'
 
1668
      runpath_var=LD_RUN_PATH
 
1669
      ;;
 
1670
    siemens)
 
1671
      need_lib_prefix=no
 
1672
      ;;
 
1673
    motorola)
 
1674
      need_lib_prefix=no
 
1675
      need_version=no
 
1676
      shlibpath_overrides_runpath=no
 
1677
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
 
1678
      ;;
 
1679
  esac
 
1680
  ;;
 
1681
 
 
1682
sysv4*MP*)
 
1683
  if test -d /usr/nec ;then
 
1684
    version_type=linux
 
1685
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
 
1686
    soname_spec='$libname${shared_ext}.$major'
 
1687
    shlibpath_var=LD_LIBRARY_PATH
 
1688
  fi
 
1689
  ;;
 
1690
 
 
1691
uts4*)
 
1692
  version_type=linux
 
1693
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1694
  soname_spec='${libname}${release}${shared_ext}$major'
 
1695
  shlibpath_var=LD_LIBRARY_PATH
 
1696
  ;;
 
1697
 
 
1698
*)
 
1699
  dynamic_linker=no
 
1700
  ;;
 
1701
esac
 
1702
AC_MSG_RESULT([$dynamic_linker])
 
1703
test "$dynamic_linker" = no && can_build_shared=no
 
1704
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
1705
 
 
1706
 
 
1707
# _LT_AC_TAGCONFIG
 
1708
# ----------------
 
1709
AC_DEFUN([_LT_AC_TAGCONFIG],
 
1710
[AC_ARG_WITH([tags],
 
1711
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
 
1712
        [include additional configurations @<:@automatic@:>@])],
 
1713
    [tagnames="$withval"])
 
1714
 
 
1715
if test -f "$ltmain" && test -n "$tagnames"; then
 
1716
  if test ! -f "${ofile}"; then
 
1717
    AC_MSG_WARN([output file `$ofile' does not exist])
 
1718
  fi
 
1719
 
 
1720
  if test -z "$LTCC"; then
 
1721
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
 
1722
    if test -z "$LTCC"; then
 
1723
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
 
1724
    else
 
1725
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
 
1726
    fi
 
1727
  fi
 
1728
 
 
1729
  # Extract list of available tagged configurations in $ofile.
 
1730
  # Note that this assumes the entire list is on one line.
 
1731
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
 
1732
 
 
1733
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
1734
  for tagname in $tagnames; do
 
1735
    IFS="$lt_save_ifs"
 
1736
    # Check whether tagname contains only valid characters
 
1737
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
 
1738
    "") ;;
 
1739
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
 
1740
        ;;
 
1741
    esac
 
1742
 
 
1743
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
 
1744
    then
 
1745
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
 
1746
    fi
 
1747
 
 
1748
    # Update the list of available tags.
 
1749
    if test -n "$tagname"; then
 
1750
      echo appending configuration tag \"$tagname\" to $ofile
 
1751
 
 
1752
      case $tagname in
 
1753
      CXX)
 
1754
        if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
 
1755
            ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
 
1756
            (test "X$CXX" != "Xg++"))) ; then
 
1757
          AC_LIBTOOL_LANG_CXX_CONFIG
 
1758
        else
 
1759
          tagname=""
 
1760
        fi
 
1761
        ;;
 
1762
 
 
1763
      F77)
 
1764
        if test -n "$F77" && test "X$F77" != "Xno"; then
 
1765
          AC_LIBTOOL_LANG_F77_CONFIG
 
1766
        else
 
1767
          tagname=""
 
1768
        fi
 
1769
        ;;
 
1770
 
 
1771
      GCJ)
 
1772
        if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
 
1773
          AC_LIBTOOL_LANG_GCJ_CONFIG
 
1774
        else
 
1775
          tagname=""
 
1776
        fi
 
1777
        ;;
 
1778
 
 
1779
      RC)
 
1780
        AC_LIBTOOL_LANG_RC_CONFIG
 
1781
        ;;
 
1782
 
 
1783
      *)
 
1784
        AC_MSG_ERROR([Unsupported tag name: $tagname])
 
1785
        ;;
 
1786
      esac
 
1787
 
 
1788
      # Append the new tag name to the list of available tags.
 
1789
      if test -n "$tagname" ; then
 
1790
      available_tags="$available_tags $tagname"
 
1791
    fi
 
1792
    fi
 
1793
  done
 
1794
  IFS="$lt_save_ifs"
 
1795
 
 
1796
  # Now substitute the updated list of available tags.
 
1797
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
 
1798
    mv "${ofile}T" "$ofile"
 
1799
    chmod +x "$ofile"
 
1800
  else
 
1801
    rm -f "${ofile}T"
 
1802
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
 
1803
  fi
 
1804
fi
 
1805
])# _LT_AC_TAGCONFIG
 
1806
 
 
1807
 
 
1808
# AC_LIBTOOL_DLOPEN
 
1809
# -----------------
 
1810
# enable checks for dlopen support
 
1811
AC_DEFUN([AC_LIBTOOL_DLOPEN],
 
1812
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
 
1813
])# AC_LIBTOOL_DLOPEN
 
1814
 
 
1815
 
 
1816
# AC_LIBTOOL_WIN32_DLL
 
1817
# --------------------
 
1818
# declare package support for building win32 DLLs
 
1819
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
 
1820
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
 
1821
])# AC_LIBTOOL_WIN32_DLL
 
1822
 
 
1823
 
 
1824
# AC_ENABLE_SHARED([DEFAULT])
 
1825
# ---------------------------
 
1826
# implement the --enable-shared flag
 
1827
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
1828
AC_DEFUN([AC_ENABLE_SHARED],
 
1829
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
 
1830
AC_ARG_ENABLE([shared],
 
1831
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
 
1832
        [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
 
1833
    [p=${PACKAGE-default}
 
1834
    case $enableval in
 
1835
    yes) enable_shared=yes ;;
 
1836
    no) enable_shared=no ;;
 
1837
    *)
 
1838
      enable_shared=no
 
1839
      # Look at the argument we got.  We use all the common list separators.
 
1840
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
1841
      for pkg in $enableval; do
 
1842
        IFS="$lt_save_ifs"
 
1843
        if test "X$pkg" = "X$p"; then
 
1844
          enable_shared=yes
 
1845
        fi
 
1846
      done
 
1847
      IFS="$lt_save_ifs"
 
1848
      ;;
 
1849
    esac],
 
1850
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
 
1851
])# AC_ENABLE_SHARED
 
1852
 
 
1853
 
 
1854
# AC_DISABLE_SHARED
 
1855
# -----------------
 
1856
#- set the default shared flag to --disable-shared
 
1857
AC_DEFUN([AC_DISABLE_SHARED],
 
1858
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
1859
AC_ENABLE_SHARED(no)
 
1860
])# AC_DISABLE_SHARED
 
1861
 
 
1862
 
 
1863
# AC_ENABLE_STATIC([DEFAULT])
 
1864
# ---------------------------
 
1865
# implement the --enable-static flag
 
1866
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
1867
AC_DEFUN([AC_ENABLE_STATIC],
 
1868
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
 
1869
AC_ARG_ENABLE([static],
 
1870
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
 
1871
        [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
 
1872
    [p=${PACKAGE-default}
 
1873
    case $enableval in
 
1874
    yes) enable_static=yes ;;
 
1875
    no) enable_static=no ;;
 
1876
    *)
 
1877
     enable_static=no
 
1878
      # Look at the argument we got.  We use all the common list separators.
 
1879
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
1880
      for pkg in $enableval; do
 
1881
        IFS="$lt_save_ifs"
 
1882
        if test "X$pkg" = "X$p"; then
 
1883
          enable_static=yes
 
1884
        fi
 
1885
      done
 
1886
      IFS="$lt_save_ifs"
 
1887
      ;;
 
1888
    esac],
 
1889
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
 
1890
])# AC_ENABLE_STATIC
 
1891
 
 
1892
 
 
1893
# AC_DISABLE_STATIC
 
1894
# -----------------
 
1895
# set the default static flag to --disable-static
 
1896
AC_DEFUN([AC_DISABLE_STATIC],
 
1897
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
1898
AC_ENABLE_STATIC(no)
 
1899
])# AC_DISABLE_STATIC
 
1900
 
 
1901
 
 
1902
# AC_ENABLE_FAST_INSTALL([DEFAULT])
 
1903
# ---------------------------------
 
1904
# implement the --enable-fast-install flag
 
1905
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
1906
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
 
1907
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
 
1908
AC_ARG_ENABLE([fast-install],
 
1909
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
 
1910
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
 
1911
    [p=${PACKAGE-default}
 
1912
    case $enableval in
 
1913
    yes) enable_fast_install=yes ;;
 
1914
    no) enable_fast_install=no ;;
 
1915
    *)
 
1916
      enable_fast_install=no
 
1917
      # Look at the argument we got.  We use all the common list separators.
 
1918
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
1919
      for pkg in $enableval; do
 
1920
        IFS="$lt_save_ifs"
 
1921
        if test "X$pkg" = "X$p"; then
 
1922
          enable_fast_install=yes
 
1923
        fi
 
1924
      done
 
1925
      IFS="$lt_save_ifs"
 
1926
      ;;
 
1927
    esac],
 
1928
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
 
1929
])# AC_ENABLE_FAST_INSTALL
 
1930
 
 
1931
 
 
1932
# AC_DISABLE_FAST_INSTALL
 
1933
# -----------------------
 
1934
# set the default to --disable-fast-install
 
1935
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
 
1936
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
1937
AC_ENABLE_FAST_INSTALL(no)
 
1938
])# AC_DISABLE_FAST_INSTALL
 
1939
 
 
1940
 
 
1941
# AC_LIBTOOL_PICMODE([MODE])
 
1942
# --------------------------
 
1943
# implement the --with-pic flag
 
1944
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
 
1945
AC_DEFUN([AC_LIBTOOL_PICMODE],
 
1946
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
1947
pic_mode=ifelse($#,1,$1,default)
 
1948
])# AC_LIBTOOL_PICMODE
 
1949
 
 
1950
 
 
1951
# AC_PROG_EGREP
 
1952
# -------------
 
1953
# This is predefined starting with Autoconf 2.54, so this conditional
 
1954
# definition can be removed once we require Autoconf 2.54 or later.
 
1955
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
 
1956
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
 
1957
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
 
1958
    then ac_cv_prog_egrep='grep -E'
 
1959
    else ac_cv_prog_egrep='egrep'
 
1960
    fi])
 
1961
 EGREP=$ac_cv_prog_egrep
 
1962
 AC_SUBST([EGREP])
 
1963
])])
 
1964
 
 
1965
 
 
1966
# AC_PATH_TOOL_PREFIX
 
1967
# -------------------
 
1968
# find a file program which can recognise shared library
 
1969
AC_DEFUN([AC_PATH_TOOL_PREFIX],
 
1970
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
1971
AC_MSG_CHECKING([for $1])
 
1972
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 
1973
[case $MAGIC_CMD in
 
1974
[[\\/*] |  ?:[\\/]*])
 
1975
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
 
1976
  ;;
 
1977
*)
 
1978
  lt_save_MAGIC_CMD="$MAGIC_CMD"
 
1979
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
1980
dnl $ac_dummy forces splitting on constant user-supplied paths.
 
1981
dnl POSIX.2 word splitting is done only on the output of word expansions,
 
1982
dnl not every word.  This closes a longstanding sh security hole.
 
1983
  ac_dummy="ifelse([$2], , $PATH, [$2])"
 
1984
  for ac_dir in $ac_dummy; do
 
1985
    IFS="$lt_save_ifs"
 
1986
    test -z "$ac_dir" && ac_dir=.
 
1987
    if test -f $ac_dir/$1; then
 
1988
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
 
1989
      if test -n "$file_magic_test_file"; then
 
1990
        case $deplibs_check_method in
 
1991
        "file_magic "*)
 
1992
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
 
1993
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
1994
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 
1995
            $EGREP "$file_magic_regex" > /dev/null; then
 
1996
            :
 
1997
          else
 
1998
            cat <<EOF 1>&2
 
1999
 
 
2000
*** Warning: the command libtool uses to detect shared libraries,
 
2001
*** $file_magic_cmd, produces output that libtool cannot recognize.
 
2002
*** The result is that libtool may fail to recognize shared libraries
 
2003
*** as such.  This will affect the creation of libtool libraries that
 
2004
*** depend on shared libraries, but programs linked with such libtool
 
2005
*** libraries will work regardless of this problem.  Nevertheless, you
 
2006
*** may want to report the problem to your system manager and/or to
 
2007
*** bug-libtool@gnu.org
 
2008
 
 
2009
EOF
 
2010
          fi ;;
 
2011
        esac
 
2012
      fi
 
2013
      break
 
2014
    fi
 
2015
  done
 
2016
  IFS="$lt_save_ifs"
 
2017
  MAGIC_CMD="$lt_save_MAGIC_CMD"
 
2018
  ;;
 
2019
esac])
 
2020
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
2021
if test -n "$MAGIC_CMD"; then
 
2022
  AC_MSG_RESULT($MAGIC_CMD)
 
2023
else
 
2024
  AC_MSG_RESULT(no)
 
2025
fi
 
2026
])# AC_PATH_TOOL_PREFIX
 
2027
 
 
2028
 
 
2029
# AC_PATH_MAGIC
 
2030
# -------------
 
2031
# find a file program which can recognise a shared library
 
2032
AC_DEFUN([AC_PATH_MAGIC],
 
2033
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 
2034
if test -z "$lt_cv_path_MAGIC_CMD"; then
 
2035
  if test -n "$ac_tool_prefix"; then
 
2036
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
 
2037
  else
 
2038
    MAGIC_CMD=:
 
2039
  fi
 
2040
fi
 
2041
])# AC_PATH_MAGIC
 
2042
 
 
2043
 
 
2044
# AC_PROG_LD
 
2045
# ----------
 
2046
# find the pathname to the GNU or non-GNU linker
 
2047
AC_DEFUN([AC_PROG_LD],
 
2048
[AC_ARG_WITH([gnu-ld],
 
2049
    [AC_HELP_STRING([--with-gnu-ld],
 
2050
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
 
2051
    [test "$withval" = no || with_gnu_ld=yes],
 
2052
    [with_gnu_ld=no])
 
2053
AC_REQUIRE([LT_AC_PROG_SED])dnl
 
2054
AC_REQUIRE([AC_PROG_CC])dnl
 
2055
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
2056
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
2057
ac_prog=ld
 
2058
if test "$GCC" = yes; then
 
2059
  # Check if gcc -print-prog-name=ld gives a path.
 
2060
  AC_MSG_CHECKING([for ld used by $CC])
 
2061
  case $host in
 
2062
  *-*-mingw*)
 
2063
    # gcc leaves a trailing carriage return which upsets mingw
 
2064
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
2065
  *)
 
2066
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
2067
  esac
 
2068
  case $ac_prog in
 
2069
    # Accept absolute paths.
 
2070
    [[\\/]]* | ?:[[\\/]]*)
 
2071
      re_direlt='/[[^/]][[^/]]*/\.\./'
 
2072
      # Canonicalize the pathname of ld
 
2073
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
 
2074
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
 
2075
        ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
 
2076
      done
 
2077
      test -z "$LD" && LD="$ac_prog"
 
2078
      ;;
 
2079
  "")
 
2080
    # If it fails, then pretend we aren't using GCC.
 
2081
    ac_prog=ld
 
2082
    ;;
 
2083
  *)
 
2084
    # If it is relative, then search for the first ld in PATH.
 
2085
    with_gnu_ld=unknown
 
2086
    ;;
 
2087
  esac
 
2088
elif test "$with_gnu_ld" = yes; then
 
2089
  AC_MSG_CHECKING([for GNU ld])
 
2090
else
 
2091
  AC_MSG_CHECKING([for non-GNU ld])
 
2092
fi
 
2093
AC_CACHE_VAL(lt_cv_path_LD,
 
2094
[if test -z "$LD"; then
 
2095
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
2096
  for ac_dir in $PATH; do
 
2097
    IFS="$lt_save_ifs"
 
2098
    test -z "$ac_dir" && ac_dir=.
 
2099
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
2100
      lt_cv_path_LD="$ac_dir/$ac_prog"
 
2101
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
2102
      # but apparently some variants of GNU ld only accept -v.
 
2103
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
2104
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
 
2105
      *GNU* | *'with BFD'*)
 
2106
        test "$with_gnu_ld" != no && break
 
2107
        ;;
 
2108
      *)
 
2109
        test "$with_gnu_ld" != yes && break
 
2110
        ;;
 
2111
      esac
 
2112
    fi
 
2113
  done
 
2114
  IFS="$lt_save_ifs"
 
2115
else
 
2116
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
 
2117
fi])
 
2118
LD="$lt_cv_path_LD"
 
2119
if test -n "$LD"; then
 
2120
  AC_MSG_RESULT($LD)
 
2121
else
 
2122
  AC_MSG_RESULT(no)
 
2123
fi
 
2124
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
2125
AC_PROG_LD_GNU
 
2126
])# AC_PROG_LD
 
2127
 
 
2128
 
 
2129
# AC_PROG_LD_GNU
 
2130
# --------------
 
2131
AC_DEFUN([AC_PROG_LD_GNU],
 
2132
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
2133
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
 
2134
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
 
2135
case `$LD -v 2>&1 </dev/null` in
 
2136
*GNU* | *'with BFD'*)
 
2137
  lt_cv_prog_gnu_ld=yes
 
2138
  ;;
 
2139
*)
 
2140
  lt_cv_prog_gnu_ld=no
 
2141
  ;;
 
2142
esac])
 
2143
with_gnu_ld=$lt_cv_prog_gnu_ld
 
2144
])# AC_PROG_LD_GNU
 
2145
 
 
2146
 
 
2147
# AC_PROG_LD_RELOAD_FLAG
 
2148
# ----------------------
 
2149
# find reload flag for linker
 
2150
#   -- PORTME Some linkers may need a different reload flag.
 
2151
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
 
2152
[AC_CACHE_CHECK([for $LD option to reload object files],
 
2153
  lt_cv_ld_reload_flag,
 
2154
  [lt_cv_ld_reload_flag='-r'])
 
2155
reload_flag=$lt_cv_ld_reload_flag
 
2156
case $reload_flag in
 
2157
"" | " "*) ;;
 
2158
*) reload_flag=" $reload_flag" ;;
 
2159
esac
 
2160
reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
2161
case $host_os in
 
2162
  darwin*)
 
2163
    if test "$GCC" = yes; then
 
2164
      reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
 
2165
    else
 
2166
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
2167
    fi
 
2168
    ;;
 
2169
esac
 
2170
])# AC_PROG_LD_RELOAD_FLAG
 
2171
 
 
2172
 
 
2173
# AC_DEPLIBS_CHECK_METHOD
 
2174
# -----------------------
 
2175
# how to check for library dependencies
 
2176
#  -- PORTME fill in with the dynamic library characteristics
 
2177
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
 
2178
[AC_CACHE_CHECK([how to recognise dependent libraries],
 
2179
lt_cv_deplibs_check_method,
 
2180
[lt_cv_file_magic_cmd='$MAGIC_CMD'
 
2181
lt_cv_file_magic_test_file=
 
2182
lt_cv_deplibs_check_method='unknown'
 
2183
# Need to set the preceding variable on all platforms that support
 
2184
# interlibrary dependencies.
 
2185
# 'none' -- dependencies not supported.
 
2186
# `unknown' -- same as none, but documents that we really don't know.
 
2187
# 'pass_all' -- all dependencies passed with no checks.
 
2188
# 'test_compile' -- check by making test program.
 
2189
# 'file_magic [[regex]]' -- check by looking for files in library path
 
2190
# which responds to the $file_magic_cmd with a given extended regex.
 
2191
# If you have `file' or equivalent on your system and you're not sure
 
2192
# whether `pass_all' will *always* work, you probably want this one.
 
2193
 
 
2194
case $host_os in
 
2195
aix4* | aix5*)
 
2196
  lt_cv_deplibs_check_method=pass_all
 
2197
  ;;
 
2198
 
 
2199
beos*)
 
2200
  lt_cv_deplibs_check_method=pass_all
 
2201
  ;;
 
2202
 
 
2203
bsdi[[45]]*)
 
2204
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
 
2205
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
2206
  lt_cv_file_magic_test_file=/shlib/libc.so
 
2207
  ;;
 
2208
 
 
2209
cygwin*)
 
2210
  # func_win32_libid is a shell function defined in ltmain.sh
 
2211
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
2212
  lt_cv_file_magic_cmd='func_win32_libid'
 
2213
  ;;
 
2214
 
 
2215
mingw* | pw32*)
 
2216
  # Base MSYS/MinGW do not provide the 'file' command needed by
 
2217
  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
 
2218
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
 
2219
  lt_cv_file_magic_cmd='$OBJDUMP -f'
 
2220
  ;;
 
2221
 
 
2222
darwin* | rhapsody*)
 
2223
  lt_cv_deplibs_check_method=pass_all
 
2224
  ;;
 
2225
 
 
2226
freebsd* | kfreebsd*-gnu | dragonfly*)
 
2227
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
2228
    case $host_cpu in
 
2229
    i*86 )
 
2230
      # Not sure whether the presence of OpenBSD here was a mistake.
 
2231
      # Let's accept both of them until this is cleared up.
 
2232
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
 
2233
      lt_cv_file_magic_cmd=/usr/bin/file
 
2234
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
2235
      ;;
 
2236
    esac
 
2237
  else
 
2238
    lt_cv_deplibs_check_method=pass_all
 
2239
  fi
 
2240
  ;;
 
2241
 
 
2242
gnu*)
 
2243
  lt_cv_deplibs_check_method=pass_all
 
2244
  ;;
 
2245
 
 
2246
hpux10.20* | hpux11*)
 
2247
  lt_cv_file_magic_cmd=/usr/bin/file
 
2248
  case $host_cpu in
 
2249
  ia64*)
 
2250
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
 
2251
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
 
2252
    ;;
 
2253
  hppa*64*)
 
2254
    [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]']
 
2255
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
 
2256
    ;;
 
2257
  *)
 
2258
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
 
2259
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
 
2260
    ;;
 
2261
  esac
 
2262
  ;;
 
2263
 
 
2264
irix5* | irix6* | nonstopux*)
 
2265
  case $LD in
 
2266
  *-32|*"-32 ") libmagic=32-bit;;
 
2267
  *-n32|*"-n32 ") libmagic=N32;;
 
2268
  *-64|*"-64 ") libmagic=64-bit;;
 
2269
  *) libmagic=never-match;;
 
2270
  esac
 
2271
  lt_cv_deplibs_check_method=pass_all
 
2272
  ;;
 
2273
 
 
2274
# This must be Linux ELF.
 
2275
linux*)
 
2276
  lt_cv_deplibs_check_method=pass_all
 
2277
  ;;
 
2278
 
 
2279
netbsd*)
 
2280
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
2281
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
2282
  else
 
2283
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
 
2284
  fi
 
2285
  ;;
 
2286
 
 
2287
newos6*)
 
2288
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
 
2289
  lt_cv_file_magic_cmd=/usr/bin/file
 
2290
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
 
2291
  ;;
 
2292
 
 
2293
nto-qnx*)
 
2294
  lt_cv_deplibs_check_method=unknown
 
2295
  ;;
 
2296
 
 
2297
openbsd*)
 
2298
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
2299
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
 
2300
  else
 
2301
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
2302
  fi
 
2303
  ;;
 
2304
 
 
2305
osf3* | osf4* | osf5*)
 
2306
  lt_cv_deplibs_check_method=pass_all
 
2307
  ;;
 
2308
 
 
2309
sco3.2v5*)
 
2310
  lt_cv_deplibs_check_method=pass_all
 
2311
  ;;
 
2312
 
 
2313
solaris*)
 
2314
  lt_cv_deplibs_check_method=pass_all
 
2315
  ;;
 
2316
 
 
2317
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
2318
  case $host_vendor in
 
2319
  motorola)
 
2320
    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]]'
 
2321
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
 
2322
    ;;
 
2323
  ncr)
 
2324
    lt_cv_deplibs_check_method=pass_all
 
2325
    ;;
 
2326
  sequent)
 
2327
    lt_cv_file_magic_cmd='/bin/file'
 
2328
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
 
2329
    ;;
 
2330
  sni)
 
2331
    lt_cv_file_magic_cmd='/bin/file'
 
2332
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
 
2333
    lt_cv_file_magic_test_file=/lib/libc.so
 
2334
    ;;
 
2335
  siemens)
 
2336
    lt_cv_deplibs_check_method=pass_all
 
2337
    ;;
 
2338
  esac
 
2339
  ;;
 
2340
 
 
2341
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
 
2342
  lt_cv_deplibs_check_method=pass_all
 
2343
  ;;
 
2344
esac
 
2345
])
 
2346
file_magic_cmd=$lt_cv_file_magic_cmd
 
2347
deplibs_check_method=$lt_cv_deplibs_check_method
 
2348
test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
2349
])# AC_DEPLIBS_CHECK_METHOD
 
2350
 
 
2351
 
 
2352
# AC_PROG_NM
 
2353
# ----------
 
2354
# find the pathname to a BSD-compatible name lister
 
2355
AC_DEFUN([AC_PROG_NM],
 
2356
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
 
2357
[if test -n "$NM"; then
 
2358
  # Let the user override the test.
 
2359
  lt_cv_path_NM="$NM"
 
2360
else
 
2361
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
2362
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
 
2363
    IFS="$lt_save_ifs"
 
2364
    test -z "$ac_dir" && ac_dir=.
 
2365
    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
 
2366
    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
 
2367
      # Check to see if the nm accepts a BSD-compat flag.
 
2368
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
 
2369
      #   nm: unknown option "B" ignored
 
2370
      # Tru64's nm complains that /dev/null is an invalid object file
 
2371
      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
 
2372
      */dev/null* | *'Invalid file or object type'*)
 
2373
        lt_cv_path_NM="$tmp_nm -B"
 
2374
        break
 
2375
        ;;
 
2376
      *)
 
2377
        case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 
2378
        */dev/null*)
 
2379
          lt_cv_path_NM="$tmp_nm -p"
 
2380
          break
 
2381
          ;;
 
2382
        *)
 
2383
          lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 
2384
          continue # so that we can try to find one that supports BSD flags
 
2385
          ;;
 
2386
        esac
 
2387
      esac
 
2388
    fi
 
2389
  done
 
2390
  IFS="$lt_save_ifs"
 
2391
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
 
2392
fi])
 
2393
NM="$lt_cv_path_NM"
 
2394
])# AC_PROG_NM
 
2395
 
 
2396
 
 
2397
# AC_CHECK_LIBM
 
2398
# -------------
 
2399
# check for math library
 
2400
AC_DEFUN([AC_CHECK_LIBM],
 
2401
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
2402
LIBM=
 
2403
case $host in
 
2404
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
 
2405
  # These system don't have libm, or don't need it
 
2406
  ;;
 
2407
*-ncr-sysv4.3*)
 
2408
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
 
2409
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
 
2410
  ;;
 
2411
*)
 
2412
  AC_CHECK_LIB(m, cos, LIBM="-lm")
 
2413
  ;;
 
2414
esac
 
2415
])# AC_CHECK_LIBM
 
2416
 
 
2417
 
 
2418
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
 
2419
# -----------------------------------
 
2420
# sets LIBLTDL to the link flags for the libltdl convenience library and
 
2421
# LTDLINCL to the include flags for the libltdl header and adds
 
2422
# --enable-ltdl-convenience to the configure arguments.  Note that
 
2423
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
 
2424
# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
 
2425
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
 
2426
# (note the single quotes!).  If your package is not flat and you're not
 
2427
# using automake, define top_builddir and top_srcdir appropriately in
 
2428
# the Makefiles.
 
2429
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
 
2430
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
2431
  case $enable_ltdl_convenience in
 
2432
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
 
2433
  "") enable_ltdl_convenience=yes
 
2434
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
 
2435
  esac
 
2436
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
 
2437
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
2438
  # For backwards non-gettext consistent compatibility...
 
2439
  INCLTDL="$LTDLINCL"
 
2440
])# AC_LIBLTDL_CONVENIENCE
 
2441
 
 
2442
 
 
2443
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
 
2444
# -----------------------------------
 
2445
# sets LIBLTDL to the link flags for the libltdl installable library and
 
2446
# LTDLINCL to the include flags for the libltdl header and adds
 
2447
# --enable-ltdl-install to the configure arguments.  Note that
 
2448
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
 
2449
# and an installed libltdl is not found, it is assumed to be `libltdl'.
 
2450
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
 
2451
# '${top_srcdir}/' (note the single quotes!).  If your package is not
 
2452
# flat and you're not using automake, define top_builddir and top_srcdir
 
2453
# appropriately in the Makefiles.
 
2454
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
 
2455
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
 
2456
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
2457
  AC_CHECK_LIB(ltdl, lt_dlinit,
 
2458
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
 
2459
  [if test x"$enable_ltdl_install" = xno; then
 
2460
     AC_MSG_WARN([libltdl not installed, but installation disabled])
 
2461
   else
 
2462
     enable_ltdl_install=yes
 
2463
   fi
 
2464
  ])
 
2465
  if test x"$enable_ltdl_install" = x"yes"; then
 
2466
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
 
2467
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
 
2468
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
2469
  else
 
2470
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
 
2471
    LIBLTDL="-lltdl"
 
2472
    LTDLINCL=
 
2473
  fi
 
2474
  # For backwards non-gettext consistent compatibility...
 
2475
  INCLTDL="$LTDLINCL"
 
2476
])# AC_LIBLTDL_INSTALLABLE
 
2477
 
 
2478
 
 
2479
# AC_LIBTOOL_CXX
 
2480
# --------------
 
2481
# enable support for C++ libraries
 
2482
AC_DEFUN([AC_LIBTOOL_CXX],
 
2483
[AC_REQUIRE([_LT_AC_LANG_CXX])
 
2484
])# AC_LIBTOOL_CXX
 
2485
 
 
2486
 
 
2487
# _LT_AC_LANG_CXX
 
2488
# ---------------
 
2489
AC_DEFUN([_LT_AC_LANG_CXX],
 
2490
[AC_REQUIRE([AC_PROG_CXX])
 
2491
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
 
2492
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
 
2493
])# _LT_AC_LANG_CXX
 
2494
 
 
2495
# _LT_AC_PROG_CXXCPP
 
2496
# ---------------
 
2497
AC_DEFUN([_LT_AC_PROG_CXXCPP],
 
2498
[
 
2499
AC_REQUIRE([AC_PROG_CXX])
 
2500
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
 
2501
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
 
2502
    (test "X$CXX" != "Xg++"))) ; then
 
2503
  AC_PROG_CXXCPP
 
2504
fi
 
2505
])# _LT_AC_PROG_CXXCPP
 
2506
 
 
2507
# AC_LIBTOOL_F77
 
2508
# --------------
 
2509
# enable support for Fortran 77 libraries
 
2510
AC_DEFUN([AC_LIBTOOL_F77],
 
2511
[AC_REQUIRE([_LT_AC_LANG_F77])
 
2512
])# AC_LIBTOOL_F77
 
2513
 
 
2514
 
 
2515
# _LT_AC_LANG_F77
 
2516
# ---------------
 
2517
AC_DEFUN([_LT_AC_LANG_F77],
 
2518
[AC_REQUIRE([AC_PROG_F77])
 
2519
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
 
2520
])# _LT_AC_LANG_F77
 
2521
 
 
2522
 
 
2523
# AC_LIBTOOL_GCJ
 
2524
# --------------
 
2525
# enable support for GCJ libraries
 
2526
AC_DEFUN([AC_LIBTOOL_GCJ],
 
2527
[AC_REQUIRE([_LT_AC_LANG_GCJ])
 
2528
])# AC_LIBTOOL_GCJ
 
2529
 
 
2530
 
 
2531
# _LT_AC_LANG_GCJ
 
2532
# ---------------
 
2533
AC_DEFUN([_LT_AC_LANG_GCJ],
 
2534
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
 
2535
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
 
2536
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
 
2537
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
 
2538
         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
 
2539
           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
 
2540
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
 
2541
])# _LT_AC_LANG_GCJ
 
2542
 
 
2543
 
 
2544
# AC_LIBTOOL_RC
 
2545
# --------------
 
2546
# enable support for Windows resource files
 
2547
AC_DEFUN([AC_LIBTOOL_RC],
 
2548
[AC_REQUIRE([LT_AC_PROG_RC])
 
2549
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
 
2550
])# AC_LIBTOOL_RC
 
2551
 
 
2552
 
 
2553
# AC_LIBTOOL_LANG_C_CONFIG
 
2554
# ------------------------
 
2555
# Ensure that the configuration vars for the C compiler are
 
2556
# suitably defined.  Those variables are subsequently used by
 
2557
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
2558
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
 
2559
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
 
2560
[lt_save_CC="$CC"
 
2561
AC_LANG_PUSH(C)
 
2562
 
 
2563
# Source file extension for C test sources.
 
2564
ac_ext=c
 
2565
 
 
2566
# Object file extension for compiled C test sources.
 
2567
objext=o
 
2568
_LT_AC_TAGVAR(objext, $1)=$objext
 
2569
 
 
2570
# Code to be used in simple compile tests
 
2571
lt_simple_compile_test_code="int some_variable = 0;\n"
 
2572
 
 
2573
# Code to be used in simple link tests
 
2574
lt_simple_link_test_code='int main(){return(0);}\n'
 
2575
 
 
2576
_LT_AC_SYS_COMPILER
 
2577
 
 
2578
# save warnings/boilerplate of simple test code
 
2579
_LT_COMPILER_BOILERPLATE
 
2580
_LT_LINKER_BOILERPLATE
 
2581
 
 
2582
#
 
2583
# Check for any special shared library compilation flags.
 
2584
#
 
2585
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
 
2586
if test "$GCC" = no; then
 
2587
  case $host_os in
 
2588
  sco3.2v5*)
 
2589
    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
 
2590
    ;;
 
2591
  esac
 
2592
fi
 
2593
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
 
2594
  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
 
2595
  if echo "$old_CC $old_CFLAGS " | grep "[[     ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[        ]]" >/dev/null; then :
 
2596
  else
 
2597
    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
 
2598
    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
 
2599
  fi
 
2600
fi
 
2601
 
 
2602
 
 
2603
#
 
2604
# Check to make sure the static flag actually works.
 
2605
#
 
2606
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
 
2607
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
 
2608
  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
 
2609
  [],
 
2610
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
 
2611
 
 
2612
 
 
2613
## CAVEAT EMPTOR:
 
2614
## There is no encapsulation within the following macros, do not change
 
2615
## the running order or otherwise move them around unless you know exactly
 
2616
## what you are doing...
 
2617
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
2618
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
2619
AC_LIBTOOL_PROG_CC_C_O($1)
 
2620
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
2621
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
2622
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
2623
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
2624
AC_LIBTOOL_SYS_LIB_STRIP
 
2625
AC_LIBTOOL_DLOPEN_SELF($1)
 
2626
 
 
2627
# Report which librarie types wil actually be built
 
2628
AC_MSG_CHECKING([if libtool supports shared libraries])
 
2629
AC_MSG_RESULT([$can_build_shared])
 
2630
 
 
2631
AC_MSG_CHECKING([whether to build shared libraries])
 
2632
test "$can_build_shared" = "no" && enable_shared=no
 
2633
 
 
2634
# On AIX, shared libraries and static libraries use the same namespace, and
 
2635
# are all built from PIC.
 
2636
case $host_os in
 
2637
aix3*)
 
2638
  test "$enable_shared" = yes && enable_static=no
 
2639
  if test -n "$RANLIB"; then
 
2640
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
2641
    postinstall_cmds='$RANLIB $lib'
 
2642
  fi
 
2643
  ;;
 
2644
 
 
2645
aix4* | aix5*)
 
2646
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
2647
    test "$enable_shared" = yes && enable_static=no
 
2648
  fi
 
2649
    ;;
 
2650
esac
 
2651
AC_MSG_RESULT([$enable_shared])
 
2652
 
 
2653
AC_MSG_CHECKING([whether to build static libraries])
 
2654
# Make sure either enable_shared or enable_static is yes.
 
2655
test "$enable_shared" = yes || enable_static=yes
 
2656
AC_MSG_RESULT([$enable_static])
 
2657
 
 
2658
AC_LIBTOOL_CONFIG($1)
 
2659
 
 
2660
AC_LANG_POP
 
2661
CC="$lt_save_CC"
 
2662
])# AC_LIBTOOL_LANG_C_CONFIG
 
2663
 
 
2664
 
 
2665
# AC_LIBTOOL_LANG_CXX_CONFIG
 
2666
# --------------------------
 
2667
# Ensure that the configuration vars for the C compiler are
 
2668
# suitably defined.  Those variables are subsequently used by
 
2669
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
2670
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
 
2671
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
 
2672
[AC_LANG_PUSH(C++)
 
2673
AC_REQUIRE([AC_PROG_CXX])
 
2674
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
 
2675
 
 
2676
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
2677
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
2678
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
2679
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
2680
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
2681
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
2682
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
2683
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
2684
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
2685
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
2686
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
2687
_LT_AC_TAGVAR(module_cmds, $1)=
 
2688
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
2689
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
2690
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
2691
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
2692
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
2693
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
2694
 
 
2695
# Dependencies to place before and after the object being linked:
 
2696
_LT_AC_TAGVAR(predep_objects, $1)=
 
2697
_LT_AC_TAGVAR(postdep_objects, $1)=
 
2698
_LT_AC_TAGVAR(predeps, $1)=
 
2699
_LT_AC_TAGVAR(postdeps, $1)=
 
2700
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
 
2701
 
 
2702
# Source file extension for C++ test sources.
 
2703
ac_ext=cpp
 
2704
 
 
2705
# Object file extension for compiled C++ test sources.
 
2706
objext=o
 
2707
_LT_AC_TAGVAR(objext, $1)=$objext
 
2708
 
 
2709
# Code to be used in simple compile tests
 
2710
lt_simple_compile_test_code="int some_variable = 0;\n"
 
2711
 
 
2712
# Code to be used in simple link tests
 
2713
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
 
2714
 
 
2715
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
2716
_LT_AC_SYS_COMPILER
 
2717
 
 
2718
# save warnings/boilerplate of simple test code
 
2719
_LT_COMPILER_BOILERPLATE
 
2720
_LT_LINKER_BOILERPLATE
 
2721
 
 
2722
# Allow CC to be a program name with arguments.
 
2723
lt_save_CC=$CC
 
2724
lt_save_LD=$LD
 
2725
lt_save_GCC=$GCC
 
2726
GCC=$GXX
 
2727
lt_save_with_gnu_ld=$with_gnu_ld
 
2728
lt_save_path_LD=$lt_cv_path_LD
 
2729
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
 
2730
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
 
2731
else
 
2732
  unset lt_cv_prog_gnu_ld
 
2733
fi
 
2734
if test -n "${lt_cv_path_LDCXX+set}"; then
 
2735
  lt_cv_path_LD=$lt_cv_path_LDCXX
 
2736
else
 
2737
  unset lt_cv_path_LD
 
2738
fi
 
2739
test -z "${LDCXX+set}" || LD=$LDCXX
 
2740
CC=${CXX-"c++"}
 
2741
compiler=$CC
 
2742
_LT_AC_TAGVAR(compiler, $1)=$CC
 
2743
_LT_CC_BASENAME([$compiler])
 
2744
 
 
2745
# We don't want -fno-exception wen compiling C++ code, so set the
 
2746
# no_builtin_flag separately
 
2747
if test "$GXX" = yes; then
 
2748
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
2749
else
 
2750
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
2751
fi
 
2752
 
 
2753
if test "$GXX" = yes; then
 
2754
  # Set up default GNU C++ configuration
 
2755
 
 
2756
  AC_PROG_LD
 
2757
 
 
2758
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
 
2759
  # archiving commands below assume that GNU ld is being used.
 
2760
  if test "$with_gnu_ld" = yes; then
 
2761
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
2762
    _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'
 
2763
 
 
2764
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
2765
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
2766
 
 
2767
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
2768
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
 
2769
    #     investigate it a little bit more. (MM)
 
2770
    wlarc='${wl}'
 
2771
 
 
2772
    # ancient GNU ld didn't support --whole-archive et. al.
 
2773
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
 
2774
        grep 'no-whole-archive' > /dev/null; then
 
2775
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
2776
    else
 
2777
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
2778
    fi
 
2779
  else
 
2780
    with_gnu_ld=no
 
2781
    wlarc=
 
2782
 
 
2783
    # A generic and very simple default shared library creation
 
2784
    # command for GNU C++ for the case where it uses the native
 
2785
    # linker, instead of GNU ld.  If possible, this setting should
 
2786
    # overridden to take advantage of the native linker features on
 
2787
    # the platform it is being used on.
 
2788
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
2789
  fi
 
2790
 
 
2791
  # Commands to make compiler produce verbose output that lists
 
2792
  # what "hidden" libraries, object files and flags are used when
 
2793
  # linking a shared library.
 
2794
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
2795
 
 
2796
else
 
2797
  GXX=no
 
2798
  with_gnu_ld=no
 
2799
  wlarc=
 
2800
fi
 
2801
 
 
2802
# PORTME: fill in a description of your system's C++ link characteristics
 
2803
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
2804
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
2805
case $host_os in
 
2806
  aix3*)
 
2807
    # FIXME: insert proper C++ library support
 
2808
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
2809
    ;;
 
2810
  aix4* | aix5*)
 
2811
    if test "$host_cpu" = ia64; then
 
2812
      # On IA64, the linker does run time linking by default, so we don't
 
2813
      # have to do anything special.
 
2814
      aix_use_runtimelinking=no
 
2815
      exp_sym_flag='-Bexport'
 
2816
      no_entry_flag=""
 
2817
    else
 
2818
      aix_use_runtimelinking=no
 
2819
 
 
2820
      # Test if we are trying to use run time linking or normal
 
2821
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
2822
      # need to do runtime linking.
 
2823
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
 
2824
        for ld_flag in $LDFLAGS; do
 
2825
          case $ld_flag in
 
2826
          *-brtl*)
 
2827
            aix_use_runtimelinking=yes
 
2828
            break
 
2829
            ;;
 
2830
          esac
 
2831
        done
 
2832
      esac
 
2833
 
 
2834
      exp_sym_flag='-bexport'
 
2835
      no_entry_flag='-bnoentry'
 
2836
    fi
 
2837
 
 
2838
    # When large executables or shared objects are built, AIX ld can
 
2839
    # have problems creating the table of contents.  If linking a library
 
2840
    # or program results in "error TOC overflow" add -mminimal-toc to
 
2841
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
2842
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
2843
 
 
2844
    _LT_AC_TAGVAR(archive_cmds, $1)=''
 
2845
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
2846
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
2847
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
2848
 
 
2849
    if test "$GXX" = yes; then
 
2850
      case $host_os in aix4.[[012]]|aix4.[[012]].*)
 
2851
      # We only want to do this on AIX 4.2 and lower, the check
 
2852
      # below for broken collect2 doesn't work under 4.3+
 
2853
        collect2name=`${CC} -print-prog-name=collect2`
 
2854
        if test -f "$collect2name" && \
 
2855
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
2856
        then
 
2857
          # We have reworked collect2
 
2858
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
2859
        else
 
2860
          # We have old collect2
 
2861
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
2862
          # It fails to find uninstalled libraries when the uninstalled
 
2863
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
2864
          # to unsupported forces relinking
 
2865
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
2866
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
2867
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
2868
        fi
 
2869
      esac
 
2870
      shared_flag='-shared'
 
2871
      if test "$aix_use_runtimelinking" = yes; then
 
2872
        shared_flag="$shared_flag "'${wl}-G'
 
2873
      fi
 
2874
    else
 
2875
      # not using gcc
 
2876
      if test "$host_cpu" = ia64; then
 
2877
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
2878
        # chokes on -Wl,-G. The following line is correct:
 
2879
        shared_flag='-G'
 
2880
      else
 
2881
        if test "$aix_use_runtimelinking" = yes; then
 
2882
          shared_flag='${wl}-G'
 
2883
        else
 
2884
          shared_flag='${wl}-bM:SRE'
 
2885
        fi
 
2886
      fi
 
2887
    fi
 
2888
 
 
2889
    # It seems that -bexpall does not export symbols beginning with
 
2890
    # underscore (_), so it is better to generate a list of symbols to export.
 
2891
    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
2892
    if test "$aix_use_runtimelinking" = yes; then
 
2893
      # Warning - without using the other runtime loading flags (-brtl),
 
2894
      # -berok will link without error, but may produce a broken library.
 
2895
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
2896
      # Determine the default libpath from the value encoded in an empty executable.
 
2897
      _LT_AC_SYS_LIBPATH_AIX
 
2898
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
2899
 
 
2900
      _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"
 
2901
     else
 
2902
      if test "$host_cpu" = ia64; then
 
2903
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
2904
        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
2905
        _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"
 
2906
      else
 
2907
        # Determine the default libpath from the value encoded in an empty executable.
 
2908
        _LT_AC_SYS_LIBPATH_AIX
 
2909
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
2910
        # Warning - without using the other run time loading flags,
 
2911
        # -berok will link without error, but may produce a broken library.
 
2912
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
2913
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
2914
        # -bexpall does not export symbols beginning with underscore (_)
 
2915
        _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
2916
        # Exported symbols can be pulled into shared objects from archives
 
2917
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
2918
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
2919
        # This is similar to how AIX traditionally builds its shared libraries.
 
2920
        _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'
 
2921
      fi
 
2922
    fi
 
2923
    ;;
 
2924
  chorus*)
 
2925
    case $cc_basename in
 
2926
      *)
 
2927
        # FIXME: insert proper C++ library support
 
2928
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
2929
        ;;
 
2930
    esac
 
2931
    ;;
 
2932
 
 
2933
 
 
2934
  cygwin* | mingw* | pw32*)
 
2935
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
2936
    # as there is no search path for DLLs.
 
2937
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
2938
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
2939
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
2940
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
2941
 
 
2942
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 
2943
      _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'
 
2944
      # If the export-symbols file already is a .def file (1st line
 
2945
      # is EXPORTS), use it as is; otherwise, prepend...
 
2946
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
2947
        cp $export_symbols $output_objdir/$soname.def;
 
2948
      else
 
2949
        echo EXPORTS > $output_objdir/$soname.def;
 
2950
        cat $export_symbols >> $output_objdir/$soname.def;
 
2951
      fi~
 
2952
      $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'
 
2953
    else
 
2954
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
2955
    fi
 
2956
  ;;
 
2957
      darwin* | rhapsody*)
 
2958
        case $host_os in
 
2959
        rhapsody* | darwin1.[[012]])
 
2960
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
 
2961
         ;;
 
2962
       *) # Darwin 1.3 on
 
2963
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
2964
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
2965
         else
 
2966
           case ${MACOSX_DEPLOYMENT_TARGET} in
 
2967
             10.[[012]])
 
2968
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
2969
               ;;
 
2970
             10.*)
 
2971
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
 
2972
               ;;
 
2973
           esac
 
2974
         fi
 
2975
         ;;
 
2976
        esac
 
2977
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
2978
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
2979
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
2980
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
2981
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
 
2982
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
2983
 
 
2984
    if test "$GXX" = yes ; then
 
2985
      lt_int_apple_cc_single_mod=no
 
2986
      output_verbose_link_cmd='echo'
 
2987
      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
 
2988
       lt_int_apple_cc_single_mod=yes
 
2989
      fi
 
2990
      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
2991
       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
2992
      else
 
2993
          _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'
 
2994
        fi
 
2995
        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
2996
        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
2997
          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
2998
            _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}'
 
2999
          else
 
3000
            _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}'
 
3001
          fi
 
3002
            _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}'
 
3003
      else
 
3004
      case $cc_basename in
 
3005
        xlc*)
 
3006
         output_verbose_link_cmd='echo'
 
3007
          _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'
 
3008
          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
3009
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
3010
          _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}'
 
3011
          _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}'
 
3012
          ;;
 
3013
       *)
 
3014
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3015
          ;;
 
3016
      esac
 
3017
      fi
 
3018
        ;;
 
3019
 
 
3020
  dgux*)
 
3021
    case $cc_basename in
 
3022
      ec++*)
 
3023
        # FIXME: insert proper C++ library support
 
3024
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3025
        ;;
 
3026
      ghcx*)
 
3027
        # Green Hills C++ Compiler
 
3028
        # FIXME: insert proper C++ library support
 
3029
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3030
        ;;
 
3031
      *)
 
3032
        # FIXME: insert proper C++ library support
 
3033
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3034
        ;;
 
3035
    esac
 
3036
    ;;
 
3037
  freebsd[[12]]*)
 
3038
    # C++ shared libraries reported to be fairly broken before switch to ELF
 
3039
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3040
    ;;
 
3041
  freebsd-elf*)
 
3042
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3043
    ;;
 
3044
  freebsd* | kfreebsd*-gnu | dragonfly*)
 
3045
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
 
3046
    # conventions
 
3047
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
3048
    ;;
 
3049
  gnu*)
 
3050
    ;;
 
3051
  hpux9*)
 
3052
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3053
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3054
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
3055
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3056
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
3057
                                # but as the default
 
3058
                                # location of the library.
 
3059
 
 
3060
    case $cc_basename in
 
3061
    CC*)
 
3062
      # FIXME: insert proper C++ library support
 
3063
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3064
      ;;
 
3065
    aCC*)
 
3066
      _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'
 
3067
      # Commands to make compiler produce verbose output that lists
 
3068
      # what "hidden" libraries, object files and flags are used when
 
3069
      # linking a shared library.
 
3070
      #
 
3071
      # There doesn't appear to be a way to prevent this compiler from
 
3072
      # explicitly linking system object files so we need to strip them
 
3073
      # from the output so that they don't get included in the library
 
3074
      # dependencies.
 
3075
      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'
 
3076
      ;;
 
3077
    *)
 
3078
      if test "$GXX" = yes; then
 
3079
        _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'
 
3080
      else
 
3081
        # FIXME: insert proper C++ library support
 
3082
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3083
      fi
 
3084
      ;;
 
3085
    esac
 
3086
    ;;
 
3087
  hpux10*|hpux11*)
 
3088
    if test $with_gnu_ld = no; then
 
3089
      case $host_cpu in
 
3090
      hppa*64*)
 
3091
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3092
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
3093
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3094
        ;;
 
3095
      ia64*)
 
3096
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
3097
        ;;
 
3098
      *)
 
3099
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3100
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3101
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
3102
        ;;
 
3103
      esac
 
3104
    fi
 
3105
    case $host_cpu in
 
3106
    hppa*64*)
 
3107
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3108
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3109
      ;;
 
3110
    ia64*)
 
3111
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3112
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3113
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
3114
                                              # but as the default
 
3115
                                              # location of the library.
 
3116
      ;;
 
3117
    *)
 
3118
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3119
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
3120
                                              # but as the default
 
3121
                                              # location of the library.
 
3122
      ;;
 
3123
    esac
 
3124
 
 
3125
    case $cc_basename in
 
3126
      CC*)
 
3127
        # FIXME: insert proper C++ library support
 
3128
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3129
        ;;
 
3130
      aCC*)
 
3131
        case $host_cpu in
 
3132
        hppa*64*|ia64*)
 
3133
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
3134
          ;;
 
3135
        *)
 
3136
          _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'
 
3137
          ;;
 
3138
        esac
 
3139
        # Commands to make compiler produce verbose output that lists
 
3140
        # what "hidden" libraries, object files and flags are used when
 
3141
        # linking a shared library.
 
3142
        #
 
3143
        # There doesn't appear to be a way to prevent this compiler from
 
3144
        # explicitly linking system object files so we need to strip them
 
3145
        # from the output so that they don't get included in the library
 
3146
        # dependencies.
 
3147
        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'
 
3148
        ;;
 
3149
      *)
 
3150
        if test "$GXX" = yes; then
 
3151
          if test $with_gnu_ld = no; then
 
3152
            case $host_cpu in
 
3153
            ia64*|hppa*64*)
 
3154
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
3155
              ;;
 
3156
            *)
 
3157
              _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'
 
3158
              ;;
 
3159
            esac
 
3160
          fi
 
3161
        else
 
3162
          # FIXME: insert proper C++ library support
 
3163
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3164
        fi
 
3165
        ;;
 
3166
    esac
 
3167
    ;;
 
3168
  irix5* | irix6*)
 
3169
    case $cc_basename in
 
3170
      CC*)
 
3171
        # SGI C++
 
3172
        _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'
 
3173
 
 
3174
        # Archives containing C++ object files must be created using
 
3175
        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
 
3176
        # necessary to make sure instantiated templates are included
 
3177
        # in the archive.
 
3178
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
 
3179
        ;;
 
3180
      *)
 
3181
        if test "$GXX" = yes; then
 
3182
          if test "$with_gnu_ld" = no; then
 
3183
            _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'
 
3184
          else
 
3185
            _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'
 
3186
          fi
 
3187
        fi
 
3188
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
3189
        ;;
 
3190
    esac
 
3191
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
3192
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3193
    ;;
 
3194
  linux*)
 
3195
    case $cc_basename in
 
3196
      KCC*)
 
3197
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
3198
 
 
3199
        # KCC will only create a shared library if the output file
 
3200
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
3201
        # to its proper name (with version) after linking.
 
3202
        _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'
 
3203
        _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'
 
3204
        # Commands to make compiler produce verbose output that lists
 
3205
        # what "hidden" libraries, object files and flags are used when
 
3206
        # linking a shared library.
 
3207
        #
 
3208
        # There doesn't appear to be a way to prevent this compiler from
 
3209
        # explicitly linking system object files so we need to strip them
 
3210
        # from the output so that they don't get included in the library
 
3211
        # dependencies.
 
3212
        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'
 
3213
 
 
3214
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
 
3215
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
3216
 
 
3217
        # Archives containing C++ object files must be created using
 
3218
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
3219
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
3220
        ;;
 
3221
      icpc*)
 
3222
        # Intel C++
 
3223
        with_gnu_ld=yes
 
3224
        # version 8.0 and above of icpc choke on multiply defined symbols
 
3225
        # if we add $predep_objects and $postdep_objects, however 7.1 and
 
3226
        # earlier do not add the objects themselves.
 
3227
        case `$CC -V 2>&1` in
 
3228
        *"Version 7."*)
 
3229
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
3230
          _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'
 
3231
          ;;
 
3232
        *)  # Version 8.0 or newer
 
3233
          tmp_idyn=
 
3234
          case $host_cpu in
 
3235
            ia64*) tmp_idyn=' -i_dynamic';;
 
3236
          esac
 
3237
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
3238
          _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'
 
3239
          ;;
 
3240
        esac
 
3241
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3242
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
3243
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
3244
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
3245
        ;;
 
3246
      pgCC*)
 
3247
        # Portland Group C++ compiler
 
3248
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 
3249
        _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'
 
3250
 
 
3251
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
3252
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
3253
        _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'
 
3254
        ;;
 
3255
      cxx*)
 
3256
        # Compaq C++
 
3257
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
3258
        _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'
 
3259
 
 
3260
        runpath_var=LD_RUN_PATH
 
3261
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
3262
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3263
 
 
3264
        # Commands to make compiler produce verbose output that lists
 
3265
        # what "hidden" libraries, object files and flags are used when
 
3266
        # linking a shared library.
 
3267
        #
 
3268
        # There doesn't appear to be a way to prevent this compiler from
 
3269
        # explicitly linking system object files so we need to strip them
 
3270
        # from the output so that they don't get included in the library
 
3271
        # dependencies.
 
3272
        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'
 
3273
        ;;
 
3274
    esac
 
3275
    ;;
 
3276
  lynxos*)
 
3277
    # FIXME: insert proper C++ library support
 
3278
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3279
    ;;
 
3280
  m88k*)
 
3281
    # FIXME: insert proper C++ library support
 
3282
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3283
    ;;
 
3284
  mvs*)
 
3285
    case $cc_basename in
 
3286
      cxx*)
 
3287
        # FIXME: insert proper C++ library support
 
3288
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3289
        ;;
 
3290
      *)
 
3291
        # FIXME: insert proper C++ library support
 
3292
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3293
        ;;
 
3294
    esac
 
3295
    ;;
 
3296
  netbsd*)
 
3297
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
3298
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
 
3299
      wlarc=
 
3300
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
3301
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3302
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3303
    fi
 
3304
    # Workaround some broken pre-1.5 toolchains
 
3305
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
 
3306
    ;;
 
3307
  openbsd2*)
 
3308
    # C++ shared libraries are fairly broken
 
3309
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3310
    ;;
 
3311
  openbsd*)
 
3312
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3313
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3314
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
3315
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
3316
    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
3317
      _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'
 
3318
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
3319
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
3320
    fi
 
3321
    output_verbose_link_cmd='echo'
 
3322
    ;;
 
3323
  osf3*)
 
3324
    case $cc_basename in
 
3325
      KCC*)
 
3326
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
3327
 
 
3328
        # KCC will only create a shared library if the output file
 
3329
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
3330
        # to its proper name (with version) after linking.
 
3331
        _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'
 
3332
 
 
3333
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
3334
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3335
 
 
3336
        # Archives containing C++ object files must be created using
 
3337
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
3338
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
3339
 
 
3340
        ;;
 
3341
      RCC*)
 
3342
        # Rational C++ 2.4.1
 
3343
        # FIXME: insert proper C++ library support
 
3344
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3345
        ;;
 
3346
      cxx*)
 
3347
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
3348
        _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'
 
3349
 
 
3350
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
3351
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3352
 
 
3353
        # Commands to make compiler produce verbose output that lists
 
3354
        # what "hidden" libraries, object files and flags are used when
 
3355
        # linking a shared library.
 
3356
        #
 
3357
        # There doesn't appear to be a way to prevent this compiler from
 
3358
        # explicitly linking system object files so we need to strip them
 
3359
        # from the output so that they don't get included in the library
 
3360
        # dependencies.
 
3361
        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'
 
3362
        ;;
 
3363
      *)
 
3364
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
3365
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
3366
          _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'
 
3367
 
 
3368
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
3369
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3370
 
 
3371
          # Commands to make compiler produce verbose output that lists
 
3372
          # what "hidden" libraries, object files and flags are used when
 
3373
          # linking a shared library.
 
3374
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
3375
 
 
3376
        else
 
3377
          # FIXME: insert proper C++ library support
 
3378
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3379
        fi
 
3380
        ;;
 
3381
    esac
 
3382
    ;;
 
3383
  osf4* | osf5*)
 
3384
    case $cc_basename in
 
3385
      KCC*)
 
3386
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
3387
 
 
3388
        # KCC will only create a shared library if the output file
 
3389
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
3390
        # to its proper name (with version) after linking.
 
3391
        _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'
 
3392
 
 
3393
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
3394
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3395
 
 
3396
        # Archives containing C++ object files must be created using
 
3397
        # the KAI C++ compiler.
 
3398
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
 
3399
        ;;
 
3400
      RCC*)
 
3401
        # Rational C++ 2.4.1
 
3402
        # FIXME: insert proper C++ library support
 
3403
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3404
        ;;
 
3405
      cxx*)
 
3406
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
3407
        _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'
 
3408
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
 
3409
          echo "-hidden">> $lib.exp~
 
3410
          $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~
 
3411
          $rm $lib.exp'
 
3412
 
 
3413
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
3414
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3415
 
 
3416
        # Commands to make compiler produce verbose output that lists
 
3417
        # what "hidden" libraries, object files and flags are used when
 
3418
        # linking a shared library.
 
3419
        #
 
3420
        # There doesn't appear to be a way to prevent this compiler from
 
3421
        # explicitly linking system object files so we need to strip them
 
3422
        # from the output so that they don't get included in the library
 
3423
        # dependencies.
 
3424
        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'
 
3425
        ;;
 
3426
      *)
 
3427
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
3428
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
3429
         _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'
 
3430
 
 
3431
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
3432
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3433
 
 
3434
          # Commands to make compiler produce verbose output that lists
 
3435
          # what "hidden" libraries, object files and flags are used when
 
3436
          # linking a shared library.
 
3437
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
3438
 
 
3439
        else
 
3440
          # FIXME: insert proper C++ library support
 
3441
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3442
        fi
 
3443
        ;;
 
3444
    esac
 
3445
    ;;
 
3446
  psos*)
 
3447
    # FIXME: insert proper C++ library support
 
3448
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3449
    ;;
 
3450
  sco*)
 
3451
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3452
    case $cc_basename in
 
3453
      CC*)
 
3454
        # FIXME: insert proper C++ library support
 
3455
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3456
        ;;
 
3457
      *)
 
3458
        # FIXME: insert proper C++ library support
 
3459
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3460
        ;;
 
3461
    esac
 
3462
    ;;
 
3463
  sunos4*)
 
3464
    case $cc_basename in
 
3465
      CC*)
 
3466
        # Sun C++ 4.x
 
3467
        # FIXME: insert proper C++ library support
 
3468
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3469
        ;;
 
3470
      lcc*)
 
3471
        # Lucid
 
3472
        # FIXME: insert proper C++ library support
 
3473
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3474
        ;;
 
3475
      *)
 
3476
        # FIXME: insert proper C++ library support
 
3477
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3478
        ;;
 
3479
    esac
 
3480
    ;;
 
3481
  solaris*)
 
3482
    case $cc_basename in
 
3483
      CC*)
 
3484
        # Sun C++ 4.2, 5.x and Centerline C++
 
3485
        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
 
3486
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
3487
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
3488
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
3489
        $CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
3490
 
 
3491
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
3492
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3493
        case $host_os in
 
3494
          solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
3495
          *)
 
3496
            # The C++ compiler is used as linker so we must use $wl
 
3497
            # flag to pass the commands to the underlying system
 
3498
            # linker. We must also pass each convience library through
 
3499
            # to the system linker between allextract/defaultextract.
 
3500
            # The C++ compiler will combine linker options so we
 
3501
            # cannot just pass the convience library names through
 
3502
            # without $wl.
 
3503
            # Supported since Solaris 2.6 (maybe 2.5.1?)
 
3504
            _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'
 
3505
            ;;
 
3506
        esac
 
3507
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
3508
 
 
3509
        output_verbose_link_cmd='echo'
 
3510
 
 
3511
        # Archives containing C++ object files must be created using
 
3512
        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
3513
        # necessary to make sure instantiated templates are included
 
3514
        # in the archive.
 
3515
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
3516
        ;;
 
3517
      gcx*)
 
3518
        # Green Hills C++ Compiler
 
3519
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
3520
 
 
3521
        # The C++ compiler must be used to create the archive.
 
3522
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 
3523
        ;;
 
3524
      *)
 
3525
        # GNU C++ compiler with Solaris linker
 
3526
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
3527
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
 
3528
          if $CC --version | grep -v '^2\.7' > /dev/null; then
 
3529
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
3530
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
3531
                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
3532
 
 
3533
            # Commands to make compiler produce verbose output that lists
 
3534
            # what "hidden" libraries, object files and flags are used when
 
3535
            # linking a shared library.
 
3536
            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
 
3537
          else
 
3538
            # g++ 2.7 appears to require `-G' NOT `-shared' on this
 
3539
            # platform.
 
3540
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
3541
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
3542
                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
3543
 
 
3544
            # Commands to make compiler produce verbose output that lists
 
3545
            # what "hidden" libraries, object files and flags are used when
 
3546
            # linking a shared library.
 
3547
            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
 
3548
          fi
 
3549
 
 
3550
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
 
3551
        fi
 
3552
        ;;
 
3553
    esac
 
3554
    ;;
 
3555
  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
 
3556
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3557
    ;;
 
3558
  tandem*)
 
3559
    case $cc_basename in
 
3560
      NCC*)
 
3561
        # NonStop-UX NCC 3.20
 
3562
        # FIXME: insert proper C++ library support
 
3563
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3564
        ;;
 
3565
      *)
 
3566
        # FIXME: insert proper C++ library support
 
3567
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3568
        ;;
 
3569
    esac
 
3570
    ;;
 
3571
  vxworks*)
 
3572
    # FIXME: insert proper C++ library support
 
3573
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3574
    ;;
 
3575
  *)
 
3576
    # FIXME: insert proper C++ library support
 
3577
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3578
    ;;
 
3579
esac
 
3580
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
3581
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
3582
 
 
3583
_LT_AC_TAGVAR(GCC, $1)="$GXX"
 
3584
_LT_AC_TAGVAR(LD, $1)="$LD"
 
3585
 
 
3586
## CAVEAT EMPTOR:
 
3587
## There is no encapsulation within the following macros, do not change
 
3588
## the running order or otherwise move them around unless you know exactly
 
3589
## what you are doing...
 
3590
AC_LIBTOOL_POSTDEP_PREDEP($1)
 
3591
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
3592
AC_LIBTOOL_PROG_CC_C_O($1)
 
3593
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
3594
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
3595
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
3596
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
3597
AC_LIBTOOL_SYS_LIB_STRIP
 
3598
AC_LIBTOOL_DLOPEN_SELF($1)
 
3599
 
 
3600
AC_LIBTOOL_CONFIG($1)
 
3601
 
 
3602
AC_LANG_POP
 
3603
CC=$lt_save_CC
 
3604
LDCXX=$LD
 
3605
LD=$lt_save_LD
 
3606
GCC=$lt_save_GCC
 
3607
with_gnu_ldcxx=$with_gnu_ld
 
3608
with_gnu_ld=$lt_save_with_gnu_ld
 
3609
lt_cv_path_LDCXX=$lt_cv_path_LD
 
3610
lt_cv_path_LD=$lt_save_path_LD
 
3611
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
 
3612
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
 
3613
])# AC_LIBTOOL_LANG_CXX_CONFIG
 
3614
 
 
3615
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
 
3616
# ------------------------
 
3617
# Figure out "hidden" library dependencies from verbose
 
3618
# compiler output when linking a shared library.
 
3619
# Parse the compiler output and extract the necessary
 
3620
# objects, libraries and library flags.
 
3621
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
 
3622
dnl we can't use the lt_simple_compile_test_code here,
 
3623
dnl because it contains code intended for an executable,
 
3624
dnl not a library.  It's possible we should let each
 
3625
dnl tag define a new lt_????_link_test_code variable,
 
3626
dnl but it's only used here...
 
3627
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
 
3628
int a;
 
3629
void foo (void) { a = 0; }
 
3630
EOF
 
3631
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
 
3632
class Foo
 
3633
{
 
3634
public:
 
3635
  Foo (void) { a = 0; }
 
3636
private:
 
3637
  int a;
 
3638
};
 
3639
EOF
 
3640
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
 
3641
      subroutine foo
 
3642
      implicit none
 
3643
      integer*4 a
 
3644
      a=0
 
3645
      return
 
3646
      end
 
3647
EOF
 
3648
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
 
3649
public class foo {
 
3650
  private int a;
 
3651
  public void bar (void) {
 
3652
    a = 0;
 
3653
  }
 
3654
};
 
3655
EOF
 
3656
])
 
3657
dnl Parse the compiler output and extract the necessary
 
3658
dnl objects, libraries and library flags.
 
3659
if AC_TRY_EVAL(ac_compile); then
 
3660
  # Parse the compiler output and extract the necessary
 
3661
  # objects, libraries and library flags.
 
3662
 
 
3663
  # Sentinel used to keep track of whether or not we are before
 
3664
  # the conftest object file.
 
3665
  pre_test_object_deps_done=no
 
3666
 
 
3667
  # The `*' in the case matches for architectures that use `case' in
 
3668
  # $output_verbose_cmd can trigger glob expansion during the loop
 
3669
  # eval without this substitution.
 
3670
  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
 
3671
 
 
3672
  for p in `eval $output_verbose_link_cmd`; do
 
3673
    case $p in
 
3674
 
 
3675
    -L* | -R* | -l*)
 
3676
       # Some compilers place space between "-{L,R}" and the path.
 
3677
       # Remove the space.
 
3678
       if test $p = "-L" \
 
3679
          || test $p = "-R"; then
 
3680
         prev=$p
 
3681
         continue
 
3682
       else
 
3683
         prev=
 
3684
       fi
 
3685
 
 
3686
       if test "$pre_test_object_deps_done" = no; then
 
3687
         case $p in
 
3688
         -L* | -R*)
 
3689
           # Internal compiler library paths should come after those
 
3690
           # provided the user.  The postdeps already come after the
 
3691
           # user supplied libs so there is no need to process them.
 
3692
           if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
 
3693
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
 
3694
           else
 
3695
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
 
3696
           fi
 
3697
           ;;
 
3698
         # The "-l" case would never come before the object being
 
3699
         # linked, so don't bother handling this case.
 
3700
         esac
 
3701
       else
 
3702
         if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
 
3703
           _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
 
3704
         else
 
3705
           _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
 
3706
         fi
 
3707
       fi
 
3708
       ;;
 
3709
 
 
3710
    *.$objext)
 
3711
       # This assumes that the test object file only shows up
 
3712
       # once in the compiler output.
 
3713
       if test "$p" = "conftest.$objext"; then
 
3714
         pre_test_object_deps_done=yes
 
3715
         continue
 
3716
       fi
 
3717
 
 
3718
       if test "$pre_test_object_deps_done" = no; then
 
3719
         if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
 
3720
           _LT_AC_TAGVAR(predep_objects, $1)="$p"
 
3721
         else
 
3722
           _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
 
3723
         fi
 
3724
       else
 
3725
         if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
 
3726
           _LT_AC_TAGVAR(postdep_objects, $1)="$p"
 
3727
         else
 
3728
           _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
 
3729
         fi
 
3730
       fi
 
3731
       ;;
 
3732
 
 
3733
    *) ;; # Ignore the rest.
 
3734
 
 
3735
    esac
 
3736
  done
 
3737
 
 
3738
  # Clean up.
 
3739
  rm -f a.out a.exe
 
3740
else
 
3741
  echo "libtool.m4: error: problem compiling $1 test program"
 
3742
fi
 
3743
 
 
3744
$rm -f confest.$objext
 
3745
 
 
3746
# PORTME: override above test on systems where it is broken
 
3747
ifelse([$1],[CXX],
 
3748
[case $host_os in
 
3749
solaris*)
 
3750
  case $cc_basename in
 
3751
  CC*)
 
3752
    # Adding this requires a known-good setup of shared libraries for
 
3753
    # Sun compiler versions before 5.6, else PIC objects from an old
 
3754
    # archive will be linked into the output, leading to subtle bugs.
 
3755
    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
 
3756
    ;;
 
3757
  esac
 
3758
esac
 
3759
])
 
3760
 
 
3761
case " $_LT_AC_TAGVAR(postdeps, $1) " in
 
3762
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
 
3763
esac
 
3764
])# AC_LIBTOOL_POSTDEP_PREDEP
 
3765
 
 
3766
# AC_LIBTOOL_LANG_F77_CONFIG
 
3767
# ------------------------
 
3768
# Ensure that the configuration vars for the C compiler are
 
3769
# suitably defined.  Those variables are subsequently used by
 
3770
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
3771
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
 
3772
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
 
3773
[AC_REQUIRE([AC_PROG_F77])
 
3774
AC_LANG_PUSH(Fortran 77)
 
3775
 
 
3776
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3777
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
3778
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
3779
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
3780
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
3781
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3782
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
3783
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
3784
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
3785
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
3786
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
3787
_LT_AC_TAGVAR(module_cmds, $1)=
 
3788
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
3789
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
3790
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
3791
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
3792
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
3793
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
3794
 
 
3795
# Source file extension for f77 test sources.
 
3796
ac_ext=f
 
3797
 
 
3798
# Object file extension for compiled f77 test sources.
 
3799
objext=o
 
3800
_LT_AC_TAGVAR(objext, $1)=$objext
 
3801
 
 
3802
# Code to be used in simple compile tests
 
3803
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
 
3804
 
 
3805
# Code to be used in simple link tests
 
3806
lt_simple_link_test_code="      program t\n      end\n"
 
3807
 
 
3808
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
3809
_LT_AC_SYS_COMPILER
 
3810
 
 
3811
# save warnings/boilerplate of simple test code
 
3812
_LT_COMPILER_BOILERPLATE
 
3813
_LT_LINKER_BOILERPLATE
 
3814
 
 
3815
# Allow CC to be a program name with arguments.
 
3816
lt_save_CC="$CC"
 
3817
CC=${F77-"f77"}
 
3818
compiler=$CC
 
3819
_LT_AC_TAGVAR(compiler, $1)=$CC
 
3820
_LT_CC_BASENAME([$compiler])
 
3821
 
 
3822
AC_MSG_CHECKING([if libtool supports shared libraries])
 
3823
AC_MSG_RESULT([$can_build_shared])
 
3824
 
 
3825
AC_MSG_CHECKING([whether to build shared libraries])
 
3826
test "$can_build_shared" = "no" && enable_shared=no
 
3827
 
 
3828
# On AIX, shared libraries and static libraries use the same namespace, and
 
3829
# are all built from PIC.
 
3830
case $host_os in
 
3831
aix3*)
 
3832
  test "$enable_shared" = yes && enable_static=no
 
3833
  if test -n "$RANLIB"; then
 
3834
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
3835
    postinstall_cmds='$RANLIB $lib'
 
3836
  fi
 
3837
  ;;
 
3838
aix4* | aix5*)
 
3839
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
3840
    test "$enable_shared" = yes && enable_static=no
 
3841
  fi
 
3842
  ;;
 
3843
esac
 
3844
AC_MSG_RESULT([$enable_shared])
 
3845
 
 
3846
AC_MSG_CHECKING([whether to build static libraries])
 
3847
# Make sure either enable_shared or enable_static is yes.
 
3848
test "$enable_shared" = yes || enable_static=yes
 
3849
AC_MSG_RESULT([$enable_static])
 
3850
 
 
3851
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
3852
 
 
3853
_LT_AC_TAGVAR(GCC, $1)="$G77"
 
3854
_LT_AC_TAGVAR(LD, $1)="$LD"
 
3855
 
 
3856
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
3857
AC_LIBTOOL_PROG_CC_C_O($1)
 
3858
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
3859
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
3860
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
3861
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
3862
AC_LIBTOOL_SYS_LIB_STRIP
 
3863
 
 
3864
 
 
3865
AC_LIBTOOL_CONFIG($1)
 
3866
 
 
3867
AC_LANG_POP
 
3868
CC="$lt_save_CC"
 
3869
])# AC_LIBTOOL_LANG_F77_CONFIG
 
3870
 
 
3871
 
 
3872
# AC_LIBTOOL_LANG_GCJ_CONFIG
 
3873
# --------------------------
 
3874
# Ensure that the configuration vars for the C compiler are
 
3875
# suitably defined.  Those variables are subsequently used by
 
3876
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
3877
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
 
3878
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
 
3879
[AC_LANG_SAVE
 
3880
 
 
3881
# Source file extension for Java test sources.
 
3882
ac_ext=java
 
3883
 
 
3884
# Object file extension for compiled Java test sources.
 
3885
objext=o
 
3886
_LT_AC_TAGVAR(objext, $1)=$objext
 
3887
 
 
3888
# Code to be used in simple compile tests
 
3889
lt_simple_compile_test_code="class foo {}\n"
 
3890
 
 
3891
# Code to be used in simple link tests
 
3892
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
 
3893
 
 
3894
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
3895
_LT_AC_SYS_COMPILER
 
3896
 
 
3897
# save warnings/boilerplate of simple test code
 
3898
_LT_COMPILER_BOILERPLATE
 
3899
_LT_LINKER_BOILERPLATE
 
3900
 
 
3901
# Allow CC to be a program name with arguments.
 
3902
lt_save_CC="$CC"
 
3903
CC=${GCJ-"gcj"}
 
3904
compiler=$CC
 
3905
_LT_AC_TAGVAR(compiler, $1)=$CC
 
3906
_LT_CC_BASENAME([$compiler])
 
3907
 
 
3908
# GCJ did not exist at the time GCC didn't implicitly link libc in.
 
3909
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3910
 
 
3911
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
3912
 
 
3913
## CAVEAT EMPTOR:
 
3914
## There is no encapsulation within the following macros, do not change
 
3915
## the running order or otherwise move them around unless you know exactly
 
3916
## what you are doing...
 
3917
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
3918
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
3919
AC_LIBTOOL_PROG_CC_C_O($1)
 
3920
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
3921
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
3922
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
3923
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
3924
AC_LIBTOOL_SYS_LIB_STRIP
 
3925
AC_LIBTOOL_DLOPEN_SELF($1)
 
3926
 
 
3927
AC_LIBTOOL_CONFIG($1)
 
3928
 
 
3929
AC_LANG_RESTORE
 
3930
CC="$lt_save_CC"
 
3931
])# AC_LIBTOOL_LANG_GCJ_CONFIG
 
3932
 
 
3933
 
 
3934
# AC_LIBTOOL_LANG_RC_CONFIG
 
3935
# --------------------------
 
3936
# Ensure that the configuration vars for the Windows resource compiler are
 
3937
# suitably defined.  Those variables are subsequently used by
 
3938
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
3939
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
 
3940
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
 
3941
[AC_LANG_SAVE
 
3942
 
 
3943
# Source file extension for RC test sources.
 
3944
ac_ext=rc
 
3945
 
 
3946
# Object file extension for compiled RC test sources.
 
3947
objext=o
 
3948
_LT_AC_TAGVAR(objext, $1)=$objext
 
3949
 
 
3950
# Code to be used in simple compile tests
 
3951
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
 
3952
 
 
3953
# Code to be used in simple link tests
 
3954
lt_simple_link_test_code="$lt_simple_compile_test_code"
 
3955
 
 
3956
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
3957
_LT_AC_SYS_COMPILER
 
3958
 
 
3959
# save warnings/boilerplate of simple test code
 
3960
_LT_COMPILER_BOILERPLATE
 
3961
_LT_LINKER_BOILERPLATE
 
3962
 
 
3963
# Allow CC to be a program name with arguments.
 
3964
lt_save_CC="$CC"
 
3965
CC=${RC-"windres"}
 
3966
compiler=$CC
 
3967
_LT_AC_TAGVAR(compiler, $1)=$CC
 
3968
_LT_CC_BASENAME([$compiler])
 
3969
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
3970
 
 
3971
AC_LIBTOOL_CONFIG($1)
 
3972
 
 
3973
AC_LANG_RESTORE
 
3974
CC="$lt_save_CC"
 
3975
])# AC_LIBTOOL_LANG_RC_CONFIG
 
3976
 
 
3977
 
 
3978
# AC_LIBTOOL_CONFIG([TAGNAME])
 
3979
# ----------------------------
 
3980
# If TAGNAME is not passed, then create an initial libtool script
 
3981
# with a default configuration from the untagged config vars.  Otherwise
 
3982
# add code to config.status for appending the configuration named by
 
3983
# TAGNAME from the matching tagged config vars.
 
3984
AC_DEFUN([AC_LIBTOOL_CONFIG],
 
3985
[# The else clause should only fire when bootstrapping the
 
3986
# libtool distribution, otherwise you forgot to ship ltmain.sh
 
3987
# with your package, and you will get complaints that there are
 
3988
# no rules to generate ltmain.sh.
 
3989
if test -f "$ltmain"; then
 
3990
  # See if we are running on zsh, and set the options which allow our commands through
 
3991
  # without removal of \ escapes.
 
3992
  if test -n "${ZSH_VERSION+set}" ; then
 
3993
    setopt NO_GLOB_SUBST
 
3994
  fi
 
3995
  # Now quote all the things that may contain metacharacters while being
 
3996
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
 
3997
  # variables and quote the copies for generation of the libtool script.
 
3998
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
 
3999
    SED SHELL STRIP \
 
4000
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
 
4001
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
 
4002
    deplibs_check_method reload_flag reload_cmds need_locks \
 
4003
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
 
4004
    lt_cv_sys_global_symbol_to_c_name_address \
 
4005
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
 
4006
    old_postinstall_cmds old_postuninstall_cmds \
 
4007
    _LT_AC_TAGVAR(compiler, $1) \
 
4008
    _LT_AC_TAGVAR(CC, $1) \
 
4009
    _LT_AC_TAGVAR(LD, $1) \
 
4010
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
 
4011
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
 
4012
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
 
4013
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
 
4014
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
 
4015
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
 
4016
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
 
4017
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
 
4018
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
 
4019
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
 
4020
    _LT_AC_TAGVAR(predep_objects, $1) \
 
4021
    _LT_AC_TAGVAR(postdep_objects, $1) \
 
4022
    _LT_AC_TAGVAR(predeps, $1) \
 
4023
    _LT_AC_TAGVAR(postdeps, $1) \
 
4024
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
 
4025
    _LT_AC_TAGVAR(archive_cmds, $1) \
 
4026
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
 
4027
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
 
4028
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
 
4029
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
 
4030
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
 
4031
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
 
4032
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
 
4033
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
 
4034
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
 
4035
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
 
4036
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
 
4037
    _LT_AC_TAGVAR(module_cmds, $1) \
 
4038
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
 
4039
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
 
4040
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
 
4041
    _LT_AC_TAGVAR(include_expsyms, $1); do
 
4042
 
 
4043
    case $var in
 
4044
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
 
4045
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
 
4046
    _LT_AC_TAGVAR(archive_cmds, $1) | \
 
4047
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
 
4048
    _LT_AC_TAGVAR(module_cmds, $1) | \
 
4049
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
 
4050
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
 
4051
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
 
4052
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
 
4053
    postinstall_cmds | postuninstall_cmds | \
 
4054
    old_postinstall_cmds | old_postuninstall_cmds | \
 
4055
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
 
4056
      # Double-quote double-evaled strings.
 
4057
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
 
4058
      ;;
 
4059
    *)
 
4060
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
 
4061
      ;;
 
4062
    esac
 
4063
  done
 
4064
 
 
4065
  case $lt_echo in
 
4066
  *'\[$]0 --fallback-echo"')
 
4067
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
 
4068
    ;;
 
4069
  esac
 
4070
 
 
4071
ifelse([$1], [],
 
4072
  [cfgfile="${ofile}T"
 
4073
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
 
4074
  $rm -f "$cfgfile"
 
4075
  AC_MSG_NOTICE([creating $ofile])],
 
4076
  [cfgfile="$ofile"])
 
4077
 
 
4078
  cat <<__EOF__ >> "$cfgfile"
 
4079
ifelse([$1], [],
 
4080
[#! $SHELL
 
4081
 
 
4082
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
 
4083
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
 
4084
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
4085
#
 
4086
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
 
4087
# Free Software Foundation, Inc.
 
4088
#
 
4089
# This file is part of GNU Libtool:
 
4090
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 
4091
#
 
4092
# This program is free software; you can redistribute it and/or modify
 
4093
# it under the terms of the GNU General Public License as published by
 
4094
# the Free Software Foundation; either version 2 of the License, or
 
4095
# (at your option) any later version.
 
4096
#
 
4097
# This program is distributed in the hope that it will be useful, but
 
4098
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
4099
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
4100
# General Public License for more details.
 
4101
#
 
4102
# You should have received a copy of the GNU General Public License
 
4103
# along with this program; if not, write to the Free Software
 
4104
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
4105
#
 
4106
# As a special exception to the GNU General Public License, if you
 
4107
# distribute this file as part of a program that contains a
 
4108
# configuration script generated by Autoconf, you may include it under
 
4109
# the same distribution terms that you use for the rest of that program.
 
4110
 
 
4111
# A sed program that does not truncate output.
 
4112
SED=$lt_SED
 
4113
 
 
4114
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
 
4115
Xsed="$SED -e 1s/^X//"
 
4116
 
 
4117
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
4118
# if CDPATH is set.
 
4119
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
4120
 
 
4121
# The names of the tagged configurations supported by this script.
 
4122
available_tags=
 
4123
 
 
4124
# ### BEGIN LIBTOOL CONFIG],
 
4125
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
 
4126
 
 
4127
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
4128
 
 
4129
# Shell to use when invoking shell scripts.
 
4130
SHELL=$lt_SHELL
 
4131
 
 
4132
# Whether or not to build shared libraries.
 
4133
build_libtool_libs=$enable_shared
 
4134
 
 
4135
# Whether or not to build static libraries.
 
4136
build_old_libs=$enable_static
 
4137
 
 
4138
# Whether or not to add -lc for building shared libraries.
 
4139
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
 
4140
 
 
4141
# Whether or not to disallow shared libs when runtime libs are static
 
4142
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
 
4143
 
 
4144
# Whether or not to optimize for fast installation.
 
4145
fast_install=$enable_fast_install
 
4146
 
 
4147
# The host system.
 
4148
host_alias=$host_alias
 
4149
host=$host
 
4150
host_os=$host_os
 
4151
 
 
4152
# The build system.
 
4153
build_alias=$build_alias
 
4154
build=$build
 
4155
build_os=$build_os
 
4156
 
 
4157
# An echo program that does not interpret backslashes.
 
4158
echo=$lt_echo
 
4159
 
 
4160
# The archiver.
 
4161
AR=$lt_AR
 
4162
AR_FLAGS=$lt_AR_FLAGS
 
4163
 
 
4164
# A C compiler.
 
4165
LTCC=$lt_LTCC
 
4166
 
 
4167
# A language-specific compiler.
 
4168
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
 
4169
 
 
4170
# Is the compiler the GNU C compiler?
 
4171
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
 
4172
 
 
4173
# An ERE matcher.
 
4174
EGREP=$lt_EGREP
 
4175
 
 
4176
# The linker used to build libraries.
 
4177
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
 
4178
 
 
4179
# Whether we need hard or soft links.
 
4180
LN_S=$lt_LN_S
 
4181
 
 
4182
# A BSD-compatible nm program.
 
4183
NM=$lt_NM
 
4184
 
 
4185
# A symbol stripping program
 
4186
STRIP=$lt_STRIP
 
4187
 
 
4188
# Used to examine libraries when file_magic_cmd begins "file"
 
4189
MAGIC_CMD=$MAGIC_CMD
 
4190
 
 
4191
# Used on cygwin: DLL creation program.
 
4192
DLLTOOL="$DLLTOOL"
 
4193
 
 
4194
# Used on cygwin: object dumper.
 
4195
OBJDUMP="$OBJDUMP"
 
4196
 
 
4197
# Used on cygwin: assembler.
 
4198
AS="$AS"
 
4199
 
 
4200
# The name of the directory that contains temporary libtool files.
 
4201
objdir=$objdir
 
4202
 
 
4203
# How to create reloadable object files.
 
4204
reload_flag=$lt_reload_flag
 
4205
reload_cmds=$lt_reload_cmds
 
4206
 
 
4207
# How to pass a linker flag through the compiler.
 
4208
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
4209
 
 
4210
# Object file suffix (normally "o").
 
4211
objext="$ac_objext"
 
4212
 
 
4213
# Old archive suffix (normally "a").
 
4214
libext="$libext"
 
4215
 
 
4216
# Shared library suffix (normally ".so").
 
4217
shrext_cmds='$shrext_cmds'
 
4218
 
 
4219
# Executable file suffix (normally "").
 
4220
exeext="$exeext"
 
4221
 
 
4222
# Additional compiler flags for building library objects.
 
4223
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
 
4224
pic_mode=$pic_mode
 
4225
 
 
4226
# What is the maximum length of a command?
 
4227
max_cmd_len=$lt_cv_sys_max_cmd_len
 
4228
 
 
4229
# Does compiler simultaneously support -c and -o options?
 
4230
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
 
4231
 
 
4232
# Must we lock files when doing compilation?
 
4233
need_locks=$lt_need_locks
 
4234
 
 
4235
# Do we need the lib prefix for modules?
 
4236
need_lib_prefix=$need_lib_prefix
 
4237
 
 
4238
# Do we need a version for libraries?
 
4239
need_version=$need_version
 
4240
 
 
4241
# Whether dlopen is supported.
 
4242
dlopen_support=$enable_dlopen
 
4243
 
 
4244
# Whether dlopen of programs is supported.
 
4245
dlopen_self=$enable_dlopen_self
 
4246
 
 
4247
# Whether dlopen of statically linked programs is supported.
 
4248
dlopen_self_static=$enable_dlopen_self_static
 
4249
 
 
4250
# Compiler flag to prevent dynamic linking.
 
4251
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
 
4252
 
 
4253
# Compiler flag to turn off builtin functions.
 
4254
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
 
4255
 
 
4256
# Compiler flag to allow reflexive dlopens.
 
4257
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
 
4258
 
 
4259
# Compiler flag to generate shared objects directly from archives.
 
4260
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
 
4261
 
 
4262
# Compiler flag to generate thread-safe objects.
 
4263
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
 
4264
 
 
4265
# Library versioning type.
 
4266
version_type=$version_type
 
4267
 
 
4268
# Format of library name prefix.
 
4269
libname_spec=$lt_libname_spec
 
4270
 
 
4271
# List of archive names.  First name is the real one, the rest are links.
 
4272
# The last name is the one that the linker finds with -lNAME.
 
4273
library_names_spec=$lt_library_names_spec
 
4274
 
 
4275
# The coded name of the library, if different from the real name.
 
4276
soname_spec=$lt_soname_spec
 
4277
 
 
4278
# Commands used to build and install an old-style archive.
 
4279
RANLIB=$lt_RANLIB
 
4280
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
 
4281
old_postinstall_cmds=$lt_old_postinstall_cmds
 
4282
old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
4283
 
 
4284
# Create an old-style archive from a shared archive.
 
4285
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
 
4286
 
 
4287
# Create a temporary old-style archive to link instead of a shared archive.
 
4288
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
 
4289
 
 
4290
# Commands used to build and install a shared archive.
 
4291
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
 
4292
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
 
4293
postinstall_cmds=$lt_postinstall_cmds
 
4294
postuninstall_cmds=$lt_postuninstall_cmds
 
4295
 
 
4296
# Commands used to build a loadable module (assumed same as above if empty)
 
4297
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
 
4298
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
 
4299
 
 
4300
# Commands to strip libraries.
 
4301
old_striplib=$lt_old_striplib
 
4302
striplib=$lt_striplib
 
4303
 
 
4304
# Dependencies to place before the objects being linked to create a
 
4305
# shared library.
 
4306
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
 
4307
 
 
4308
# Dependencies to place after the objects being linked to create a
 
4309
# shared library.
 
4310
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
 
4311
 
 
4312
# Dependencies to place before the objects being linked to create a
 
4313
# shared library.
 
4314
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
 
4315
 
 
4316
# Dependencies to place after the objects being linked to create a
 
4317
# shared library.
 
4318
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
 
4319
 
 
4320
# The library search path used internally by the compiler when linking
 
4321
# a shared library.
 
4322
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
 
4323
 
 
4324
# Method to check whether dependent libraries are shared objects.
 
4325
deplibs_check_method=$lt_deplibs_check_method
 
4326
 
 
4327
# Command to use when deplibs_check_method == file_magic.
 
4328
file_magic_cmd=$lt_file_magic_cmd
 
4329
 
 
4330
# Flag that allows shared libraries with undefined symbols to be built.
 
4331
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
4332
 
 
4333
# Flag that forces no undefined symbols.
 
4334
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
 
4335
 
 
4336
# Commands used to finish a libtool library installation in a directory.
 
4337
finish_cmds=$lt_finish_cmds
 
4338
 
 
4339
# Same as above, but a single script fragment to be evaled but not shown.
 
4340
finish_eval=$lt_finish_eval
 
4341
 
 
4342
# Take the output of nm and produce a listing of raw symbols and C names.
 
4343
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 
4344
 
 
4345
# Transform the output of nm in a proper C declaration
 
4346
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
4347
 
 
4348
# Transform the output of nm in a C name address pair
 
4349
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
4350
 
 
4351
# This is the shared library runtime path variable.
 
4352
runpath_var=$runpath_var
 
4353
 
 
4354
# This is the shared library path variable.
 
4355
shlibpath_var=$shlibpath_var
 
4356
 
 
4357
# Is shlibpath searched before the hard-coded library search path?
 
4358
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 
4359
 
 
4360
# How to hardcode a shared library path into an executable.
 
4361
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
 
4362
 
 
4363
# Whether we should hardcode library paths into libraries.
 
4364
hardcode_into_libs=$hardcode_into_libs
 
4365
 
 
4366
# Flag to hardcode \$libdir into a binary during linking.
 
4367
# This must work even if \$libdir does not exist.
 
4368
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
 
4369
 
 
4370
# If ld is used when linking, flag to hardcode \$libdir into
 
4371
# a binary during linking. This must work even if \$libdir does
 
4372
# not exist.
 
4373
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
 
4374
 
 
4375
# Whether we need a single -rpath flag with a separated argument.
 
4376
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
 
4377
 
 
4378
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
 
4379
# resulting binary.
 
4380
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
 
4381
 
 
4382
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
 
4383
# resulting binary.
 
4384
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
 
4385
 
 
4386
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
 
4387
# the resulting binary.
 
4388
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
 
4389
 
 
4390
# Set to yes if building a shared library automatically hardcodes DIR into the library
 
4391
# and all subsequent libraries and executables linked against it.
 
4392
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
 
4393
 
 
4394
# Variables whose values should be saved in libtool wrapper scripts and
 
4395
# restored at relink time.
 
4396
variables_saved_for_relink="$variables_saved_for_relink"
 
4397
 
 
4398
# Whether libtool must link a program against all its dependency libraries.
 
4399
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
 
4400
 
 
4401
# Compile-time system search path for libraries
 
4402
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
4403
 
 
4404
# Run-time system search path for libraries
 
4405
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
4406
 
 
4407
# Fix the shell variable \$srcfile for the compiler.
 
4408
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
 
4409
 
 
4410
# Set to yes if exported symbols are required.
 
4411
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
 
4412
 
 
4413
# The commands to list exported symbols.
 
4414
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
 
4415
 
 
4416
# The commands to extract the exported symbol list from a shared archive.
 
4417
extract_expsyms_cmds=$lt_extract_expsyms_cmds
 
4418
 
 
4419
# Symbols that should not be listed in the preloaded symbols.
 
4420
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
 
4421
 
 
4422
# Symbols that must always be exported.
 
4423
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
 
4424
 
 
4425
ifelse([$1],[],
 
4426
[# ### END LIBTOOL CONFIG],
 
4427
[# ### END LIBTOOL TAG CONFIG: $tagname])
 
4428
 
 
4429
__EOF__
 
4430
 
 
4431
ifelse([$1],[], [
 
4432
  case $host_os in
 
4433
  aix3*)
 
4434
    cat <<\EOF >> "$cfgfile"
 
4435
 
 
4436
# AIX sometimes has problems with the GCC collect2 program.  For some
 
4437
# reason, if we set the COLLECT_NAMES environment variable, the problems
 
4438
# vanish in a puff of smoke.
 
4439
if test "X${COLLECT_NAMES+set}" != Xset; then
 
4440
  COLLECT_NAMES=
 
4441
  export COLLECT_NAMES
 
4442
fi
 
4443
EOF
 
4444
    ;;
 
4445
  esac
 
4446
 
 
4447
  # We use sed instead of cat because bash on DJGPP gets confused if
 
4448
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
 
4449
  # text mode, it properly converts lines to CR/LF.  This bash problem
 
4450
  # is reportedly fixed, but why not run on old versions too?
 
4451
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
 
4452
 
 
4453
  mv -f "$cfgfile" "$ofile" || \
 
4454
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
 
4455
  chmod +x "$ofile"
 
4456
])
 
4457
else
 
4458
  # If there is no Makefile yet, we rely on a make rule to execute
 
4459
  # `config.status --recheck' to rerun these tests and create the
 
4460
  # libtool script then.
 
4461
  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
 
4462
  if test -f "$ltmain_in"; then
 
4463
    test -f Makefile && make "$ltmain"
 
4464
  fi
 
4465
fi
 
4466
])# AC_LIBTOOL_CONFIG
 
4467
 
 
4468
 
 
4469
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
 
4470
# -------------------------------------------
 
4471
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
 
4472
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
4473
 
 
4474
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
4475
 
 
4476
if test "$GCC" = yes; then
 
4477
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
4478
 
 
4479
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
 
4480
    lt_cv_prog_compiler_rtti_exceptions,
 
4481
    [-fno-rtti -fno-exceptions], [],
 
4482
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
 
4483
fi
 
4484
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
 
4485
 
 
4486
 
 
4487
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
4488
# ---------------------------------
 
4489
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
 
4490
[AC_REQUIRE([AC_CANONICAL_HOST])
 
4491
AC_REQUIRE([AC_PROG_NM])
 
4492
AC_REQUIRE([AC_OBJEXT])
 
4493
# Check for command to grab the raw symbol name followed by C symbol from nm.
 
4494
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
 
4495
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
 
4496
[
 
4497
# These are sane defaults that work on at least a few old systems.
 
4498
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
4499
 
 
4500
# Character class describing NM global symbol codes.
 
4501
symcode='[[BCDEGRST]]'
 
4502
 
 
4503
# Regexp to match symbols that can be accessed directly from C.
 
4504
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
4505
 
 
4506
# Transform an extracted symbol line into a proper C declaration
 
4507
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
 
4508
 
 
4509
# Transform an extracted symbol line into symbol name and symbol address
 
4510
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'"
 
4511
 
 
4512
# Define system-specific variables.
 
4513
case $host_os in
 
4514
aix*)
 
4515
  symcode='[[BCDT]]'
 
4516
  ;;
 
4517
cygwin* | mingw* | pw32*)
 
4518
  symcode='[[ABCDGISTW]]'
 
4519
  ;;
 
4520
hpux*) # Its linker distinguishes data from code symbols
 
4521
  if test "$host_cpu" = ia64; then
 
4522
    symcode='[[ABCDEGRST]]'
 
4523
  fi
 
4524
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
4525
  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'"
 
4526
  ;;
 
4527
linux*)
 
4528
  if test "$host_cpu" = ia64; then
 
4529
    symcode='[[ABCDGIRSTW]]'
 
4530
    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
4531
    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'"
 
4532
  fi
 
4533
  ;;
 
4534
irix* | nonstopux*)
 
4535
  symcode='[[BCDEGRST]]'
 
4536
  ;;
 
4537
osf*)
 
4538
  symcode='[[BCDEGQRST]]'
 
4539
  ;;
 
4540
solaris* | sysv5*)
 
4541
  symcode='[[BDRT]]'
 
4542
  ;;
 
4543
sysv4)
 
4544
  symcode='[[DFNSTU]]'
 
4545
  ;;
 
4546
esac
 
4547
 
 
4548
# Handle CRLF in mingw tool chain
 
4549
opt_cr=
 
4550
case $build_os in
 
4551
mingw*)
 
4552
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
 
4553
  ;;
 
4554
esac
 
4555
 
 
4556
# If we're using GNU nm, then use its standard symbol codes.
 
4557
case `$NM -V 2>&1` in
 
4558
*GNU* | *'with BFD'*)
 
4559
  symcode='[[ABCDGIRSTW]]' ;;
 
4560
esac
 
4561
 
 
4562
# Try without a prefix undercore, then with it.
 
4563
for ac_symprfx in "" "_"; do
 
4564
 
 
4565
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
 
4566
  symxfrm="\\1 $ac_symprfx\\2 \\2"
 
4567
 
 
4568
  # Write the raw and C identifiers.
 
4569
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
 
4570
 
 
4571
  # Check to see that the pipe works correctly.
 
4572
  pipe_works=no
 
4573
 
 
4574
  rm -f conftest*
 
4575
  cat > conftest.$ac_ext <<EOF
 
4576
#ifdef __cplusplus
 
4577
extern "C" {
 
4578
#endif
 
4579
char nm_test_var;
 
4580
void nm_test_func(){}
 
4581
#ifdef __cplusplus
 
4582
}
 
4583
#endif
 
4584
int main(){nm_test_var='a';nm_test_func();return(0);}
 
4585
EOF
 
4586
 
 
4587
  if AC_TRY_EVAL(ac_compile); then
 
4588
    # Now try to grab the symbols.
 
4589
    nlist=conftest.nm
 
4590
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
 
4591
      # Try sorting and uniquifying the output.
 
4592
      if sort "$nlist" | uniq > "$nlist"T; then
 
4593
        mv -f "$nlist"T "$nlist"
 
4594
      else
 
4595
        rm -f "$nlist"T
 
4596
      fi
 
4597
 
 
4598
      # Make sure that we snagged all the symbols we need.
 
4599
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
 
4600
        if grep ' nm_test_func$' "$nlist" >/dev/null; then
 
4601
          cat <<EOF > conftest.$ac_ext
 
4602
#ifdef __cplusplus
 
4603
extern "C" {
 
4604
#endif
 
4605
 
 
4606
EOF
 
4607
          # Now generate the symbol file.
 
4608
          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
 
4609
 
 
4610
          cat <<EOF >> conftest.$ac_ext
 
4611
#if defined (__STDC__) && __STDC__
 
4612
# define lt_ptr_t void *
 
4613
#else
 
4614
# define lt_ptr_t char *
 
4615
# define const
 
4616
#endif
 
4617
 
 
4618
/* The mapping between symbol names and symbols. */
 
4619
const struct {
 
4620
  const char *name;
 
4621
  lt_ptr_t address;
 
4622
}
 
4623
lt_preloaded_symbols[[]] =
 
4624
{
 
4625
EOF
 
4626
          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
 
4627
          cat <<\EOF >> conftest.$ac_ext
 
4628
  {0, (lt_ptr_t) 0}
 
4629
};
 
4630
 
 
4631
#ifdef __cplusplus
 
4632
}
 
4633
#endif
 
4634
EOF
 
4635
          # Now try linking the two files.
 
4636
          mv conftest.$ac_objext conftstm.$ac_objext
 
4637
          lt_save_LIBS="$LIBS"
 
4638
          lt_save_CFLAGS="$CFLAGS"
 
4639
          LIBS="conftstm.$ac_objext"
 
4640
          CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
 
4641
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 
4642
            pipe_works=yes
 
4643
          fi
 
4644
          LIBS="$lt_save_LIBS"
 
4645
          CFLAGS="$lt_save_CFLAGS"
 
4646
        else
 
4647
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 
4648
        fi
 
4649
      else
 
4650
        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
 
4651
      fi
 
4652
    else
 
4653
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
 
4654
    fi
 
4655
  else
 
4656
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
 
4657
    cat conftest.$ac_ext >&5
 
4658
  fi
 
4659
  rm -f conftest* conftst*
 
4660
 
 
4661
  # Do not use the global_symbol_pipe unless it works.
 
4662
  if test "$pipe_works" = yes; then
 
4663
    break
 
4664
  else
 
4665
    lt_cv_sys_global_symbol_pipe=
 
4666
  fi
 
4667
done
 
4668
])
 
4669
if test -z "$lt_cv_sys_global_symbol_pipe"; then
 
4670
  lt_cv_sys_global_symbol_to_cdecl=
 
4671
fi
 
4672
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
 
4673
  AC_MSG_RESULT(failed)
 
4674
else
 
4675
  AC_MSG_RESULT(ok)
 
4676
fi
 
4677
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
4678
 
 
4679
 
 
4680
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
 
4681
# ---------------------------------------
 
4682
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
 
4683
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
 
4684
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
4685
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
 
4686
 
 
4687
AC_MSG_CHECKING([for $compiler option to produce PIC])
 
4688
 ifelse([$1],[CXX],[
 
4689
  # C++ specific cases for pic, static, wl, etc.
 
4690
  if test "$GXX" = yes; then
 
4691
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4692
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4693
 
 
4694
    case $host_os in
 
4695
    aix*)
 
4696
      # All AIX code is PIC.
 
4697
      if test "$host_cpu" = ia64; then
 
4698
        # AIX 5 now supports IA64 processor
 
4699
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4700
      fi
 
4701
      ;;
 
4702
    amigaos*)
 
4703
      # FIXME: we need at least 68020 code to build shared libraries, but
 
4704
      # adding the `-m68020' flag to GCC prevents building anything better,
 
4705
      # like `-m68040'.
 
4706
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
4707
      ;;
 
4708
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
4709
      # PIC is the default for these OSes.
 
4710
      ;;
 
4711
    mingw* | os2* | pw32*)
 
4712
      # This hack is so that the source file can tell whether it is being
 
4713
      # built for inclusion in a dll (and should export symbols for example).
 
4714
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
4715
      ;;
 
4716
    darwin* | rhapsody*)
 
4717
      # PIC is the default on this platform
 
4718
      # Common symbols not allowed in MH_DYLIB files
 
4719
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
4720
      ;;
 
4721
    *djgpp*)
 
4722
      # DJGPP does not support shared libraries at all
 
4723
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
4724
      ;;
 
4725
    sysv4*MP*)
 
4726
      if test -d /usr/nec; then
 
4727
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
4728
      fi
 
4729
      ;;
 
4730
    hpux*)
 
4731
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
4732
      # not for PA HP-UX.
 
4733
      case $host_cpu in
 
4734
      hppa*64*|ia64*)
 
4735
        ;;
 
4736
      *)
 
4737
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4738
        ;;
 
4739
      esac
 
4740
      ;;
 
4741
    *)
 
4742
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4743
      ;;
 
4744
    esac
 
4745
  else
 
4746
    case $host_os in
 
4747
      aix4* | aix5*)
 
4748
        # All AIX code is PIC.
 
4749
        if test "$host_cpu" = ia64; then
 
4750
          # AIX 5 now supports IA64 processor
 
4751
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4752
        else
 
4753
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
4754
        fi
 
4755
        ;;
 
4756
      chorus*)
 
4757
        case $cc_basename in
 
4758
        cxch68*)
 
4759
          # Green Hills C++ Compiler
 
4760
          # _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"
 
4761
          ;;
 
4762
        esac
 
4763
        ;;
 
4764
       darwin*)
 
4765
         # PIC is the default on this platform
 
4766
         # Common symbols not allowed in MH_DYLIB files
 
4767
         case $cc_basename in
 
4768
           xlc*)
 
4769
           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
 
4770
           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4771
           ;;
 
4772
         esac
 
4773
       ;;
 
4774
      dgux*)
 
4775
        case $cc_basename in
 
4776
          ec++*)
 
4777
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4778
            ;;
 
4779
          ghcx*)
 
4780
            # Green Hills C++ Compiler
 
4781
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
4782
            ;;
 
4783
          *)
 
4784
            ;;
 
4785
        esac
 
4786
        ;;
 
4787
      freebsd* | kfreebsd*-gnu | dragonfly*)
 
4788
        # FreeBSD uses GNU C++
 
4789
        ;;
 
4790
      hpux9* | hpux10* | hpux11*)
 
4791
        case $cc_basename in
 
4792
          CC*)
 
4793
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4794
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
4795
            if test "$host_cpu" != ia64; then
 
4796
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
4797
            fi
 
4798
            ;;
 
4799
          aCC*)
 
4800
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4801
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
4802
            case $host_cpu in
 
4803
            hppa*64*|ia64*)
 
4804
              # +Z the default
 
4805
              ;;
 
4806
            *)
 
4807
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
4808
              ;;
 
4809
            esac
 
4810
            ;;
 
4811
          *)
 
4812
            ;;
 
4813
        esac
 
4814
        ;;
 
4815
      irix5* | irix6* | nonstopux*)
 
4816
        case $cc_basename in
 
4817
          CC*)
 
4818
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4819
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
4820
            # CC pic flag -KPIC is the default.
 
4821
            ;;
 
4822
          *)
 
4823
            ;;
 
4824
        esac
 
4825
        ;;
 
4826
      linux*)
 
4827
        case $cc_basename in
 
4828
          KCC*)
 
4829
            # KAI C++ Compiler
 
4830
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
4831
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4832
            ;;
 
4833
          icpc* | ecpc*)
 
4834
            # Intel C++
 
4835
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4836
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4837
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4838
            ;;
 
4839
          pgCC*)
 
4840
            # Portland Group C++ compiler.
 
4841
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4842
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
4843
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4844
            ;;
 
4845
          cxx*)
 
4846
            # Compaq C++
 
4847
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
4848
            # Linux and Compaq Tru64 Unix objects are PIC.
 
4849
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
4850
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
4851
            ;;
 
4852
          *)
 
4853
            ;;
 
4854
        esac
 
4855
        ;;
 
4856
      lynxos*)
 
4857
        ;;
 
4858
      m88k*)
 
4859
        ;;
 
4860
      mvs*)
 
4861
        case $cc_basename in
 
4862
          cxx*)
 
4863
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
 
4864
            ;;
 
4865
          *)
 
4866
            ;;
 
4867
        esac
 
4868
        ;;
 
4869
      netbsd*)
 
4870
        ;;
 
4871
      osf3* | osf4* | osf5*)
 
4872
        case $cc_basename in
 
4873
          KCC*)
 
4874
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
4875
            ;;
 
4876
          RCC*)
 
4877
            # Rational C++ 2.4.1
 
4878
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
4879
            ;;
 
4880
          cxx*)
 
4881
            # Digital/Compaq C++
 
4882
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4883
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
4884
            # Linux and Compaq Tru64 Unix objects are PIC.
 
4885
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
4886
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
4887
            ;;
 
4888
          *)
 
4889
            ;;
 
4890
        esac
 
4891
        ;;
 
4892
      psos*)
 
4893
        ;;
 
4894
      sco*)
 
4895
        case $cc_basename in
 
4896
          CC*)
 
4897
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4898
            ;;
 
4899
          *)
 
4900
            ;;
 
4901
        esac
 
4902
        ;;
 
4903
      solaris*)
 
4904
        case $cc_basename in
 
4905
          CC*)
 
4906
            # Sun C++ 4.2, 5.x and Centerline C++
 
4907
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4908
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4909
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
4910
            ;;
 
4911
          gcx*)
 
4912
            # Green Hills C++ Compiler
 
4913
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
4914
            ;;
 
4915
          *)
 
4916
            ;;
 
4917
        esac
 
4918
        ;;
 
4919
      sunos4*)
 
4920
        case $cc_basename in
 
4921
          CC*)
 
4922
            # Sun C++ 4.x
 
4923
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
4924
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4925
            ;;
 
4926
          lcc*)
 
4927
            # Lucid
 
4928
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
4929
            ;;
 
4930
          *)
 
4931
            ;;
 
4932
        esac
 
4933
        ;;
 
4934
      tandem*)
 
4935
        case $cc_basename in
 
4936
          NCC*)
 
4937
            # NonStop-UX NCC 3.20
 
4938
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4939
            ;;
 
4940
          *)
 
4941
            ;;
 
4942
        esac
 
4943
        ;;
 
4944
      unixware*)
 
4945
        ;;
 
4946
      vxworks*)
 
4947
        ;;
 
4948
      *)
 
4949
        _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
4950
        ;;
 
4951
    esac
 
4952
  fi
 
4953
],
 
4954
[
 
4955
  if test "$GCC" = yes; then
 
4956
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4957
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4958
 
 
4959
    case $host_os in
 
4960
      aix*)
 
4961
      # All AIX code is PIC.
 
4962
      if test "$host_cpu" = ia64; then
 
4963
        # AIX 5 now supports IA64 processor
 
4964
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4965
      fi
 
4966
      ;;
 
4967
 
 
4968
    amigaos*)
 
4969
      # FIXME: we need at least 68020 code to build shared libraries, but
 
4970
      # adding the `-m68020' flag to GCC prevents building anything better,
 
4971
      # like `-m68040'.
 
4972
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
4973
      ;;
 
4974
 
 
4975
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
4976
      # PIC is the default for these OSes.
 
4977
      ;;
 
4978
 
 
4979
    mingw* | pw32* | os2*)
 
4980
      # This hack is so that the source file can tell whether it is being
 
4981
      # built for inclusion in a dll (and should export symbols for example).
 
4982
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
4983
      ;;
 
4984
 
 
4985
    darwin* | rhapsody*)
 
4986
      # PIC is the default on this platform
 
4987
      # Common symbols not allowed in MH_DYLIB files
 
4988
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
4989
      ;;
 
4990
 
 
4991
    msdosdjgpp*)
 
4992
      # Just because we use GCC doesn't mean we suddenly get shared libraries
 
4993
      # on systems that don't support them.
 
4994
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
4995
      enable_shared=no
 
4996
      ;;
 
4997
 
 
4998
    sysv4*MP*)
 
4999
      if test -d /usr/nec; then
 
5000
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
5001
      fi
 
5002
      ;;
 
5003
 
 
5004
    hpux*)
 
5005
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
5006
      # not for PA HP-UX.
 
5007
      case $host_cpu in
 
5008
      hppa*64*|ia64*)
 
5009
        # +Z the default
 
5010
        ;;
 
5011
      *)
 
5012
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5013
        ;;
 
5014
      esac
 
5015
      ;;
 
5016
 
 
5017
    *)
 
5018
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5019
      ;;
 
5020
    esac
 
5021
  else
 
5022
    # PORTME Check for flag to pass linker flags through the system compiler.
 
5023
    case $host_os in
 
5024
    aix*)
 
5025
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5026
      if test "$host_cpu" = ia64; then
 
5027
        # AIX 5 now supports IA64 processor
 
5028
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5029
      else
 
5030
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
5031
      fi
 
5032
      ;;
 
5033
      darwin*)
 
5034
        # PIC is the default on this platform
 
5035
        # Common symbols not allowed in MH_DYLIB files
 
5036
       case $cc_basename in
 
5037
         xlc*)
 
5038
         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
 
5039
         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5040
         ;;
 
5041
       esac
 
5042
       ;;
 
5043
 
 
5044
    mingw* | pw32* | os2*)
 
5045
      # This hack is so that the source file can tell whether it is being
 
5046
      # built for inclusion in a dll (and should export symbols for example).
 
5047
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
5048
      ;;
 
5049
 
 
5050
    hpux9* | hpux10* | hpux11*)
 
5051
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5052
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
5053
      # not for PA HP-UX.
 
5054
      case $host_cpu in
 
5055
      hppa*64*|ia64*)
 
5056
        # +Z the default
 
5057
        ;;
 
5058
      *)
 
5059
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
5060
        ;;
 
5061
      esac
 
5062
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
 
5063
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
5064
      ;;
 
5065
 
 
5066
    irix5* | irix6* | nonstopux*)
 
5067
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5068
      # PIC (with -KPIC) is the default.
 
5069
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5070
      ;;
 
5071
 
 
5072
    newsos6)
 
5073
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5074
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5075
      ;;
 
5076
 
 
5077
    linux*)
 
5078
      case $cc_basename in
 
5079
      icc* | ecc*)
 
5080
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5081
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5082
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5083
        ;;
 
5084
      pgcc* | pgf77* | pgf90* | pgf95*)
 
5085
        # Portland Group compilers (*not* the Pentium gcc compiler,
 
5086
        # which looks to be a dead project)
 
5087
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5088
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
5089
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5090
        ;;
 
5091
      ccc*)
 
5092
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5093
        # All Alpha code is PIC.
 
5094
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5095
        ;;
 
5096
      esac
 
5097
      ;;
 
5098
 
 
5099
    osf3* | osf4* | osf5*)
 
5100
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5101
      # All OSF/1 code is PIC.
 
5102
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5103
      ;;
 
5104
 
 
5105
    sco3.2v5*)
 
5106
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
 
5107
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
 
5108
      ;;
 
5109
 
 
5110
    solaris*)
 
5111
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5112
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5113
      case $cc_basename in
 
5114
      f77* | f90* | f95*)
 
5115
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
 
5116
      *)
 
5117
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
 
5118
      esac
 
5119
      ;;
 
5120
 
 
5121
    sunos4*)
 
5122
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
5123
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
5124
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5125
      ;;
 
5126
 
 
5127
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
5128
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5129
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5130
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5131
      ;;
 
5132
 
 
5133
    sysv4*MP*)
 
5134
      if test -d /usr/nec ;then
 
5135
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
 
5136
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5137
      fi
 
5138
      ;;
 
5139
 
 
5140
    unicos*)
 
5141
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5142
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5143
      ;;
 
5144
 
 
5145
    uts4*)
 
5146
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5147
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5148
      ;;
 
5149
 
 
5150
    *)
 
5151
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5152
      ;;
 
5153
    esac
 
5154
  fi
 
5155
])
 
5156
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
 
5157
 
 
5158
#
 
5159
# Check to make sure the PIC flag actually works.
 
5160
#
 
5161
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
 
5162
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
 
5163
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
 
5164
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
 
5165
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
 
5166
     "" | " "*) ;;
 
5167
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
 
5168
     esac],
 
5169
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
5170
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
 
5171
fi
 
5172
case $host_os in
 
5173
  # For platforms which do not support PIC, -DPIC is meaningless:
 
5174
  *djgpp*)
 
5175
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
5176
    ;;
 
5177
  *)
 
5178
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
 
5179
    ;;
 
5180
esac
 
5181
])
 
5182
 
 
5183
 
 
5184
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
 
5185
# ------------------------------------
 
5186
# See if the linker supports building shared libraries.
 
5187
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
 
5188
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
5189
ifelse([$1],[CXX],[
 
5190
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5191
  case $host_os in
 
5192
  aix4* | aix5*)
 
5193
    # If we're using GNU nm, then we don't want the "-C" option.
 
5194
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
5195
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 
5196
      _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'
 
5197
    else
 
5198
      _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'
 
5199
    fi
 
5200
    ;;
 
5201
  pw32*)
 
5202
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
 
5203
  ;;
 
5204
  cygwin* | mingw*)
 
5205
    _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'
 
5206
  ;;
 
5207
  *)
 
5208
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5209
  ;;
 
5210
  esac
 
5211
],[
 
5212
  runpath_var=
 
5213
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
5214
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
5215
  _LT_AC_TAGVAR(archive_cmds, $1)=
 
5216
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
5217
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
 
5218
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
 
5219
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
5220
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
5221
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
 
5222
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
5223
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
5224
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
5225
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5226
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
5227
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
5228
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
5229
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
5230
  _LT_AC_TAGVAR(module_cmds, $1)=
 
5231
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
5232
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
5233
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5234
  # include_expsyms should be a list of space-separated symbols to be *always*
 
5235
  # included in the symbol list
 
5236
  _LT_AC_TAGVAR(include_expsyms, $1)=
 
5237
  # exclude_expsyms can be an extended regexp of symbols to exclude
 
5238
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
 
5239
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
 
5240
  # as well as any symbol that contains `d'.
 
5241
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
 
5242
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
 
5243
  # platforms (ab)use it in PIC code, but their linkers get confused if
 
5244
  # the symbol is explicitly referenced.  Since portable code cannot
 
5245
  # rely on this symbol name, it's probably fine to never include it in
 
5246
  # preloaded symbol tables.
 
5247
  extract_expsyms_cmds=
 
5248
  # Just being paranoid about ensuring that cc_basename is set.
 
5249
  _LT_CC_BASENAME([$compiler])
 
5250
  case $host_os in
 
5251
  cygwin* | mingw* | pw32*)
 
5252
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
 
5253
    # When not using gcc, we currently assume that we are using
 
5254
    # Microsoft Visual C++.
 
5255
    if test "$GCC" != yes; then
 
5256
      with_gnu_ld=no
 
5257
    fi
 
5258
    ;;
 
5259
  openbsd*)
 
5260
    with_gnu_ld=no
 
5261
    ;;
 
5262
  esac
 
5263
 
 
5264
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
5265
  if test "$with_gnu_ld" = yes; then
 
5266
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
5267
    wlarc='${wl}'
 
5268
 
 
5269
    # Set some defaults for GNU ld with shared library support. These
 
5270
    # are reset later if shared libraries are not supported. Putting them
 
5271
    # here allows them to be overridden if necessary.
 
5272
    runpath_var=LD_RUN_PATH
 
5273
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
5274
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
5275
    # ancient GNU ld didn't support --whole-archive et. al.
 
5276
    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
 
5277
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
5278
      else
 
5279
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
5280
    fi
 
5281
    supports_anon_versioning=no
 
5282
    case `$LD -v 2>/dev/null` in
 
5283
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
 
5284
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
 
5285
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
 
5286
      *\ 2.11.*) ;; # other 2.11 versions
 
5287
      *) supports_anon_versioning=yes ;;
 
5288
    esac
 
5289
 
 
5290
    # See if GNU ld supports shared libraries.
 
5291
    case $host_os in
 
5292
    aix3* | aix4* | aix5*)
 
5293
      # On AIX/PPC, the GNU linker is very broken
 
5294
      if test "$host_cpu" != ia64; then
 
5295
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5296
        cat <<EOF 1>&2
 
5297
 
 
5298
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
 
5299
*** to be unable to reliably create shared libraries on AIX.
 
5300
*** Therefore, libtool is disabling shared libraries support.  If you
 
5301
*** really care for shared libraries, you may want to modify your PATH
 
5302
*** so that a non-GNU linker is found, and then restart.
 
5303
 
 
5304
EOF
 
5305
      fi
 
5306
      ;;
 
5307
 
 
5308
    amigaos*)
 
5309
      _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)'
 
5310
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5311
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5312
 
 
5313
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
 
5314
      # that the semantics of dynamic libraries on AmigaOS, at least up
 
5315
      # to version 4, is to share data among multiple programs linked
 
5316
      # with the same dynamic library.  Since this doesn't match the
 
5317
      # behavior of shared libraries on other platforms, we can't use
 
5318
      # them.
 
5319
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5320
      ;;
 
5321
 
 
5322
    beos*)
 
5323
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
5324
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5325
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
5326
        # support --undefined.  This deserves some investigation.  FIXME
 
5327
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5328
      else
 
5329
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5330
      fi
 
5331
      ;;
 
5332
 
 
5333
    cygwin* | mingw* | pw32*)
 
5334
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
5335
      # as there is no search path for DLLs.
 
5336
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5337
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5338
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
5339
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
5340
      _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'
 
5341
 
 
5342
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 
5343
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
5344
        # If the export-symbols file already is a .def file (1st line
 
5345
        # is EXPORTS), use it as is; otherwise, prepend...
 
5346
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
5347
          cp $export_symbols $output_objdir/$soname.def;
 
5348
        else
 
5349
          echo EXPORTS > $output_objdir/$soname.def;
 
5350
          cat $export_symbols >> $output_objdir/$soname.def;
 
5351
        fi~
 
5352
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
 
5353
      else
 
5354
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5355
      fi
 
5356
      ;;
 
5357
 
 
5358
    linux*)
 
5359
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
5360
        tmp_addflag=
 
5361
        case $cc_basename,$host_cpu in
 
5362
        pgcc*)                          # Portland Group C compiler
 
5363
          _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'
 
5364
          tmp_addflag=' $pic_flag'
 
5365
          ;;
 
5366
        pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
 
5367
          _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'
 
5368
          tmp_addflag=' $pic_flag -Mnomain' ;;
 
5369
        ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
 
5370
          tmp_addflag=' -i_dynamic' ;;
 
5371
        efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
 
5372
          tmp_addflag=' -i_dynamic -nofor_main' ;;
 
5373
        ifc* | ifort*)                  # Intel Fortran compiler
 
5374
          tmp_addflag=' -nofor_main' ;;
 
5375
        esac
 
5376
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5377
 
 
5378
        if test $supports_anon_versioning = yes; then
 
5379
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
 
5380
  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
5381
  $echo "local: *; };" >> $output_objdir/$libname.ver~
 
5382
          $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 
5383
        fi
 
5384
      else
 
5385
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5386
      fi
 
5387
      ;;
 
5388
 
 
5389
    netbsd*)
 
5390
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
5391
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 
5392
        wlarc=
 
5393
      else
 
5394
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5395
        _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'
 
5396
      fi
 
5397
      ;;
 
5398
 
 
5399
    solaris* | sysv5*)
 
5400
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
 
5401
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5402
        cat <<EOF 1>&2
 
5403
 
 
5404
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
 
5405
*** create shared libraries on Solaris systems.  Therefore, libtool
 
5406
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
5407
*** binutils to release 2.9.1 or newer.  Another option is to modify
 
5408
*** your PATH or compiler configuration so that the native linker is
 
5409
*** used, and then restart.
 
5410
 
 
5411
EOF
 
5412
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
5413
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5414
        _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'
 
5415
      else
 
5416
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5417
      fi
 
5418
      ;;
 
5419
 
 
5420
    sunos4*)
 
5421
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
5422
      wlarc=
 
5423
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5424
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5425
      ;;
 
5426
 
 
5427
    *)
 
5428
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
5429
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5430
        _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'
 
5431
      else
 
5432
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5433
      fi
 
5434
      ;;
 
5435
    esac
 
5436
 
 
5437
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
 
5438
      runpath_var=
 
5439
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
5440
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
5441
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
5442
    fi
 
5443
  else
 
5444
    # PORTME fill in a description of your system's linker (not GNU ld)
 
5445
    case $host_os in
 
5446
    aix3*)
 
5447
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5448
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
5449
      _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'
 
5450
      # Note: this linker hardcodes the directories in LIBPATH if there
 
5451
      # are no directories specified by -L.
 
5452
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5453
      if test "$GCC" = yes && test -z "$link_static_flag"; then
 
5454
        # Neither direct hardcoding nor static linking is supported with a
 
5455
        # broken collect2.
 
5456
        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
5457
      fi
 
5458
      ;;
 
5459
 
 
5460
    aix4* | aix5*)
 
5461
      if test "$host_cpu" = ia64; then
 
5462
        # On IA64, the linker does run time linking by default, so we don't
 
5463
        # have to do anything special.
 
5464
        aix_use_runtimelinking=no
 
5465
        exp_sym_flag='-Bexport'
 
5466
        no_entry_flag=""
 
5467
      else
 
5468
        # If we're using GNU nm, then we don't want the "-C" option.
 
5469
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
5470
        if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 
5471
          _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'
 
5472
        else
 
5473
          _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'
 
5474
        fi
 
5475
        aix_use_runtimelinking=no
 
5476
 
 
5477
        # Test if we are trying to use run time linking or normal
 
5478
        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
5479
        # need to do runtime linking.
 
5480
        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
 
5481
          for ld_flag in $LDFLAGS; do
 
5482
          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
 
5483
            aix_use_runtimelinking=yes
 
5484
            break
 
5485
          fi
 
5486
          done
 
5487
        esac
 
5488
 
 
5489
        exp_sym_flag='-bexport'
 
5490
        no_entry_flag='-bnoentry'
 
5491
      fi
 
5492
 
 
5493
      # When large executables or shared objects are built, AIX ld can
 
5494
      # have problems creating the table of contents.  If linking a library
 
5495
      # or program results in "error TOC overflow" add -mminimal-toc to
 
5496
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
5497
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
5498
 
 
5499
      _LT_AC_TAGVAR(archive_cmds, $1)=''
 
5500
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5501
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
5502
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
5503
 
 
5504
      if test "$GCC" = yes; then
 
5505
        case $host_os in aix4.[[012]]|aix4.[[012]].*)
 
5506
        # We only want to do this on AIX 4.2 and lower, the check
 
5507
        # below for broken collect2 doesn't work under 4.3+
 
5508
          collect2name=`${CC} -print-prog-name=collect2`
 
5509
          if test -f "$collect2name" && \
 
5510
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
5511
          then
 
5512
          # We have reworked collect2
 
5513
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5514
          else
 
5515
          # We have old collect2
 
5516
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
5517
          # It fails to find uninstalled libraries when the uninstalled
 
5518
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
5519
          # to unsupported forces relinking
 
5520
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5521
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5522
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
5523
          fi
 
5524
        esac
 
5525
        shared_flag='-shared'
 
5526
        if test "$aix_use_runtimelinking" = yes; then
 
5527
          shared_flag="$shared_flag "'${wl}-G'
 
5528
        fi
 
5529
      else
 
5530
        # not using gcc
 
5531
        if test "$host_cpu" = ia64; then
 
5532
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
5533
        # chokes on -Wl,-G. The following line is correct:
 
5534
          shared_flag='-G'
 
5535
        else
 
5536
        if test "$aix_use_runtimelinking" = yes; then
 
5537
            shared_flag='${wl}-G'
 
5538
          else
 
5539
            shared_flag='${wl}-bM:SRE'
 
5540
        fi
 
5541
        fi
 
5542
      fi
 
5543
 
 
5544
      # It seems that -bexpall does not export symbols beginning with
 
5545
      # underscore (_), so it is better to generate a list of symbols to export.
 
5546
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
5547
      if test "$aix_use_runtimelinking" = yes; then
 
5548
        # Warning - without using the other runtime loading flags (-brtl),
 
5549
        # -berok will link without error, but may produce a broken library.
 
5550
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
5551
       # Determine the default libpath from the value encoded in an empty executable.
 
5552
       _LT_AC_SYS_LIBPATH_AIX
 
5553
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
5554
        _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"
 
5555
       else
 
5556
        if test "$host_cpu" = ia64; then
 
5557
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
5558
          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
5559
          _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"
 
5560
        else
 
5561
         # Determine the default libpath from the value encoded in an empty executable.
 
5562
         _LT_AC_SYS_LIBPATH_AIX
 
5563
         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
5564
          # Warning - without using the other run time loading flags,
 
5565
          # -berok will link without error, but may produce a broken library.
 
5566
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
5567
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
5568
          # -bexpall does not export symbols beginning with underscore (_)
 
5569
          _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
5570
          # Exported symbols can be pulled into shared objects from archives
 
5571
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
5572
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
5573
          # This is similar to how AIX traditionally builds its shared libraries.
 
5574
          _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'
 
5575
        fi
 
5576
      fi
 
5577
      ;;
 
5578
 
 
5579
    amigaos*)
 
5580
      _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)'
 
5581
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5582
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5583
      # see comment about different semantics on the GNU ld section
 
5584
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5585
      ;;
 
5586
 
 
5587
    bsdi[[45]]*)
 
5588
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
 
5589
      ;;
 
5590
 
 
5591
    cygwin* | mingw* | pw32*)
 
5592
      # When not using gcc, we currently assume that we are using
 
5593
      # Microsoft Visual C++.
 
5594
      # hardcode_libdir_flag_spec is actually meaningless, as there is
 
5595
      # no search path for DLLs.
 
5596
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
5597
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5598
      # Tell ltmain to make .lib files, not .a files.
 
5599
      libext=lib
 
5600
      # Tell ltmain to make .dll files, not .so files.
 
5601
      shrext_cmds=".dll"
 
5602
      # FIXME: Setting linknames here is a bad hack.
 
5603
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
 
5604
      # The linker will automatically build a .lib file if we build a DLL.
 
5605
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
 
5606
      # FIXME: Should let the user specify the lib program.
 
5607
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
 
5608
      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
 
5609
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
5610
      ;;
 
5611
 
 
5612
    darwin* | rhapsody*)
 
5613
      case $host_os in
 
5614
        rhapsody* | darwin1.[[012]])
 
5615
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
 
5616
         ;;
 
5617
       *) # Darwin 1.3 on
 
5618
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
5619
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
5620
         else
 
5621
           case ${MACOSX_DEPLOYMENT_TARGET} in
 
5622
             10.[[012]])
 
5623
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
5624
               ;;
 
5625
             10.*)
 
5626
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
 
5627
               ;;
 
5628
           esac
 
5629
         fi
 
5630
         ;;
 
5631
      esac
 
5632
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
5633
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5634
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
5635
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
5636
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
 
5637
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
5638
    if test "$GCC" = yes ; then
 
5639
        output_verbose_link_cmd='echo'
 
5640
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
5641
      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
5642
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
5643
      _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}'
 
5644
      _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}'
 
5645
    else
 
5646
      case $cc_basename in
 
5647
        xlc*)
 
5648
         output_verbose_link_cmd='echo'
 
5649
         _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'
 
5650
         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
5651
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
5652
         _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}'
 
5653
          _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}'
 
5654
          ;;
 
5655
       *)
 
5656
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5657
          ;;
 
5658
      esac
 
5659
    fi
 
5660
      ;;
 
5661
 
 
5662
    dgux*)
 
5663
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5664
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5665
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5666
      ;;
 
5667
 
 
5668
    freebsd1*)
 
5669
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5670
      ;;
 
5671
 
 
5672
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
 
5673
    # support.  Future versions do this automatically, but an explicit c++rt0.o
 
5674
    # does not break anything, and helps significantly (at the cost of a little
 
5675
    # extra space).
 
5676
    freebsd2.2*)
 
5677
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 
5678
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
5679
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5680
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5681
      ;;
 
5682
 
 
5683
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
 
5684
    freebsd2*)
 
5685
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
5686
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5687
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5688
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5689
      ;;
 
5690
 
 
5691
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
 
5692
    freebsd* | kfreebsd*-gnu | dragonfly*)
 
5693
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
5694
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
5695
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5696
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5697
      ;;
 
5698
 
 
5699
    hpux9*)
 
5700
      if test "$GCC" = yes; then
 
5701
        _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'
 
5702
      else
 
5703
        _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'
 
5704
      fi
 
5705
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
5706
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5707
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5708
 
 
5709
      # hardcode_minus_L: Not really in the search PATH,
 
5710
      # but as the default location of the library.
 
5711
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5712
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5713
      ;;
 
5714
 
 
5715
    hpux10* | hpux11*)
 
5716
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
5717
        case $host_cpu in
 
5718
        hppa*64*|ia64*)
 
5719
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
5720
          ;;
 
5721
        *)
 
5722
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
5723
          ;;
 
5724
        esac
 
5725
      else
 
5726
        case $host_cpu in
 
5727
        hppa*64*|ia64*)
 
5728
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5729
          ;;
 
5730
        *)
 
5731
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
5732
          ;;
 
5733
        esac
 
5734
      fi
 
5735
      if test "$with_gnu_ld" = no; then
 
5736
        case $host_cpu in
 
5737
        hppa*64*)
 
5738
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
5739
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
5740
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5741
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5742
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5743
          ;;
 
5744
        ia64*)
 
5745
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5746
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5747
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5748
 
 
5749
          # hardcode_minus_L: Not really in the search PATH,
 
5750
          # but as the default location of the library.
 
5751
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5752
          ;;
 
5753
        *)
 
5754
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
5755
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5756
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5757
          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5758
 
 
5759
          # hardcode_minus_L: Not really in the search PATH,
 
5760
          # but as the default location of the library.
 
5761
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5762
          ;;
 
5763
        esac
 
5764
      fi
 
5765
      ;;
 
5766
 
 
5767
    irix5* | irix6* | nonstopux*)
 
5768
      if test "$GCC" = yes; then
 
5769
        _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'
 
5770
      else
 
5771
        _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'
 
5772
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
 
5773
      fi
 
5774
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5775
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5776
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
5777
      ;;
 
5778
 
 
5779
    netbsd*)
 
5780
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
5781
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
 
5782
      else
 
5783
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
 
5784
      fi
 
5785
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
5786
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5787
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5788
      ;;
 
5789
 
 
5790
    newsos6)
 
5791
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5792
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5793
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5794
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5795
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5796
      ;;
 
5797
 
 
5798
    openbsd*)
 
5799
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5800
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5801
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
5802
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
5803
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
 
5804
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
5805
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5806
      else
 
5807
       case $host_os in
 
5808
         openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
 
5809
           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
5810
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
5811
           ;;
 
5812
         *)
 
5813
           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
5814
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
5815
           ;;
 
5816
       esac
 
5817
      fi
 
5818
      ;;
 
5819
 
 
5820
    os2*)
 
5821
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5822
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5823
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5824
      _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'
 
5825
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
 
5826
      ;;
 
5827
 
 
5828
    osf3*)
 
5829
      if test "$GCC" = yes; then
 
5830
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
5831
        _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'
 
5832
      else
 
5833
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
5834
        _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'
 
5835
      fi
 
5836
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5837
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5838
      ;;
 
5839
 
 
5840
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
 
5841
      if test "$GCC" = yes; then
 
5842
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
5843
        _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'
 
5844
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5845
      else
 
5846
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
5847
        _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'
 
5848
        _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~
 
5849
        $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'
 
5850
 
 
5851
        # Both c and cxx compiler support -rpath directly
 
5852
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
5853
      fi
 
5854
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5855
      ;;
 
5856
 
 
5857
    sco3.2v5*)
 
5858
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5859
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5860
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
5861
      runpath_var=LD_RUN_PATH
 
5862
      hardcode_runpath_var=yes
 
5863
      ;;
 
5864
 
 
5865
    solaris*)
 
5866
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
5867
      if test "$GCC" = yes; then
 
5868
        wlarc='${wl}'
 
5869
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
5870
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
5871
          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
 
5872
      else
 
5873
        wlarc=''
 
5874
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5875
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
5876
        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
5877
      fi
 
5878
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
5879
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5880
      case $host_os in
 
5881
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
5882
      *)
 
5883
        # The compiler driver will combine linker options so we
 
5884
        # cannot just pass the convience library names through
 
5885
        # without $wl, iff we do not link with $LD.
 
5886
        # Luckily, gcc supports the same syntax we need for Sun Studio.
 
5887
        # Supported since Solaris 2.6 (maybe 2.5.1?)
 
5888
        case $wlarc in
 
5889
        '')
 
5890
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
 
5891
        *)
 
5892
          _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' ;;
 
5893
        esac ;;
 
5894
      esac
 
5895
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
5896
      ;;
 
5897
 
 
5898
    sunos4*)
 
5899
      if test "x$host_vendor" = xsequent; then
 
5900
        # Use $CC to link under sequent, because it throws in some extra .o
 
5901
        # files that make .init and .fini sections work.
 
5902
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
5903
      else
 
5904
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
 
5905
      fi
 
5906
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5907
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5908
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5909
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5910
      ;;
 
5911
 
 
5912
    sysv4)
 
5913
      case $host_vendor in
 
5914
        sni)
 
5915
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5916
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
 
5917
        ;;
 
5918
        siemens)
 
5919
          ## LD is ld it makes a PLAMLIB
 
5920
          ## CC just makes a GrossModule.
 
5921
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
5922
          _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
 
5923
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5924
        ;;
 
5925
        motorola)
 
5926
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5927
          _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
 
5928
        ;;
 
5929
      esac
 
5930
      runpath_var='LD_RUN_PATH'
 
5931
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5932
      ;;
 
5933
 
 
5934
    sysv4.3*)
 
5935
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5936
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5937
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
 
5938
      ;;
 
5939
 
 
5940
    sysv4*MP*)
 
5941
      if test -d /usr/nec; then
 
5942
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5943
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5944
        runpath_var=LD_RUN_PATH
 
5945
        hardcode_runpath_var=yes
 
5946
        _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
5947
      fi
 
5948
      ;;
 
5949
 
 
5950
    sysv4.2uw2*)
 
5951
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
5952
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5953
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
5954
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5955
      hardcode_runpath_var=yes
 
5956
      runpath_var=LD_RUN_PATH
 
5957
      ;;
 
5958
 
 
5959
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
 
5960
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
 
5961
      if test "$GCC" = yes; then
 
5962
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
5963
      else
 
5964
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
5965
      fi
 
5966
      runpath_var='LD_RUN_PATH'
 
5967
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5968
      ;;
 
5969
 
 
5970
    sysv5*)
 
5971
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
5972
      # $CC -shared without GNU ld will not create a library from C++
 
5973
      # object files and a static libstdc++, better avoid it by now
 
5974
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5975
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
5976
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
5977
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
5978
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5979
      runpath_var='LD_RUN_PATH'
 
5980
      ;;
 
5981
 
 
5982
    uts4*)
 
5983
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5984
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5985
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5986
      ;;
 
5987
 
 
5988
    *)
 
5989
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5990
      ;;
 
5991
    esac
 
5992
  fi
 
5993
])
 
5994
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
5995
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
5996
 
 
5997
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 
5998
if test "$GCC" = yes; then
 
5999
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
6000
fi
 
6001
 
 
6002
#
 
6003
# Do we need to explicitly link libc?
 
6004
#
 
6005
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
 
6006
x|xyes)
 
6007
  # Assume -lc should be added
 
6008
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
6009
 
 
6010
  if test "$enable_shared" = yes && test "$GCC" = yes; then
 
6011
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
 
6012
    *'~'*)
 
6013
      # FIXME: we may have to deal with multi-command sequences.
 
6014
      ;;
 
6015
    '$CC '*)
 
6016
      # Test whether the compiler implicitly links with -lc since on some
 
6017
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
 
6018
      # to ld, don't add -lc before -lgcc.
 
6019
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
 
6020
      $rm conftest*
 
6021
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
6022
 
 
6023
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
 
6024
        soname=conftest
 
6025
        lib=conftest
 
6026
        libobjs=conftest.$ac_objext
 
6027
        deplibs=
 
6028
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
6029
        compiler_flags=-v
 
6030
        linker_flags=-v
 
6031
        verstring=
 
6032
        output_objdir=.
 
6033
        libname=conftest
 
6034
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
6035
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
6036
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
 
6037
        then
 
6038
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
6039
        else
 
6040
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
6041
        fi
 
6042
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
 
6043
      else
 
6044
        cat conftest.err 1>&5
 
6045
      fi
 
6046
      $rm conftest*
 
6047
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
 
6048
      ;;
 
6049
    esac
 
6050
  fi
 
6051
  ;;
 
6052
esac
 
6053
])# AC_LIBTOOL_PROG_LD_SHLIBS
 
6054
 
 
6055
 
 
6056
# _LT_AC_FILE_LTDLL_C
 
6057
# -------------------
 
6058
# Be careful that the start marker always follows a newline.
 
6059
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
 
6060
# /* ltdll.c starts here */
 
6061
# #define WIN32_LEAN_AND_MEAN
 
6062
# #include <windows.h>
 
6063
# #undef WIN32_LEAN_AND_MEAN
 
6064
# #include <stdio.h>
 
6065
#
 
6066
# #ifndef __CYGWIN__
 
6067
# #  ifdef __CYGWIN32__
 
6068
# #    define __CYGWIN__ __CYGWIN32__
 
6069
# #  endif
 
6070
# #endif
 
6071
#
 
6072
# #ifdef __cplusplus
 
6073
# extern "C" {
 
6074
# #endif
 
6075
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
 
6076
# #ifdef __cplusplus
 
6077
# }
 
6078
# #endif
 
6079
#
 
6080
# #ifdef __CYGWIN__
 
6081
# #include <cygwin/cygwin_dll.h>
 
6082
# DECLARE_CYGWIN_DLL( DllMain );
 
6083
# #endif
 
6084
# HINSTANCE __hDllInstance_base;
 
6085
#
 
6086
# BOOL APIENTRY
 
6087
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
 
6088
# {
 
6089
#   __hDllInstance_base = hInst;
 
6090
#   return TRUE;
 
6091
# }
 
6092
# /* ltdll.c ends here */
 
6093
])# _LT_AC_FILE_LTDLL_C
 
6094
 
 
6095
 
 
6096
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
 
6097
# ---------------------------------
 
6098
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
 
6099
 
 
6100
 
 
6101
# old names
 
6102
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
 
6103
AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
 
6104
AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
 
6105
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
 
6106
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
 
6107
AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
 
6108
AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
 
6109
 
 
6110
# This is just to silence aclocal about the macro not being used
 
6111
ifelse([AC_DISABLE_FAST_INSTALL])
 
6112
 
 
6113
AC_DEFUN([LT_AC_PROG_GCJ],
 
6114
[AC_CHECK_TOOL(GCJ, gcj, no)
 
6115
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
 
6116
  AC_SUBST(GCJFLAGS)
 
6117
])
 
6118
 
 
6119
AC_DEFUN([LT_AC_PROG_RC],
 
6120
[AC_CHECK_TOOL(RC, windres, no)
 
6121
])
 
6122
 
 
6123
############################################################
 
6124
# NOTE: This macro has been submitted for inclusion into   #
 
6125
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
 
6126
#  a released version of Autoconf we should remove this    #
 
6127
#  macro and use it instead.                               #
 
6128
############################################################
 
6129
# LT_AC_PROG_SED
 
6130
# --------------
 
6131
# Check for a fully-functional sed program, that truncates
 
6132
# as few characters as possible.  Prefer GNU sed if found.
 
6133
AC_DEFUN([LT_AC_PROG_SED],
 
6134
[AC_MSG_CHECKING([for a sed that does not truncate output])
 
6135
AC_CACHE_VAL(lt_cv_path_SED,
 
6136
[# Loop through the user's path and test for sed and gsed.
 
6137
# Then use that list of sed's as ones to test for truncation.
 
6138
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
6139
for as_dir in $PATH
 
6140
do
 
6141
  IFS=$as_save_IFS
 
6142
  test -z "$as_dir" && as_dir=.
 
6143
  for lt_ac_prog in sed gsed; do
 
6144
    for ac_exec_ext in '' $ac_executable_extensions; do
 
6145
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
 
6146
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
 
6147
      fi
 
6148
    done
 
6149
  done
 
6150
done
 
6151
lt_ac_max=0
 
6152
lt_ac_count=0
 
6153
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
 
6154
# along with /bin/sed that truncates output.
 
6155
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
 
6156
  test ! -f $lt_ac_sed && continue
 
6157
  cat /dev/null > conftest.in
 
6158
  lt_ac_count=0
 
6159
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
 
6160
  # Check for GNU sed and select it if it is found.
 
6161
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
 
6162
    lt_cv_path_SED=$lt_ac_sed
 
6163
    break
 
6164
  fi
 
6165
  while true; do
 
6166
    cat conftest.in conftest.in >conftest.tmp
 
6167
    mv conftest.tmp conftest.in
 
6168
    cp conftest.in conftest.nl
 
6169
    echo >>conftest.nl
 
6170
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
 
6171
    cmp -s conftest.out conftest.nl || break
 
6172
    # 10000 chars as input seems more than enough
 
6173
    test $lt_ac_count -gt 10 && break
 
6174
    lt_ac_count=`expr $lt_ac_count + 1`
 
6175
    if test $lt_ac_count -gt $lt_ac_max; then
 
6176
      lt_ac_max=$lt_ac_count
 
6177
      lt_cv_path_SED=$lt_ac_sed
 
6178
    fi
 
6179
  done
 
6180
done
 
6181
])
 
6182
SED=$lt_cv_path_SED
 
6183
AC_MSG_RESULT([$SED])
 
6184
])