Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 228865 | Differences between
and this patch

Collapse All | Expand All

(-)celestia-1.5.1/acinclude.m4 (-5402 / +13 lines)
Lines 522-527 Link Here
522
522
523
AC_DEFUN(KDE_SUBST_PROGRAMS,
523
AC_DEFUN(KDE_SUBST_PROGRAMS,
524
[
524
[
525
    AC_ARG_WITH(arts,
526
        AC_HELP_STRING([--without-arts],[build without aRts [default=no]]),
527
        [build_arts=$withval],
528
        [build_arts=yes]
529
    )
530
    AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
531
    if test "$build_arts" = "no"; then
532
        AC_DEFINE(WITHOUT_ARTS, 1, [Defined if compiling without arts])
533
    fi
525
534
526
        kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
535
        kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
527
        test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
536
        test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
Lines 536-543 Link Here
536
        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
545
        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
537
        KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
546
        KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
538
        KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
547
        KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
539
        KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
548
        if test "$build_arts" '!=' "no"; then
540
        KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
549
           KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
550
           KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
551
        fi
541
        KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
552
        KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
542
        KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
553
        KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
543
      
554
      
Lines 5391-10793 Link Here
5391
      ])
5402
      ])
5392
  ])
5403
  ])
5393
])
5404
])
5394
5395
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5396
## Copyright 1996, 1997, 1998, 1999, 2000, 2001
5397
## Free Software Foundation, Inc.
5398
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5399
##
5400
## This program is free software; you can redistribute it and/or modify
5401
## it under the terms of the GNU General Public License as published by
5402
## the Free Software Foundation; either version 2 of the License, or
5403
## (at your option) any later version.
5404
##
5405
## This program is distributed in the hope that it will be useful, but
5406
## WITHOUT ANY WARRANTY; without even the implied warranty of
5407
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5408
## General Public License for more details.
5409
##
5410
## You should have received a copy of the GNU General Public License
5411
## along with this program; if not, write to the Free Software
5412
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5413
##
5414
## As a special exception to the GNU General Public License, if you
5415
## distribute this file as part of a program that contains a
5416
## configuration script generated by Autoconf, you may include it under
5417
## the same distribution terms that you use for the rest of that program.
5418
5419
# serial 47 AC_PROG_LIBTOOL
5420
5421
# AC_PROG_LIBTOOL
5422
# ---------------
5423
AC_DEFUN([AC_PROG_LIBTOOL],
5424
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
5425
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
5426
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
5427
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
5428
    [AC_LIBTOOL_CXX],
5429
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
5430
  ])])
5431
5432
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
5433
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
5434
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
5435
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
5436
    [AC_LIBTOOL_GCJ],
5437
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
5438
      [AC_LIBTOOL_GCJ],
5439
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
5440
	[AC_LIBTOOL_GCJ],
5441
      [ifdef([AC_PROG_GCJ],
5442
	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5443
       ifdef([A][M_PROG_GCJ],
5444
	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5445
       ifdef([LT_AC_PROG_GCJ],
5446
	     [define([LT_AC_PROG_GCJ],
5447
		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
5448
])])# AC_PROG_LIBTOOL
5449
5450
5451
# _AC_PROG_LIBTOOL
5452
# ----------------
5453
AC_DEFUN([_AC_PROG_LIBTOOL],
5454
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
5455
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
5456
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
5457
5458
# This can be used to rebuild libtool when needed
5459
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
5460
5461
# Always use our own libtool.
5462
LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
5463
AC_SUBST(LIBTOOL)dnl
5464
5465
# Prevent multiple expansion
5466
define([AC_PROG_LIBTOOL], [])
5467
])# _AC_PROG_LIBTOOL
5468
5469
5470
# AC_LIBTOOL_SETUP
5471
# ----------------
5472
AC_DEFUN([AC_LIBTOOL_SETUP],
5473
[AC_PREREQ(2.50)dnl
5474
AC_REQUIRE([AC_ENABLE_SHARED])dnl
5475
AC_REQUIRE([AC_ENABLE_STATIC])dnl
5476
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
5477
AC_REQUIRE([AC_CANONICAL_HOST])dnl
5478
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5479
AC_REQUIRE([AC_PROG_CC])dnl
5480
AC_REQUIRE([AC_PROG_LD])dnl
5481
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
5482
AC_REQUIRE([AC_PROG_NM])dnl
5483
AC_REQUIRE([LT_AC_PROG_SED])dnl
5484
5485
AC_REQUIRE([AC_PROG_LN_S])dnl
5486
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
5487
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
5488
AC_REQUIRE([AC_OBJEXT])dnl
5489
AC_REQUIRE([AC_EXEEXT])dnl
5490
dnl
5491
5492
AC_LIBTOOL_SYS_MAX_CMD_LEN
5493
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5494
AC_LIBTOOL_OBJDIR
5495
5496
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5497
_LT_AC_PROG_ECHO_BACKSLASH
5498
5499
case $host_os in
5500
aix3*)
5501
  # AIX sometimes has problems with the GCC collect2 program.  For some
5502
  # reason, if we set the COLLECT_NAMES environment variable, the problems
5503
  # vanish in a puff of smoke.
5504
  if test "X${COLLECT_NAMES+set}" != Xset; then
5505
    COLLECT_NAMES=
5506
    export COLLECT_NAMES
5507
  fi
5508
  ;;
5509
esac
5510
5511
# Sed substitution that helps us do robust quoting.  It backslashifies
5512
# metacharacters that are still active within double-quoted strings.
5513
Xsed='sed -e s/^X//'
5514
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
5515
5516
# Same as above, but do not quote variable references.
5517
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
5518
5519
# Sed substitution to delay expansion of an escaped shell variable in a
5520
# double_quote_subst'ed string.
5521
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5522
5523
# Sed substitution to avoid accidental globbing in evaled expressions
5524
no_glob_subst='s/\*/\\\*/g'
5525
5526
# Constants:
5527
rm="rm -f"
5528
5529
# Global variables:
5530
default_ofile=libtool
5531
can_build_shared=yes
5532
5533
# All known linkers require a `.a' archive for static linking (except M$VC,
5534
# which needs '.lib').
5535
libext=a
5536
ltmain="$ac_aux_dir/ltmain.sh"
5537
ofile="$default_ofile"
5538
with_gnu_ld="$lt_cv_prog_gnu_ld"
5539
5540
AC_CHECK_TOOL(RANLIB, ranlib, :)
5541
AC_CHECK_TOOL(STRIP, strip, :)
5542
5543
old_CC="$CC"
5544
old_CFLAGS="$CFLAGS"
5545
5546
# Set sane defaults for various variables
5547
test -z "$AR" && AR=ar
5548
test -z "$AR_FLAGS" && AR_FLAGS=cru
5549
test -z "$AS" && AS=as
5550
test -z "$CC" && CC=cc
5551
test -z "$LTCC" && LTCC=$CC
5552
test -z "$DLLTOOL" && DLLTOOL=dlltool
5553
test -z "$LD" && LD=ld
5554
test -z "$LN_S" && LN_S="ln -s"
5555
test -z "$MAGIC_CMD" && MAGIC_CMD=file
5556
test -z "$NM" && NM=nm
5557
test -z "$SED" && SED=sed
5558
test -z "$OBJDUMP" && OBJDUMP=objdump
5559
test -z "$RANLIB" && RANLIB=:
5560
test -z "$STRIP" && STRIP=:
5561
test -z "$ac_objext" && ac_objext=o
5562
5563
# Determine commands to create old-style static archives.
5564
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5565
old_postinstall_cmds='chmod 644 $oldlib'
5566
old_postuninstall_cmds=
5567
5568
if test -n "$RANLIB"; then
5569
  case $host_os in
5570
  openbsd*)
5571
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5572
    ;;
5573
  *)
5574
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5575
    ;;
5576
  esac
5577
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5578
fi
5579
5580
# Only perform the check for file, if the check method requires it
5581
case $deplibs_check_method in
5582
file_magic*)
5583
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
5584
    AC_PATH_MAGIC
5585
  fi
5586
  ;;
5587
esac
5588
5589
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
5590
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
5591
enable_win32_dll=yes, enable_win32_dll=no)
5592
5593
AC_ARG_ENABLE([libtool-lock],
5594
    [AC_HELP_STRING([--disable-libtool-lock],
5595
	[avoid locking (might break parallel builds)])])
5596
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5597
5598
AC_ARG_WITH([pic],
5599
    [AC_HELP_STRING([--with-pic],
5600
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
5601
    [pic_mode="$withval"],
5602
    [pic_mode=default])
5603
test -z "$pic_mode" && pic_mode=default
5604
5605
# Use C for the default configuration in the libtool script
5606
tagname=
5607
AC_LIBTOOL_LANG_C_CONFIG
5608
_LT_AC_TAGCONFIG
5609
])# AC_LIBTOOL_SETUP
5610
5611
5612
# _LT_AC_SYS_COMPILER
5613
# -------------------
5614
AC_DEFUN([_LT_AC_SYS_COMPILER],
5615
[AC_REQUIRE([AC_PROG_CC])dnl
5616
5617
# If no C compiler was specified, use CC.
5618
LTCC=${LTCC-"$CC"}
5619
5620
# Allow CC to be a program name with arguments.
5621
set dummy $CC
5622
compiler="[$]2"
5623
])# _LT_AC_SYS_COMPILER
5624
5625
5626
# _LT_AC_SYS_LIBPATH_AIX
5627
# ----------------------
5628
# Links a minimal program and checks the executable
5629
# for the system default hardcoded library path. In most cases,
5630
# this is /usr/lib:/lib, but when the MPI compilers are used
5631
# the location of the communication and MPI libs are included too.
5632
# If we don't find anything, use the default library path according
5633
# to the aix ld manual.
5634
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
5635
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
5636
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
5637
}'`
5638
# Check for a 64-bit object if we didn't find anything.
5639
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
5640
}'`; fi],[])
5641
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
5642
])# _LT_AC_SYS_LIBPATH_AIX
5643
5644
5645
# _LT_AC_PROG_ECHO_BACKSLASH
5646
# --------------------------
5647
# Add some code to the start of the generated configure script which
5648
# will find an echo command which doesn't interpret backslashes.
5649
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
5650
[ifdef([AC_DIVERSION_NOTICE],
5651
	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
5652
	 [AC_DIVERT_PUSH(NOTICE)])
5653
5654
# Check that we are running under the correct shell.
5655
SHELL=${CONFIG_SHELL-/bin/sh}
5656
5657
case X$ECHO in
5658
X*--fallback-echo)
5659
  # Remove one level of quotation (which was required for Make).
5660
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
5661
  ;;
5662
esac
5663
5664
echo=${ECHO-echo}
5665
if test "X[$]1" = X--no-reexec; then
5666
  # Discard the --no-reexec flag, and continue.
5667
  shift
5668
elif test "X[$]1" = X--fallback-echo; then
5669
  # Avoid inline document here, it may be left over
5670
  :
5671
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
5672
  # Yippee, $echo works!
5673
  :
5674
else
5675
  # Restart under the correct shell.
5676
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
5677
fi
5678
5679
if test "X[$]1" = X--fallback-echo; then
5680
  # used as fallback echo
5681
  shift
5682
  cat <<EOF
5683
[$]*
5684
EOF
5685
  exit 0
5686
fi
5687
5688
# The HP-UX ksh and POSIX shell print the target directory to stdout
5689
# if CDPATH is set.
5690
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
5691
5692
if test -z "$ECHO"; then
5693
if test "X${echo_test_string+set}" != Xset; then
5694
# find a string as large as possible, as long as the shell can cope with it
5695
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
5696
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
5697
    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
5698
       echo_test_string="`eval $cmd`" &&
5699
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
5700
    then
5701
      break
5702
    fi
5703
  done
5704
fi
5705
5706
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5707
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5708
   test "X$echo_testing_string" = "X$echo_test_string"; then
5709
  :
5710
else
5711
  # The Solaris, AIX, and Digital Unix default echo programs unquote
5712
  # backslashes.  This makes it impossible to quote backslashes using
5713
  #   echo "$something" | sed 's/\\/\\\\/g'
5714
  #
5715
  # So, first we look for a working echo in the user's PATH.
5716
5717
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5718
  for dir in $PATH /usr/ucb; do
5719
    IFS="$lt_save_ifs"
5720
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
5721
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
5722
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
5723
       test "X$echo_testing_string" = "X$echo_test_string"; then
5724
      echo="$dir/echo"
5725
      break
5726
    fi
5727
  done
5728
  IFS="$lt_save_ifs"
5729
5730
  if test "X$echo" = Xecho; then
5731
    # We didn't find a better echo, so look for alternatives.
5732
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
5733
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
5734
       test "X$echo_testing_string" = "X$echo_test_string"; then
5735
      # This shell has a builtin print -r that does the trick.
5736
      echo='print -r'
5737
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
5738
	 test "X$CONFIG_SHELL" != X/bin/ksh; then
5739
      # If we have ksh, try running configure again with it.
5740
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
5741
      export ORIGINAL_CONFIG_SHELL
5742
      CONFIG_SHELL=/bin/ksh
5743
      export CONFIG_SHELL
5744
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
5745
    else
5746
      # Try using printf.
5747
      echo='printf %s\n'
5748
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5749
	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5750
	 test "X$echo_testing_string" = "X$echo_test_string"; then
5751
	# Cool, printf works
5752
	:
5753
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5754
	   test "X$echo_testing_string" = 'X\t' &&
5755
	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5756
	   test "X$echo_testing_string" = "X$echo_test_string"; then
5757
	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
5758
	export CONFIG_SHELL
5759
	SHELL="$CONFIG_SHELL"
5760
	export SHELL
5761
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
5762
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5763
	   test "X$echo_testing_string" = 'X\t' &&
5764
	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5765
	   test "X$echo_testing_string" = "X$echo_test_string"; then
5766
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
5767
      else
5768
	# maybe with a smaller string...
5769
	prev=:
5770
5771
	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
5772
	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
5773
	  then
5774
	    break
5775
	  fi
5776
	  prev="$cmd"
5777
	done
5778
5779
	if test "$prev" != 'sed 50q "[$]0"'; then
5780
	  echo_test_string=`eval $prev`
5781
	  export echo_test_string
5782
	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
5783
	else
5784
	  # Oops.  We lost completely, so just stick with echo.
5785
	  echo=echo
5786
	fi
5787
      fi
5788
    fi
5789
  fi
5790
fi
5791
fi
5792
5793
# Copy echo and quote the copy suitably for passing to libtool from
5794
# the Makefile, instead of quoting the original, which is used later.
5795
ECHO=$echo
5796
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
5797
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
5798
fi
5799
5800
AC_SUBST(ECHO)
5801
AC_DIVERT_POP
5802
])# _LT_AC_PROG_ECHO_BACKSLASH
5803
5804
5805
# _LT_AC_LOCK
5806
# -----------
5807
AC_DEFUN([_LT_AC_LOCK],
5808
[AC_ARG_ENABLE([libtool-lock],
5809
    [AC_HELP_STRING([--disable-libtool-lock],
5810
	[avoid locking (might break parallel builds)])])
5811
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5812
5813
# Some flags need to be propagated to the compiler or linker for good
5814
# libtool support.
5815
case $host in
5816
ia64-*-hpux*)
5817
  # Find out which ABI we are using.
5818
  echo 'int i;' > conftest.$ac_ext
5819
  if AC_TRY_EVAL(ac_compile); then
5820
    case `/usr/bin/file conftest.$ac_objext` in
5821
    *ELF-32*)
5822
      HPUX_IA64_MODE="32"
5823
      ;;
5824
    *ELF-64*)
5825
      HPUX_IA64_MODE="64"
5826
      ;;
5827
    esac
5828
  fi
5829
  rm -rf conftest*
5830
  ;;
5831
*-*-irix6*)
5832
  # Find out which ABI we are using.
5833
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
5834
  if AC_TRY_EVAL(ac_compile); then
5835
    case `/usr/bin/file conftest.$ac_objext` in
5836
    *32-bit*)
5837
      LD="${LD-ld} -32"
5838
      ;;
5839
    *N32*)
5840
      LD="${LD-ld} -n32"
5841
      ;;
5842
    *64-bit*)
5843
      LD="${LD-ld} -64"
5844
      ;;
5845
    esac
5846
  fi
5847
  rm -rf conftest*
5848
  ;;
5849
5850
*-*-linux*)
5851
  # Test if the compiler is 64bit
5852
  echo 'int i;' > conftest.$ac_ext
5853
  if AC_TRY_EVAL(ac_compile); then
5854
    case `/usr/bin/file conftest.$ac_objext` in
5855
    *"ELF 32"*)
5856
      LINUX_64_MODE="32"
5857
      ;;
5858
    *"ELF 64"*)
5859
      LINUX_64_MODE="64"
5860
      ;;
5861
    esac
5862
  fi
5863
  rm -rf conftest*
5864
  ;;
5865
  
5866
*-*-sco3.2v5*)
5867
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5868
  SAVE_CFLAGS="$CFLAGS"
5869
  CFLAGS="$CFLAGS -belf"
5870
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
5871
    [AC_LANG_PUSH(C)
5872
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
5873
     AC_LANG_POP])
5874
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5875
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5876
    CFLAGS="$SAVE_CFLAGS"
5877
  fi
5878
  ;;
5879
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
5880
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
5881
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
5882
  AC_CHECK_TOOL(AS, as, false)
5883
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
5884
5885
  # recent cygwin and mingw systems supply a stub DllMain which the user
5886
  # can override, but on older systems we have to supply one
5887
  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
5888
    [AC_TRY_LINK([],
5889
      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
5890
      DllMain (0, 0, 0);],
5891
      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
5892
5893
  case $host/$CC in
5894
  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
5895
    # old mingw systems require "-dll" to link a DLL, while more recent ones
5896
    # require "-mdll"
5897
    SAVE_CFLAGS="$CFLAGS"
5898
    CFLAGS="$CFLAGS -mdll"
5899
    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
5900
      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
5901
    CFLAGS="$SAVE_CFLAGS" ;;
5902
  *-*-cygwin* | *-*-pw32*)
5903
    # cygwin systems need to pass --dll to the linker, and not link
5904
    # crt.o which will require a WinMain@16 definition.
5905
    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
5906
  esac
5907
  ;;
5908
  ])
5909
esac
5910
5911
need_locks="$enable_libtool_lock"
5912
5913
])# _LT_AC_LOCK
5914
5915
5916
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
5917
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
5918
# ----------------------------------------------------------------
5919
# Check whether the given compiler option works
5920
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
5921
[AC_CACHE_CHECK([$1], [$2],
5922
  [$2=no
5923
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
5924
   save_CFLAGS="$CFLAGS"
5925
   CFLAGS="$CFLAGS $3"
5926
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5927
   if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
5928
     # The compiler can only warn and ignore the option if not recognized
5929
     # So say no if there are warnings
5930
     if test -s conftest.err; then
5931
       # Append any errors to the config.log.
5932
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
5933
     else
5934
       $2=yes
5935
     fi
5936
   fi
5937
   $rm conftest*
5938
   CFLAGS="$save_CFLAGS"
5939
])
5940
5941
if test x"[$]$2" = xyes; then
5942
    ifelse([$5], , :, [$5])
5943
else
5944
    ifelse([$6], , :, [$6])
5945
fi
5946
])# AC_LIBTOOL_COMPILER_OPTION
5947
5948
5949
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
5950
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
5951
# ------------------------------------------------------------
5952
# Check whether the given compiler option works
5953
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
5954
[AC_CACHE_CHECK([$1], [$2],
5955
  [$2=no
5956
   save_LDFLAGS="$LDFLAGS"
5957
   LDFLAGS="$LDFLAGS $3"
5958
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
5959
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
5960
     # The compiler can only warn and ignore the option if not recognized
5961
     # So say no if there are warnings
5962
     if test -s conftest.err; then
5963
       # Append any errors to the config.log.
5964
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
5965
     else
5966
       $2=yes
5967
     fi
5968
   fi
5969
   $rm conftest*
5970
   LDFLAGS="$save_LDFLAGS"
5971
])
5972
5973
if test x"[$]$2" = xyes; then
5974
    ifelse([$4], , :, [$4])
5975
else
5976
    ifelse([$5], , :, [$5])
5977
fi
5978
])# AC_LIBTOOL_LINKER_OPTION
5979
5980
5981
# AC_LIBTOOL_SYS_MAX_CMD_LEN
5982
# --------------------------
5983
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
5984
[# find the maximum length of command line arguments
5985
AC_MSG_CHECKING([the maximum length of command line arguments])
5986
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
5987
  i=0
5988
  testring="ABCD"
5989
5990
  case $host_os in
5991
  msdosdjgpp*)
