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