libtool.m4 revision 91041
185815Sobrien## libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
285815Sobrien## Copyright 1996, 1997, 1998, 1999, 2000, 2001
385815Sobrien## Free Software Foundation, Inc.
485815Sobrien## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
585815Sobrien##
685815Sobrien## This program is free software; you can redistribute it and/or modify
785815Sobrien## it under the terms of the GNU General Public License as published by
885815Sobrien## the Free Software Foundation; either version 2 of the License, or
985815Sobrien## (at your option) any later version.
1085815Sobrien##
1185815Sobrien## This program is distributed in the hope that it will be useful, but
1285815Sobrien## WITHOUT ANY WARRANTY; without even the implied warranty of
1385815Sobrien## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1485815Sobrien## General Public License for more details.
1585815Sobrien##
1685815Sobrien## You should have received a copy of the GNU General Public License
1785815Sobrien## along with this program; if not, write to the Free Software
1885815Sobrien## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1985815Sobrien##
2085815Sobrien## As a special exception to the GNU General Public License, if you
2185815Sobrien## distribute this file as part of a program that contains a
2285815Sobrien## configuration script generated by Autoconf, you may include it under
2385815Sobrien## the same distribution terms that you use for the rest of that program.
2485815Sobrien
2589857Sobrien# serial 46 AC_PROG_LIBTOOL
2689857SobrienAC_DEFUN([AC_PROG_LIBTOOL],
2789857Sobrien[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
2885815Sobriendnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
2985815Sobriendnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
3085815Sobrien  AC_PROVIDE_IFELSE([AC_PROG_CXX],
3185815Sobrien    [AC_LIBTOOL_CXX],
3285815Sobrien    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
3385815Sobrien])])
3485815Sobrien
3585815Sobriendnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
3685815Sobriendnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
3785815Sobriendnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
3885815Sobrien  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
3985815Sobrien    [AC_LIBTOOL_GCJ],
4085815Sobrien    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
4185815Sobrien        [AC_LIBTOOL_GCJ],
4285815Sobrien	[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
4385815Sobrien	  [AC_LIBTOOL_GCJ],
4485815Sobrien	[ifdef([AC_PROG_GCJ],
4585815Sobrien	       [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
4685815Sobrien])])
4785815Sobrien	 ifdef([A][M_PROG_GCJ],
4885815Sobrien	       [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
4985815Sobrien])])
5085815Sobrien	 ifdef([LT_AC_PROG_GCJ],
5185815Sobrien	       [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
5285815Sobrien])])])])])])
5385815Sobrien
5489857SobrienAC_DEFUN([_AC_PROG_LIBTOOL],
5585815Sobrien[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
5685815SobrienAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
5785815SobrienAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
5885815Sobrien
5985815Sobrien# Save cache, so that ltconfig can load it
6085815SobrienAC_CACHE_SAVE
6185815Sobrien
6285815Sobrien# Actually configure libtool.  ac_aux_dir is where install-sh is found.
6385815SobrienAR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
6485815SobrienMAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
6585815SobrienLN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
6685815SobrienAS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
6785815Sobrienobjext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
6885815Sobriendeplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
6985815Sobrien${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
7085815Sobrien$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
7185815Sobrien|| AC_MSG_ERROR([libtool configure failed])
7285815Sobrien
7385815Sobrien# Reload cache, that may have been modified by ltconfig
7485815SobrienAC_CACHE_LOAD
7585815Sobrien
7685815Sobrien# This can be used to rebuild libtool when needed
7785815SobrienLIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
7885815Sobrien
7985815Sobrien# Always use our own libtool.
8085815SobrienLIBTOOL='$(SHELL) $(top_builddir)/libtool'
8185815SobrienAC_SUBST(LIBTOOL)dnl
8285815Sobrien
8385815Sobrien# Redirect the config.log output again, so that the ltconfig log is not
8485815Sobrien# clobbered by the next message.
8585815Sobrienexec 5>>./config.log
8685815Sobrien])
8785815Sobrien
8889857SobrienAC_DEFUN([AC_LIBTOOL_SETUP],
8985815Sobrien[AC_PREREQ(2.13)dnl
9085815SobrienAC_REQUIRE([AC_ENABLE_SHARED])dnl
9185815SobrienAC_REQUIRE([AC_ENABLE_STATIC])dnl
9285815SobrienAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
9385815SobrienAC_REQUIRE([AC_CANONICAL_HOST])dnl
9485815SobrienAC_REQUIRE([AC_CANONICAL_BUILD])dnl
9585815SobrienAC_REQUIRE([AC_PROG_CC])dnl
9685815SobrienAC_REQUIRE([AC_PROG_LD])dnl
9785815SobrienAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
9885815SobrienAC_REQUIRE([AC_PROG_NM])dnl
9985815SobrienAC_REQUIRE([AC_PROG_LN_S])dnl
10085815SobrienAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
10185815Sobrien# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
10285815SobrienAC_REQUIRE([AC_OBJEXT])dnl
10385815SobrienAC_REQUIRE([AC_EXEEXT])dnl
10485815Sobriendnl
10585815Sobrien
10685815Sobrien# Only perform the check for file, if the check method requires it
10789857Sobriencase $deplibs_check_method in
10885815Sobrienfile_magic*)
10985815Sobrien  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
11085815Sobrien    AC_PATH_MAGIC
11185815Sobrien  fi
11285815Sobrien  ;;
11385815Sobrienesac
11485815Sobrien
11585815SobrienAC_CHECK_TOOL(RANLIB, ranlib, :)
11685815SobrienAC_CHECK_TOOL(STRIP, strip, :)
11785815Sobrien
11885815Sobrien# Check for any special flags to pass to ltconfig.
11985815Sobrienlibtool_flags="--cache-file=$cache_file"
12085815Sobrientest "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
12185815Sobrientest "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
12285815Sobrientest "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
12389857Sobrientest "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
12489857Sobrientest "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
12585815Sobrienifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
12685815Sobrien[libtool_flags="$libtool_flags --enable-dlopen"])
12785815Sobrienifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
12885815Sobrien[libtool_flags="$libtool_flags --enable-win32-dll"])
12985815SobrienAC_ARG_ENABLE(libtool-lock,
13085815Sobrien  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
13185815Sobrientest "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
13285815Sobrientest x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
13385815Sobrien
13485815SobrienAC_ARG_WITH(pic,
13585815Sobrien  [  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
13685815Sobrien     pic_mode="$withval", pic_mode=default)
13785815Sobrientest x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
13885815Sobrientest x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
13985815Sobrien
14085815Sobrien# Some flags need to be propagated to the compiler or linker for good
14185815Sobrien# libtool support.
14289857Sobriencase $host in
14385815Sobrien*-*-irix6*)
14485815Sobrien  # Find out which ABI we are using.
14585815Sobrien  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
14685815Sobrien  if AC_TRY_EVAL(ac_compile); then
14789857Sobrien    case `/usr/bin/file conftest.$ac_objext` in
14885815Sobrien    *32-bit*)
14985815Sobrien      LD="${LD-ld} -32"
15085815Sobrien      ;;
15185815Sobrien    *N32*)
15285815Sobrien      LD="${LD-ld} -n32"
15385815Sobrien      ;;
15485815Sobrien    *64-bit*)
15585815Sobrien      LD="${LD-ld} -64"
15685815Sobrien      ;;
15785815Sobrien    esac
15885815Sobrien  fi
15985815Sobrien  rm -rf conftest*
16085815Sobrien  ;;
16185815Sobrien
16291041Sobrienia64-*-hpux*)
16391041Sobrien  # Find out which ABI we are using.
16491041Sobrien  echo 'int i;' > conftest.$ac_ext
16591041Sobrien  if AC_TRY_EVAL(ac_compile); then
16691041Sobrien    case "`/usr/bin/file conftest.o`" in
16791041Sobrien    *ELF-32*)
16891041Sobrien      HPUX_IA64_MODE="32"
16991041Sobrien      ;;
17091041Sobrien    *ELF-64*)
17191041Sobrien      HPUX_IA64_MODE="64"
17291041Sobrien      ;;
17391041Sobrien    esac
17491041Sobrien  fi
17591041Sobrien  rm -rf conftest*
17691041Sobrien  ;;
17791041Sobrien
17885815Sobrien*-*-sco3.2v5*)
17985815Sobrien  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
18085815Sobrien  SAVE_CFLAGS="$CFLAGS"
18185815Sobrien  CFLAGS="$CFLAGS -belf"
18285815Sobrien  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
18385815Sobrien    [AC_LANG_SAVE
18485815Sobrien     AC_LANG_C
18585815Sobrien     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
18685815Sobrien     AC_LANG_RESTORE])
18785815Sobrien  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
18885815Sobrien    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
18985815Sobrien    CFLAGS="$SAVE_CFLAGS"
19085815Sobrien  fi
19185815Sobrien  ;;
19285815Sobrien
19385815Sobrienifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
19485815Sobrien[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
19585815Sobrien  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
19685815Sobrien  AC_CHECK_TOOL(AS, as, false)
19785815Sobrien  AC_CHECK_TOOL(OBJDUMP, objdump, false)
19885815Sobrien
19985815Sobrien  # recent cygwin and mingw systems supply a stub DllMain which the user
20085815Sobrien  # can override, but on older systems we have to supply one
20185815Sobrien  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
20285815Sobrien    [AC_TRY_LINK([],
20385815Sobrien      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
20485815Sobrien      DllMain (0, 0, 0);],
20585815Sobrien      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
20685815Sobrien
20789857Sobrien  case $host/$CC in
20885815Sobrien  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
20985815Sobrien    # old mingw systems require "-dll" to link a DLL, while more recent ones
21085815Sobrien    # require "-mdll"
21185815Sobrien    SAVE_CFLAGS="$CFLAGS"
21285815Sobrien    CFLAGS="$CFLAGS -mdll"
21385815Sobrien    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
21485815Sobrien      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
21585815Sobrien    CFLAGS="$SAVE_CFLAGS" ;;
21685815Sobrien  *-*-cygwin* | *-*-pw32*)
21785815Sobrien    # cygwin systems need to pass --dll to the linker, and not link
21885815Sobrien    # crt.o which will require a WinMain@16 definition.
21985815Sobrien    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
22085815Sobrien  esac
22185815Sobrien  ;;
22285815Sobrien  ])
22385815Sobrienesac
22485815Sobrien])
22585815Sobrien
22685815Sobrien# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
22789857SobrienAC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
22885815Sobrien
22985815Sobrien# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
23089857SobrienAC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
23185815Sobrien
23285815Sobrien# AC_ENABLE_SHARED - implement the --enable-shared flag
23385815Sobrien# Usage: AC_ENABLE_SHARED[(DEFAULT)]
23485815Sobrien#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
23585815Sobrien#   `yes'.
23689857SobrienAC_DEFUN([AC_ENABLE_SHARED],
23789857Sobrien[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
23885815SobrienAC_ARG_ENABLE(shared,
23985815Sobrienchangequote(<<, >>)dnl
24085815Sobrien<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
24185815Sobrienchangequote([, ])dnl
24285815Sobrien[p=${PACKAGE-default}
24389857Sobriencase $enableval in
24485815Sobrienyes) enable_shared=yes ;;
24585815Sobrienno) enable_shared=no ;;
24685815Sobrien*)
24785815Sobrien  enable_shared=no
24885815Sobrien  # Look at the argument we got.  We use all the common list separators.
24985815Sobrien  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
25085815Sobrien  for pkg in $enableval; do
25185815Sobrien    if test "X$pkg" = "X$p"; then
25285815Sobrien      enable_shared=yes
25385815Sobrien    fi
25485815Sobrien  done
25585815Sobrien  IFS="$ac_save_ifs"
25685815Sobrien  ;;
25785815Sobrienesac],
25885815Sobrienenable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
25985815Sobrien])
26085815Sobrien
26185815Sobrien# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
26289857SobrienAC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
26385815SobrienAC_ENABLE_SHARED(no)])
26485815Sobrien
26585815Sobrien# AC_ENABLE_STATIC - implement the --enable-static flag
26685815Sobrien# Usage: AC_ENABLE_STATIC[(DEFAULT)]
26785815Sobrien#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
26885815Sobrien#   `yes'.
26989857SobrienAC_DEFUN([AC_ENABLE_STATIC],
27089857Sobrien[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
27185815SobrienAC_ARG_ENABLE(static,
27285815Sobrienchangequote(<<, >>)dnl
27385815Sobrien<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
27485815Sobrienchangequote([, ])dnl
27585815Sobrien[p=${PACKAGE-default}
27689857Sobriencase $enableval in
27785815Sobrienyes) enable_static=yes ;;
27885815Sobrienno) enable_static=no ;;
27985815Sobrien*)
28085815Sobrien  enable_static=no
28185815Sobrien  # Look at the argument we got.  We use all the common list separators.
28285815Sobrien  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
28385815Sobrien  for pkg in $enableval; do
28485815Sobrien    if test "X$pkg" = "X$p"; then
28585815Sobrien      enable_static=yes
28685815Sobrien    fi
28785815Sobrien  done
28885815Sobrien  IFS="$ac_save_ifs"
28985815Sobrien  ;;
29085815Sobrienesac],
29185815Sobrienenable_static=AC_ENABLE_STATIC_DEFAULT)dnl
29285815Sobrien])
29385815Sobrien
29485815Sobrien# AC_DISABLE_STATIC - set the default static flag to --disable-static
29589857SobrienAC_DEFUN([AC_DISABLE_STATIC],
29689857Sobrien[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
29785815SobrienAC_ENABLE_STATIC(no)])
29885815Sobrien
29985815Sobrien
30085815Sobrien# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
30185815Sobrien# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
30285815Sobrien#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
30385815Sobrien#   `yes'.
30489857SobrienAC_DEFUN([AC_ENABLE_FAST_INSTALL],
30589857Sobrien[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
30685815SobrienAC_ARG_ENABLE(fast-install,
30785815Sobrienchangequote(<<, >>)dnl
30885815Sobrien<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
30985815Sobrienchangequote([, ])dnl
31085815Sobrien[p=${PACKAGE-default}
31189857Sobriencase $enableval in
31285815Sobrienyes) enable_fast_install=yes ;;
31385815Sobrienno) enable_fast_install=no ;;
31485815Sobrien*)
31585815Sobrien  enable_fast_install=no
31685815Sobrien  # Look at the argument we got.  We use all the common list separators.
31785815Sobrien  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
31885815Sobrien  for pkg in $enableval; do
31985815Sobrien    if test "X$pkg" = "X$p"; then
32085815Sobrien      enable_fast_install=yes
32185815Sobrien    fi
32285815Sobrien  done
32385815Sobrien  IFS="$ac_save_ifs"
32485815Sobrien  ;;
32585815Sobrienesac],
32685815Sobrienenable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
32785815Sobrien])
32885815Sobrien
32985815Sobrien# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
33089857SobrienAC_DEFUN([AC_DISABLE_FAST_INSTALL],
33189857Sobrien[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
33285815SobrienAC_ENABLE_FAST_INSTALL(no)])
33385815Sobrien
33485815Sobrien# AC_LIBTOOL_PICMODE - implement the --with-pic flag
33585815Sobrien# Usage: AC_LIBTOOL_PICMODE[(MODE)]
33685815Sobrien#   Where MODE is either `yes' or `no'.  If omitted, it defaults to
33785815Sobrien#   `both'.
33889857SobrienAC_DEFUN([AC_LIBTOOL_PICMODE],
33989857Sobrien[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
34085815Sobrienpic_mode=ifelse($#,1,$1,default)])
34185815Sobrien
34285815Sobrien
34385815Sobrien# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
34489857SobrienAC_DEFUN([AC_PATH_TOOL_PREFIX],
34585815Sobrien[AC_MSG_CHECKING([for $1])
34685815SobrienAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
34789857Sobrien[case $MAGIC_CMD in
34885815Sobrien  /*)
34985815Sobrien  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
35085815Sobrien  ;;
35185815Sobrien  ?:/*)
35285815Sobrien  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
35385815Sobrien  ;;
35485815Sobrien  *)
35585815Sobrien  ac_save_MAGIC_CMD="$MAGIC_CMD"
35685815Sobrien  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
35785815Sobriendnl $ac_dummy forces splitting on constant user-supplied paths.
35885815Sobriendnl POSIX.2 word splitting is done only on the output of word expansions,
35985815Sobriendnl not every word.  This closes a longstanding sh security hole.
36085815Sobrien  ac_dummy="ifelse([$2], , $PATH, [$2])"
36185815Sobrien  for ac_dir in $ac_dummy; do
36285815Sobrien    test -z "$ac_dir" && ac_dir=.
36385815Sobrien    if test -f $ac_dir/$1; then
36485815Sobrien      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
36585815Sobrien      if test -n "$file_magic_test_file"; then
36689857Sobrien	case $deplibs_check_method in
36785815Sobrien	"file_magic "*)
36885815Sobrien	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
36985815Sobrien	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
37085815Sobrien	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
37185815Sobrien	    egrep "$file_magic_regex" > /dev/null; then
37285815Sobrien	    :
37385815Sobrien	  else
37485815Sobrien	    cat <<EOF 1>&2
37585815Sobrien
37685815Sobrien*** Warning: the command libtool uses to detect shared libraries,
37785815Sobrien*** $file_magic_cmd, produces output that libtool cannot recognize.
37885815Sobrien*** The result is that libtool may fail to recognize shared libraries
37985815Sobrien*** as such.  This will affect the creation of libtool libraries that
38085815Sobrien*** depend on shared libraries, but programs linked with such libtool
38185815Sobrien*** libraries will work regardless of this problem.  Nevertheless, you
38285815Sobrien*** may want to report the problem to your system manager and/or to
38385815Sobrien*** bug-libtool@gnu.org
38485815Sobrien
38585815SobrienEOF
38685815Sobrien	  fi ;;
38785815Sobrien	esac
38885815Sobrien      fi
38985815Sobrien      break
39085815Sobrien    fi
39185815Sobrien  done
39285815Sobrien  IFS="$ac_save_ifs"
39385815Sobrien  MAGIC_CMD="$ac_save_MAGIC_CMD"
39485815Sobrien  ;;
39585815Sobrienesac])
39685815SobrienMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
39785815Sobrienif test -n "$MAGIC_CMD"; then
39885815Sobrien  AC_MSG_RESULT($MAGIC_CMD)
39985815Sobrienelse
40085815Sobrien  AC_MSG_RESULT(no)
40185815Sobrienfi
40285815Sobrien])
40385815Sobrien
40485815Sobrien
40585815Sobrien# AC_PATH_MAGIC - find a file program which can recognise a shared library
40689857SobrienAC_DEFUN([AC_PATH_MAGIC],
40785815Sobrien[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
40885815SobrienAC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
40985815Sobrienif test -z "$lt_cv_path_MAGIC_CMD"; then
41085815Sobrien  if test -n "$ac_tool_prefix"; then
41185815Sobrien    AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
41285815Sobrien  else
41385815Sobrien    MAGIC_CMD=:
41485815Sobrien  fi
41585815Sobrienfi
41685815Sobrien])
41785815Sobrien
41885815Sobrien
41985815Sobrien# AC_PROG_LD - find the path to the GNU or non-GNU linker
42089857SobrienAC_DEFUN([AC_PROG_LD],
42185815Sobrien[AC_ARG_WITH(gnu-ld,
42285815Sobrien[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
42385815Sobrientest "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
42485815SobrienAC_REQUIRE([AC_PROG_CC])dnl
42585815SobrienAC_REQUIRE([AC_CANONICAL_HOST])dnl
42685815SobrienAC_REQUIRE([AC_CANONICAL_BUILD])dnl
42785815Sobrienac_prog=ld
42889857Sobrienif test "$GCC" = yes; then
42985815Sobrien  # Check if gcc -print-prog-name=ld gives a path.
43085815Sobrien  AC_MSG_CHECKING([for ld used by GCC])
43185815Sobrien  case $host in
43285815Sobrien  *-*-mingw*)
43385815Sobrien    # gcc leaves a trailing carriage return which upsets mingw
43485815Sobrien    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
43585815Sobrien  *)
43685815Sobrien    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
43785815Sobrien  esac
43889857Sobrien  case $ac_prog in
43985815Sobrien    # Accept absolute paths.
44089857Sobrien    [[\\/]* | [A-Za-z]:[\\/]*)]
44189857Sobrien      re_direlt=['/[^/][^/]*/\.\./']
44285815Sobrien      # Canonicalize the path of ld
44385815Sobrien      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
44485815Sobrien      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
44585815Sobrien	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
44685815Sobrien      done
44785815Sobrien      test -z "$LD" && LD="$ac_prog"
44885815Sobrien      ;;
44985815Sobrien  "")
45085815Sobrien    # If it fails, then pretend we aren't using GCC.
45185815Sobrien    ac_prog=ld
45285815Sobrien    ;;
45385815Sobrien  *)
45485815Sobrien    # If it is relative, then search for the first ld in PATH.
45585815Sobrien    with_gnu_ld=unknown
45685815Sobrien    ;;
45785815Sobrien  esac
45885815Sobrienelif test "$with_gnu_ld" = yes; then
45985815Sobrien  AC_MSG_CHECKING([for GNU ld])
46085815Sobrienelse
46185815Sobrien  AC_MSG_CHECKING([for non-GNU ld])
46285815Sobrienfi
46389857SobrienAC_CACHE_VAL(lt_cv_path_LD,
46485815Sobrien[if test -z "$LD"; then
46585815Sobrien  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
46685815Sobrien  for ac_dir in $PATH; do
46785815Sobrien    test -z "$ac_dir" && ac_dir=.
46885815Sobrien    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
46989857Sobrien      lt_cv_path_LD="$ac_dir/$ac_prog"
47085815Sobrien      # Check to see if the program is GNU ld.  I'd rather use --version,
47185815Sobrien      # but apparently some GNU ld's only accept -v.
47285815Sobrien      # Break only if it was the GNU/non-GNU ld that we prefer.
47389857Sobrien      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
47485815Sobrien	test "$with_gnu_ld" != no && break
47585815Sobrien      else
47685815Sobrien	test "$with_gnu_ld" != yes && break
47785815Sobrien      fi
47885815Sobrien    fi
47985815Sobrien  done
48085815Sobrien  IFS="$ac_save_ifs"
48185815Sobrienelse
48289857Sobrien  lt_cv_path_LD="$LD" # Let the user override the test with a path.
48385815Sobrienfi])
48489857SobrienLD="$lt_cv_path_LD"
48585815Sobrienif test -n "$LD"; then
48685815Sobrien  AC_MSG_RESULT($LD)
48785815Sobrienelse
48885815Sobrien  AC_MSG_RESULT(no)
48985815Sobrienfi
49085815Sobrientest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
49185815SobrienAC_PROG_LD_GNU
49285815Sobrien])
49385815Sobrien
49489857SobrienAC_DEFUN([AC_PROG_LD_GNU],
49589857Sobrien[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
49685815Sobrien[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
49785815Sobrienif $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
49889857Sobrien  lt_cv_prog_gnu_ld=yes
49985815Sobrienelse
50089857Sobrien  lt_cv_prog_gnu_ld=no
50185815Sobrienfi])
50289857Sobrienwith_gnu_ld=$lt_cv_prog_gnu_ld
50385815Sobrien])
50485815Sobrien
50585815Sobrien# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
50685815Sobrien#   -- PORTME Some linkers may need a different reload flag.
50789857SobrienAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
50885815Sobrien[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
50985815Sobrien[lt_cv_ld_reload_flag='-r'])
51085815Sobrienreload_flag=$lt_cv_ld_reload_flag
51185815Sobrientest -n "$reload_flag" && reload_flag=" $reload_flag"
51285815Sobrien])
51385815Sobrien
51485815Sobrien# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
51585815Sobrien#  -- PORTME fill in with the dynamic library characteristics
51689857SobrienAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
51785815Sobrien[AC_CACHE_CHECK([how to recognise dependant libraries],
51885815Sobrienlt_cv_deplibs_check_method,
51985815Sobrien[lt_cv_file_magic_cmd='$MAGIC_CMD'
52085815Sobrienlt_cv_file_magic_test_file=
52185815Sobrienlt_cv_deplibs_check_method='unknown'
52285815Sobrien# Need to set the preceding variable on all platforms that support
52385815Sobrien# interlibrary dependencies.
52485815Sobrien# 'none' -- dependencies not supported.
52585815Sobrien# `unknown' -- same as none, but documents that we really don't know.
52685815Sobrien# 'pass_all' -- all dependencies passed with no checks.
52785815Sobrien# 'test_compile' -- check by making test program.
52885815Sobrien# 'file_magic [regex]' -- check by looking for files in library path
52985815Sobrien# which responds to the $file_magic_cmd with a given egrep regex.
53085815Sobrien# If you have `file' or equivalent on your system and you're not sure
53185815Sobrien# whether `pass_all' will *always* work, you probably want this one.
53285815Sobrien
53389857Sobriencase $host_os in
53489857Sobrienaix*)
53585815Sobrien  lt_cv_deplibs_check_method=pass_all
53685815Sobrien  ;;
53785815Sobrien
53885815Sobrienbeos*)
53985815Sobrien  lt_cv_deplibs_check_method=pass_all
54085815Sobrien  ;;
54185815Sobrien
54285815Sobrienbsdi4*)
54389857Sobrien  lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
54485815Sobrien  lt_cv_file_magic_cmd='/usr/bin/file -L'
54585815Sobrien  lt_cv_file_magic_test_file=/shlib/libc.so
54685815Sobrien  ;;
54785815Sobrien
54885815Sobriencygwin* | mingw* |pw32*)
54985815Sobrien  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
55085815Sobrien  lt_cv_file_magic_cmd='$OBJDUMP -f'
55185815Sobrien  ;;
55285815Sobrien
55389857Sobriendarwin* | rhapsody*)
55489857Sobrien  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
55589857Sobrien  lt_cv_file_magic_cmd='/usr/bin/file -L'
55689857Sobrien  case "$host_os" in
55789857Sobrien  rhapsody* | darwin1.[012])
55889857Sobrien    lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
55989857Sobrien    ;;
56089857Sobrien  *) # Darwin 1.3 on
56189857Sobrien    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
56289857Sobrien    ;;
56389857Sobrien  esac
56489857Sobrien  ;;
56589857Sobrien
56685815Sobrienfreebsd* )
56785815Sobrien  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
56889857Sobrien    case $host_cpu in
56985815Sobrien    i*86 )
57085815Sobrien      # Not sure whether the presence of OpenBSD here was a mistake.
57185815Sobrien      # Let's accept both of them until this is cleared up.
57289857Sobrien      lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
57385815Sobrien      lt_cv_file_magic_cmd=/usr/bin/file
57485815Sobrien      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
57585815Sobrien      ;;
57685815Sobrien    esac
57785815Sobrien  else
57885815Sobrien    lt_cv_deplibs_check_method=pass_all
57985815Sobrien  fi
58085815Sobrien  ;;
58185815Sobrien
58285815Sobriengnu*)
58385815Sobrien  lt_cv_deplibs_check_method=pass_all
58485815Sobrien  ;;
58585815Sobrien
58689857Sobrienhpux10.20*|hpux11*)
58791041Sobrien  case $host_cpu in
58891041Sobrien  hppa*)
58991041Sobrien    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
59091041Sobrien    lt_cv_file_magic_cmd=/usr/bin/file
59191041Sobrien    lt_cv_file_magic_test_file=/usr/lib/libc.sl
59291041Sobrien    ;;
59391041Sobrien  ia64*)
59491041Sobrien    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64']
59591041Sobrien    lt_cv_file_magic_cmd=/usr/bin/file
59691041Sobrien    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
59791041Sobrien    ;;
59891041Sobrien  esac
59985815Sobrien  ;;
60085815Sobrien
60185815Sobrienirix5* | irix6*)
60289857Sobrien  case $host_os in
60385815Sobrien  irix5*)
60485815Sobrien    # this will be overridden with pass_all, but let us keep it just in case
60585815Sobrien    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
60685815Sobrien    ;;
60785815Sobrien  *)
60889857Sobrien    case $LD in
60985815Sobrien    *-32|*"-32 ") libmagic=32-bit;;
61085815Sobrien    *-n32|*"-n32 ") libmagic=N32;;
61185815Sobrien    *-64|*"-64 ") libmagic=64-bit;;
61285815Sobrien    *) libmagic=never-match;;
61385815Sobrien    esac
61485815Sobrien    # this will be overridden with pass_all, but let us keep it just in case
61589857Sobrien    lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
61685815Sobrien    ;;
61785815Sobrien  esac
61885815Sobrien  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
61985815Sobrien  lt_cv_deplibs_check_method=pass_all
62085815Sobrien  ;;
62185815Sobrien
62285815Sobrien# This must be Linux ELF.
62385815Sobrienlinux-gnu*)
62489857Sobrien  case $host_cpu in
62589857Sobrien  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
62685815Sobrien    lt_cv_deplibs_check_method=pass_all ;;
62785815Sobrien  *)
62885815Sobrien    # glibc up to 2.1.1 does not perform some relocations on ARM
62989857Sobrien    lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
63085815Sobrien  esac
63185815Sobrien  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
63285815Sobrien  ;;
63385815Sobrien
63485815Sobriennetbsd*)
63589857Sobrien  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
63689857Sobrien    [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
63785815Sobrien  else
63889857Sobrien    [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
63985815Sobrien  fi
64085815Sobrien  ;;
64185815Sobrien
64289857Sobriennewsos6)
64389857Sobrien  [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
64489857Sobrien  lt_cv_file_magic_cmd=/usr/bin/file
64589857Sobrien  lt_cv_file_magic_test_file=/usr/lib/libnls.so
64689857Sobrien  ;;
64789857Sobrien
64885815Sobrienosf3* | osf4* | osf5*)
64985815Sobrien  # this will be overridden with pass_all, but let us keep it just in case
65085815Sobrien  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
65185815Sobrien  lt_cv_file_magic_test_file=/shlib/libc.so
65285815Sobrien  lt_cv_deplibs_check_method=pass_all
65385815Sobrien  ;;
65485815Sobrien
65585815Sobriensco3.2v5*)
65685815Sobrien  lt_cv_deplibs_check_method=pass_all
65785815Sobrien  ;;
65885815Sobrien
65985815Sobriensolaris*)
66085815Sobrien  lt_cv_deplibs_check_method=pass_all
66185815Sobrien  lt_cv_file_magic_test_file=/lib/libc.so
66285815Sobrien  ;;
66385815Sobrien
66489857Sobrien[sysv5uw[78]* | sysv4*uw2*)]
66589857Sobrien  lt_cv_deplibs_check_method=pass_all
66689857Sobrien  ;;
66789857Sobrien
66885815Sobriensysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
66989857Sobrien  case $host_vendor in
67085815Sobrien  ncr)
67185815Sobrien    lt_cv_deplibs_check_method=pass_all
67285815Sobrien    ;;
67385815Sobrien  motorola)
67489857Sobrien    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]']
67585815Sobrien    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
67685815Sobrien    ;;
67785815Sobrien  esac
67885815Sobrien  ;;
67985815Sobrienesac
68085815Sobrien])
68185815Sobrienfile_magic_cmd=$lt_cv_file_magic_cmd
68285815Sobriendeplibs_check_method=$lt_cv_deplibs_check_method
68385815Sobrien])
68485815Sobrien
68585815Sobrien
68685815Sobrien# AC_PROG_NM - find the path to a BSD-compatible name lister
68789857SobrienAC_DEFUN([AC_PROG_NM],
68885815Sobrien[AC_MSG_CHECKING([for BSD-compatible nm])
68989857SobrienAC_CACHE_VAL(lt_cv_path_NM,
69085815Sobrien[if test -n "$NM"; then
69185815Sobrien  # Let the user override the test.
69289857Sobrien  lt_cv_path_NM="$NM"
69385815Sobrienelse
69485815Sobrien  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
69585815Sobrien  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
69685815Sobrien    test -z "$ac_dir" && ac_dir=.
69785815Sobrien    tmp_nm=$ac_dir/${ac_tool_prefix}nm
69885815Sobrien    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
69985815Sobrien      # Check to see if the nm accepts a BSD-compat flag.
70085815Sobrien      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
70185815Sobrien      #   nm: unknown option "B" ignored
70285815Sobrien      # Tru64's nm complains that /dev/null is an invalid object file
70385815Sobrien      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
70489857Sobrien	lt_cv_path_NM="$tmp_nm -B"
70585815Sobrien	break
70685815Sobrien      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
70789857Sobrien	lt_cv_path_NM="$tmp_nm -p"
70885815Sobrien	break
70985815Sobrien      else
71089857Sobrien	lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
71185815Sobrien	continue # so that we can try to find one that supports BSD flags
71285815Sobrien      fi
71385815Sobrien    fi
71485815Sobrien  done
71585815Sobrien  IFS="$ac_save_ifs"
71689857Sobrien  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
71785815Sobrienfi])
71889857SobrienNM="$lt_cv_path_NM"
71985815SobrienAC_MSG_RESULT([$NM])
72085815Sobrien])
72185815Sobrien
72285815Sobrien# AC_CHECK_LIBM - check for math library
72389857SobrienAC_DEFUN([AC_CHECK_LIBM],
72485815Sobrien[AC_REQUIRE([AC_CANONICAL_HOST])dnl
72585815SobrienLIBM=
72689857Sobriencase $host in
72785815Sobrien*-*-beos* | *-*-cygwin* | *-*-pw32*)
72885815Sobrien  # These system don't have libm
72985815Sobrien  ;;
73085815Sobrien*-ncr-sysv4.3*)
73185815Sobrien  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
73285815Sobrien  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
73385815Sobrien  ;;
73485815Sobrien*)
73585815Sobrien  AC_CHECK_LIB(m, main, LIBM="-lm")
73685815Sobrien  ;;
73785815Sobrienesac
73885815Sobrien])
73985815Sobrien
74085815Sobrien# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
74185815Sobrien# the libltdl convenience library and INCLTDL to the include flags for
74285815Sobrien# the libltdl header and adds --enable-ltdl-convenience to the
74385815Sobrien# configure arguments.  Note that LIBLTDL and INCLTDL are not
74485815Sobrien# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
74585815Sobrien# provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
74685815Sobrien# with '${top_builddir}/' and INCLTDL will be prefixed with
74785815Sobrien# '${top_srcdir}/' (note the single quotes!).  If your package is not
74885815Sobrien# flat and you're not using automake, define top_builddir and
74985815Sobrien# top_srcdir appropriately in the Makefiles.
75089857SobrienAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
75189857Sobrien[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
75289857Sobrien  case $enable_ltdl_convenience in
75385815Sobrien  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
75485815Sobrien  "") enable_ltdl_convenience=yes
75585815Sobrien      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
75685815Sobrien  esac
75785815Sobrien  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
75885815Sobrien  INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
75985815Sobrien])
76085815Sobrien
76185815Sobrien# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
76285815Sobrien# the libltdl installable library and INCLTDL to the include flags for
76385815Sobrien# the libltdl header and adds --enable-ltdl-install to the configure
76485815Sobrien# arguments.  Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
76585815Sobrien# AC_CONFIG_SUBDIRS called.  If DIR is not provided and an installed
76685815Sobrien# libltdl is not found, it is assumed to be `libltdl'.  LIBLTDL will
76785815Sobrien# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
76885815Sobrien# with '${top_srcdir}/' (note the single quotes!).  If your package is
76985815Sobrien# not flat and you're not using automake, define top_builddir and
77085815Sobrien# top_srcdir appropriately in the Makefiles.
77185815Sobrien# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
77289857SobrienAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
77389857Sobrien[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
77485815Sobrien  AC_CHECK_LIB(ltdl, main,
77585815Sobrien  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
77685815Sobrien  [if test x"$enable_ltdl_install" = xno; then
77785815Sobrien     AC_MSG_WARN([libltdl not installed, but installation disabled])
77885815Sobrien   else
77985815Sobrien     enable_ltdl_install=yes
78085815Sobrien   fi
78185815Sobrien  ])
78285815Sobrien  if test x"$enable_ltdl_install" = x"yes"; then
78385815Sobrien    ac_configure_args="$ac_configure_args --enable-ltdl-install"
78485815Sobrien    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
78585815Sobrien    INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
78685815Sobrien  else
78785815Sobrien    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
78885815Sobrien    LIBLTDL="-lltdl"
78985815Sobrien    INCLTDL=
79085815Sobrien  fi
79185815Sobrien])
79285815Sobrien
79385815Sobrien# If this macro is not defined by Autoconf, define it here.
79485815Sobrienifdef([AC_PROVIDE_IFELSE],
79585815Sobrien      [],
79685815Sobrien      [define([AC_PROVIDE_IFELSE],
79785815Sobrien              [ifdef([AC_PROVIDE_$1],
79885815Sobrien                     [$2], [$3])])])
79985815Sobrien
80085815Sobrien# AC_LIBTOOL_CXX - enable support for C++ libraries
80189857SobrienAC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
80289857Sobrien
80389857SobrienAC_DEFUN([_AC_LIBTOOL_CXX],
80489857Sobrien[AC_REQUIRE([AC_PROG_CXX])
80585815SobrienAC_REQUIRE([AC_PROG_CXXCPP])
80685815SobrienLIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
80785815Sobrienlt_save_CC="$CC"
80885815Sobrienlt_save_CFLAGS="$CFLAGS"
80985815Sobriendnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
81085815Sobriendnl is set to the C++ compiler.
81185815SobrienAR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
81289857SobrienMAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
81385815SobrienLN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
81485815SobrienAS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
81585815Sobrienobjext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
81685815Sobriendeplibs_check_method="$deplibs_check_method" \
81785815Sobrienfile_magic_cmd="$file_magic_cmd" \
81885815Sobrien${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
81985815Sobrien--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
82085815Sobrien|| AC_MSG_ERROR([libtool tag configuration failed])
82185815SobrienCC="$lt_save_CC"
82285815SobrienCFLAGS="$lt_save_CFLAGS"
82385815Sobrien
82485815Sobrien# Redirect the config.log output again, so that the ltconfig log is not
82585815Sobrien# clobbered by the next message.
82685815Sobrienexec 5>>./config.log
82785815Sobrien])
82885815Sobrien
82985815Sobrien# AC_LIBTOOL_GCJ - enable support for GCJ libraries
83089857SobrienAC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
83189857Sobrien
83289857SobrienAC_DEFUN([_AC_LIBTOOL_GCJ],
83385815Sobrien[AC_REQUIRE([AC_PROG_LIBTOOL])
83485815SobrienAC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
83585815Sobrien  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
83685815Sobrien    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
83785815Sobrien      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
83885815Sobrien         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
83985815Sobrien           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
84085815SobrienLIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
84185815Sobrienlt_save_CC="$CC"
84285815Sobrienlt_save_CFLAGS="$CFLAGS"
84385815Sobriendnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
84485815Sobriendnl is set to the C++ compiler.
84585815SobrienAR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
84689857SobrienMAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
84785815SobrienLN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
84885815SobrienAS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
84985815Sobrienobjext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
85085815Sobriendeplibs_check_method="$deplibs_check_method" \
85185815Sobrienfile_magic_cmd="$file_magic_cmd" \
85285815Sobrien${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
85385815Sobrien--build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
85485815Sobrien|| AC_MSG_ERROR([libtool tag configuration failed])
85585815SobrienCC="$lt_save_CC"
85685815SobrienCFLAGS="$lt_save_CFLAGS"
85785815Sobrien
85885815Sobrien# Redirect the config.log output again, so that the ltconfig log is not
85985815Sobrien# clobbered by the next message.
86085815Sobrienexec 5>>./config.log
86185815Sobrien])
86285815Sobrien
86385815Sobriendnl old names
86489857SobrienAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
86589857SobrienAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
86689857SobrienAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
86789857SobrienAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
86889857SobrienAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
86989857SobrienAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
87089857SobrienAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
87185815Sobrien
87285815Sobriendnl This is just to silence aclocal about the macro not being used
87385815Sobrienifelse([AC_DISABLE_FAST_INSTALL])dnl
87485815Sobrien
87589857SobrienAC_DEFUN([LT_AC_PROG_GCJ],
87689857Sobrien[AC_CHECK_TOOL(GCJ, gcj, no)
87785815Sobrien  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
87885815Sobrien  AC_SUBST(GCJFLAGS)
87985815Sobrien])
880