5992
    # On DJGPP, this test can blow up pretty badly due to problems in libc
5993
    # (any single argument exceeding 2000 bytes causes a buffer overrun
5994
    # during glob expansion).  Even if it were fixed, the result of this
5995
    # check would be larger than it should be.
5996
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
5997
    ;;
5998
5999
  gnu*)
6000
    # Under GNU Hurd, this test is not required because there is
6001
    # no limit to the length of command line arguments.
6002
    # Libtool will interpret -1 as no limit whatsoever
6003
    lt_cv_sys_max_cmd_len=-1;
6004
    ;;
6005
6006
  *)
6007
    # If test is not a shell built-in, we'll probably end up computing a
6008
    # maximum length that is only half of the actual maximum length, but
6009
    # we can't tell.
6010
    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
6011
	       = "XX$testring") >/dev/null 2>&1 &&
6012
	    new_result=`expr "X$testring" : ".*" 2>&1` &&
6013
	    lt_cv_sys_max_cmd_len=$new_result &&
6014
	    test $i != 17 # 1/2 MB should be enough
6015
    do
6016
      i=`expr $i + 1`
6017
      testring=$testring$testring
6018
    done
6019
    testring=
6020
    # Add a significant safety factor because C++ compilers can tack on massive
6021
    # amounts of additional arguments before passing them to the linker.
6022
    # It appears as though 1/2 is a usable value.
6023
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6024
    ;;
6025
  esac
6026
])
6027
if test -n $lt_cv_sys_max_cmd_len ; then
6028
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
6029
else
6030
  AC_MSG_RESULT(none)
6031
fi
6032
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
6033
6034
6035
# _LT_AC_CHECK_DLFCN
6036
# --------------------
6037
AC_DEFUN([_LT_AC_CHECK_DLFCN],
6038
[AC_CHECK_HEADERS(dlfcn.h)dnl
6039
])# _LT_AC_CHECK_DLFCN
6040
6041
6042
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
6043
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
6044
# ------------------------------------------------------------------
6045
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
6046
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6047
if test "$cross_compiling" = yes; then :
6048
  [$4]
6049
else
6050
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6051
  lt_status=$lt_dlunknown
6052
  cat > conftest.$ac_ext <<EOF
6053
[#line __oline__ "configure"
6054
#include "confdefs.h"
6055
6056
#if HAVE_DLFCN_H
6057
#include <dlfcn.h>
6058
#endif
6059
6060
#include <stdio.h>
6061
6062
#ifdef RTLD_GLOBAL
6063
#  define LT_DLGLOBAL		RTLD_GLOBAL
6064
#else
6065
#  ifdef DL_GLOBAL
6066
#    define LT_DLGLOBAL		DL_GLOBAL
6067
#  else
6068
#    define LT_DLGLOBAL		0
6069
#  endif
6070
#endif
6071
6072
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6073
   find out it does not work in some platform. */
6074
#ifndef LT_DLLAZY_OR_NOW
6075
#  ifdef RTLD_LAZY
6076
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
6077
#  else
6078
#    ifdef DL_LAZY
6079
#      define LT_DLLAZY_OR_NOW		DL_LAZY
6080
#    else
6081
#      ifdef RTLD_NOW
6082
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
6083
#      else
6084
#        ifdef DL_NOW
6085
#          define LT_DLLAZY_OR_NOW	DL_NOW
6086
#        else
6087
#          define LT_DLLAZY_OR_NOW	0
6088
#        endif
6089
#      endif
6090
#    endif
6091
#  endif
6092
#endif
6093
6094
#ifdef __cplusplus
6095
extern "C" void exit (int);
6096
#endif
6097
6098
void fnord() { int i=42;}
6099
int main ()
6100
{
6101
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6102
  int status = $lt_dlunknown;
6103
6104
  if (self)
6105
    {
6106
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6107
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6108
      /* dlclose (self); */
6109
    }
6110
6111
    exit (status);
6112
}]
6113
EOF
6114
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6115
    (./conftest; exit; ) 2>/dev/null
6116
    lt_status=$?
6117
    case x$lt_status in
6118
      x$lt_dlno_uscore) $1 ;;
6119
      x$lt_dlneed_uscore) $2 ;;
6120
      x$lt_unknown|x*) $3 ;;
6121
    esac
6122
  else :
6123
    # compilation failed
6124
    $3
6125
  fi
6126
fi
6127
rm -fr conftest*
6128
])# _LT_AC_TRY_DLOPEN_SELF
6129
6130
6131
# AC_LIBTOOL_DLOPEN_SELF
6132
# -------------------
6133
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
6134
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6135
if test "x$enable_dlopen" != xyes; then
6136
  enable_dlopen=unknown
6137
  enable_dlopen_self=unknown
6138
  enable_dlopen_self_static=unknown
6139
else
6140
  lt_cv_dlopen=no
6141
  lt_cv_dlopen_libs=
6142
6143
  case $host_os in
6144
  beos*)
6145
    lt_cv_dlopen="load_add_on"
6146
    lt_cv_dlopen_libs=
6147
    lt_cv_dlopen_self=yes
6148
    ;;
6149
6150
  cygwin* | mingw* | pw32*)
6151
    lt_cv_dlopen="LoadLibrary"
6152
    lt_cv_dlopen_libs=
6153
   ;;
6154
6155
  *)
6156
    AC_CHECK_FUNC([shl_load],
6157
	  [lt_cv_dlopen="shl_load"],
6158
      [AC_CHECK_LIB([dld], [shl_load],
6159
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6160
	[AC_CHECK_FUNC([dlopen],
6161
	      [lt_cv_dlopen="dlopen"],
6162
	  [AC_CHECK_LIB([dl], [dlopen],
6163
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6164
	    [AC_CHECK_LIB([svld], [dlopen],
6165
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6166
	      [AC_CHECK_LIB([dld], [dld_link],
6167
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6168
	      ])
6169
	    ])
6170
	  ])
6171
	])
6172
      ])
6173
    ;;
6174
  esac
6175
6176
  if test "x$lt_cv_dlopen" != xno; then
6177
    enable_dlopen=yes
6178
  else
6179
    enable_dlopen=no
6180
  fi
6181
6182
  case $lt_cv_dlopen in
6183
  dlopen)
6184
    save_CPPFLAGS="$CPPFLAGS"
6185
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6186
6187
    save_LDFLAGS="$LDFLAGS"
6188
    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6189
6190
    save_LIBS="$LIBS"
6191
    LIBS="$lt_cv_dlopen_libs $LIBS"
6192
6193
    AC_CACHE_CHECK([whether a program can dlopen itself],
6194
	  lt_cv_dlopen_self, [dnl
6195
	  _LT_AC_TRY_DLOPEN_SELF(
6196
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6197
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6198
    ])
6199
6200
    if test "x$lt_cv_dlopen_self" = xyes; then
6201
      LDFLAGS="$LDFLAGS $link_static_flag"
6202
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6203
    	  lt_cv_dlopen_self_static, [dnl
6204
	  _LT_AC_TRY_DLOPEN_SELF(
6205
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6206
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
6207
      ])
6208
    fi
6209
6210
    CPPFLAGS="$save_CPPFLAGS"
6211
    LDFLAGS="$save_LDFLAGS"
6212
    LIBS="$save_LIBS"
6213
    ;;
6214
  esac
6215
6216
  case $lt_cv_dlopen_self in
6217
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6218
  *) enable_dlopen_self=unknown ;;
6219
  esac
6220
6221
  case $lt_cv_dlopen_self_static in
6222
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6223
  *) enable_dlopen_self_static=unknown ;;
6224
  esac
6225
fi
6226
])# AC_LIBTOOL_DLOPEN_SELF
6227
6228
6229
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
6230
# ---------------------------------
6231
# Check to see if options -c and -o are simultaneously supported by compiler
6232
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
6233
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6234
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
6235
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
6236
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
6237
   $rm -r conftest 2>/dev/null
6238
   mkdir conftest
6239
   cd conftest
6240
   mkdir out
