~ubuntu-branches/debian/sid/kxstitch/sid

« back to all changes in this revision

Viewing changes to admin/libtool.m4.in

  • Committer: Bazaar Package Importer
  • Author(s): eric pareja
  • Date: 2005-02-19 12:37:22 UTC
  • Revision ID: james.westby@ubuntu.com-20050219123722-kt3ru1nqvllietee
Tags: upstream-0.6
ImportĀ upstreamĀ versionĀ 0.6

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