~ubuntu-branches/ubuntu/feisty/sdlpango/feisty

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette
  • Date: 2006-09-28 23:50:02 UTC
  • Revision ID: james.westby@ubuntu.com-20060928235002-qn0dl0ktodhmieax
Tags: upstream-0.1.2
ImportĀ upstreamĀ versionĀ 0.1.2

Show diffs side-by-side

added added

removed removed

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