6241
   ifelse([$1],[],[save_CFLAGS="$CFLAGS"
6242
		   CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
6243
	  [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
6244
		   CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
6245
	  [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
6246
		   GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
6247
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6248
6249
   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
6250
   # that will create temporary files in the current directory regardless of
6251
   # the output directory.  Thus, making CWD read-only will cause this test
6252
   # to fail, enabling locking or at least warning the user not to do parallel
6253
   # builds.
6254
   chmod -w .
6255
6256
   if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
6257
   then
6258
     # The compiler can only warn and ignore the option if not recognized
6259
     # So say no if there are warnings
6260
     if test -s out/conftest.err; then
6261
       # Append any errors to the config.log.
6262
       cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
6263
     else
6264
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6265
     fi
6266
   fi
6267
   ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
6268
	  [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
6269
	  [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
6270
   chmod u+w .
6271
   $rm conftest* out/*
6272
   rmdir out
6273
   cd ..
6274
   rmdir conftest
6275
   $rm conftest*
6276
])
6277
])# AC_LIBTOOL_PROG_CC_C_O
6278
6279
6280
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
6281
# -----------------------------------------
6282
# Check to see if we can do hard links to lock some files if needed
6283
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
6284
[AC_REQUIRE([_LT_AC_LOCK])dnl
6285
6286
hard_links="nottested"
6287
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
6288
  # do not overwrite the value of need_locks provided by the user
6289
  AC_MSG_CHECKING([if we can lock with hard links])
6290
  hard_links=yes
6291
  $rm conftest*
6292
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
6293
  touch conftest.a
6294
  ln conftest.a conftest.b 2>&5 || hard_links=no
6295
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
6296
  AC_MSG_RESULT([$hard_links])
6297
  if test "$hard_links" = no; then
6298
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
6299
    need_locks=warn
6300
  fi
6301
else
6302
  need_locks=no
6303
fi
6304
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
6305
6306
6307
# AC_LIBTOOL_OBJDIR
6308
# -----------------
6309
AC_DEFUN([AC_LIBTOOL_OBJDIR],
6310
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
6311
[rm -f .libs 2>/dev/null
6312
mkdir .libs 2>/dev/null
6313
if test -d .libs; then
6314
  lt_cv_objdir=.libs
6315
else
6316
  # MS-DOS does not allow filenames that begin with a dot.
6317
  lt_cv_objdir=_libs
6318
fi
6319
rmdir .libs 2>/dev/null])
6320
objdir=$lt_cv_objdir
6321
])# AC_LIBTOOL_OBJDIR
6322
6323
6324
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
6325
# ----------------------------------------------
6326
# Check hardcoding attributes.
6327
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
6328
[AC_MSG_CHECKING([how to hardcode library paths into programs])
6329
_LT_AC_TAGVAR(hardcode_action, $1)=
6330
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
6331
   test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
6332
6333
  # We can hardcode non-existant directories.
6334
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
6335
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
6336
     # have to relink, otherwise we might link with an installed library
6337
     # when we should be linking with a yet-to-be-installed one
6338
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
6339
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
6340
    # Linking always hardcodes the temporary library directory.
6341
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
6342
  else
6343
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
6344
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
6345
  fi
6346
else
6347
  # We cannot hardcode anything, or else we can only hardcode existing
6348
  # directories.
6349
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
6350
fi
6351
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
6352
6353
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
6354
  # Fast installation is not supported
6355
  enable_fast_install=no
6356
elif test "$shlibpath_overrides_runpath" = yes ||
6357
     test "$enable_shared" = no; then
6358
  # Fast installation is not necessary
6359
  enable_fast_install=needless
6360
fi
6361
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
6362
6363
6364
# AC_LIBTOOL_SYS_LIB_STRIP
6365
# ------------------------
6366
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
6367
[striplib=
6368
old_striplib=
6369
AC_MSG_CHECKING([whether stripping libraries is possible])
6370
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6371
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6372
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6373
  AC_MSG_RESULT([yes])
6374
else
6375
  AC_MSG_RESULT([no])
6376
fi
6377
])# AC_LIBTOOL_SYS_LIB_STRIP
6378
6379
6380
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6381
# -----------------------------
6382
# PORTME Fill in your ld.so characteristics
6383
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
6384
[AC_MSG_CHECKING([dynamic linker characteristics])
6385
library_names_spec=
6386
libname_spec='lib$name'
6387
soname_spec=
6388
postinstall_cmds=
6389
postuninstall_cmds=
6390
finish_cmds=
6391
finish_eval=
6392
shlibpath_var=
6393
shlibpath_overrides_runpath=unknown
6394
version_type=none
6395
dynamic_linker="$host_os ld.so"
6396
sys_lib_dlsearch_path_spec="/lib /usr/lib"
6397
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6398
need_lib_prefix=unknown
6399
hardcode_into_libs=no
6400
6401
# when you set need_version to no, make sure it does not cause -set_version
6402
# flags to be left without arguments
6403
need_version=unknown
6404
6405
case $host_os in
6406
aix3*)
6407
  version_type=linux
6408
  library_names_spec='${libname}${release}.so$versuffix $libname.a'
6409
  shlibpath_var=LIBPATH
6410
6411
  # AIX 3 has no versioning support, so we append a major version to the name.
6412
  soname_spec='${libname}${release}.so$major'
6413
  ;;
6414
6415
aix4* | aix5*)
6416
  version_type=linux
6417
  if test "$host_cpu" = ia64; then
6418
    # AIX 5 supports IA64
6419
    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6420
    shlibpath_var=LD_LIBRARY_PATH
6421
  else
6422
    # With GCC up to 2.95.x, collect2 would create an import file
6423
    # for dependence libraries.  The import file would start with
6424
    # the line `#! .'.  This would cause the generated library to
6425
    # depend on `.', always an invalid library.  This was fixed in
6426
    # development snapshots of GCC prior to 3.0.
6427
    case $host_os in
6428
      aix4 | aix4.[[01]] | aix4.[[01]].*)
6429
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6430
	   echo ' yes '
6431
	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6432
	:
6433
      else
6434
	can_build_shared=no
6435
      fi
6436
      ;;
6437
    esac
6438
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
6439
    # soname into executable. Probably we can add versioning support to
6440
    # collect2, so additional links can be useful in future.
6441
    if test "$aix_use_runtimelinking" = yes; then
6442
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6443
      # instead of lib<name>.a to let people know that these are not
6444
      # typical AIX shared libraries.
6445
      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6446
    else
6447
      # We preserve .a as extension for shared libraries through AIX4.2
6448
      # and later when we are not doing run time linking.
6449
      library_names_spec='${libname}${release}.a $libname.a'
6450
      soname_spec='${libname}${release}.so$major'
6451
    fi
6452
    shlibpath_var=LIBPATH
6453
  fi
6454
  ;;
6455
6456
amigaos*)
6457
  library_names_spec='$libname.ixlibrary $libname.a'
6458
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
6459
  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'
6460
  ;;
6461
6462
beos*)
6463
  library_names_spec='${libname}.so'
6464
  dynamic_linker="$host_os ld.so"
6465
  shlibpath_var=LIBRARY_PATH
6466
  ;;
6467
6468
bsdi4*)
6469
  version_type=linux
6470
  need_version=no
6471
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6472
  soname_spec='${libname}${release}.so$major'
6473
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6474
  shlibpath_var=LD_LIBRARY_PATH
6475
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6476
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6477
  # the default ld.so.conf also contains /usr/contrib/lib and
6478
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6479
  # libtool to hard-code these into programs
6480
  ;;
6481
6482
cygwin* | mingw* | pw32*)
6483
  version_type=windows
6484
  need_version=no
6485
  need_lib_prefix=no
6486
  case $GCC,$host_os in
6487
  yes,cygwin*)
6488
    library_names_spec='$libname.dll.a'
6489
    sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
6490
    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
6491
    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6492
      dldir=$destdir/`dirname \$dlpath`~
6493
      test -d \$dldir || mkdir -p \$dldir~
6494
      $install_prog .libs/$dlname \$dldir/$dlname'
6495
    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6496
      dlpath=$dir/\$dldll~
6497
       $rm \$dlpath'
6498
    ;;
6499
  yes,mingw*)
6500
    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
6501
    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
6502
    if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then
6503
      # It is most probably a Windows format PATH printed by
6504
      # mingw gcc, but we are running on Cygwin. Gcc prints its search
6505
      # path with ; separators, and with drive letters. We can handle the
6506
      # drive letters (cygwin fileutils understands them), so leave them,
6507
      # especially as we might pass files found there to a mingw objdump,
6508
      # which wouldn't understand a cygwinified path. Ahh.
6509
      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
6510
    else
6511
      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed  -e "s/$PATH_SEPARATOR/ /g"`
6512
    fi
6513
    ;;
6514
  yes,pw32*)
6515
    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6516
    ;;
6517
  *)
6518
    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
6519
    ;;
6520
  esac
6521
  dynamic_linker='Win32 ld.exe'
6522
  # FIXME: first we should search . and the directory the executable is in
6523
  shlibpath_var=PATH
6524
  ;;
6525
6526
darwin* | rhapsody*)
6527
  dynamic_linker="$host_os dyld"
6528
  version_type=darwin
6529
  need_lib_prefix=no
6530
  need_version=no
6531
  # FIXME: Relying on posixy $() will cause problems for
6532
  #        cross-compilation, but unfortunately the echo tests do not
6533
  #        yet detect zsh echo's removal of \ escapes.
6534
  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
6535
  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6536
  shlibpath_overrides_runpath=yes
6537
  shlibpath_var=DYLD_LIBRARY_PATH
6538
  ;;
6539
6540
dgux*)
6541
  version_type=linux
6542
  need_lib_prefix=no
6543
  need_version=no
6544
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6545
  soname_spec='${libname}${release}.so$major'
6546
  shlibpath_var=LD_LIBRARY_PATH
6547
  ;;
6548
6549
freebsd1*)
6550
  dynamic_linker=no
6551
  ;;
6552
6553
freebsd*)
6554
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6555
  version_type=freebsd-$objformat
6556
  case $version_type in
6557
    freebsd-elf*)
6558
      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6559
      need_version=no
6560
      need_lib_prefix=no
6561
      ;;
6562
    freebsd-*)
6563
      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6564
      need_version=yes
6565
      ;;
6566
  esac
6567
  shlibpath_var=LD_LIBRARY_PATH
6568
  case $host_os in
6569
  freebsd2*)
6570
    shlibpath_overrides_runpath=yes
6571
    ;;
6572
  freebsd3.[01]* | freebsdelf3.[01]*)
6573
    shlibpath_overrides_runpath=yes
6574
    hardcode_into_libs=yes
6575
    ;;
6576
  *) # from 3.2 on
6577
    shlibpath_overrides_runpath=no
6578
    hardcode_into_libs=yes
6579
    ;;
6580
  esac
6581
  ;;
6582
6583
gnu*)
6584
  version_type=linux
6585
  need_lib_prefix=no
6586
  need_version=no
6587
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6588
  soname_spec='${libname}${release}.so$major'
6589
  shlibpath_var=LD_LIBRARY_PATH
6590
  hardcode_into_libs=yes
6591
  ;;
6592
6593
hpux9* | hpux10* | hpux11*)
6594
  # Give a soname corresponding to the major version so that dld.sl refuses to
6595
  # link against other versions.
6596
  version_type=sunos
6597
  need_lib_prefix=no
6598
  need_version=no
6599
  if test "$host_cpu" = ia64; then
6600
    hardcode_into_libs=yes
6601
    dynamic_linker="$host_os dld.so"
6602
    shlibpath_var=LD_LIBRARY_PATH
6603
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6604
    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6605
    soname_spec='${libname}${release}.so$major'
6606
    if test "X$HPUX_IA64_MODE" = X32; then
6607
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
6608
    else
6609
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
6610
    fi
6611
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6612
  else
6613
    dynamic_linker="$host_os dld.sl"
6614
    shlibpath_var=SHLIB_PATH
6615
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6616
    library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6617
    soname_spec='${libname}${release}.sl$major'
6618
  fi
6619
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
6620
  postinstall_cmds='chmod 555 $lib'
6621
  ;;
6622
6623
irix5* | irix6* | nonstopux*)
6624
  case $host_os in
6625
    nonstopux*) version_type=nonstopux ;;
6626
    *)          version_type=irix ;;
6627
  esac
6628
  need_lib_prefix=no
6629
  need_version=no
6630
  soname_spec='${libname}${release}.so$major'
6631
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6632
  case $host_os in
6633
  irix5* | nonstopux*)
6634
    libsuff= shlibsuff=
6635
    ;;
6636
  *)
6637
    case $LD in # libtool.m4 will add one of these switches to LD
6638
    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6639
    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6640
    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6641
    *) libsuff= shlibsuff= libmagic=never-match;;
6642
    esac
6643
    ;;
6644
  esac
6645
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6646
  shlibpath_overrides_runpath=no
6647
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6648
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6649
  ;;
6650
6651
# No shared lib support for Linux oldld, aout, or coff.
6652
linux*oldld* | linux*aout* | linux*coff*)
6653
  dynamic_linker=no
6654
  ;;
6655
6656
# This must be Linux ELF.
6657
linux*)
6658
  version_type=linux
6659
  need_lib_prefix=no
6660
  need_version=no
6661
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6662
  soname_spec='${libname}${release}.so$major'
6663
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6664
  libsuff=
6665
  if test "x$LINUX_64_MODE" = x64; then
6666
    # Some platforms are per default 64-bit, so there's no /lib64
6667
    if test -d /lib64; then
6668
      libsuff=64
6669
    fi
6670
  fi
6671
  shlibpath_var=LD_LIBRARY_PATH
6672
  shlibpath_overrides_runpath=no
6673
  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
6674
  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
6675
  # This implies no fast_install, which is unacceptable.
6676
  # Some rework will be needed to allow for fast_install
6677
  # before this can be enabled.
6678
  hardcode_into_libs=yes
6679
6680
  # We used to test for /lib/ld.so.1 and disable shared libraries on
6681
  # powerpc, because MkLinux only supported shared libraries with the
6682
  # GNU dynamic linker.  Since this was broken with cross compilers,
6683
  # most powerpc-linux boxes support dynamic linking these days and
6684
  # people can always --disable-shared, the test was removed, and we
6685
  # assume the GNU/Linux dynamic linker is in use.
6686
  dynamic_linker='GNU/Linux ld.so'
6687
  ;;
6688
6689
netbsd*)
6690
  version_type=sunos
6691
  need_lib_prefix=no
6692
  need_version=no
6693
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6694
    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6695
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6696
    dynamic_linker='NetBSD (a.out) ld.so'
6697
  else
6698
    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6699
    soname_spec='${libname}${release}.so$major'
6700
    dynamic_linker='NetBSD ld.elf_so'
6701
  fi
6702
  shlibpath_var=LD_LIBRARY_PATH
6703
  shlibpath_overrides_runpath=yes
6704
  hardcode_into_libs=yes
6705
  ;;
6706
6707
newsos6)
6708
  version_type=linux
6709
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6710
  shlibpath_var=LD_LIBRARY_PATH
6711
  shlibpath_overrides_runpath=yes
6712
  ;;
6713
6714
nto-qnx)
6715
  version_type=linux
6716
  need_lib_prefix=no
6717
  need_version=no
6718
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6719
  soname_spec='${libname}${release}.so$major'
6720
  shlibpath_var=LD_LIBRARY_PATH
6721
  shlibpath_overrides_runpath=yes
6722
  ;;
6723
6724
openbsd*)
6725
  version_type=sunos
6726
  need_lib_prefix=no
6727
  need_version=no
6728
  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6729
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6730
  shlibpath_var=LD_LIBRARY_PATH
6731
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6732
    case $host_os in
6733
      openbsd2.[[89]] | openbsd2.[[89]].*)
6734
	shlibpath_overrides_runpath=no
6735
	;;
6736
      *)
6737
	shlibpath_overrides_runpath=yes
6738
	;;
6739
      esac
6740
  else
6741
    shlibpath_overrides_runpath=yes
6742
  fi
6743
  ;;
6744
6745
os2*)
6746
  libname_spec='$name'
6747
  need_lib_prefix=no
6748
  library_names_spec='$libname.dll $libname.a'
6749
  dynamic_linker='OS/2 ld.exe'
6750
  shlibpath_var=LIBPATH
6751
  ;;
6752
6753
osf3* | osf4* | osf5*)
6754
  version_type=osf
6755
  need_lib_prefix=no
6756
  need_version=no
6757
  soname_spec='${libname}${release}.so'
6758
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6759
  shlibpath_var=LD_LIBRARY_PATH
6760
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6761
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6762
  ;;
6763
6764
sco3.2v5*)
6765
  version_type=osf
6766
  soname_spec='${libname}${release}.so$major'
6767
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6768
  shlibpath_var=LD_LIBRARY_PATH
6769
  ;;
6770
6771
solaris*)
6772
  version_type=linux
6773
  need_lib_prefix=no
6774
  need_version=no
6775
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6776
  soname_spec='${libname}${release}.so$major'
6777
  shlibpath_var=LD_LIBRARY_PATH
6778
  shlibpath_overrides_runpath=yes
6779
  hardcode_into_libs=yes
6780
  # ldd complains unless libraries are executable
6781
  postinstall_cmds='chmod +x $lib'
6782
  ;;
6783
6784
sunos4*)
6785
  version_type=sunos
6786
  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6787
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6788
  shlibpath_var=LD_LIBRARY_PATH
6789
  shlibpath_overrides_runpath=yes
6790
  if test "$with_gnu_ld" = yes; then
6791
    need_lib_prefix=no
6792
  fi
6793
  need_version=yes
6794
  ;;
6795
6796
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6797
  version_type=linux
6798
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6799
  soname_spec='${libname}${release}.so$major'
6800
  shlibpath_var=LD_LIBRARY_PATH
6801
  case $host_vendor in
6802
    sni)
6803
      shlibpath_overrides_runpath=no
6804
      ;;
6805
    motorola)
6806
      need_lib_prefix=no
6807
      need_version=no
6808
      shlibpath_overrides_runpath=no
6809
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6810
      ;;
6811
  esac
6812
  ;;
6813
6814
sysv4*MP*)
6815
  if test -d /usr/nec ;then
6816
    version_type=linux
6817
    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6818
    soname_spec='$libname.so.$major'
6819
    shlibpath_var=LD_LIBRARY_PATH
6820
  fi
6821
  ;;
6822
6823
uts4*)
6824
  version_type=linux
6825
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6826
  soname_spec='${libname}${release}.so$major'
6827
  shlibpath_var=LD_LIBRARY_PATH
6828
  ;;
6829
6830
*)
6831
  dynamic_linker=no
6832
  ;;
6833
esac
6834
AC_MSG_RESULT([$dynamic_linker])
6835
test "$dynamic_linker" = no && can_build_shared=no
6836
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6837
6838
6839
# _LT_AC_TAGCONFIG
6840
# ----------------
6841
AC_DEFUN([_LT_AC_TAGCONFIG],
6842
[AC_ARG_WITH([tags],
6843
    [AC_HELP_STRING([--with-tags=TAGS],
6844
	[include additional configurations @<:@CXX,GCJ@:>@])],
6845
    [tagnames="$withval"],
6846
    [tagnames="CXX,GCJ"
6847
    case $host_os in
6848
      mingw*|cygwin*) tagnames="$tagnames,RC" ;;
6849
    esac])
6850
6851
if test -f "$ltmain" && test -n "$tagnames"; then
6852
  if test ! -f "${ofile}"; then
6853
    AC_MSG_WARN([output file `$ofile' does not exist])
6854
  fi
6855
6856
  if test -z "$LTCC"; then
6857
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
6858
    if test -z "$LTCC"; then
6859
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
6860
    else
6861
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
6862
    fi
6863
  fi
6864
6865
  # Extract list of available tagged configurations in $ofile.
6866
  # Note that this assumes the entire list is on one line.
6867
  available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
6868
6869
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
6870
  for tagname in $tagnames; do
6871
    IFS="$lt_save_ifs"
6872
    # Check whether tagname contains only valid characters
6873
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
6874
    "") ;;
6875
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
6876
	;;
6877
    esac
6878
6879
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
6880
    then
6881
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
6882
    fi
6883
6884
    # Update the list of available tags.
6885
    if test -n "$tagname"; then
6886
      echo appending configuration tag \"$tagname\" to $ofile
6887
6888
      case $tagname in
6889
      CXX)
6890
	AC_LIBTOOL_LANG_CXX_CONFIG
6891
	;;
6892
6893
      GCJ)
6894
	AC_LIBTOOL_LANG_GCJ_CONFIG
6895
	;;
6896
6897
      RC)
6898
	AC_LIBTOOL_LANG_RC_CONFIG
6899
	;;
6900
6901
      *)
6902
	AC_MSG_ERROR([Unsupported tag name: $tagname])
6903
	;;
6904
      esac
6905
6906
      # Append the new tag name to the list of available tags.
6907
      available_tags="$available_tags $tagname"
6908
    fi
6909
  done
6910
  IFS="$lt_save_ifs"
6911
6912
  # Now substitute the updated list of available tags.
6913
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
6914
    mv "${ofile}T" "$ofile"
6915
    chmod +x "$ofile"
6916
  else
6917
    rm -f "${ofile}T"
6918
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
6919
  fi
6920
fi
6921
])# _LT_AC_TAGCONFIG
6922
6923
6924
# AC_LIBTOOL_DLOPEN
6925
# -----------------
6926
# enable checks for dlopen support
6927
AC_DEFUN([AC_LIBTOOL_DLOPEN],
6928
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
6929
])# AC_LIBTOOL_DLOPEN
6930
6931
6932
# AC_LIBTOOL_WIN32_DLL
6933
# --------------------
6934
# declare package support for building win32 dll's
6935
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
6936
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
6937
])# AC_LIBTOOL_WIN32_DLL
6938
6939
6940
# AC_ENABLE_SHARED([DEFAULT])
6941
# ---------------------------
6942
# implement the --enable-shared flag
6943
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
6944
AC_DEFUN([AC_ENABLE_SHARED],
6945
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
6946
AC_ARG_ENABLE([shared],
6947
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
6948
	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
6949
    [p=${PACKAGE-default}
6950
    case $enableval in
6951
    yes) enable_shared=yes ;;
6952
    no) enable_shared=no ;;
6953
    *)
6954
      enable_shared=no
6955
      # Look at the argument we got.  We use all the common list separators.
6956
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
6957
      for pkg in $enableval; do
6958
	IFS="$lt_save_ifs"
6959
	if test "X$pkg" = "X$p"; then
6960
	  enable_shared=yes
6961
	fi
6962
      done
6963
      IFS="$lt_save_ifs"
6964
      ;;
6965
    esac],
6966
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
6967
])# AC_ENABLE_SHARED
6968
6969
6970
# AC_DISABLE_SHARED
6971
# -----------------
6972
#- set the default shared flag to --disable-shared
6973
AC_DEFUN([AC_DISABLE_SHARED],
6974
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6975
AC_ENABLE_SHARED(no)
6976
])# AC_DISABLE_SHARED
6977
6978
6979
# AC_ENABLE_STATIC([DEFAULT])
6980
# ---------------------------
6981
# implement the --enable-static flag
6982
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
6983
AC_DEFUN([AC_ENABLE_STATIC],
6984
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
6985
AC_ARG_ENABLE([static],
6986
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
6987
	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
6988
    [p=${PACKAGE-default}
6989
    case $enableval in
6990
    yes) enable_static=yes ;;
6991
    no) enable_static=no ;;
6992
    *)
6993
     enable_static=no
6994
      # Look at the argument we got.  We use all the common list separators.
6995
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
6996
      for pkg in $enableval; do
6997
	IFS="$lt_save_ifs"
6998
	if test "X$pkg" = "X$p"; then
6999
	  enable_static=yes
7000
	fi
7001
      done
7002
      IFS="$lt_save_ifs"
7003
      ;;
7004
    esac],
7005
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
7006
])# AC_ENABLE_STATIC
7007
7008
7009
# AC_DISABLE_STATIC
7010
# -----------------
7011
# set the default static flag to --disable-static
7012
AC_DEFUN([AC_DISABLE_STATIC],
7013
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7014
AC_ENABLE_STATIC(no)
7015
])# AC_DISABLE_STATIC
7016
7017
7018
# AC_ENABLE_FAST_INSTALL([DEFAULT])
7019
# ---------------------------------
7020
# implement the --enable-fast-install flag
7021
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7022
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
7023
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
7024
AC_ARG_ENABLE([fast-install],
7025
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7026
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7027
    [p=${PACKAGE-default}
7028
    case $enableval in
7029
    yes) enable_fast_install=yes ;;
7030
    no) enable_fast_install=no ;;
7031
    *)
7032
      enable_fast_install=no
7033
      # Look at the argument we got.  We use all the common list separators.
7034
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7035
      for pkg in $enableval; do
7036
	IFS="$lt_save_ifs"
7037
	if test "X$pkg" = "X$p"; then
7038
	  enable_fast_install=yes
7039
	fi
7040
      done
7041
      IFS="$lt_save_ifs"
7042
      ;;
7043
    esac],
7044
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
7045
])# AC_ENABLE_FAST_INSTALL
7046
7047
7048
# AC_DISABLE_FAST_INSTALL
7049
# -----------------------
7050
# set the default to --disable-fast-install
7051
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
7052
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7053
AC_ENABLE_FAST_INSTALL(no)
7054
])# AC_DISABLE_FAST_INSTALL
7055
7056
7057
# AC_LIBTOOL_PICMODE([MODE])
7058
# --------------------------
7059
# implement the --with-pic flag
7060
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
7061
AC_DEFUN([AC_LIBTOOL_PICMODE],
7062
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7063
pic_mode=ifelse($#,1,$1,default)
7064
])# AC_LIBTOOL_PICMODE
7065
7066
7067
# AC_PATH_TOOL_PREFIX
7068
# -------------------
7069
# find a file program which can recognise shared library
7070
AC_DEFUN([AC_PATH_TOOL_PREFIX],
7071
[AC_MSG_CHECKING([for $1])
7072
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
7073
[case $MAGIC_CMD in
7074
[[\\/*] |  ?:[\\/]*])
7075
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7076
  ;;
7077
*)
7078
  lt_save_MAGIC_CMD="$MAGIC_CMD"
7079
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7080
dnl $ac_dummy forces splitting on constant user-supplied paths.
7081
dnl POSIX.2 word splitting is done only on the output of word expansions,
7082
dnl not every word.  This closes a longstanding sh security hole.
7083
  ac_dummy="ifelse([$2], , $PATH, [$2])"
7084
  for ac_dir in $ac_dummy; do
7085
    IFS="$lt_save_ifs"
7086
    test -z "$ac_dir" && ac_dir=.
7087
    if test -f $ac_dir/$1; then
7088
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
7089
      if test -n "$file_magic_test_file"; then
7090
	case $deplibs_check_method in
7091
	"file_magic "*)
7092
	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
7093
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7094
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7095
	    egrep "$file_magic_regex" > /dev/null; then
7096
	    :
7097
	  else
7098
	    cat <<EOF 1>&2
7099
7100
*** Warning: the command libtool uses to detect shared libraries,
7101
*** $file_magic_cmd, produces output that libtool cannot recognize.
7102
*** The result is that libtool may fail to recognize shared libraries
7103
*** as such.  This will affect the creation of libtool libraries that
7104
*** depend on shared libraries, but programs linked with such libtool
7105
*** libraries will work regardless of this problem.  Nevertheless, you
7106
*** may want to report the problem to your system manager and/or to
7107
*** bug-libtool@gnu.org
7108
7109
EOF
7110
	  fi ;;
7111
	esac
7112
      fi
7113
      break
7114
    fi
7115
  done
7116
  IFS="$lt_save_ifs"
7117
  MAGIC_CMD="$lt_save_MAGIC_CMD"
7118
  ;;
7119
esac])
7120
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7121
if test -n "$MAGIC_CMD"; then
7122
  AC_MSG_RESULT($MAGIC_CMD)
7123
else
7124
  AC_MSG_RESULT(no)
7125
fi
7126
])# AC_PATH_TOOL_PREFIX
7127
7128
7129
# AC_PATH_MAGIC
7130
# -------------
7131
# find a file program which can recognise a shared library
7132
AC_DEFUN([AC_PATH_MAGIC],
7133
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
7134
if test -z "$lt_cv_path_MAGIC_CMD"; then
7135
  if test -n "$ac_tool_prefix"; then
7136
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
7137
  else
7138
    MAGIC_CMD=:
7139
  fi
7140
fi
7141
])# AC_PATH_MAGIC
7142
7143
7144
# AC_PROG_LD
7145
# ----------
7146
# find the path to the GNU or non-GNU linker
7147
AC_DEFUN([AC_PROG_LD],
7148
[AC_ARG_WITH([gnu-ld],
7149
    [AC_HELP_STRING([--with-gnu-ld],
7150
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
7151
    [test "$withval" = no || with_gnu_ld=yes],
7152
    [with_gnu_ld=no])
7153
AC_REQUIRE([AC_PROG_CC])dnl
7154
AC_REQUIRE([AC_CANONICAL_HOST])dnl
7155
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7156
ac_prog=ld
7157
if test "$GCC" = yes; then
7158
  # Check if gcc -print-prog-name=ld gives a path.
7159
  AC_MSG_CHECKING([for ld used by GCC])
7160
  case $host in
7161
  *-*-mingw*)
7162
    # gcc leaves a trailing carriage return which upsets mingw
7163
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7164
  *)
7165
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7166
  esac
7167
  case $ac_prog in
7168
    # Accept absolute paths.
7169
    [[\\/]]* | ?:[[\\/]]*)
7170
      re_direlt='/[[^/]][[^/]]*/\.\./'
7171
      # Canonicalize the path of ld
7172
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7173
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7174
	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7175
      done
7176
      test -z "$LD" && LD="$ac_prog"
7177
      ;;
7178
  "")
7179
    # If it fails, then pretend we aren't using GCC.
7180
    ac_prog=ld
7181
    ;;
7182
  *)
7183
    # If it is relative, then search for the first ld in PATH.
7184
    with_gnu_ld=unknown
7185
    ;;
7186
  esac
7187
elif test "$with_gnu_ld" = yes; then
7188
  AC_MSG_CHECKING([for GNU ld])
7189
else
7190
  AC_MSG_CHECKING([for non-GNU ld])
7191
fi
7192
AC_CACHE_VAL(lt_cv_path_LD,
7193
[if test -z "$LD"; then
7194
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7195
  for ac_dir in $PATH; do
7196
    IFS="$lt_save_ifs"
7197
    test -z "$ac_dir" && ac_dir=.
7198
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7199
      lt_cv_path_LD="$ac_dir/$ac_prog"
7200
      # Check to see if the program is GNU ld.  I'd rather use --version,
7201
      # but apparently some GNU ld's only accept -v.
7202
      # Break only if it was the GNU/non-GNU ld that we prefer.
7203
      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7204
	test "$with_gnu_ld" != no && break
7205
      else
7206
	test "$with_gnu_ld" != yes && break
7207
      fi
7208
    fi
7209
  done
7210
  IFS="$lt_save_ifs"
7211
else
7212
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
7213
fi])
7214
LD="$lt_cv_path_LD"
7215
if test -n "$LD"; then
7216
  AC_MSG_RESULT($LD)
7217
else
7218
  AC_MSG_RESULT(no)
7219
fi
7220
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
7221
AC_PROG_LD_GNU
7222
])# AC_PROG_LD
7223
7224
7225
# AC_PROG_LD_GNU
7226
# --------------
7227
AC_DEFUN([AC_PROG_LD_GNU],
7228
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
7229
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
7230
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7231
  lt_cv_prog_gnu_ld=yes
7232
else
7233
  lt_cv_prog_gnu_ld=no
7234
fi])
7235
with_gnu_ld=$lt_cv_prog_gnu_ld
7236
])# AC_PROG_LD_GNU
7237
7238
7239
# AC_PROG_LD_RELOAD_FLAG
7240
# ----------------------
7241
# find reload flag for linker
7242
#   -- PORTME Some linkers may need a different reload flag.
7243
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
7244
[AC_CACHE_CHECK([for $LD option to reload object files],
7245
  lt_cv_ld_reload_flag,
7246
  [lt_cv_ld_reload_flag='-r'])
7247
reload_flag=$lt_cv_ld_reload_flag
7248
case $reload_flag in
7249
"" | " "*) ;;
7250
*) reload_flag=" $reload_flag" ;;
7251
esac
7252
reload_cmds='$LD$reload_flag -o $output$reload_objs'
7253
])# AC_PROG_LD_RELOAD_FLAG
7254
7255
7256
# AC_DEPLIBS_CHECK_METHOD
7257
# -----------------------
7258
# how to check for library dependencies
7259
#  -- PORTME fill in with the dynamic library characteristics
7260
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
7261
[AC_CACHE_CHECK([how to recognise dependant libraries],
7262
lt_cv_deplibs_check_method,
7263
[lt_cv_file_magic_cmd='$MAGIC_CMD'
7264
lt_cv_file_magic_test_file=
7265
lt_cv_deplibs_check_method='unknown'
7266
# Need to set the preceding variable on all platforms that support
7267
# interlibrary dependencies.
7268
# 'none' -- dependencies not supported.
7269
# `unknown' -- same as none, but documents that we really don't know.
7270
# 'pass_all' -- all dependencies passed with no checks.
7271
# 'test_compile' -- check by making test program.
7272
# 'file_magic [[regex]]' -- check by looking for files in library path
7273
# which responds to the $file_magic_cmd with a given egrep regex.
7274
# If you have `file' or equivalent on your system and you're not sure
7275
# whether `pass_all' will *always* work, you probably want this one.
7276
7277
case $host_os in
7278
aix4* | aix5*)
7279
  lt_cv_deplibs_check_method=pass_all
7280
  ;;
7281
7282
beos*)
7283
  lt_cv_deplibs_check_method=pass_all
7284
  ;;
7285
7286
bsdi4*)
7287
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
7288
  lt_cv_file_magic_cmd='/usr/bin/file -L'
7289
  lt_cv_file_magic_test_file=/shlib/libc.so
7290
  ;;
7291
7292
cygwin* | mingw* | pw32*)
7293
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
7294
  lt_cv_file_magic_cmd='$OBJDUMP -f'
7295
  ;;
7296
7297
darwin* | rhapsody*)
7298
  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
7299
  lt_cv_file_magic_cmd='/usr/bin/file -L'
7300
  case "$host_os" in
7301
  rhapsody* | darwin1.[[012]])
7302
    lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
7303
    ;;
7304
  *) # Darwin 1.3 on
7305
    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
7306
    ;;
7307
  esac
7308
  ;;
7309
7310
freebsd*)
7311
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7312
    case $host_cpu in
7313
    i*86 )
7314
      # Not sure whether the presence of OpenBSD here was a mistake.
7315
      # Let's accept both of them until this is cleared up.
7316
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
7317
      lt_cv_file_magic_cmd=/usr/bin/file
7318
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7319
      ;;
7320
    esac
7321
  else
7322
    lt_cv_deplibs_check_method=pass_all
7323
  fi
7324
  ;;
7325
7326
gnu*)
7327
  lt_cv_deplibs_check_method=pass_all
7328
  ;;
7329
7330
hpux10.20* | hpux11*)
7331
  lt_cv_file_magic_cmd=/usr/bin/file
7332
  if test "$host_cpu" = ia64; then
7333
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
7334
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7335
  else
7336
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
7337
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
7338
  fi
7339
  ;;
7340
7341
irix5* | irix6* | nonstopux*)
7342
  case $host_os in
7343
  irix5* | nonstopux*)
7344
    # this will be overridden with pass_all, but let us keep it just in case
7345
    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
7346
    ;;
7347
  *)
7348
    case $LD in
7349
    *-32|*"-32 ") libmagic=32-bit;;
7350
    *-n32|*"-n32 ") libmagic=N32;;
7351
    *-64|*"-64 ") libmagic=64-bit;;
7352
    *) libmagic=never-match;;
7353
    esac
7354
    # this will be overridden with pass_all, but let us keep it just in case
7355
    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
7356
    ;;
7357
  esac
7358
  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
7359
  lt_cv_deplibs_check_method=pass_all
7360
  ;;
7361
7362
# This must be Linux ELF.
7363
linux*)
7364
  case $host_cpu in
7365
  alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* )
7366
    lt_cv_deplibs_check_method=pass_all ;;
7367
  *)
7368
    # glibc up to 2.1.1 does not perform some relocations on ARM
7369
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
7370
  esac
7371
  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
7372
  ;;
7373
7374
netbsd*)
7375
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7376
    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
7377
  else
7378
    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
7379
  fi
7380
  ;;
7381
7382
newos6*)
7383
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
7384
  lt_cv_file_magic_cmd=/usr/bin/file
7385
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
7386
  ;;
7387
7388
nto-qnx)
7389
  lt_cv_deplibs_check_method=unknown
7390
  ;;
7391
7392
openbsd*)
7393
  lt_cv_file_magic_cmd=/usr/bin/file
7394
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7395
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7396
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
7397
  else
7398
    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
7399
  fi
7400
  ;;
7401
7402
osf3* | osf4* | osf5*)
7403
  # this will be overridden with pass_all, but let us keep it just in case
7404
  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
7405
  lt_cv_file_magic_test_file=/shlib/libc.so
7406
  lt_cv_deplibs_check_method=pass_all
7407
  ;;
7408
7409
sco3.2v5*)
7410
  lt_cv_deplibs_check_method=pass_all
7411
  ;;
7412
7413
solaris*)
7414
  lt_cv_deplibs_check_method=pass_all
7415
  lt_cv_file_magic_test_file=/lib/libc.so
7416
  ;;
7417
7418
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7419
  case $host_vendor in
7420
  motorola)
7421
    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]]'
7422
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7423
    ;;
7424
  ncr)
7425
    lt_cv_deplibs_check_method=pass_all
7426
    ;;
7427
  sequent)
7428
    lt_cv_file_magic_cmd='/bin/file'
7429
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
7430
    ;;
7431
  sni)
7432
    lt_cv_file_magic_cmd='/bin/file'
7433
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
7434
    lt_cv_file_magic_test_file=/lib/libc.so
7435
    ;;
7436
  esac
7437
  ;;
7438
7439
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
7440
  lt_cv_deplibs_check_method=pass_all
7441
  ;;
7442
esac
7443
])
7444
file_magic_cmd=$lt_cv_file_magic_cmd
7445
deplibs_check_method=$lt_cv_deplibs_check_method
7446
test -z "$deplibs_check_method" && deplibs_check_method=unknown
7447
])# AC_DEPLIBS_CHECK_METHOD
7448
7449
7450
# AC_PROG_NM
7451
# ----------
7452
# find the path to a BSD-compatible name lister
7453
AC_DEFUN([AC_PROG_NM],
7454
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
7455
[if test -n "$NM"; then
7456
  # Let the user override the test.
7457
  lt_cv_path_NM="$NM"
7458
else
7459
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7460
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
7461
    IFS="$lt_save_ifs"
7462
    test -z "$ac_dir" && ac_dir=.
7463
    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
7464
    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
7465
      # Check to see if the nm accepts a BSD-compat flag.
7466
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
7467
      #   nm: unknown option "B" ignored
7468
      # Tru64's nm complains that /dev/null is an invalid object file
7469
      if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
7470
	lt_cv_path_NM="$tmp_nm -B"
7471
	break
7472
      elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
7473
	lt_cv_path_NM="$tmp_nm -p"
7474
	break
7475
      else
7476
	lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7477
	continue # so that we can try to find one that supports BSD flags
7478
      fi
7479
    fi
7480
  done
7481
  IFS="$lt_save_ifs"
7482
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
7483
fi])
7484
NM="$lt_cv_path_NM"
7485
])# AC_PROG_NM
7486
7487
7488
# AC_CHECK_LIBM
7489
# -------------
7490
# check for math library
7491
AC_DEFUN([AC_CHECK_LIBM],
7492
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7493
LIBM=
7494
case $host in
7495
*-*-beos* | *-*-cygwin* | *-*-pw32*)
7496
  # These system don't have libm
7497
  ;;
7498
*-ncr-sysv4.3*)
7499
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
7500
  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
7501
  ;;
7502
*)
7503
  AC_CHECK_LIB(m, main, LIBM="-lm")
7504
  ;;
7505
esac
7506
])# AC_CHECK_LIBM
7507
7508
7509
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
7510
# -----------------------------------
7511
# sets LIBLTDL to the link flags for the libltdl convenience library and
7512
# LTDLINCL to the include flags for the libltdl header and adds
7513
# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
7514
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
7515
# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
7516
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
7517
# '${top_srcdir}/' (note the single quotes!).  If your package is not
7518
# flat and you're not using automake, define top_builddir and
7519
# top_srcdir appropriately in the Makefiles.
7520
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
7521
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7522
  case $enable_ltdl_convenience in
7523
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
7524
  "") enable_ltdl_convenience=yes
7525
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
7526
  esac
7527
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
7528
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
7529
  # For backwards non-gettext consistent compatibility...
7530
  INCLTDL="$LTDLINCL"
7531
])# AC_LIBLTDL_CONVENIENCE
7532
7533
7534
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
7535
# -----------------------------------
7536
# sets LIBLTDL to the link flags for the libltdl installable library and
7537
# LTDLINCL to the include flags for the libltdl header and adds
7538
# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
7539
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
7540
# DIRECTORY is not provided and an installed libltdl is not found, it is
7541
# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
7542
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
7543
# quotes!).  If your package is not flat and you're not using automake,
7544
# define top_builddir and top_srcdir appropriately in the Makefiles.
7545
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
7546
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
7547
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7548
  AC_CHECK_LIB(ltdl, main,
7549
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
7550
  [if test x"$enable_ltdl_install" = xno; then
7551
     AC_MSG_WARN([libltdl not installed, but installation disabled])
7552
   else
7553
     enable_ltdl_install=yes
7554
   fi
7555
  ])
7556
  if test x"$enable_ltdl_install" = x"yes"; then
7557
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
7558
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
7559
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
7560
  else
7561
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
7562
    LIBLTDL="-lltdl"
7563
    LTDLINCL=
7564
  fi
7565
  # For backwards non-gettext consistent compatibility...
7566
  INCLTDL="$LTDLINCL"
7567
])# AC_LIBLTDL_INSTALLABLE
7568
7569
7570
# If this macro is not defined by Autoconf, define it here.
7571
ifdef([AC_PROVIDE_IFELSE],
7572
      [],
7573
      [define([AC_PROVIDE_IFELSE],
7574
	      [ifdef([AC_PROVIDE_$1],
7575
		     [$2], [$3])])])
7576
7577
7578
# AC_LIBTOOL_CXX
7579
# --------------
7580
# enable support for C++ libraries
7581
AC_DEFUN([AC_LIBTOOL_CXX],
7582
[AC_REQUIRE([_LT_AC_LANG_CXX])
7583
])# AC_LIBTOOL_CXX
7584
7585
7586
# _LT_AC_LANG_CXX
7587
# ---------------
7588
AC_DEFUN([_LT_AC_LANG_CXX],
7589
[AC_REQUIRE([AC_PROG_CXX])
7590
AC_REQUIRE([AC_PROG_CXXCPP])
7591
])# _LT_AC_LANG_CXX
7592
7593
7594
# AC_LIBTOOL_GCJ
7595
# --------------
7596
# enable support for GCJ libraries
7597
AC_DEFUN([AC_LIBTOOL_GCJ],
7598
[AC_REQUIRE([_LT_AC_LANG_GCJ])
7599
])# AC_LIBTOOL_GCJ
7600
7601
7602
# _LT_AC_LANG_GCJ
7603
# ---------------
7604
AC_DEFUN([_LT_AC_LANG_GCJ],
7605
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
7606
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
7607
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
7608
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
7609
	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
7610
	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
7611
])# _LT_AC_LANG_GCJ
7612
7613
7614
# AC_LIBTOOL_RC
7615
# --------------
7616
# enable support for Windows resource files
7617
AC_DEFUN([AC_LIBTOOL_RC],
7618
[AC_REQUIRE([AC_PROG_RC])
7619
])# AC_LIBTOOL_RC
7620
7621
7622
# AC_LIBTOOL_LANG_C_CONFIG
7623
# ------------------------
7624
# Ensure that the configuration vars for the C compiler are
7625
# suitably defined.  Those variables are subsequently used by
7626
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
7627
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
7628
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
7629
[lt_save_CC="$CC"
7630
AC_LANG_PUSH(C)
7631
7632
# Source file extension for C test sources.
7633
ac_ext=c
7634
7635
# Object file extension for compiled C test sources.
7636
objext=o
7637
_LT_AC_TAGVAR(objext, $1)=$objext
7638
7639
# Code to be used in simple compile tests
7640
lt_simple_compile_test_code="int some_variable = 0;"
7641
7642
# Code to be used in simple link tests
7643
lt_simple_link_test_code='main(){return(0);}'
7644
7645
_LT_AC_SYS_COMPILER
7646
7647
#
7648
# Check for any special shared library compilation flags.
7649
#
7650
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
7651
if test "$GCC" = no; then
7652
  case $host_os in
7653
  sco3.2v5*)
7654
    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
7655
    ;;
7656
  esac
7657
fi
7658
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
7659
  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
7660
  if echo "$old_CC $old_CFLAGS " | egrep -e "[[ 	]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ 	]]" >/dev/null; then :
7661
  else
7662
    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
7663
    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
7664
  fi
7665
fi
7666
7667
7668
#
7669
# Check to make sure the static flag actually works.
7670
#
7671
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
7672
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
7673
  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
7674
  [],
7675
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
7676
7677
7678
## CAVEAT EMPTOR:
7679
## There is no encapsulation within the following macros, do not change
7680
## the running order or otherwise move them around unless you know exactly
7681
## what you are doing...
7682
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
7683
AC_LIBTOOL_PROG_COMPILER_PIC($1)
7684
AC_LIBTOOL_PROG_CC_C_O($1)
7685
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
7686
AC_LIBTOOL_PROG_LD_SHLIBS($1)
7687
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
7688
AC_LIBTOOL_SYS_LIB_STRIP
7689
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
7690
AC_LIBTOOL_DLOPEN_SELF($1)
7691
7692
# Report which librarie types wil actually be built
7693
AC_MSG_CHECKING([if libtool supports shared libraries])
7694
AC_MSG_RESULT([$can_build_shared])
7695
7696
AC_MSG_CHECKING([whether to build shared libraries])
7697
test "$can_build_shared" = "no" && enable_shared=no
7698
7699
# On AIX, shared libraries and static libraries use the same namespace, and
7700
# are all built from PIC.
7701
case "$host_os" in
7702
aix3*)
7703
  test "$enable_shared" = yes && enable_static=no
7704
  if test -n "$RANLIB"; then
7705
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
7706
    postinstall_cmds='$RANLIB $lib'
7707
  fi
7708
  ;;
7709
7710
aix4*)
7711
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7712
    test "$enable_shared" = yes && enable_static=no
7713
  fi
7714
  ;;
7715
esac
7716
AC_MSG_RESULT([$enable_shared])
7717
7718
AC_MSG_CHECKING([whether to build static libraries])
7719
# Make sure either enable_shared or enable_static is yes.
7720
test "$enable_shared" = yes || enable_static=yes
7721
AC_MSG_RESULT([$enable_static])
7722
7723
AC_LIBTOOL_CONFIG($1)
7724
7725
AC_LANG_POP
7726
CC="$lt_save_CC"
7727
])# AC_LIBTOOL_LANG_C_CONFIG
7728
7729
7730
# AC_LIBTOOL_LANG_CXX_CONFIG
7731
# --------------------------
7732
# Ensure that the configuration vars for the C compiler are
7733
# suitably defined.  Those variables are subsequently used by
7734
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
7735
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
7736
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
7737
[AC_LANG_PUSH(C++)
7738
AC_REQUIRE([AC_PROG_CXX])
7739
AC_REQUIRE([AC_PROG_CXXCPP])
7740
7741
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7742
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
7743
_LT_AC_TAGVAR(always_export_symbols, $1)=no
7744
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
7745
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7746
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7747
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7748
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7749
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7750
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
7751
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7752
_LT_AC_TAGVAR(no_undefined_flag, $1)=
7753
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7754
7755
# Dependencies to place before and after the object being linked:
7756
_LT_AC_TAGVAR(predep_objects, $1)=
7757
_LT_AC_TAGVAR(postdep_objects, $1)=
7758
_LT_AC_TAGVAR(predeps, $1)=
7759
_LT_AC_TAGVAR(postdeps, $1)=
7760
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
7761
7762
# Source file extension for C test sources.
7763
ac_ext=cc
7764
7765
# Object file extension for compiled C test sources.
7766
objext=o
7767
_LT_AC_TAGVAR(objext, $1)=$objext
7768
7769
# Code to be used in simple compile tests
7770
lt_simple_compile_test_code="int some_variable = 0;"
7771
7772
# Code to be used in simple link tests
7773
lt_simple_link_test_code='int main(int char *[]) { return(0); }'
7774
7775
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7776
_LT_AC_SYS_COMPILER
7777
7778
# Allow CC to be a program name with arguments.
7779
lt_save_CC="$CC"
7780
CC=${CXX-"c++"}
7781
set dummy $CC
7782
compiler="[$]2"
7783
_LT_AC_TAGVAR(compiler, $1)=$CC
7784
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
7785
7786
# We don't want -fno-exception wen compiling C++ code, so set the
7787
# no_builtin_flag separately
7788
if test "$GXX" = yes; then
7789
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7790
else
7791
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7792
fi
7793
7794
if test "$GXX" = yes; then
7795
  # Set up default GNU C++ configuration
7796
7797
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
7798
  # archiving commands below assume that GNU ld is being used.
7799
  if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
7800
      egrep 'GNU ld' > /dev/null; then
7801
    with_gnu_ld=yes
7802
7803
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7804
    _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'
7805
7806
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7807
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7808
7809
    # If archive_cmds runs LD, not CC, wlarc should be empty
7810
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7811
    #     investigate it a little bit more. (MM)
7812
    wlarc='${wl}'
7813
7814
    # ancient GNU ld didn't support --whole-archive et. al.
7815
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
7816
	egrep 'no-whole-archive' > /dev/null; then
7817
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7818
    else
7819
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7820
    fi
7821
  else
7822
    with_gnu_ld=no
7823
    wlarc=
7824
7825
    # A generic and very simple default shared library creation
7826
    # command for GNU C++ for the case where it uses the native
7827
    # linker, instead of GNU ld.  If possible, this setting should
7828
    # overridden to take advantage of the native linker features on
7829
    # the platform it is being used on.
7830
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7831
  fi
7832
7833
  # Commands to make compiler produce verbose output that lists
7834
  # what "hidden" libraries, object files and flags are used when
7835
  # linking a shared library.
7836
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
7837
7838
else
7839
  GXX=no
7840
  with_gnu_ld=no
7841
  wlarc=
7842
fi
7843
7844
# PORTME: fill in a description of your system's C++ link characteristics
7845
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7846
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
7847
case $host_os in
7848
  aix3*)
7849
    # FIXME: insert proper C++ library support
7850
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
7851
    ;;
7852
  aix4* | aix5*)
7853
    if test "$host_cpu" = ia64; then
7854
      # On IA64, the linker does run time linking by default, so we don't
7855
      # have to do anything special.
7856
      aix_use_runtimelinking=no
7857
      exp_sym_flag='-Bexport'
7858
      no_entry_flag=""
7859
    else
7860
      # KDE requires run time linking.  Make it the default.
7861
      aix_use_runtimelinking=yes
7862
      exp_sym_flag='-bexport'
7863
      no_entry_flag='-bnoentry'
7864
    fi
7865
7866
    # When large executables or shared objects are built, AIX ld can
7867
    # have problems creating the table of contents.  If linking a library
7868
    # or program results in "error TOC overflow" add -mminimal-toc to
7869
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7870
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7871
7872
    _LT_AC_TAGVAR(archive_cmds, $1)=''
7873
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7874
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7875
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7876
7877
    if test "$GXX" = yes; then
7878
      case $host_os in aix4.[012]|aix4.[012].*)
7879
      # We only want to do this on AIX 4.2 and lower, the check
7880
      # below for broken collect2 doesn't work under 4.3+
7881
	collect2name=`${CC} -print-prog-name=collect2`
7882
	if test -f "$collect2name" && \
7883
	   strings "$collect2name" | grep resolve_lib_name >/dev/null
7884
	then
7885
	  # We have reworked collect2
7886
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7887
	else
7888
	  # We have old collect2
7889
	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7890
	  # It fails to find uninstalled libraries when the uninstalled
7891
	  # path is not listed in the libpath.  Setting hardcode_minus_L
7892
	  # to unsupported forces relinking
7893
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7894
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7895
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7896
	fi
7897
      esac
7898
      shared_flag='-shared'
7899
    else
7900
      # not using gcc
7901
      if test "$host_cpu" = ia64; then
7902
	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7903
	# chokes on -Wl,-G. The following line is correct:
7904
	shared_flag='-G'
7905
      else
7906
	if test "$aix_use_runtimelinking" = yes; then
7907
	  shared_flag='-qmkshrobj ${wl}-G'
7908
	else
7909
	  shared_flag='-qmkshrobj'
7910
	fi
7911
      fi
7912
    fi
7913
7914
    # Let the compiler handle the export list.
7915
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
7916
    if test "$aix_use_runtimelinking" = yes; then
7917
      # Warning - without using the other runtime loading flags (-brtl),
7918
      # -berok will link without error, but may produce a broken library.
7919
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
7920
      # Determine the default libpath from the value encoded in an empty executable.
7921
      _LT_AC_SYS_LIBPATH_AIX
7922
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7923
7924
      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
7925
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7926
     else
7927
      if test "$host_cpu" = ia64; then
7928
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7929
	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7930
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
7931
      else
7932
	# Determine the default libpath from the value encoded in an empty executable.
7933
	_LT_AC_SYS_LIBPATH_AIX
7934
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7935
	# Warning - without using the other run time loading flags,
7936
	# -berok will link without error, but may produce a broken library.
7937
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7938
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7939
	# -bexpall does not export symbols beginning with underscore (_)
7940
	_LT_AC_TAGVAR(always_export_symbols, $1)=yes
7941
	# Exported symbols can be pulled into shared objects from archives
7942
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
7943
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7944
	# This is similar to how AIX traditionally builds it's shared libraries.
7945
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7946
      fi
7947
    fi
7948
    ;;
7949
  chorus*)
7950
    case $cc_basename in
7951
      *)
7952
	# FIXME: insert proper C++ library support
7953
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7954
	;;
7955
    esac
7956
    ;;
7957
  dgux*)
7958
    case $cc_basename in
7959
      ec++)
7960
	# FIXME: insert proper C++ library support
7961
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7962
	;;
7963
      ghcx)
7964
	# Green Hills C++ Compiler
7965
	# FIXME: insert proper C++ library support
7966
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7967
	;;
7968
      *)
7969
	# FIXME: insert proper C++ library support
7970
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7971
	;;
7972
    esac
7973
    ;;
7974
  freebsd[12]*)
7975
    # C++ shared libraries reported to be fairly broken before switch to ELF
7976
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
7977
    ;;
7978
  freebsd-elf*)
7979
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7980
    ;;
7981
  freebsd*)
7982
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7983
    # conventions
7984
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7985
    ;;
7986
  gnu*)
7987
    ;;
7988
  hpux*)
7989
    if test $with_gnu_ld = no; then
7990
      if test "$host_cpu" = ia64; then
7991
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7992
      else
7993
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7994
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7995
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7996
      fi
7997
    fi
7998
    if test "$host_cpu" = ia64; then
7999
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
8000
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8001
    else
8002
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8003
    fi
8004
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8005
					    # but as the default
8006
					    # location of the library.
8007
8008
    case $cc_basename in
8009
      CC)
8010
	# FIXME: insert proper C++ library support
8011
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8012
	;;
8013
      aCC)
8014
	case $host_os in
8015
	hpux9*)
8016
	  _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'
8017
	  ;;
8018
	*)
8019
	  if test "$host_cpu" = ia64; then
8020
	    _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8021
	  else
8022
	    _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'
8023
	  fi
8024
	  ;;
8025
	esac
8026
	# Commands to make compiler produce verbose output that lists
8027
	# what "hidden" libraries, object files and flags are used when
8028
	# linking a shared library.
8029
	#
8030
	# There doesn't appear to be a way to prevent this compiler from
8031
	# explicitly linking system object files so we need to strip them
8032
	# from the output so that they don't get included in the library
8033
	# dependencies.
8034
	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
8035
	;;
8036
      *)
8037
	if test "$GXX" = yes; then
8038
	  if test $with_gnu_ld = no; then
8039
	    case $host_os in
8040
	    hpux9*)
8041
	      _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'
8042
	      ;;
8043
	    *)
8044
	      if test "$host_cpu" = ia64; then
8045
		_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8046
	      else
8047
		_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'
8048
	      fi
8049
	      ;;
8050
	    esac
8051
	  fi
8052
	else
8053
	  # FIXME: insert proper C++ library support
8054
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
8055
	fi
8056
	;;
8057
    esac
8058
    ;;
8059
  irix5* | irix6*)
8060
    case $cc_basename in
8061
      CC)
8062
	# SGI C++
8063
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8064
8065
	# Archives containing C++ object files must be created using
8066
	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
8067
	# necessary to make sure instantiated templates are included
8068
	# in the archive.
8069
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8070
	;;
8071
      *)
8072
	if test "$GXX" = yes; then
8073
	  if test "$with_gnu_ld" = no; then
8074
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8075
	  else
8076
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
8077
	  fi
8078
	fi
8079
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8080
	;;
8081
    esac
8082
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8083
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8084
    ;;
8085
  linux*)
8086
    case $cc_basename in
8087
      KCC)
8088
	# Kuck and Associates, Inc. (KAI) C++ Compiler
8089
8090
	# KCC will only create a shared library if the output file
8091
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
8092
	# to its proper name (with version) after linking.
8093
	_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
8094
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
8095
8096
	# Commands to make compiler produce verbose output that lists
8097
	# what "hidden" libraries, object files and flags are used when
8098
	# linking a shared library.
8099
	#
8100
	# There doesn't appear to be a way to prevent this compiler from
8101
	# explicitly linking system object files so we need to strip them
8102
	# from the output so that they don't get included in the library
8103
	# dependencies.
8104
	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
8105
8106
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
8107
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8108
8109
	# Archives containing C++ object files must be created using
8110
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
8111
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8112
	;;
8113
      cxx)
8114
	# Compaq C++
8115
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8116
	_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'
8117
8118
	runpath_var=LD_RUN_PATH
8119
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8120
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8121
8122
	# Commands to make compiler produce verbose output that lists
8123
	# what "hidden" libraries, object files and flags are used when
8124
	# linking a shared library.
8125
	#
8126
	# There doesn't appear to be a way to prevent this compiler from
8127
	# explicitly linking system object files so we need to strip them
8128
	# from the output so that they don't get included in the library
8129
	# dependencies.
8130
	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'
8131
	;;
8132
    esac
8133
    ;;
8134
  lynxos*)
8135
    # FIXME: insert proper C++ library support
8136
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8137
    ;;
8138
  m88k*)
8139
    # FIXME: insert proper C++ library support
8140
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8141
    ;;
8142
  mvs*)
8143
    case $cc_basename in
8144
      cxx)
8145
	# FIXME: insert proper C++ library support
8146
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8147
	;;
8148
      *)
8149
	# FIXME: insert proper C++ library support
8150
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8151
	;;
8152
    esac
8153
    ;;
8154
  netbsd*)
8155
    # NetBSD uses g++ - do we need to do anything?
8156
    ;;
8157
  osf3*)
8158
    case $cc_basename in
8159
      KCC)
8160
	# Kuck and Associates, Inc. (KAI) C++ Compiler
8161
8162
	# KCC will only create a shared library if the output file
8163
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
8164
	# to its proper name (with version) after linking.
8165
	_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
8166
8167
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8168
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8169
8170
	# Archives containing C++ object files must be created using
8171
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
8172
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8173
8174
	;;
8175
      RCC)
8176
	# Rational C++ 2.4.1
8177
	# FIXME: insert proper C++ library support
8178
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8179
	;;
8180
      cxx)
8181
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8182
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8183
8184
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8185
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8186
8187
	# Commands to make compiler produce verbose output that lists
8188
	# what "hidden" libraries, object files and flags are used when
8189
	# linking a shared library.
8190
	#
8191
	# There doesn't appear to be a way to prevent this compiler from
8192
	# explicitly linking system object files so we need to strip them
8193
	# from the output so that they don't get included in the library
8194
	# dependencies.
8195
	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'
8196
	;;
8197
      *)
8198
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8199
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8200
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8201
8202
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8203
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8204
8205
	  # Commands to make compiler produce verbose output that lists
8206
	  # what "hidden" libraries, object files and flags are used when
8207
	  # linking a shared library.
8208
	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
8209
8210
	else
8211
	  # FIXME: insert proper C++ library support
8212
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
8213
	fi
8214
	;;
8215
    esac
8216
    ;;
8217
  osf4* | osf5*)
8218
    case $cc_basename in
8219
      KCC)
8220
	# Kuck and Associates, Inc. (KAI) C++ Compiler
8221
8222
	# KCC will only create a shared library if the output file
8223
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
8224
	# to its proper name (with version) after linking.
8225
	_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
8226
8227
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8228
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8229
8230
	# Archives containing C++ object files must be created using
8231
	# the KAI C++ compiler.
8232
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
8233
	;;
8234
      RCC)
8235
	# Rational C++ 2.4.1
8236
	# FIXME: insert proper C++ library support
8237
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8238
	;;
8239
      cxx)
8240
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8241
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8242
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
8243
	  echo "-hidden">> $lib.exp~
8244
	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry $objdir/so_locations -o $lib~
8245
	  $rm $lib.exp'
8246
8247
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8248
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8249
8250
	# Commands to make compiler produce verbose output that lists
8251
	# what "hidden" libraries, object files and flags are used when
8252
	# linking a shared library.
8253
	#
8254
	# There doesn't appear to be a way to prevent this compiler from
8255
	# explicitly linking system object files so we need to strip them
8256
	# from the output so that they don't get included in the library
8257
	# dependencies.
8258
	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'
8259
	;;
8260
      *)
8261
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8262
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8263
	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8264
8265
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8266
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8267
8268
	  # Commands to make compiler produce verbose output that lists
8269
	  # what "hidden" libraries, object files and flags are used when
8270
	  # linking a shared library.
8271
	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
8272
8273
	else
8274
	  # FIXME: insert proper C++ library support
8275
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
8276
	fi
8277
	;;
8278
    esac
8279
    ;;
8280
  psos*)
8281
    # FIXME: insert proper C++ library support
8282
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8283
    ;;
8284
  sco*)
8285
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8286
    case $cc_basename in
8287
      CC)
8288
	# FIXME: insert proper C++ library support
8289
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8290
	;;
8291
      *)
8292
	# FIXME: insert proper C++ library support
8293
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8294
	;;
8295
    esac
8296
    ;;
8297
  sunos4*)
8298
    case $cc_basename in
8299
      CC)
8300
	# Sun C++ 4.x
8301
	# FIXME: insert proper C++ library support
8302
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8303
	;;
8304
      lcc)
8305
	# Lucid
8306
	# FIXME: insert proper C++ library support
8307
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8308
	;;
8309
      *)
8310
	# FIXME: insert proper C++ library support
8311
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8312
	;;
8313
    esac
8314
    ;;
8315
  solaris*)
8316
    case $cc_basename in
8317
      CC)
8318
	# Sun C++ 4.2, 5.x and Centerline C++
8319
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8320
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8321
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8322
	$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
8323
8324
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8325
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8326
	case $host_os in
8327
	  solaris2.[0-5] | solaris2.[0-5].*) ;;
8328
	  *)
8329
	    # The C++ compiler is used as linker so we must use $wl
8330
	    # flag to pass the commands to the underlying system
8331
	    # linker.
8332
	    # Supported since Solaris 2.6 (maybe 2.5.1?)
8333
	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8334
	    ;;
8335
	esac
8336
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8337
8338
	# Commands to make compiler produce verbose output that lists
8339
	# what "hidden" libraries, object files and flags are used when
8340
	# linking a shared library.
8341
	#
8342
	# There doesn't appear to be a way to prevent this compiler from
8343
	# explicitly linking system object files so we need to strip them
8344
	# from the output so that they don't get included in the library
8345
	# dependencies.
8346
	output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
8347
8348
	# Archives containing C++ object files must be created using
8349
	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
8350
	# necessary to make sure instantiated templates are included
8351
	# in the archive.
8352
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8353
	;;
8354
      gcx)
8355
	# Green Hills C++ Compiler
8356
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8357
8358
	# The C++ compiler must be used to create the archive.
8359
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8360
	;;
8361
      *)
8362
	# GNU C++ compiler with Solaris linker
8363
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8364
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8365
	  if $CC --version | egrep -v '^2\.7' > /dev/null; then
8366
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
8367
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8368
		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
8369
8370
	    # Commands to make compiler produce verbose output that lists
8371
	    # what "hidden" libraries, object files and flags are used when
8372
	    # linking a shared library.
8373
	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
8374
	  else
8375
	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
8376
	    # platform.
8377
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
8378
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8379
		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
8380
8381
	    # Commands to make compiler produce verbose output that lists
8382
	    # what "hidden" libraries, object files and flags are used when
8383
	    # linking a shared library.
8384
	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
8385
	  fi
8386
8387
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8388
	fi
8389
	;;
8390
    esac
8391
    ;;
8392
  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
8393
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8394
    ;;
8395
  tandem*)
8396
    case $cc_basename in
8397
      NCC)
8398
	# NonStop-UX NCC 3.20
8399
	# FIXME: insert proper C++ library support
8400
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8401
	;;
8402
      *)
8403
	# FIXME: insert proper C++ library support
8404
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
8405
	;;
8406
    esac
8407
    ;;
8408
  vxworks*)
8409
    # FIXME: insert proper C++ library support
8410
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8411
    ;;
8412
  *)
8413
    # FIXME: insert proper C++ library support
8414
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
8415
    ;;
8416
esac
8417
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
8418
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8419
8420
# Figure out "hidden" C++ library dependencies from verbose
8421
# compiler output whening linking a shared library.
8422
cat > conftest.$ac_ext <<EOF
8423
class Foo
8424
{
8425
public:
8426
  Foo (void) { a = 0; }
8427
private:
8428
  int a;
8429
};
8430
EOF
8431
8432
8433
if AC_TRY_EVAL(ac_compile); then
8434
  # Parse the compiler output and extract the necessary
8435
  # objects, libraries and library flags.
8436
8437
  # Sentinel used to keep track of whether or not we are before
8438
  # the conftest object file.
8439
  pre_test_object_deps_done=no
8440
8441
  # The `*' in the case matches for architectures that use `case' in
8442
  # $output_verbose_cmd can trigger glob expansion during the loop
8443
  # eval without this substitution.
8444
  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
8445
8446
  for p in `eval $output_verbose_link_cmd`; do
8447
    case $p in
8448
8449
    -L* | -R* | -l*)
8450
       # Some compilers place space between "-{L,R}" and the path.
8451
       # Remove the space.
8452
       if test $p = "-L" \
8453
	  || test $p = "-R"; then
8454
	 prev=$p
8455
	 continue
8456
       else
8457
	 prev=
8458
       fi
8459
8460
       if test "$pre_test_object_deps_done" = no; then
8461
	 case $p in
8462
	 -L* | -R*)
8463
	   # Internal compiler library paths should come after those
8464
	   # provided the user.  The postdeps already come after the
8465
	   # user supplied libs so there is no need to process them.
8466
	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
8467
	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8468
	   else
8469
	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8470
	   fi
8471
	   ;;
8472
	 # The "-l" case would never come before the object being
8473
	 # linked, so don't bother handling this case.
8474
	 esac
8475
       else
8476
	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
8477
	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
8478
	 else
8479
	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
8480
	 fi
8481
       fi
8482
       ;;
8483
8484
    *.$objext|*.$libext)
8485
       # This assumes that the test object file only shows up
8486
       # once in the compiler output.
8487
       if test "$p" = "conftest.$objext"; then
8488
	 pre_test_object_deps_done=yes
8489
	 continue
8490
       fi
8491
8492
       if test "$pre_test_object_deps_done" = no; then
8493
	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
8494
	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
8495
	 else
8496
	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
8497
	 fi
8498
       else
8499
	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
8500
	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
8501
	 else
8502
	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
8503
	 fi
8504
       fi
8505
       ;;
8506
8507
    *) ;; # Ignore the rest.
8508
8509
    esac
8510
  done
8511
8512
  # Clean up.
8513
  rm -f a.out
8514
else
8515
  echo "libtool.m4: error: problem compiling C++ test program"
8516
fi
8517
8518
$rm -f confest.$objext
8519
8520
case " $_LT_AC_TAGVAR(postdeps, $1) " in
8521
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8522
*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
8523
esac
8524
8525
_LT_AC_TAGVAR(GCC, $1)="$GXX"
8526
_LT_AC_TAGVAR(LD, $1)="$LD"
8527
8528
## CAVEAT EMPTOR:
8529
## There is no encapsulation within the following macros, do not change
8530
## the running order or otherwise move them around unless you know exactly
8531
## what you are doing...
8532
AC_LIBTOOL_PROG_COMPILER_PIC($1)
8533
AC_LIBTOOL_PROG_CC_C_O($1)
8534
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8535
AC_LIBTOOL_PROG_LD_SHLIBS($1)
8536
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8537
AC_LIBTOOL_SYS_LIB_STRIP
8538
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8539
AC_LIBTOOL_DLOPEN_SELF($1)
8540
8541
AC_LIBTOOL_CONFIG($1)
8542
8543
AC_LANG_POP
8544
CC="$lt_save_CC"
8545
])# AC_LIBTOOL_LANG_CXX_CONFIG
8546
8547
8548
# AC_LIBTOOL_LANG_GCJ_CONFIG
8549
# --------------------------
8550
# Ensure that the configuration vars for the C compiler are
8551
# suitably defined.  Those variables are subsequently used by
8552
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8553
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
8554
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
8555
[AC_LANG_SAVE
8556
8557
# Source file extension for C test sources.
8558
ac_ext=java
8559
8560
# Object file extension for compiled C test sources.
8561
objext=o
8562
_LT_AC_TAGVAR(objext, $1)=$objext
8563
8564
# Code to be used in simple compile tests
8565
lt_simple_compile_test_code="class foo {}"
8566
8567
# Code to be used in simple link tests
8568
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
8569
8570
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8571
_LT_AC_SYS_COMPILER
8572
8573
# Allow CC to be a program name with arguments.
8574
lt_save_CC="$CC"
8575
CC=${GCJ-"gcj"}
8576
set dummy $CC
8577
compiler="[$]2"
8578
_LT_AC_TAGVAR(compiler, $1)=$CC
8579
8580
# GCJ did not exist at the time GCC didn't implicitly link libc in.
8581
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8582
8583
## CAVEAT EMPTOR:
8584
## There is no encapsulation within the following macros, do not change
8585
## the running order or otherwise move them around unless you know exactly
8586
## what you are doing...
8587
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
8588
AC_LIBTOOL_PROG_COMPILER_PIC($1)
8589
AC_LIBTOOL_PROG_CC_C_O($1)
8590
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8591
AC_LIBTOOL_PROG_LD_SHLIBS($1)
8592
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8593
AC_LIBTOOL_SYS_LIB_STRIP
8594
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8595
AC_LIBTOOL_DLOPEN_SELF($1)
8596
8597
AC_LIBTOOL_CONFIG($1)
8598
8599
AC_LANG_RESTORE
8600
CC="$lt_save_CC"
8601
])# AC_LIBTOOL_LANG_GCJ_CONFIG
8602
8603
8604
# AC_LIBTOOL_LANG_RC_CONFIG
8605
# --------------------------
8606
# Ensure that the configuration vars for the Windows resource compiler are
8607
# suitably defined.  Those variables are subsequently used by
8608
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8609
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
8610
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
8611
[AC_LANG_SAVE
8612
8613
# Source file extension for RC test sources.
8614
ac_ext=rc
8615
8616
# Object file extension for compiled RC test sources.
8617
objext=o
8618
_LT_AC_TAGVAR(objext, $1)=$objext
8619
8620
# Code to be used in simple compile tests
8621
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8622
8623
# Code to be used in simple link tests
8624
lt_simple_link_test_code="$lt_simple_compile_test_code"
8625
8626
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8627
_LT_AC_SYS_COMPILER
8628
8629
# Allow CC to be a program name with arguments.
8630
lt_save_CC="$CC"
8631
CC=${RC-"windres"}
8632
set dummy $CC
8633
compiler="[$]2"
8634
_LT_AC_TAGVAR(compiler, $1)=$CC
8635
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8636
8637
AC_LIBTOOL_CONFIG($1)
8638
8639
AC_LANG_RESTORE
8640
CC="$lt_save_CC"
8641
])# AC_LIBTOOL_LANG_RC_CONFIG
8642
8643
8644
# AC_LIBTOOL_CONFIG([TAGNAME])
8645
# ----------------------------
8646
# If TAGNAME is not passed, then create an initial libtool script
8647
# with a default configuration from the untagged config vars.  Otherwise
8648
# add code to config.status for appending the configuration named by
8649
# TAGNAME from the matching tagged config vars.
8650
AC_DEFUN([AC_LIBTOOL_CONFIG],
8651
[# The else clause should only fire when bootstrapping the
8652
# libtool distribution, otherwise you forgot to ship ltmain.sh
8653
# with your package, and you will get complaints that there are
8654
# no rules to generate ltmain.sh.
8655
if test -f "$ltmain"; then
8656
  # Now quote all the things that may contain metacharacters while being
8657
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
8658
  # variables and quote the copies for generation of the libtool script.
8659
  for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
8660
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
8661
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
8662
    deplibs_check_method reload_flag reload_cmds need_locks \
8663
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
8664
    lt_cv_sys_global_symbol_to_c_name_address \
8665
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
8666
    old_postinstall_cmds old_postuninstall_cmds \
8667
    _LT_AC_TAGVAR(compiler, $1) \
8668
    _LT_AC_TAGVAR(CC, $1) \
8669
    _LT_AC_TAGVAR(LD, $1) \
8670
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
8671
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
8672
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
8673
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
8674
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
8675
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
8676
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
8677
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
8678
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
8679
    _LT_AC_TAGVAR(predep_objects, $1) \
8680
    _LT_AC_TAGVAR(postdep_objects, $1) \
8681
    _LT_AC_TAGVAR(predeps, $1) \
8682
    _LT_AC_TAGVAR(postdeps, $1) \
8683
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
8684
    _LT_AC_TAGVAR(archive_cmds, $1) \
8685
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
8686
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
8687
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
8688
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
8689
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
8690
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
8691
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
8692
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
8693
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
8694
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
8695
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
8696
    _LT_AC_TAGVAR(include_expsyms, $1); do
8697
8698
    case $var in
8699
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
8700
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
8701
    _LT_AC_TAGVAR(archive_cmds, $1) | \
8702
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
8703
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
8704
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
8705
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
8706
    postinstall_cmds | postuninstall_cmds | \
8707
    old_postinstall_cmds | old_postuninstall_cmds | \
8708
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
8709
      # Double-quote double-evaled strings.
8710
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
8711
      ;;
8712
    *)
8713
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
8714
      ;;
8715
    esac
8716
  done
8717
8718
  case $lt_echo in
8719
  *'\[$]0 --fallback-echo"')
8720
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
8721
    ;;
8722
  esac
8723
8724
ifelse([$1], [],
8725
  [cfgfile="${ofile}T"
8726
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
8727
  $rm -f "$cfgfile"
8728
  AC_MSG_NOTICE([creating $ofile])],
8729
  [cfgfile="$ofile"])
8730
8731
  cat <<__EOF__ >> "$cfgfile"
8732
ifelse([$1], [],
8733
[#! $SHELL
8734
8735
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
8736
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
8737
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
8738
#
8739
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
8740
# Free Software Foundation, Inc.
8741
#
8742
# This file is part of GNU Libtool:
8743
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
8744
#
8745
# This program is free software; you can redistribute it and/or modify
8746
# it under the terms of the GNU General Public License as published by
8747
# the Free Software Foundation; either version 2 of the License, or
8748
# (at your option) any later version.
8749
#
8750
# This program is distributed in the hope that it will be useful, but
8751
# WITHOUT ANY WARRANTY; without even the implied warranty of
8752
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8753
# General Public License for more details.
8754
#
8755
# You should have received a copy of the GNU General Public License
8756
# along with this program; if not, write to the Free Software
8757
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8758
#
8759
# As a special exception to the GNU General Public License, if you
8760
# distribute this file as part of a program that contains a
8761
# configuration script generated by Autoconf, you may include it under
8762
# the same distribution terms that you use for the rest of that program.
8763
8764
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
8765
Xsed="sed -e s/^X//"
8766
8767
# The HP-UX ksh and POSIX shell print the target directory to stdout
8768
# if CDPATH is set.
8769
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
8770
8771
# The names of the tagged configurations supported by this script.
8772
available_tags=
8773
8774
# ### BEGIN LIBTOOL CONFIG],
8775
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
8776
8777
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8778
8779
# Shell to use when invoking shell scripts.
8780
SHELL=$lt_SHELL
8781
8782
# Whether or not to build shared libraries.
8783
build_libtool_libs=$enable_shared
8784
8785
# Whether or not to build static libraries.
8786
build_old_libs=$enable_static
8787
8788
# Whether or not to add -lc for building shared libraries.
8789
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
8790
8791
# Whether or not to optimize for fast installation.
8792
fast_install=$enable_fast_install
8793
8794
# The host system.
8795
host_alias=$host_alias
8796
host=$host
8797
8798
# An echo program that does not interpret backslashes.
8799
echo=$lt_echo
8800
8801
# The archiver.
8802
AR=$lt_AR
8803
AR_FLAGS=$lt_AR_FLAGS
8804
8805
# A C compiler.
8806
LTCC=$lt_LTCC
8807
8808
# A language-specific compiler.
8809
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
8810
8811
# Is the compiler the GNU C compiler?
8812
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
8813
8814
# The linker used to build libraries.
8815
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
8816
8817
# Whether we need hard or soft links.
8818
LN_S=$lt_LN_S
8819
8820
# A BSD-compatible nm program.
8821
NM=$lt_NM
8822
8823
# A sed program that does not truncate output.
8824
SED=$lt_SED
8825
8826
# A symbol stripping program
8827
STRIP=$STRIP
8828
8829
# Used to examine libraries when file_magic_cmd begins "file"
8830
MAGIC_CMD=$MAGIC_CMD
8831
8832
# Used on cygwin: DLL creation program.
8833
DLLTOOL="$DLLTOOL"
8834
8835
# Used on cygwin: object dumper.
8836
OBJDUMP="$OBJDUMP"
8837
8838
# Used on cygwin: assembler.
8839
AS="$AS"
8840
8841
# The name of the directory that contains temporary libtool files.
8842
objdir=$objdir
8843
8844
# How to create reloadable object files.
8845
reload_flag=$lt_reload_flag
8846
reload_cmds=$lt_reload_cmds
8847
8848
# How to pass a linker flag through the compiler.
8849
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
8850
8851
# Object file suffix (normally "o").
8852
objext="$ac_objext"
8853
8854
# Old archive suffix (normally "a").
8855
libext="$libext"
8856
8857
# Executable file suffix (normally "").
8858
exeext="$exeext"
8859
8860
# Additional compiler flags for building library objects.
8861
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
8862
pic_mode=$pic_mode
8863
8864
# What is the maximum length of a command?
8865
max_cmd_len=$lt_cv_sys_max_cmd_len
8866
8867
# Does compiler simultaneously support -c and -o options?
8868
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
8869
8870
# Must we lock files when doing compilation ?
8871
need_locks=$lt_need_locks
8872
8873
# Do we need the lib prefix for modules?
8874
need_lib_prefix=$need_lib_prefix
8875
8876
# Do we need a version for libraries?
8877
need_version=$need_version
8878
8879
# Whether dlopen is supported.
8880
dlopen_support=$enable_dlopen
8881
8882
# Whether dlopen of programs is supported.
8883
dlopen_self=$enable_dlopen_self
8884
8885
# Whether dlopen of statically linked programs is supported.
8886
dlopen_self_static=$enable_dlopen_self_static
8887
8888
# Compiler flag to prevent dynamic linking.
8889
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
8890
8891
# Compiler flag to turn off builtin functions.
8892
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
8893
8894
# Compiler flag to allow reflexive dlopens.
8895
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
8896
8897
# Compiler flag to generate shared objects directly from archives.
8898
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
8899
8900
# Compiler flag to generate thread-safe objects.
8901
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
8902
8903
# Library versioning type.
8904
version_type=$version_type
8905
8906
# Format of library name prefix.
8907
libname_spec=$lt_libname_spec
8908
8909
# List of archive names.  First name is the real one, the rest are links.
8910
# The last name is the one that the linker finds with -lNAME.
8911
library_names_spec=$lt_library_names_spec
8912
8913
# The coded name of the library, if different from the real name.
8914
soname_spec=$lt_soname_spec
8915
8916
# Commands used to build and install an old-style archive.
8917
RANLIB=$lt_RANLIB
8918
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
8919
old_postinstall_cmds=$lt_old_postinstall_cmds
8920
old_postuninstall_cmds=$lt_old_postuninstall_cmds
8921
8922
# Create an old-style archive from a shared archive.
8923
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
8924
8925
# Create a temporary old-style archive to link instead of a shared archive.
8926
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
8927
8928
# Commands used to build and install a shared archive.
8929
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
8930
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
8931
postinstall_cmds=$lt_postinstall_cmds
8932
postuninstall_cmds=$lt_postuninstall_cmds
8933
8934
# Commands to strip libraries.
8935
old_striplib=$lt_old_striplib
8936
striplib=$lt_striplib
8937
8938
# Dependencies to place before the objects being linked to create a
8939
# shared library.
8940
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
8941
8942
# Dependencies to place after the objects being linked to create a
8943
# shared library.
8944
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
8945
8946
# Dependencies to place before the objects being linked to create a
8947
# shared library.
8948
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
8949
8950
# Dependencies to place after the objects being linked to create a
8951
# shared library.
8952
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
8953
8954
# The library search path used internally by the compiler when linking
8955
# a shared library.
8956
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
8957
8958
# Method to check whether dependent libraries are shared objects.
8959
deplibs_check_method=$lt_deplibs_check_method
8960
8961
# Command to use when deplibs_check_method == file_magic.
8962
file_magic_cmd=$lt_file_magic_cmd
8963
8964
# Flag that allows shared libraries with undefined symbols to be built.
8965
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
8966
8967
# Flag that forces no undefined symbols.
8968
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
8969
8970
# Commands used to finish a libtool library installation in a directory.
8971
finish_cmds=$lt_finish_cmds
8972
8973
# Same as above, but a single script fragment to be evaled but not shown.
8974
finish_eval=$lt_finish_eval
8975
8976
# Take the output of nm and produce a listing of raw symbols and C names.
8977
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
8978
8979
# Transform the output of nm in a proper C declaration
8980
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
8981
8982
# Transform the output of nm in a C name address pair
8983
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
8984
8985
# This is the shared library runtime path variable.
8986
runpath_var=$runpath_var
8987
8988
# This is the shared library path variable.
8989
shlibpath_var=$shlibpath_var
8990
8991
# Is shlibpath searched before the hard-coded library search path?
8992
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
8993
8994
# How to hardcode a shared library path into an executable.
8995
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
8996
8997
# Whether we should hardcode library paths into libraries.
8998
hardcode_into_libs=$hardcode_into_libs
8999
9000
# Flag to hardcode \$libdir into a binary during linking.
9001
# This must work even if \$libdir does not exist.
9002
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
9003
9004
# Whether we need a single -rpath flag with a separated argument.
9005
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
9006
9007
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
9008
# resulting binary.
9009
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
9010
9011
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
9012
# resulting binary.
9013
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
9014
9015
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
9016
# the resulting binary.
9017
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
9018
9019
# Variables whose values should be saved in libtool wrapper scripts and
9020
# restored at relink time.
9021
variables_saved_for_relink="$variables_saved_for_relink"
9022
9023
# Whether libtool must link a program against all its dependency libraries.
9024
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
9025
9026
# Compile-time system search path for libraries
9027
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
9028
9029
# Run-time system search path for libraries
9030
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
9031
9032
# Fix the shell variable \$srcfile for the compiler.
9033
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
9034
9035
# Set to yes if exported symbols are required.
9036
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
9037
9038
# The commands to list exported symbols.
9039
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
9040
9041
# The commands to extract the exported symbol list from a shared archive.
9042
extract_expsyms_cmds=$lt_extract_expsyms_cmds
9043
9044
# Symbols that should not be listed in the preloaded symbols.
9045
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
9046
9047
# Symbols that must always be exported.
9048
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
9049
9050
ifelse([$1],[],
9051
[# ### END LIBTOOL CONFIG],
9052
[# ### END LIBTOOL TAG CONFIG: $tagname])
9053
9054
__EOF__
9055
9056
ifelse([$1],[], [
9057
  case $host_os in
9058
  aix3*)
9059
    cat <<\EOF >> "$cfgfile"
9060
9061
# AIX sometimes has problems with the GCC collect2 program.  For some
9062
# reason, if we set the COLLECT_NAMES environment variable, the problems
9063
# vanish in a puff of smoke.
9064
if test "X${COLLECT_NAMES+set}" != Xset; then
9065
  COLLECT_NAMES=
9066
  export COLLECT_NAMES
9067
fi
9068
EOF
9069
    ;;
9070
9071
  cygwin* | mingw* | pw32* | os2*)
9072
    cat <<'EOF' >> "$cfgfile"
9073
    # This is a source program that is used to create dlls on Windows
9074
    # Don't remove nor modify the starting and closing comments
9075
    _LT_AC_FILE_LTDLL_C
9076
    # This is a source program that is used to create import libraries
9077
    # on Windows for dlls which lack them. Don't remove nor modify the
9078
    # starting and closing comments
9079
    _LT_AC_FILE_IMPGEN_C
9080
EOF
9081
    ;;
9082
  esac
9083
9084
  # We use sed instead of cat because bash on DJGPP gets confused if
9085
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
9086
  # text mode, it properly converts lines to CR/LF.  This bash problem
9087
  # is reportedly fixed, but why not run on old versions too?
9088
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
9089
9090
  mv -f "$cfgfile" "$ofile" || \
9091
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
9092
  chmod +x "$ofile"
9093
])
9094
else
9095
  # If there is no Makefile yet, we rely on a make rule to execute
9096
  # `config.status --recheck' to rerun these tests and create the
9097
  # libtool script then.
9098
  test -f Makefile && make "$ltmain"
9099
fi
9100
])# AC_LIBTOOL_CONFIG
9101
9102
9103
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
9104
# -------------------------------------------
9105
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
9106
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
9107
9108
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
9109
9110
if test "$GCC" = yes; then
9111
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
9112
9113
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
9114
    lt_cv_prog_compiler_rtti_exceptions,
9115
    [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
9116
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
9117
fi
9118
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
9119
9120
9121
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
9122
# ---------------------------------
9123
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
9124
[AC_REQUIRE([AC_CANONICAL_HOST])
9125
AC_REQUIRE([AC_PROG_NM])
9126
AC_REQUIRE([AC_OBJEXT])
9127
# Check for command to grab the raw symbol name followed by C symbol from nm.
9128
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
9129
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
9130
[
9131
# These are sane defaults that work on at least a few old systems.
9132
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
9133
9134
# Character class describing NM global symbol codes.
9135
symcode='[[BCDEGRST]]'
9136
9137
# Regexp to match symbols that can be accessed directly from C.
9138
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
9139
9140
# Transform the above into a raw symbol and a C symbol.
9141
symxfrm='\1 \2\3 \3'
9142
9143
# Transform an extracted symbol line into a proper C declaration
9144
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
9145
9146
# Transform an extracted symbol line into symbol name and symbol address
9147
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'"
9148
9149
# Define system-specific variables.
9150
case $host_os in
9151
aix*)
9152
  symcode='[[BCDT]]'
9153
  ;;
9154
cygwin* | mingw* | pw32*)
9155
  symcode='[[ABCDGISTW]]'
9156
  ;;
9157
hpux*) # Its linker distinguishes data from code symbols
9158
  if test "$host_cpu" = ia64; then
9159
    symcode='[[ABCDEGRST]]'
9160
  fi
9161
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
9162
  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'"
9163
  ;;
9164
irix* | nonstopux*)
9165
  symcode='[[BCDEGRST]]'
9166
  ;;
9167
solaris* | sysv5*)
9168
  symcode='[[BDT]]'
9169
  ;;
9170
sysv4)
9171
  symcode='[[DFNSTU]]'
9172
  ;;
9173
esac
9174
9175
# Handle CRLF in mingw tool chain
9176
opt_cr=
9177
case $host_os in
9178
mingw*)
9179
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
9180
  ;;
9181
esac
9182
9183
# If we're using GNU nm, then use its standard symbol codes.
9184
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
9185
  symcode='[[ABCDGISTW]]'
9186
fi
9187
9188
# Try without a prefix undercore, then with it.
9189
for ac_symprfx in "" "_"; do
9190
9191
  # Write the raw and C identifiers.
9192
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
9193
9194
  # Check to see that the pipe works correctly.
9195
  pipe_works=no
9196
9197
  rm -f conftest*
9198
  cat > conftest.$ac_ext <<EOF
9199
#ifdef __cplusplus
9200
extern "C" {
9201
#endif
9202
char nm_test_var;
9203
void nm_test_func(){}
9204
#ifdef __cplusplus
9205
}
9206
#endif
9207
int main(){nm_test_var='a';nm_test_func();return(0);}
9208
EOF
9209
9210
  if AC_TRY_EVAL(ac_compile); then
9211
    # Now try to grab the symbols.
9212
    nlist=conftest.nm
9213
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
9214
      # Try sorting and uniquifying the output.
9215
      if sort "$nlist" | uniq > "$nlist"T; then
9216
	mv -f "$nlist"T "$nlist"
9217
      else
9218
	rm -f "$nlist"T
9219
      fi
9220
9221
      # Make sure that we snagged all the symbols we need.
9222
      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
9223
	if egrep ' nm_test_func$' "$nlist" >/dev/null; then
9224
	  cat <<EOF > conftest.$ac_ext
9225
#ifdef __cplusplus
9226
extern "C" {
9227
#endif
9228
9229
EOF
9230
	  # Now generate the symbol file.
9231
	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
9232
9233
	  cat <<EOF >> conftest.$ac_ext
9234
#if defined (__STDC__) && __STDC__
9235
# define lt_ptr_t void *
9236
#else
9237
# define lt_ptr_t char *
9238
# define const
9239
#endif
9240
9241
/* The mapping between symbol names and symbols. */
9242
const struct {
9243
  const char *name;
9244
  lt_ptr_t address;
9245
}
9246
lt_preloaded_symbols[[]] =
9247
{
9248
EOF
9249
	  sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
9250
	  cat <<\EOF >> conftest.$ac_ext
9251
  {0, (lt_ptr_t) 0}
9252
};
9253
9254
#ifdef __cplusplus
9255
}
9256
#endif
9257
EOF
9258
	  # Now try linking the two files.
9259
	  mv conftest.$ac_objext conftstm.$ac_objext
9260
	  lt_save_LIBS="$LIBS"
9261
	  lt_save_CFLAGS="$CFLAGS"
9262
	  LIBS="conftstm.$ac_objext"
9263
	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
9264
	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
9265
	    pipe_works=yes
9266
	  fi
9267
	  LIBS="$lt_save_LIBS"
9268
	  CFLAGS="$lt_save_CFLAGS"
9269
	else
9270
	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
9271
	fi
9272
      else
9273
	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
9274
      fi
9275
    else
9276
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
9277
    fi
9278
  else
9279
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
9280
    cat conftest.$ac_ext >&5
9281
  fi
9282
  rm -f conftest* conftst*
9283
9284
  # Do not use the global_symbol_pipe unless it works.
9285
  if test "$pipe_works" = yes; then
9286
    break
9287
  else
9288
    lt_cv_sys_global_symbol_pipe=
9289
  fi
9290
done
9291
])
9292
if test -z "$lt_cv_sys_global_symbol_pipe"; then
9293
  lt_cv_sys_global_symbol_to_cdecl=
9294
fi
9295
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9296
  AC_MSG_RESULT(failed)
9297
else
9298
  AC_MSG_RESULT(ok)
9299
fi
9300
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
9301
9302
9303
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
9304
# ---------------------------------------
9305
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
9306
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
9307
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9308
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
9309
9310
AC_MSG_CHECKING([for $compiler option to produce PIC])
9311
 ifelse([$1],[CXX],[
9312
  # C++ specific cases for pic, static, wl, etc.
9313
  if test "$GXX" = yes; then
9314
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9315
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
9316
9317
    case $host_os in
9318
    aix*)
9319
      # All AIX code is PIC.
9320
      if test "$host_cpu" = ia64; then
9321
	# AIX 5 now supports IA64 processor
9322
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9323
      fi
9324
      ;;
9325
    amigaos*)
9326
      # FIXME: we need at least 68020 code to build shared libraries, but
9327
      # adding the `-m68020' flag to GCC prevents building anything better,
9328
      # like `-m68040'.
9329
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
9330
      ;;
9331
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
9332
      # PIC is the default for these OSes.
9333
      ;;
9334
    cygwin* | mingw* | os2*)
9335
      # This hack is so that the source file can tell whether it is being
9336
      # built for inclusion in a dll (and should export symbols for example).
9337
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9338
      ;;
9339
    darwin* | rhapsody*)
9340
      # PIC is the default on this platform
9341
      # Common symbols not allowed in MH_DYLIB files
9342
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
9343
      ;;
9344
    *djgpp*)
9345
      # DJGPP does not support shared libraries at all
9346
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9347
      ;;
9348
    sysv4*MP*)
9349
      if test -d /usr/nec; then
9350
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
9351
      fi
9352
      ;;
9353
    hpux*)
9354
      # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
9355
      if test "$host_cpu" != ia64; then
9356
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9357
      fi
9358
      ;;
9359
    *)
9360
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9361
      ;;
9362
    esac
9363
  else
9364
    case $host_os in
9365
      aix4* | aix5*)
9366
	# All AIX code is PIC.
9367
	if test "$host_cpu" = ia64; then
9368
	  # AIX 5 now supports IA64 processor
9369
	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9370
	else
9371
	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
9372
	fi
9373
	;;
9374
      chorus*)
9375
	case $cc_basename in
9376
	cxch68)
9377
	  # Green Hills C++ Compiler
9378
	  # _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"
9379
	  ;;
9380
	esac
9381
	;;
9382
      dgux*)
9383
	case $cc_basename in
9384
	  ec++)
9385
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9386
	    ;;
9387
	  ghcx)
9388
	    # Green Hills C++ Compiler
9389
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9390
	    ;;
9391
	  *)
9392
	    ;;
9393
	esac
9394
	;;
9395
      freebsd*)
9396
	# FreeBSD uses GNU C++
9397
	;;
9398
      hpux9* | hpux10* | hpux11*)
9399
	case $cc_basename in
9400
	  CC)
9401
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9402
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
9403
	    if test "$host_cpu" != ia64; then
9404
	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9405
	    fi
9406
	    ;;
9407
	  aCC)
9408
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9409
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
9410
	    if test "$host_cpu" != ia64; then
9411
	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9412
	    fi
9413
	    ;;
9414
	  *)
9415
	    ;;
9416
	esac
9417
	;;
9418
      irix5* | irix6* | nonstopux*)
9419
	case $cc_basename in
9420
	  CC)
9421
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9422
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9423
	    # CC pic flag -KPIC is the default.
9424
	    ;;
9425
	  *)
9426
	    ;;
9427
	esac
9428
	;;
9429
      linux*)
9430
	case $cc_basename in
9431
	  KCC)
9432
	    # KAI C++ Compiler
9433
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
9434
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9435
	    ;;
9436
	  cxx)
9437
	    # Compaq C++
9438
	    # Make sure the PIC flag is empty.  It appears that all Alpha
9439
	    # Linux and Compaq Tru64 Unix objects are PIC.
9440
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9441
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9442
	    ;;
9443
	  *)
9444
	    ;;
9445
	esac
9446
	;;
9447
      lynxos*)
9448
	;;
9449
      m88k*)
9450
	;;
9451
      mvs*)
9452
	case $cc_basename in
9453
	  cxx)
9454
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
9455
	    ;;
9456
	  *)
9457
	    ;;
9458
	esac
9459
	;;
9460
      netbsd*)
9461
	;;
9462
      osf3* | osf4* | osf5*)
9463
	case $cc_basename in
9464
	  KCC)
9465
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
9466
	    ;;
9467
	  RCC)
9468
	    # Rational C++ 2.4.1
9469
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9470
	    ;;
9471
	  cxx)
9472
	    # Digital/Compaq C++
9473
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9474
	    # Make sure the PIC flag is empty.  It appears that all Alpha
9475
	    # Linux and Compaq Tru64 Unix objects are PIC.
9476
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9477
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9478
	    ;;
9479
	  *)
9480
	    ;;
9481
	esac
9482
	;;
9483
      psos*)
9484
	;;
9485
      sco*)
9486
	case $cc_basename in
9487
	  CC)
9488
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9489
	    ;;
9490
	  *)
9491
	    ;;
9492
	esac
9493
	;;
9494
      solaris*)
9495
	case $cc_basename in
9496
	  CC)
9497
	    # Sun C++ 4.2, 5.x and Centerline C++
9498
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9499
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9500
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
9501
	    ;;
9502
	  gcx)
9503
	    # Green Hills C++ Compiler
9504
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
9505
	    ;;
9506
	  *)
9507
	    ;;
9508
	esac
9509
	;;
9510
      sunos4*)
9511
	case $cc_basename in
9512
	  CC)
9513
	    # Sun C++ 4.x
9514
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9515
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9516
	    ;;
9517
	  lcc)
9518
	    # Lucid
9519
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9520
	    ;;
9521
	  *)
9522
	    ;;
9523
	esac
9524
	;;
9525
      tandem*)
9526
	case $cc_basename in
9527
	  NCC)
9528
	    # NonStop-UX NCC 3.20
9529
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9530
	    ;;
9531
	  *)
9532
	    ;;
9533
	esac
9534
	;;
9535
      unixware*)
9536
	;;
9537
      vxworks*)
9538
	;;
9539
      *)
9540
	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
9541
	;;
9542
    esac
9543
  fi
9544
],
9545
[
9546
  if test "$GCC" = yes; then
9547
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9548
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
9549
9550
    case $host_os in
9551
      aix*)
9552
      # All AIX code is PIC.
9553
      if test "$host_cpu" = ia64; then
9554
	# AIX 5 now supports IA64 processor
9555
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9556
      fi
9557
      ;;
9558
9559
    amigaos*)
9560
      # FIXME: we need at least 68020 code to build shared libraries, but
9561
      # adding the `-m68020' flag to GCC prevents building anything better,
9562
      # like `-m68040'.
9563
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
9564
      ;;
9565
9566
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
9567
      # PIC is the default for these OSes.
9568
      ;;
9569
9570
    cygwin* | mingw* | pw32* | os2*)
9571
      # This hack is so that the source file can tell whether it is being
9572
      # built for inclusion in a dll (and should export symbols for example).
9573
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9574
      ;;
9575
9576
    darwin* | rhapsody*)
9577
      # PIC is the default on this platform
9578
      # Common symbols not allowed in MH_DYLIB files
9579
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
9580
      ;;
9581
9582
    msdosdjgpp*)
9583
      # Just because we use GCC doesn't mean we suddenly get shared libraries
9584
      # on systems that don't support them.
9585
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
9586
      enable_shared=no
9587
      ;;
9588
9589
    sysv4*MP*)
9590
      if test -d /usr/nec; then
9591
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
9592
      fi
9593
      ;;
9594
9595
    hpux*)
9596
      # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
9597
      if test "$host_cpu" != ia64; then
9598
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9599
      fi
9600
      ;;
9601
9602
    *)
9603
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9604
      ;;
9605
    esac
9606
  else
9607
    # PORTME Check for flag to pass linker flags through the system compiler.
9608
    case $host_os in
9609
    aix*)
9610
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9611
      if test "$host_cpu" = ia64; then
9612
	# AIX 5 now supports IA64 processor
9613
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9614
      else
9615
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
9616
      fi
9617
      ;;
9618
9619
    cygwin* | mingw* | pw32* | os2*)
9620
      # This hack is so that the source file can tell whether it is being
9621
      # built for inclusion in a dll (and should export symbols for example).
9622
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9623
      ;;
9624
9625
    hpux9* | hpux10* | hpux11*)
9626
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9627
      if test "$host_cpu" != ia64; then
9628
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9629
      fi
9630
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
9631
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
9632
      ;;
9633
9634
    irix5* | irix6* | nonstopux*)
9635
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9636
      # PIC (with -KPIC) is the default.
9637
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9638
      ;;
9639
9640
    newsos6)
9641
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9642
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9643
      ;;
9644
9645
    osf3* | osf4* | osf5*)
9646
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9647
      # All OSF/1 code is PIC.
9648
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9649
      ;;
9650
9651
    sco3.2v5*)
9652
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
9653
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
9654
      ;;
9655
9656
    solaris*)
9657
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9658
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9659
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9660
      ;;
9661
9662
    sunos4*)
9663
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
9664
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
9665
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9666
      ;;
9667
9668
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9669
      if test "x$host_vendor" = xsni; then
9670
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
9671
      else
9672
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9673
      fi
9674
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9675
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9676
      ;;
9677
9678
    sysv4*MP*)
9679
      if test -d /usr/nec ;then
9680
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
9681
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9682
      fi
9683
      ;;
9684
9685
    uts4*)
9686
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9687
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9688
      ;;
9689
9690
    *)
9691
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
9692
      ;;
9693
    esac
9694
  fi
9695
])
9696
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
9697
9698
#
9699
# Check to make sure the PIC flag actually works.
9700
#
9701
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
9702
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
9703
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
9704
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
9705
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
9706
     "" | " "*) ;;
9707
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
9708
     esac],
9709
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9710
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
9711
fi
9712
case "$host_os" in
9713
  # For platforms which do not support PIC, -DPIC is meaningless:
9714
  *djgpp*)
9715
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9716
    ;;
9717
  *)
9718
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
9719
    ;;
9720
esac
9721
])
9722
9723
9724
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
9725
# ------------------------------------
9726
# See if the linker supports building shared libraries.
9727
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
9728
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
9729
ifelse([$1],[CXX],[
9730
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
9731
  case $host_os in
9732
  aix4* | aix5*)
9733
    # If we're using GNU nm, then we don't want the "-C" option.
9734
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
9735
    if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
9736
      _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'
9737
    else
9738
      _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'
9739
    fi
9740
    ;;
9741
  cygwin* | mingw* | pw32*)
9742
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
9743
  ;;
9744
  *)
9745
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
9746
  ;;
9747
  esac
9748
],[
9749
  runpath_var=
9750
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
9751
9752
  _LT_AC_TAGVAR(archive_cmds, $1)=
9753
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
9754
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
9755
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
9756
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
9757
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
9758
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9759
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
9760
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
9761
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
9762
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
9763
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
9764
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
9765
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
9766
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
9767
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
9768
  # include_expsyms should be a list of space-separated symbols to be *always*
9769
  # included in the symbol list
9770
  _LT_AC_TAGVAR(include_expsyms, $1)=
9771
  # exclude_expsyms can be an egrep regular expression of symbols to exclude
9772
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
9773
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
9774
  # as well as any symbol that contains `d'.
9775
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
9776
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
9777
  # platforms (ab)use it in PIC code, but their linkers get confused if
9778
  # the symbol is explicitly referenced.  Since portable code cannot
9779
  # rely on this symbol name, it's probably fine to never include it in
9780
  # preloaded symbol tables.
9781
  extract_expsyms_cmds=
9782
9783
  case $host_os in
9784
  cygwin* | mingw* | pw32*)
9785
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
9786
    # When not using gcc, we currently assume that we are using
9787
    # Microsoft Visual C++.
9788
    if test "$GCC" != yes; then
9789
      with_gnu_ld=no
9790
    fi
9791
    ;;
9792
  openbsd*)
9793
    with_gnu_ld=no
9794
    ;;
9795
  esac
9796
9797
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
9798
  if test "$with_gnu_ld" = yes; then
9799
    # If archive_cmds runs LD, not CC, wlarc should be empty
9800
    wlarc='${wl}'
9801
9802
    # See if GNU ld supports shared libraries.
9803
    case $host_os in
9804
    aix3* | aix4* | aix5*)
9805
      # On AIX/PPC, the GNU linker is very broken
9806
      if test "$host_cpu" != ia64; then
9807
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9808
	cat <<EOF 1>&2
9809
9810
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
9811
*** to be unable to reliably create shared libraries on AIX.
9812
*** Therefore, libtool is disabling shared libraries support.  If you
9813
*** really care for shared libraries, you may want to modify your PATH
9814
*** so that a non-GNU linker is found, and then restart.
9815
9816
EOF
9817
      fi
9818
      ;;
9819
9820
    amigaos*)
9821
      _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)'
9822
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9823
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
9824
9825
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
9826
      # that the semantics of dynamic libraries on AmigaOS, at least up
9827
      # to version 4, is to share data among multiple programs linked
9828
      # with the same dynamic library.  Since this doesn't match the
9829
      # behavior of shared libraries on other platforms, we can't use
9830
      # them.
9831
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
9832
      ;;
9833
9834
    beos*)
9835
      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
9836
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
9837
	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9838
	# support --undefined.  This deserves some investigation.  FIXME
9839
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9840
      else
9841
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9842
      fi
9843
      ;;
9844
9845
    cygwin* | mingw* | pw32*)
9846
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
9847
      # no search path for DLLs.
9848
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9849
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
9850
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
9851
9852
      extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
9853
	sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
9854
	test -f $output_objdir/impgen.exe || (cd $output_objdir && \
9855
	if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
9856
	else $CC -o impgen impgen.c ; fi)~
9857
	$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
9858
9859
      _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
9860
9861
      # cygwin and mingw dlls have different entry points and sets of symbols
9862
      # to exclude.
9863
      # FIXME: what about values for MSVC?
9864
      dll_entry=__cygwin_dll_entry@12
9865
      dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
9866
      case $host_os in
9867
      mingw*)
9868
	# mingw values
9869
	dll_entry=_DllMainCRTStartup@12
9870
	dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
9871
	;;
9872
      esac
9873
9874
      # mingw and cygwin differ, and it's simplest to just exclude the union
9875
      # of the two symbol sets.
9876
      dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
9877
9878
      # recent cygwin and mingw systems supply a stub DllMain which the user
9879
      # can override, but on older systems we have to supply one (in ltdll.c)
9880
      if test "x$lt_cv_need_dllmain" = "xyes"; then
9881
	ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
9882
	ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
9883
  	test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
9884
      else
9885
	ltdll_obj=
9886
	ltdll_cmds=
9887
      fi
9888
9889
      # Extract the symbol export list from an `--export-all' def file,
9890
      # then regenerate the def file from the symbol export list, so that
9891
      # the compiled dll only exports the symbol export list.
9892
      # Be careful not to strip the DATA tag left by newer dlltools.
9893
      _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
9894
	$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
9895
	sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
9896
9897
      # If the export-symbols file already is a .def file (1st line
9898
      # is EXPORTS), use it as is.
9899
      # If DATA tags from a recent dlltool are present, honour them!
9900
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
9901
	  cp $export_symbols $output_objdir/$soname-def;
9902
	else
9903
	  echo EXPORTS > $output_objdir/$soname-def;
9904
	  _lt_hint=1;
9905
	  cat $export_symbols | while read symbol; do
9906
	   set dummy \$symbol;
9907
	   case \[$]# in
9908
	     2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
9909
	     *) echo "   \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
9910
	   esac;
9911
	   _lt_hint=`expr 1 + \$_lt_hint`;
9912
	  done;
9913
	fi~
9914
	'"$ltdll_cmds"'
9915
	$CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
9916
	$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
9917
	$CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
9918
	$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
9919
	$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
9920
      ;;
9921
9922
    netbsd*)
9923
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9924
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9925
	wlarc=
9926
      else
9927
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9928
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9929
      fi
9930
      ;;
9931
9932
    solaris* | sysv5*)
9933
      if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
9934
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9935
	cat <<EOF 1>&2
9936
9937
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
9938
*** create shared libraries on Solaris systems.  Therefore, libtool
9939
*** is disabling shared libraries support.  We urge you to upgrade GNU
9940
*** binutils to release 2.9.1 or newer.  Another option is to modify
9941
*** your PATH or compiler configuration so that the native linker is
9942
*** used, and then restart.
9943
9944
EOF
9945
      elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
9946
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9947
	_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'
9948
      else
9949
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9950
      fi
9951
      ;;
9952
9953
    sunos4*)
9954
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9955
      wlarc=
9956
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
9957
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9958
      ;;
9959
9960
    *)
9961
      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
9962
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9963
	_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'
9964
      else
9965
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
9966
      fi
9967
      ;;
9968
    esac
9969
9970
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
9971
      runpath_var=LD_RUN_PATH
9972
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
9973
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
9974
      case $host_os in
9975
      cygwin* | mingw* | pw32*)
9976
	# dlltool doesn't understand --whole-archive et. al.
9977
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9978
	;;
9979
      *)
9980
	# ancient GNU ld didn't support --whole-archive et. al.
9981
	if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
9982
  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9983
	else
9984
  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9985
	fi
9986
	;;
9987
      esac
9988
    fi
9989
  else
9990
    # PORTME fill in a description of your system's linker (not GNU ld)
9991
    case $host_os in
9992
    aix3*)
9993
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
9994
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
9995
      _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'
9996
      # Note: this linker hardcodes the directories in LIBPATH if there
9997
      # are no directories specified by -L.
9998
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
9999
      if test "$GCC" = yes && test -z "$link_static_flag"; then
10000
	# Neither direct hardcoding nor static linking is supported with a
10001
	# broken collect2.
10002
	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10003
      fi
10004
      ;;
10005
10006
    aix4* | aix5*)
10007
      if test "$host_cpu" = ia64; then
10008
	# On IA64, the linker does run time linking by default, so we don't
10009
	# have to do anything special.
10010
	aix_use_runtimelinking=no
10011
	exp_sym_flag='-Bexport'
10012
	no_entry_flag=""
10013
      else
10014
	# If we're using GNU nm, then we don't want the "-C" option.
10015
	# -C means demangle to AIX nm, but means don't demangle with GNU nm
10016
	if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
10017
	  _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'
10018
	else
10019
	  _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'
10020
	fi
10021
10022
	# KDE requires run time linking.  Make it the default.
10023
	aix_use_runtimelinking=yes
10024
	exp_sym_flag='-bexport'
10025
	no_entry_flag='-bnoentry'
10026
      fi
10027
10028
      # When large executables or shared objects are built, AIX ld can
10029
      # have problems creating the table of contents.  If linking a library
10030
      # or program results in "error TOC overflow" add -mminimal-toc to
10031
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
10032
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10033
10034
      _LT_AC_TAGVAR(archive_cmds, $1)=''
10035
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10036
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
10037
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10038
10039
      if test "$GCC" = yes; then
10040
	case $host_os in aix4.[012]|aix4.[012].*)
10041
	# We only want to do this on AIX 4.2 and lower, the check
10042
	# below for broken collect2 doesn't work under 4.3+
10043
	  collect2name=`${CC} -print-prog-name=collect2`
10044
	  if test -f "$collect2name" && \
10045
  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
10046
	  then
10047
  	  # We have reworked collect2
10048
  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10049
	  else
10050
  	  # We have old collect2
10051
  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10052
  	  # It fails to find uninstalled libraries when the uninstalled
10053
  	  # path is not listed in the libpath.  Setting hardcode_minus_L
10054
  	  # to unsupported forces relinking
10055
  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10056
  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10057
  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10058
	  fi
10059
	esac
10060
	shared_flag='-shared'
10061
      else
10062
	# not using gcc
10063
	if test "$host_cpu" = ia64; then
10064
  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10065
  	# chokes on -Wl,-G. The following line is correct:
10066
	  shared_flag='-G'
10067
	else
10068
  	if test "$aix_use_runtimelinking" = yes; then
10069
	    shared_flag='-qmkshrobj ${wl}-G'
10070
	  else
10071
	    shared_flag='-qmkshrobj'
10072
  	fi
10073
	fi
10074
      fi
10075
10076
      # Let the compiler handle the export list.
10077
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
10078
      if test "$aix_use_runtimelinking" = yes; then
10079
	# Warning - without using the other runtime loading flags (-brtl),
10080
	# -berok will link without error, but may produce a broken library.
10081
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
10082
       # Determine the default libpath from the value encoded in an empty executable.
10083
	_LT_AC_SYS_LIBPATH_AIX
10084
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10085
	_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
10086
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
10087
       else
10088
	if test "$host_cpu" = ia64; then
10089
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
10090
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
10091
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
10092
	else
10093
	 # Determine the default libpath from the value encoded in an empty executable.
10094
	 _LT_AC_SYS_LIBPATH_AIX
10095
	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10096
	  # Warning - without using the other run time loading flags,
10097
	  # -berok will link without error, but may produce a broken library.
10098
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
10099
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
10100
	  # -bexpall does not export symbols beginning with underscore (_)
10101
	  _LT_AC_TAGVAR(always_export_symbols, $1)=yes
10102
	  # Exported symbols can be pulled into shared objects from archives
10103
	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
10104
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10105
	  # This is similar to how AIX traditionally builds it's shared libraries.
10106
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
10107
	fi
10108
      fi
10109
      ;;
10110
10111
    amigaos*)
10112
      _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)'
10113
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10114
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10115
      # see comment about different semantics on the GNU ld section
10116
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
10117
      ;;
10118
10119
    bsdi4*)
10120
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
10121
      ;;
10122
10123
    cygwin* | mingw* | pw32*)
10124
      # When not using gcc, we currently assume that we are using
10125
      # Microsoft Visual C++.
10126
      # hardcode_libdir_flag_spec is actually meaningless, as there is
10127
      # no search path for DLLs.
10128
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
10129
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10130
      # Tell ltmain to make .lib files, not .a files.
10131
      libext=lib
10132
      # FIXME: Setting linknames here is a bad hack.
10133
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
10134
      # The linker will automatically build a .lib file if we build a DLL.
10135
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
10136
      # FIXME: Should let the user specify the lib program.
10137
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
10138
      fix_srcfile_path='`cygpath -w "$srcfile"`'
10139
      ;;
10140
10141
    darwin* | rhapsody*)
10142
      case "$host_os" in
10143
      rhapsody* | darwin1.[[012]])
10144
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
10145
	;;
10146
      *) # Darwin 1.3 on
10147
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
10148
	;;
10149
      esac
10150
10151
      # FIXME: Relying on posixy $() will cause problems for
10152
      #        cross-compilation, but unfortunately the echo tests do not
10153
      #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
10154
      #	       `"' quotes if we put them in here... so don't!
10155
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
10156
      # We need to add '_' to the symbols in $export_symbols first
10157
      #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
10158
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10159
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10160
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
10161
      ;;
10162
10163
    dgux*)
10164
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10165
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10166
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10167
      ;;
10168
10169
    freebsd1*)
10170
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
10171
      ;;
10172
10173
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
10174
    # support.  Future versions do this automatically, but an explicit c++rt0.o
10175
    # does not break anything, and helps significantly (at the cost of a little
10176
    # extra space).
10177
    freebsd2.2*)
10178
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
10179
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10180
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10181
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10182
      ;;
10183
10184
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10185
    freebsd2*)
10186
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10187
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10188
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10189
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10190
      ;;
10191
10192
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
10193
    freebsd*)
10194
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
10195
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10196
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10197
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10198
      ;;
10199
10200
    hpux9* | hpux10* | hpux11*)
10201
      if test "$GCC" = yes; then
10202
	case $host_os in
10203
	  hpux9*)
10204
	    _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'
10205
	    ;;
10206
	  *)
10207
	    if test "$host_cpu" = ia64; then
10208
	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10209
	    else
10210
	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10211
	    fi
10212
	    ;;
10213
	esac
10214
      else
10215
	case $host_os in
10216
	  hpux9*)
10217
	    _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'
10218
	    ;;
10219
	  *)
10220
	    if test "$host_cpu" = ia64; then
10221
	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
10222
	    else
10223
	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
10224
	    fi
10225
	    ;;
10226
	esac
10227
      fi
10228
      if test "$host_cpu" = ia64; then
10229
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10230
	_LT_AC_TAGVAR(hardcode_direct, $1)=no
10231
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10232
      else
10233
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
10234
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10235
	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10236
      fi
10237
      # hardcode_minus_L: Not really in the search PATH,
10238
      # but as the default location of the library.
10239
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10240
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10241
      ;;
10242
10243
    irix5* | irix6* | nonstopux*)
10244
      if test "$GCC" = yes; then
10245
	_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'
10246
      else
10247
	_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'
10248
      fi
10249
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10250
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10251
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10252
      ;;
10253
10254
    netbsd*)
10255
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10256
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
10257
      else
10258
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
10259
      fi
10260
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10261
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10262
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10263
      ;;
10264
10265
    newsos6)
10266
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10267
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10268
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10269
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10270
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10271
      ;;
10272
10273
    openbsd*)
10274
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10275
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10276
10277
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10278
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
10279
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
10280
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10281
      else
10282
       case $host_os in
10283
	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
10284
	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10285
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10286
	   ;;
10287
	 *)
10288
	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
10289
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
10290
	   ;;
10291
       esac
10292
      fi
10293
      ;;
10294
10295
    os2*)
10296
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10297
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10298
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10299
      _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'
10300
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
10301
      ;;
10302
10303
    osf3*)
10304
      if test "$GCC" = yes; then
10305
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
10306
	_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'
10307
      else
10308
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10309
	_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'
10310
      fi
10311
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10312
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10313
      ;;
10314
10315
    osf4* | osf5*)	# as osf3* with the addition of -msym flag
10316
      if test "$GCC" = yes; then
10317
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
10318
	_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'
10319
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10320
      else
10321
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10322
	_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'
10323
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
10324
	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
10325
10326
	# Both c and cxx compiler support -rpath directly
10327
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
10328
      fi
10329
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10330
      ;;
10331
10332
    sco3.2v5*)
10333
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10334
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10335
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
10336
      runpath_var=LD_RUN_PATH
10337
      hardcode_runpath_var=yes
10338
      ;;
10339
10340
    solaris*)
10341
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
10342
      if test "$GCC" = yes; then
10343
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10344
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10345
	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
10346
      else
10347
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
10348
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10349
  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
10350
      fi
10351
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10352
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10353
      case $host_os in
10354
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
10355
      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
10356
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
10357
      esac
10358
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10359
      ;;
10360
10361
    sunos4*)
10362
      if test "x$host_vendor" = xsequent; then
10363
	# Use $CC to link under sequent, because it throws in some extra .o
10364
	# files that make .init and .fini sections work.
10365
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
10366
      else
10367
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
10368
      fi
10369
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10370
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10371
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10372
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10373
      ;;
10374
10375
    sysv4)
10376
      if test "x$host_vendor" = xsni; then
10377
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
10378
	_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
10379
      else
10380
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10381
	_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
10382
      fi
10383
      runpath_var='LD_RUN_PATH'
10384
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10385
      ;;
10386
10387
    sysv4.3*)
10388
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10389
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10390
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
10391
      ;;
10392
10393
    sysv4*MP*)
10394
      if test -d /usr/nec; then
10395
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10396
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10397
	runpath_var=LD_RUN_PATH
10398
	hardcode_runpath_var=yes
10399
	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
10400
      fi
10401
      ;;
10402
10403
    sysv4.2uw2*)
10404
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
10405
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10406
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
10407
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10408
      hardcode_runpath_var=yes
10409
      runpath_var=LD_RUN_PATH
10410
      ;;
10411
10412
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
10413
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
10414
      if test "$GCC" = yes; then
10415
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10416
      else
10417
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10418
      fi
10419
      runpath_var='LD_RUN_PATH'
10420
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10421
      ;;
10422
10423
    sysv5*)
10424
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
10425
      # $CC -shared without GNU ld will not create a library from C++
10426
      # object files and a static libstdc++, better avoid it by now
10427
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
10428
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10429
  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
10430
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
10431
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10432
      runpath_var='LD_RUN_PATH'
10433
      ;;
10434
10435
    uts4*)
10436
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10437
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10438
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10439
      ;;
10440
10441
    *)
10442
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
10443
      ;;
10444
    esac
10445
  fi
10446
])
10447
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
10448
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
10449
10450
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
10451
if test "$GCC" = yes; then
10452
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
10453
fi
10454
10455
#
10456
# Do we need to explicitly link libc?
10457
#
10458
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10459
if test "$enable_shared" = yes && test "$GCC" = yes; then
10460
  case $_LT_AC_TAGVAR(archive_cmds, $1) in
10461
  *'~'*)
10462
    # FIXME: we may have to deal with multi-command sequences.
10463
    ;;
10464
  '$CC '*)
10465
    # Test whether the compiler implicitly links with -lc since on some
10466
    # systems, -lgcc has to come before -lc. If gcc already passes -lc
10467
    # to ld, don't add -lc before -lgcc.
10468
    AC_MSG_CHECKING([whether -lc should be explicitly linked in])
10469
    $rm conftest*
10470
    echo 'static int dummy;' > conftest.$ac_ext
10471
10472
    if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
10473
      soname=conftest
10474
      lib=conftest
10475
      libobjs=conftest.$ac_objext
10476
      deplibs=
10477
      wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
10478
      compiler_flags=-v
10479
      linker_flags=-v
10480
      verstring=
10481
      output_objdir=.
10482
      libname=conftest
10483
      lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
10484
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=
10485
      if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
10486
      then
10487
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
10488
      else
10489
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10490
      fi
10491
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
10492
    else
10493
      cat conftest.err 1>&5
10494
    fi
10495
    $rm conftest*
10496
    AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
10497
    ;;
10498
  esac
10499
fi
10500
])# AC_LIBTOOL_PROG_LD_SHLIBS
10501
10502
10503
# _LT_AC_FILE_LTDLL_C
10504
# -------------------
10505
# Be careful that the start marker always follows a newline.
10506
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
10507
# /* ltdll.c starts here */
10508
# #define WIN32_LEAN_AND_MEAN
10509
# #include <windows.h>
10510
# #undef WIN32_LEAN_AND_MEAN
10511
# #include <stdio.h>
10512
#
10513
# #ifndef __CYGWIN__
10514
# #  ifdef __CYGWIN32__
10515
# #    define __CYGWIN__ __CYGWIN32__
10516
# #  endif
10517
# #endif
10518
#
10519
# #ifdef __cplusplus
10520
# extern "C" {
10521
# #endif
10522
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
10523
# #ifdef __cplusplus
10524
# }
10525
# #endif
10526
#
10527
# #ifdef __CYGWIN__
10528
# #include <cygwin/cygwin_dll.h>
10529
# DECLARE_CYGWIN_DLL( DllMain );
10530
# #endif
10531
# HINSTANCE __hDllInstance_base;
10532
#
10533
# BOOL APIENTRY
10534
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
10535
# {
10536
#   __hDllInstance_base = hInst;
10537
#   return TRUE;
10538
# }
10539
# /* ltdll.c ends here */
10540
])# _LT_AC_FILE_LTDLL_C
10541
10542
10543
# _LT_AC_FILE_IMPGEN_C
10544
# --------------------
10545
# Be careful that the start marker always follows a newline.
10546
AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
10547
# /* impgen.c starts here */
10548
# /*   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
10549
#
10550
#  This file is part of GNU libtool.
10551
#
10552
#  This program is free software; you can redistribute it and/or modify
10553
#  it under the terms of the GNU General Public License as published by
10554
#  the Free Software Foundation; either version 2 of the License, or
10555
#  (at your option) any later version.
10556
#
10557
#  This program is distributed in the hope that it will be useful,
10558
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
10559
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10560
#  GNU General Public License for more details.
10561
#
10562
#  You should have received a copy of the GNU General Public License
10563
#  along with this program; if not, write to the Free Software
10564
#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
10565
#  */
10566
#
10567
# #include <stdio.h>		/* for printf() */
10568
# #include <unistd.h>		/* for open(), lseek(), read() */
10569
# #include <fcntl.h>		/* for O_RDONLY, O_BINARY */
10570
# #include <string.h>		/* for strdup() */
10571
#
10572
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
10573
# #ifndef O_BINARY
10574
# #define O_BINARY 0
10575
# #endif
10576
#
10577
# static unsigned int
10578
# pe_get16 (fd, offset)
10579
#      int fd;
10580
#      int offset;
10581
# {
10582
#   unsigned char b[2];
10583
#   lseek (fd, offset, SEEK_SET);
10584
#   read (fd, b, 2);
10585
#   return b[0] + (b[1]<<8);
10586
# }
10587
#
10588
# static unsigned int
10589
# pe_get32 (fd, offset)
10590
#     int fd;
10591
#     int offset;
10592
# {
10593
#   unsigned char b[4];
10594
#   lseek (fd, offset, SEEK_SET);
10595
#   read (fd, b, 4);
10596
#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
10597
# }
10598
#
10599
# static unsigned int
10600
# pe_as32 (ptr)
10601
#      void *ptr;
10602
# {
10603
#   unsigned char *b = ptr;
10604
#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
10605
# }
10606
#
10607
# int
10608
# main (argc, argv)
10609
#     int argc;
10610
#     char *argv[];
10611
# {
10612
#     int dll;
10613
#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
10614
#     unsigned long export_rva, export_size, nsections, secptr, expptr;
10615
#     unsigned long name_rvas, nexp;
10616
#     unsigned char *expdata, *erva;
10617
#     char *filename, *dll_name;
10618
#
10619
#     filename = argv[1];
10620
#
10621
#     dll = open(filename, O_RDONLY|O_BINARY);
10622
#     if (dll < 1)
10623
# 	return 1;
10624
#
10625
#     dll_name = filename;
10626
#
10627
#     for (i=0; filename[i]; i++)
10628
# 	if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
10629
# 	    dll_name = filename + i +1;
10630
#
10631
#     pe_header_offset = pe_get32 (dll, 0x3c);
10632
#     opthdr_ofs = pe_header_offset + 4 + 20;
10633
#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
10634
#
10635
#     if (num_entries < 1) /* no exports */
10636
# 	return 1;
10637
#
10638
#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
10639
#     export_size = pe_get32 (dll, opthdr_ofs + 100);
10640
#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
10641
#     secptr = (pe_header_offset + 4 + 20 +
10642
# 	      pe_get16 (dll, pe_header_offset + 4 + 16));
10643
#
10644
#     expptr = 0;
10645
#     for (i = 0; i < nsections; i++)
10646
#     {
10647
# 	char sname[8];
10648
# 	unsigned long secptr1 = secptr + 40 * i;
10649
# 	unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
10650
# 	unsigned long vsize = pe_get32 (dll, secptr1 + 16);
10651
# 	unsigned long fptr = pe_get32 (dll, secptr1 + 20);
10652
# 	lseek(dll, secptr1, SEEK_SET);
10653
# 	read(dll, sname, 8);
10654
# 	if (vaddr <= export_rva && vaddr+vsize > export_rva)
10655
# 	{
10656
# 	    expptr = fptr + (export_rva - vaddr);
10657
# 	    if (export_rva + export_size > vaddr + vsize)
10658
# 		export_size = vsize - (export_rva - vaddr);
10659
# 	    break;
10660
# 	}
10661
#     }
10662
#
10663
#     expdata = (unsigned char*)malloc(export_size);
10664
#     lseek (dll, expptr, SEEK_SET);
10665
#     read (dll, expdata, export_size);
10666
#     erva = expdata - export_rva;
10667
#
10668
#     nexp = pe_as32 (expdata+24);
10669
#     name_rvas = pe_as32 (expdata+32);
10670
#
10671
#     printf ("EXPORTS\n");
10672
#     for (i = 0; i<nexp; i++)
10673
#     {
10674
# 	unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
10675
# 	printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
10676
#     }
10677
#
10678
#     return 0;
10679
# }
10680
# /* impgen.c ends here */
10681
])# _LT_AC_FILE_IMPGEN_C
10682
10683
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
10684
# ---------------------------------
10685
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
10686
10687
10688
# old names
10689
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
10690
AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
10691
AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
10692
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
10693
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
10694
AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
10695
AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
10696
10697
# This is just to silence aclocal about the macro not being used
10698
ifelse([AC_DISABLE_FAST_INSTALL])
10699
10700
AC_DEFUN([LT_AC_PROG_GCJ],
10701
[AC_CHECK_TOOL(GCJ, gcj, no)
10702
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
10703
  AC_SUBST(GCJFLAGS)
10704
])
10705
10706
AC_DEFUN([LT_AC_PROG_RC],
10707
[AC_CHECK_TOOL(RC, windres, no)
10708
])
10709
10710
############################################################
10711
# NOTE: This macro has been submitted for inclusion into   #
10712
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
10713
#  a released version of Autoconf we should remove this    #
10714
#  macro and use it instead.                               #
10715
############################################################
10716
# LT_AC_PROG_SED
10717
# --------------
10718
# Check for a fully-functional sed program, that truncates
10719
# as few characters as possible.  Prefer GNU sed if found.
10720
AC_DEFUN([LT_AC_PROG_SED],
10721
[AC_MSG_CHECKING([for a sed that does not truncate output])
10722
AC_CACHE_VAL(lt_cv_path_SED,
10723
[# Loop through the user's path and test for sed and gsed.
10724
# Then use that list of sed's as ones to test for truncation.
10725
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10726
for as_dir in $PATH
10727
do
10728
  IFS=$as_save_IFS
10729
  test -z "$as_dir" && as_dir=.
10730
  for ac_prog in sed gsed; do
10731
    for ac_exec_ext in '' $ac_executable_extensions; do
10732
      if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
10733
        _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
10734
      fi
10735
    done
10736
  done
10737
done
10738
10739
  # Create a temporary directory, and hook for its removal unless debugging.
10740
$debug ||
10741
{
10742
  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
10743
  trap '{ (exit 1); exit 1; }' 1 2 13 15
10744
}
10745
10746
# Create a (secure) tmp directory for tmp files.
10747
: ${TMPDIR=/tmp}
10748
{
10749
  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
10750
  test -n "$tmp" && test -d "$tmp"
10751
}  ||
10752
{
10753
  tmp=$TMPDIR/sed$$-$RANDOM
10754
  (umask 077 && mkdir $tmp)
10755
} ||
10756
{
10757
   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
10758
   { (exit 1); exit 1; }
10759
}
10760
  _max=0
10761
  _count=0
10762
  # Add /usr/xpg4/bin/sed as it is typically found on Solaris
10763
  # along with /bin/sed that truncates output.
10764
  for _sed in $_sed_list /usr/xpg4/bin/sed; do
10765
    test ! -f ${_sed} && break
10766
    cat /dev/null > "$tmp/sed.in"
10767
    _count=0
10768
    echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
10769
    # Check for GNU sed and select it if it is found.
10770
    if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
10771
      lt_cv_path_SED=${_sed}
10772
      break;
10773
    fi
10774
    while true; do
10775
      cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
10776
      mv "$tmp/sed.tmp" "$tmp/sed.in"
10777
      cp "$tmp/sed.in" "$tmp/sed.nl"
10778
      echo >>"$tmp/sed.nl"
10779
      ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
10780
      cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
10781
      # 10000 chars as input seems more than enough
10782
      test $_count -gt 10 && break
10783
      _count=`expr $_count + 1`
10784
      if test $_count -gt $_max; then
10785
        _max=$_count
10786
        lt_cv_path_SED=$_sed
10787
      fi
10788
    done
10789
  done
10790
  rm -rf "$tmp"
10791
])
10792
AC_MSG_RESULT([$SED])
10793
])
(-)celestia-1.5.1/configure (-1 / +24 lines)
Lines 1698-1703 Link Here
1698
  --with-qt-dir=DIR       where the root of Qt is installed
1698
  --with-qt-dir=DIR       where the root of Qt is installed
1699
  --with-qt-includes=DIR  where the Qt includes are.
1699
  --with-qt-includes=DIR  where the Qt includes are.
1700
  --with-qt-libraries=DIR where the Qt library is installed.
1700
  --with-qt-libraries=DIR where the Qt library is installed.
1701
  --without-arts          build without aRts default=no
1701
  --with-lua              Use Lua for Celestia Extension Language support
1702
  --with-lua              Use Lua for Celestia Extension Language support
1702
1703
1703
Some influential environment variables:
1704
Some influential environment variables:
Lines 33214-33220 Link Here
33214
33215
33215
bindir=$kde_bindir
33216
bindir=$kde_bindir
33216
33217
33218
# Check whether --with-arts was given.
33219
if test "${with_arts+set}" = set; then
33220
  withval=$with_arts; build_arts=$withval
33221
else
33222
  build_arts=yes
33223
33224
fi
33225
33226
     if test "$build_arts" '!=' "no"; then
33227
  include_ARTS_TRUE=
33228
  include_ARTS_FALSE='#'
33229
else
33230
  include_ARTS_TRUE='#'
33231
  include_ARTS_FALSE=
33232
fi
33233
33234
    if test "$build_arts" = "no"; then
33235
33236
cat >>confdefs.h <<\_ACEOF
33237
#define WITHOUT_ARTS 1
33238
_ACEOF
33217
33239
33240
    fi
33218
33241
33219
        kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
33242
        kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
33220
        test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
33243
        test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
Lines 33359-33365 Link Here
33359
33382
33360
   fi
33383
   fi
33361
33384
33362
33385
   if test "$build_arts" '!=' "no"; then
33363
   { echo "$as_me:$LINENO: checking for mcopidl" >&5
33386
   { echo "$as_me:$LINENO: checking for mcopidl" >&5
33364
echo $ECHO_N "checking for mcopidl... $ECHO_C" >&6; }
33387
echo $ECHO_N "checking for mcopidl... $ECHO_C" >&6; }
33365
   if test -n "$MCOPIDL"; then
33388
   if test -n "$MCOPIDL"; then

Return to bug 228865