xref: /openbsd-src/gnu/usr.bin/binutils-2.17/libtool.m4 (revision 3d8817e467ea46cf4772788d6804dd293abfb01a)
1*3d8817e4Smiod## libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
2*3d8817e4Smiod## Copyright 1996, 1997, 1998, 1999, 2000, 2001
3*3d8817e4Smiod## Free Software Foundation, Inc.
4*3d8817e4Smiod## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5*3d8817e4Smiod##
6*3d8817e4Smiod## This program is free software; you can redistribute it and/or modify
7*3d8817e4Smiod## it under the terms of the GNU General Public License as published by
8*3d8817e4Smiod## the Free Software Foundation; either version 2 of the License, or
9*3d8817e4Smiod## (at your option) any later version.
10*3d8817e4Smiod##
11*3d8817e4Smiod## This program is distributed in the hope that it will be useful, but
12*3d8817e4Smiod## WITHOUT ANY WARRANTY; without even the implied warranty of
13*3d8817e4Smiod## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14*3d8817e4Smiod## General Public License for more details.
15*3d8817e4Smiod##
16*3d8817e4Smiod## You should have received a copy of the GNU General Public License
17*3d8817e4Smiod## along with this program; if not, write to the Free Software
18*3d8817e4Smiod## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19*3d8817e4Smiod##
20*3d8817e4Smiod## As a special exception to the GNU General Public License, if you
21*3d8817e4Smiod## distribute this file as part of a program that contains a
22*3d8817e4Smiod## configuration script generated by Autoconf, you may include it under
23*3d8817e4Smiod## the same distribution terms that you use for the rest of that program.
24*3d8817e4Smiod
25*3d8817e4Smiod# serial 46 AC_PROG_LIBTOOL
26*3d8817e4SmiodAC_DEFUN([AC_PROG_LIBTOOL],
27*3d8817e4Smiod[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
28*3d8817e4Smioddnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
29*3d8817e4Smioddnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
30*3d8817e4Smiod  AC_PROVIDE_IFELSE([AC_PROG_CXX],
31*3d8817e4Smiod    [AC_LIBTOOL_CXX],
32*3d8817e4Smiod    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
33*3d8817e4Smiod])])
34*3d8817e4Smiod
35*3d8817e4Smioddnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
36*3d8817e4Smioddnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
37*3d8817e4Smioddnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
38*3d8817e4Smiod  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
39*3d8817e4Smiod    [AC_LIBTOOL_GCJ],
40*3d8817e4Smiod    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
41*3d8817e4Smiod        [AC_LIBTOOL_GCJ],
42*3d8817e4Smiod	[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
43*3d8817e4Smiod	  [AC_LIBTOOL_GCJ],
44*3d8817e4Smiod	[ifdef([AC_PROG_GCJ],
45*3d8817e4Smiod	       [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
46*3d8817e4Smiod])])
47*3d8817e4Smiod	 ifdef([A][M_PROG_GCJ],
48*3d8817e4Smiod	       [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
49*3d8817e4Smiod])])
50*3d8817e4Smiod	 ifdef([LT_AC_PROG_GCJ],
51*3d8817e4Smiod	       [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
52*3d8817e4Smiod])])])])])])
53*3d8817e4Smiod
54*3d8817e4SmiodAC_DEFUN([_AC_PROG_LIBTOOL],
55*3d8817e4Smiod[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
56*3d8817e4SmiodAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
57*3d8817e4SmiodAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
58*3d8817e4Smiod
59*3d8817e4Smiod# Save cache, so that ltconfig can load it
60*3d8817e4SmiodAC_CACHE_SAVE
61*3d8817e4Smiod
62*3d8817e4Smiod# Actually configure libtool.  ac_aux_dir is where install-sh is found.
63*3d8817e4SmiodAR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
64*3d8817e4SmiodMAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
65*3d8817e4SmiodLN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
66*3d8817e4SmiodAS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
67*3d8817e4Smiodobjext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
68*3d8817e4Smioddeplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
69*3d8817e4Smiod${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
70*3d8817e4Smiod$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
71*3d8817e4Smiod|| AC_MSG_ERROR([libtool configure failed])
72*3d8817e4Smiod
73*3d8817e4Smiod# Reload cache, that may have been modified by ltconfig
74*3d8817e4SmiodAC_CACHE_LOAD
75*3d8817e4Smiod
76*3d8817e4Smiod# This can be used to rebuild libtool when needed
77*3d8817e4SmiodLIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
78*3d8817e4Smiod
79*3d8817e4Smiod# Always use our own libtool.
80*3d8817e4SmiodLIBTOOL='$(SHELL) $(top_builddir)/libtool'
81*3d8817e4SmiodAC_SUBST(LIBTOOL)dnl
82*3d8817e4Smiod
83*3d8817e4Smiod# Redirect the config.log output again, so that the ltconfig log is not
84*3d8817e4Smiod# clobbered by the next message.
85*3d8817e4Smiodexec 5>>./config.log
86*3d8817e4Smiod])
87*3d8817e4Smiod
88*3d8817e4SmiodAC_DEFUN([AC_LIBTOOL_SETUP],
89*3d8817e4Smiod[AC_PREREQ(2.13)dnl
90*3d8817e4SmiodAC_REQUIRE([AC_ENABLE_SHARED])dnl
91*3d8817e4SmiodAC_REQUIRE([AC_ENABLE_STATIC])dnl
92*3d8817e4SmiodAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
93*3d8817e4SmiodAC_REQUIRE([AC_CANONICAL_HOST])dnl
94*3d8817e4SmiodAC_REQUIRE([AC_CANONICAL_BUILD])dnl
95*3d8817e4SmiodAC_REQUIRE([AC_PROG_CC])dnl
96*3d8817e4SmiodAC_REQUIRE([AC_PROG_LD])dnl
97*3d8817e4SmiodAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
98*3d8817e4SmiodAC_REQUIRE([AC_PROG_NM])dnl
99*3d8817e4SmiodAC_REQUIRE([AC_PROG_LN_S])dnl
100*3d8817e4SmiodAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
101*3d8817e4Smiod# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
102*3d8817e4SmiodAC_REQUIRE([AC_OBJEXT])dnl
103*3d8817e4SmiodAC_REQUIRE([AC_EXEEXT])dnl
104*3d8817e4Smioddnl
105*3d8817e4Smiod
106*3d8817e4SmiodAC_LIBTOOL_SYS_MAX_CMD_LEN
107*3d8817e4Smiod
108*3d8817e4Smiod# Only perform the check for file, if the check method requires it
109*3d8817e4Smiodcase $deplibs_check_method in
110*3d8817e4Smiodfile_magic*)
111*3d8817e4Smiod  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
112*3d8817e4Smiod    AC_PATH_MAGIC
113*3d8817e4Smiod  fi
114*3d8817e4Smiod  ;;
115*3d8817e4Smiodesac
116*3d8817e4Smiod
117*3d8817e4SmiodAC_CHECK_TOOL(RANLIB, ranlib, :)
118*3d8817e4SmiodAC_CHECK_TOOL(STRIP, strip, :)
119*3d8817e4Smiod
120*3d8817e4Smiod# Check for any special flags to pass to ltconfig.
121*3d8817e4Smiodlibtool_flags="--cache-file=$cache_file"
122*3d8817e4Smiodtest "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
123*3d8817e4Smiodtest "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
124*3d8817e4Smiodtest "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
125*3d8817e4Smiodtest "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
126*3d8817e4Smiodtest "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
127*3d8817e4Smiodifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
128*3d8817e4Smiod[libtool_flags="$libtool_flags --enable-dlopen"])
129*3d8817e4Smiodifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
130*3d8817e4Smiod[libtool_flags="$libtool_flags --enable-win32-dll"])
131*3d8817e4SmiodAC_ARG_ENABLE(libtool-lock,
132*3d8817e4Smiod  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
133*3d8817e4Smiodtest "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
134*3d8817e4Smiodtest x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
135*3d8817e4Smiod
136*3d8817e4SmiodAC_ARG_WITH(pic,
137*3d8817e4Smiod  [  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
138*3d8817e4Smiod     pic_mode="$withval", pic_mode=default)
139*3d8817e4Smiodtest x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
140*3d8817e4Smiodtest x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
141*3d8817e4Smiod
142*3d8817e4Smiod# Some flags need to be propagated to the compiler or linker for good
143*3d8817e4Smiod# libtool support.
144*3d8817e4Smiodcase $host in
145*3d8817e4Smiod*-*-irix6*)
146*3d8817e4Smiod  # Find out which ABI we are using.
147*3d8817e4Smiod  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
148*3d8817e4Smiod  if AC_TRY_EVAL(ac_compile); then
149*3d8817e4Smiod   if test "$lt_cv_prog_gnu_ld" = yes; then
150*3d8817e4Smiod    case `/usr/bin/file conftest.$ac_objext` in
151*3d8817e4Smiod    *32-bit*)
152*3d8817e4Smiod      LD="${LD-ld} -melf32bsmip"
153*3d8817e4Smiod      ;;
154*3d8817e4Smiod    *N32*)
155*3d8817e4Smiod      LD="${LD-ld} -melf32bmipn32"
156*3d8817e4Smiod      ;;
157*3d8817e4Smiod    *64-bit*)
158*3d8817e4Smiod      LD="${LD-ld} -melf64bmip"
159*3d8817e4Smiod      ;;
160*3d8817e4Smiod    esac
161*3d8817e4Smiod   else
162*3d8817e4Smiod    case `/usr/bin/file conftest.$ac_objext` in
163*3d8817e4Smiod    *32-bit*)
164*3d8817e4Smiod      LD="${LD-ld} -32"
165*3d8817e4Smiod      ;;
166*3d8817e4Smiod    *N32*)
167*3d8817e4Smiod      LD="${LD-ld} -n32"
168*3d8817e4Smiod      ;;
169*3d8817e4Smiod    *64-bit*)
170*3d8817e4Smiod      LD="${LD-ld} -64"
171*3d8817e4Smiod      ;;
172*3d8817e4Smiod    esac
173*3d8817e4Smiod   fi
174*3d8817e4Smiod  fi
175*3d8817e4Smiod  rm -rf conftest*
176*3d8817e4Smiod  ;;
177*3d8817e4Smiod
178*3d8817e4Smiodia64-*-hpux*)
179*3d8817e4Smiod  # Find out which ABI we are using.
180*3d8817e4Smiod  echo 'int i;' > conftest.$ac_ext
181*3d8817e4Smiod  if AC_TRY_EVAL(ac_compile); then
182*3d8817e4Smiod    case "`/usr/bin/file conftest.o`" in
183*3d8817e4Smiod    *ELF-32*)
184*3d8817e4Smiod      HPUX_IA64_MODE="32"
185*3d8817e4Smiod      ;;
186*3d8817e4Smiod    *ELF-64*)
187*3d8817e4Smiod      HPUX_IA64_MODE="64"
188*3d8817e4Smiod      ;;
189*3d8817e4Smiod    esac
190*3d8817e4Smiod  fi
191*3d8817e4Smiod  rm -rf conftest*
192*3d8817e4Smiod  ;;
193*3d8817e4Smiod
194*3d8817e4Smiodx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
195*3d8817e4Smiod  # Find out which ABI we are using.
196*3d8817e4Smiod  echo 'int i;' > conftest.$ac_ext
197*3d8817e4Smiod  if AC_TRY_EVAL(ac_compile); then
198*3d8817e4Smiod    case "`/usr/bin/file conftest.o`" in
199*3d8817e4Smiod    *32-bit*)
200*3d8817e4Smiod      case $host in
201*3d8817e4Smiod        x86_64-*linux*)
202*3d8817e4Smiod          LD="${LD-ld} -m elf_i386"
203*3d8817e4Smiod          ;;
204*3d8817e4Smiod        ppc64-*linux*|powerpc64-*linux*)
205*3d8817e4Smiod          LD="${LD-ld} -m elf32ppclinux"
206*3d8817e4Smiod          ;;
207*3d8817e4Smiod        s390x-*linux*)
208*3d8817e4Smiod          LD="${LD-ld} -m elf_s390"
209*3d8817e4Smiod          ;;
210*3d8817e4Smiod        sparc64-*linux*)
211*3d8817e4Smiod          LD="${LD-ld} -m elf32_sparc"
212*3d8817e4Smiod          ;;
213*3d8817e4Smiod      esac
214*3d8817e4Smiod      ;;
215*3d8817e4Smiod    *64-bit*)
216*3d8817e4Smiod      case $host in
217*3d8817e4Smiod        x86_64-*linux*)
218*3d8817e4Smiod          LD="${LD-ld} -m elf_x86_64"
219*3d8817e4Smiod          ;;
220*3d8817e4Smiod        ppc*-*linux*|powerpc*-*linux*)
221*3d8817e4Smiod          LD="${LD-ld} -m elf64ppc"
222*3d8817e4Smiod          ;;
223*3d8817e4Smiod        s390*-*linux*)
224*3d8817e4Smiod          LD="${LD-ld} -m elf64_s390"
225*3d8817e4Smiod          ;;
226*3d8817e4Smiod        sparc*-*linux*)
227*3d8817e4Smiod          LD="${LD-ld} -m elf64_sparc"
228*3d8817e4Smiod          ;;
229*3d8817e4Smiod      esac
230*3d8817e4Smiod      ;;
231*3d8817e4Smiod    esac
232*3d8817e4Smiod  fi
233*3d8817e4Smiod  rm -rf conftest*
234*3d8817e4Smiod  ;;
235*3d8817e4Smiod
236*3d8817e4Smiod*-*-sco3.2v5*)
237*3d8817e4Smiod  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
238*3d8817e4Smiod  SAVE_CFLAGS="$CFLAGS"
239*3d8817e4Smiod  CFLAGS="$CFLAGS -belf"
240*3d8817e4Smiod  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
241*3d8817e4Smiod    [AC_LANG_SAVE
242*3d8817e4Smiod     AC_LANG_C
243*3d8817e4Smiod     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
244*3d8817e4Smiod     AC_LANG_RESTORE])
245*3d8817e4Smiod  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
246*3d8817e4Smiod    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
247*3d8817e4Smiod    CFLAGS="$SAVE_CFLAGS"
248*3d8817e4Smiod  fi
249*3d8817e4Smiod  ;;
250*3d8817e4Smiod
251*3d8817e4Smiodifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
252*3d8817e4Smiod[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
253*3d8817e4Smiod  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
254*3d8817e4Smiod  AC_CHECK_TOOL(AS, as, false)
255*3d8817e4Smiod  AC_CHECK_TOOL(OBJDUMP, objdump, false)
256*3d8817e4Smiod
257*3d8817e4Smiod  # recent cygwin and mingw systems supply a stub DllMain which the user
258*3d8817e4Smiod  # can override, but on older systems we have to supply one
259*3d8817e4Smiod  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
260*3d8817e4Smiod    [AC_TRY_LINK([],
261*3d8817e4Smiod      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
262*3d8817e4Smiod      DllMain (0, 0, 0);],
263*3d8817e4Smiod      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
264*3d8817e4Smiod
265*3d8817e4Smiod  case $host/$CC in
266*3d8817e4Smiod  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
267*3d8817e4Smiod    # old mingw systems require "-dll" to link a DLL, while more recent ones
268*3d8817e4Smiod    # require "-mdll"
269*3d8817e4Smiod    SAVE_CFLAGS="$CFLAGS"
270*3d8817e4Smiod    CFLAGS="$CFLAGS -mdll"
271*3d8817e4Smiod    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
272*3d8817e4Smiod      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
273*3d8817e4Smiod    CFLAGS="$SAVE_CFLAGS" ;;
274*3d8817e4Smiod  *-*-cygwin* | *-*-pw32*)
275*3d8817e4Smiod    # cygwin systems need to pass --dll to the linker, and not link
276*3d8817e4Smiod    # crt.o which will require a WinMain@16 definition.
277*3d8817e4Smiod    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
278*3d8817e4Smiod  esac
279*3d8817e4Smiod  ;;
280*3d8817e4Smiod  ])
281*3d8817e4Smiodesac
282*3d8817e4Smiod])
283*3d8817e4Smiod
284*3d8817e4Smiod
285*3d8817e4Smiod# AC_LIBTOOL_SYS_MAX_CMD_LEN
286*3d8817e4Smiod# --------------------------
287*3d8817e4SmiodAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
288*3d8817e4Smiod[# find the maximum length of command line arguments
289*3d8817e4SmiodAC_MSG_CHECKING([the maximum length of command line arguments])
290*3d8817e4SmiodAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
291*3d8817e4Smiod  i=0
292*3d8817e4Smiod  teststring="ABCD"
293*3d8817e4Smiod
294*3d8817e4Smiod  case $build_os in
295*3d8817e4Smiod  msdosdjgpp*)
296*3d8817e4Smiod    # On DJGPP, this test can blow up pretty badly due to problems in libc
297*3d8817e4Smiod    # (any single argument exceeding 2000 bytes causes a buffer overrun
298*3d8817e4Smiod    # during glob expansion).  Even if it were fixed, the result of this
299*3d8817e4Smiod    # check would be larger than it should be.
300*3d8817e4Smiod    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
301*3d8817e4Smiod    ;;
302*3d8817e4Smiod
303*3d8817e4Smiod  cygwin* | mingw*)
304*3d8817e4Smiod    # On Win9x/ME, this test blows up -- it succeeds, but takes
305*3d8817e4Smiod    # about 5 minutes as the teststring grows exponentially.
306*3d8817e4Smiod    # Worse, since 9x/ME are not pre-emptively multitasking,
307*3d8817e4Smiod    # you end up with a "frozen" computer, even though with patience
308*3d8817e4Smiod    # the test eventually succeeds (with a max line length of 256k).
309*3d8817e4Smiod    # Instead, let's just punt: use the minimum linelength reported by
310*3d8817e4Smiod    # all of the supported platforms: 8192 (on NT/2K/XP).
311*3d8817e4Smiod    lt_cv_sys_max_cmd_len=8192;
312*3d8817e4Smiod    ;;
313*3d8817e4Smiod
314*3d8817e4Smiod  amigaos*)
315*3d8817e4Smiod    # On AmigaOS with pdksh, this test takes hours, literally.
316*3d8817e4Smiod    # So we just punt and use a minimum line length of 8192.
317*3d8817e4Smiod    lt_cv_sys_max_cmd_len=8192;
318*3d8817e4Smiod    ;;
319*3d8817e4Smiod
320*3d8817e4Smiod  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
321*3d8817e4Smiod    # This has been around since 386BSD, at least.  Likely further.
322*3d8817e4Smiod    if test -x /sbin/sysctl; then
323*3d8817e4Smiod      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
324*3d8817e4Smiod    elif test -x /usr/sbin/sysctl; then
325*3d8817e4Smiod      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
326*3d8817e4Smiod    else
327*3d8817e4Smiod      lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
328*3d8817e4Smiod    fi
329*3d8817e4Smiod    # And add a safety zone
330*3d8817e4Smiod    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
331*3d8817e4Smiod    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
332*3d8817e4Smiod    ;;
333*3d8817e4Smiod  esac
334*3d8817e4Smiod])
335*3d8817e4Smiodif test -n "$lt_cv_sys_max_cmd_len" ; then
336*3d8817e4Smiod  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
337*3d8817e4Smiodelse
338*3d8817e4Smiod  AC_MSG_RESULT(none)
339*3d8817e4Smiodfi
340*3d8817e4Smiod])# AC_LIBTOOL_SYS_MAX_CMD_LEN
341*3d8817e4Smiod
342*3d8817e4Smiod
343*3d8817e4Smiod# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
344*3d8817e4SmiodAC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
345*3d8817e4Smiod
346*3d8817e4Smiod# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
347*3d8817e4SmiodAC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
348*3d8817e4Smiod
349*3d8817e4Smiod# AC_ENABLE_SHARED - implement the --enable-shared flag
350*3d8817e4Smiod# Usage: AC_ENABLE_SHARED[(DEFAULT)]
351*3d8817e4Smiod#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
352*3d8817e4Smiod#   `yes'.
353*3d8817e4SmiodAC_DEFUN([AC_ENABLE_SHARED],
354*3d8817e4Smiod[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
355*3d8817e4SmiodAC_ARG_ENABLE(shared,
356*3d8817e4Smiodchangequote(<<, >>)dnl
357*3d8817e4Smiod<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
358*3d8817e4Smiodchangequote([, ])dnl
359*3d8817e4Smiod[p=${PACKAGE-default}
360*3d8817e4Smiodcase $enableval in
361*3d8817e4Smiodyes) enable_shared=yes ;;
362*3d8817e4Smiodno) enable_shared=no ;;
363*3d8817e4Smiod*)
364*3d8817e4Smiod  enable_shared=no
365*3d8817e4Smiod  # Look at the argument we got.  We use all the common list separators.
366*3d8817e4Smiod  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
367*3d8817e4Smiod  for pkg in $enableval; do
368*3d8817e4Smiod    if test "X$pkg" = "X$p"; then
369*3d8817e4Smiod      enable_shared=yes
370*3d8817e4Smiod    fi
371*3d8817e4Smiod  done
372*3d8817e4Smiod  IFS="$ac_save_ifs"
373*3d8817e4Smiod  ;;
374*3d8817e4Smiodesac],
375*3d8817e4Smiodenable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
376*3d8817e4Smiod])
377*3d8817e4Smiod
378*3d8817e4Smiod# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
379*3d8817e4SmiodAC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
380*3d8817e4SmiodAC_ENABLE_SHARED(no)])
381*3d8817e4Smiod
382*3d8817e4Smiod# AC_ENABLE_STATIC - implement the --enable-static flag
383*3d8817e4Smiod# Usage: AC_ENABLE_STATIC[(DEFAULT)]
384*3d8817e4Smiod#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
385*3d8817e4Smiod#   `yes'.
386*3d8817e4SmiodAC_DEFUN([AC_ENABLE_STATIC],
387*3d8817e4Smiod[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
388*3d8817e4SmiodAC_ARG_ENABLE(static,
389*3d8817e4Smiodchangequote(<<, >>)dnl
390*3d8817e4Smiod<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
391*3d8817e4Smiodchangequote([, ])dnl
392*3d8817e4Smiod[p=${PACKAGE-default}
393*3d8817e4Smiodcase $enableval in
394*3d8817e4Smiodyes) enable_static=yes ;;
395*3d8817e4Smiodno) enable_static=no ;;
396*3d8817e4Smiod*)
397*3d8817e4Smiod  enable_static=no
398*3d8817e4Smiod  # Look at the argument we got.  We use all the common list separators.
399*3d8817e4Smiod  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
400*3d8817e4Smiod  for pkg in $enableval; do
401*3d8817e4Smiod    if test "X$pkg" = "X$p"; then
402*3d8817e4Smiod      enable_static=yes
403*3d8817e4Smiod    fi
404*3d8817e4Smiod  done
405*3d8817e4Smiod  IFS="$ac_save_ifs"
406*3d8817e4Smiod  ;;
407*3d8817e4Smiodesac],
408*3d8817e4Smiodenable_static=AC_ENABLE_STATIC_DEFAULT)dnl
409*3d8817e4Smiod])
410*3d8817e4Smiod
411*3d8817e4Smiod# AC_DISABLE_STATIC - set the default static flag to --disable-static
412*3d8817e4SmiodAC_DEFUN([AC_DISABLE_STATIC],
413*3d8817e4Smiod[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
414*3d8817e4SmiodAC_ENABLE_STATIC(no)])
415*3d8817e4Smiod
416*3d8817e4Smiod
417*3d8817e4Smiod# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
418*3d8817e4Smiod# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
419*3d8817e4Smiod#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
420*3d8817e4Smiod#   `yes'.
421*3d8817e4SmiodAC_DEFUN([AC_ENABLE_FAST_INSTALL],
422*3d8817e4Smiod[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
423*3d8817e4SmiodAC_ARG_ENABLE(fast-install,
424*3d8817e4Smiodchangequote(<<, >>)dnl
425*3d8817e4Smiod<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
426*3d8817e4Smiodchangequote([, ])dnl
427*3d8817e4Smiod[p=${PACKAGE-default}
428*3d8817e4Smiodcase $enableval in
429*3d8817e4Smiodyes) enable_fast_install=yes ;;
430*3d8817e4Smiodno) enable_fast_install=no ;;
431*3d8817e4Smiod*)
432*3d8817e4Smiod  enable_fast_install=no
433*3d8817e4Smiod  # Look at the argument we got.  We use all the common list separators.
434*3d8817e4Smiod  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
435*3d8817e4Smiod  for pkg in $enableval; do
436*3d8817e4Smiod    if test "X$pkg" = "X$p"; then
437*3d8817e4Smiod      enable_fast_install=yes
438*3d8817e4Smiod    fi
439*3d8817e4Smiod  done
440*3d8817e4Smiod  IFS="$ac_save_ifs"
441*3d8817e4Smiod  ;;
442*3d8817e4Smiodesac],
443*3d8817e4Smiodenable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
444*3d8817e4Smiod])
445*3d8817e4Smiod
446*3d8817e4Smiod# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
447*3d8817e4SmiodAC_DEFUN([AC_DISABLE_FAST_INSTALL],
448*3d8817e4Smiod[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
449*3d8817e4SmiodAC_ENABLE_FAST_INSTALL(no)])
450*3d8817e4Smiod
451*3d8817e4Smiod# AC_LIBTOOL_PICMODE - implement the --with-pic flag
452*3d8817e4Smiod# Usage: AC_LIBTOOL_PICMODE[(MODE)]
453*3d8817e4Smiod#   Where MODE is either `yes' or `no'.  If omitted, it defaults to
454*3d8817e4Smiod#   `both'.
455*3d8817e4SmiodAC_DEFUN([AC_LIBTOOL_PICMODE],
456*3d8817e4Smiod[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
457*3d8817e4Smiodpic_mode=ifelse($#,1,$1,default)])
458*3d8817e4Smiod
459*3d8817e4Smiod
460*3d8817e4Smiod# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
461*3d8817e4SmiodAC_DEFUN([AC_PATH_TOOL_PREFIX],
462*3d8817e4Smiod[AC_MSG_CHECKING([for $1])
463*3d8817e4SmiodAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
464*3d8817e4Smiod[case $MAGIC_CMD in
465*3d8817e4Smiod  /*)
466*3d8817e4Smiod  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
467*3d8817e4Smiod  ;;
468*3d8817e4Smiod  ?:/*)
469*3d8817e4Smiod  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
470*3d8817e4Smiod  ;;
471*3d8817e4Smiod  *)
472*3d8817e4Smiod  ac_save_MAGIC_CMD="$MAGIC_CMD"
473*3d8817e4Smiod  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
474*3d8817e4Smioddnl $ac_dummy forces splitting on constant user-supplied paths.
475*3d8817e4Smioddnl POSIX.2 word splitting is done only on the output of word expansions,
476*3d8817e4Smioddnl not every word.  This closes a longstanding sh security hole.
477*3d8817e4Smiod  ac_dummy="ifelse([$2], , $PATH, [$2])"
478*3d8817e4Smiod  for ac_dir in $ac_dummy; do
479*3d8817e4Smiod    test -z "$ac_dir" && ac_dir=.
480*3d8817e4Smiod    if test -f $ac_dir/$1; then
481*3d8817e4Smiod      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
482*3d8817e4Smiod      if test -n "$file_magic_test_file"; then
483*3d8817e4Smiod	case $deplibs_check_method in
484*3d8817e4Smiod	"file_magic "*)
485*3d8817e4Smiod	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
486*3d8817e4Smiod	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
487*3d8817e4Smiod	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
488*3d8817e4Smiod	    egrep "$file_magic_regex" > /dev/null; then
489*3d8817e4Smiod	    :
490*3d8817e4Smiod	  else
491*3d8817e4Smiod	    cat <<EOF 1>&2
492*3d8817e4Smiod
493*3d8817e4Smiod*** Warning: the command libtool uses to detect shared libraries,
494*3d8817e4Smiod*** $file_magic_cmd, produces output that libtool cannot recognize.
495*3d8817e4Smiod*** The result is that libtool may fail to recognize shared libraries
496*3d8817e4Smiod*** as such.  This will affect the creation of libtool libraries that
497*3d8817e4Smiod*** depend on shared libraries, but programs linked with such libtool
498*3d8817e4Smiod*** libraries will work regardless of this problem.  Nevertheless, you
499*3d8817e4Smiod*** may want to report the problem to your system manager and/or to
500*3d8817e4Smiod*** bug-libtool@gnu.org
501*3d8817e4Smiod
502*3d8817e4SmiodEOF
503*3d8817e4Smiod	  fi ;;
504*3d8817e4Smiod	esac
505*3d8817e4Smiod      fi
506*3d8817e4Smiod      break
507*3d8817e4Smiod    fi
508*3d8817e4Smiod  done
509*3d8817e4Smiod  IFS="$ac_save_ifs"
510*3d8817e4Smiod  MAGIC_CMD="$ac_save_MAGIC_CMD"
511*3d8817e4Smiod  ;;
512*3d8817e4Smiodesac])
513*3d8817e4SmiodMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
514*3d8817e4Smiodif test -n "$MAGIC_CMD"; then
515*3d8817e4Smiod  AC_MSG_RESULT($MAGIC_CMD)
516*3d8817e4Smiodelse
517*3d8817e4Smiod  AC_MSG_RESULT(no)
518*3d8817e4Smiodfi
519*3d8817e4Smiod])
520*3d8817e4Smiod
521*3d8817e4Smiod
522*3d8817e4Smiod# AC_PATH_MAGIC - find a file program which can recognise a shared library
523*3d8817e4SmiodAC_DEFUN([AC_PATH_MAGIC],
524*3d8817e4Smiod[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
525*3d8817e4SmiodAC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
526*3d8817e4Smiodif test -z "$lt_cv_path_MAGIC_CMD"; then
527*3d8817e4Smiod  if test -n "$ac_tool_prefix"; then
528*3d8817e4Smiod    AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
529*3d8817e4Smiod  else
530*3d8817e4Smiod    MAGIC_CMD=:
531*3d8817e4Smiod  fi
532*3d8817e4Smiodfi
533*3d8817e4Smiod])
534*3d8817e4Smiod
535*3d8817e4Smiod
536*3d8817e4Smiod# AC_PROG_LD - find the path to the GNU or non-GNU linker
537*3d8817e4SmiodAC_DEFUN([AC_PROG_LD],
538*3d8817e4Smiod[AC_ARG_WITH(gnu-ld,
539*3d8817e4Smiod[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
540*3d8817e4Smiodtest "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
541*3d8817e4SmiodAC_REQUIRE([AC_PROG_CC])dnl
542*3d8817e4SmiodAC_REQUIRE([AC_CANONICAL_HOST])dnl
543*3d8817e4SmiodAC_REQUIRE([AC_CANONICAL_BUILD])dnl
544*3d8817e4Smiodac_prog=ld
545*3d8817e4Smiodif test "$GCC" = yes; then
546*3d8817e4Smiod  # Check if gcc -print-prog-name=ld gives a path.
547*3d8817e4Smiod  AC_MSG_CHECKING([for ld used by GCC])
548*3d8817e4Smiod  case $host in
549*3d8817e4Smiod  *-*-mingw*)
550*3d8817e4Smiod    # gcc leaves a trailing carriage return which upsets mingw
551*3d8817e4Smiod    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
552*3d8817e4Smiod  *)
553*3d8817e4Smiod    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
554*3d8817e4Smiod  esac
555*3d8817e4Smiod  case $ac_prog in
556*3d8817e4Smiod    # Accept absolute paths.
557*3d8817e4Smiod    [[\\/]* | [A-Za-z]:[\\/]*)]
558*3d8817e4Smiod      re_direlt=['/[^/][^/]*/\.\./']
559*3d8817e4Smiod      # Canonicalize the path of ld
560*3d8817e4Smiod      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
561*3d8817e4Smiod      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
562*3d8817e4Smiod	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
563*3d8817e4Smiod      done
564*3d8817e4Smiod      test -z "$LD" && LD="$ac_prog"
565*3d8817e4Smiod      ;;
566*3d8817e4Smiod  "")
567*3d8817e4Smiod    # If it fails, then pretend we aren't using GCC.
568*3d8817e4Smiod    ac_prog=ld
569*3d8817e4Smiod    ;;
570*3d8817e4Smiod  *)
571*3d8817e4Smiod    # If it is relative, then search for the first ld in PATH.
572*3d8817e4Smiod    with_gnu_ld=unknown
573*3d8817e4Smiod    ;;
574*3d8817e4Smiod  esac
575*3d8817e4Smiodelif test "$with_gnu_ld" = yes; then
576*3d8817e4Smiod  AC_MSG_CHECKING([for GNU ld])
577*3d8817e4Smiodelse
578*3d8817e4Smiod  AC_MSG_CHECKING([for non-GNU ld])
579*3d8817e4Smiodfi
580*3d8817e4SmiodAC_CACHE_VAL(lt_cv_path_LD,
581*3d8817e4Smiod[if test -z "$LD"; then
582*3d8817e4Smiod  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
583*3d8817e4Smiod  for ac_dir in $PATH; do
584*3d8817e4Smiod    test -z "$ac_dir" && ac_dir=.
585*3d8817e4Smiod    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
586*3d8817e4Smiod      lt_cv_path_LD="$ac_dir/$ac_prog"
587*3d8817e4Smiod      # Check to see if the program is GNU ld.  I'd rather use --version,
588*3d8817e4Smiod      # but apparently some GNU ld's only accept -v.
589*3d8817e4Smiod      # Break only if it was the GNU/non-GNU ld that we prefer.
590*3d8817e4Smiod      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
591*3d8817e4Smiod	test "$with_gnu_ld" != no && break
592*3d8817e4Smiod      else
593*3d8817e4Smiod	test "$with_gnu_ld" != yes && break
594*3d8817e4Smiod      fi
595*3d8817e4Smiod    fi
596*3d8817e4Smiod  done
597*3d8817e4Smiod  IFS="$ac_save_ifs"
598*3d8817e4Smiodelse
599*3d8817e4Smiod  lt_cv_path_LD="$LD" # Let the user override the test with a path.
600*3d8817e4Smiodfi])
601*3d8817e4SmiodLD="$lt_cv_path_LD"
602*3d8817e4Smiodif test -n "$LD"; then
603*3d8817e4Smiod  AC_MSG_RESULT($LD)
604*3d8817e4Smiodelse
605*3d8817e4Smiod  AC_MSG_RESULT(no)
606*3d8817e4Smiodfi
607*3d8817e4Smiodtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
608*3d8817e4SmiodAC_PROG_LD_GNU
609*3d8817e4Smiod])
610*3d8817e4Smiod
611*3d8817e4SmiodAC_DEFUN([AC_PROG_LD_GNU],
612*3d8817e4Smiod[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
613*3d8817e4Smiod[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
614*3d8817e4Smiodif $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
615*3d8817e4Smiod  lt_cv_prog_gnu_ld=yes
616*3d8817e4Smiodelse
617*3d8817e4Smiod  lt_cv_prog_gnu_ld=no
618*3d8817e4Smiodfi])
619*3d8817e4Smiodwith_gnu_ld=$lt_cv_prog_gnu_ld
620*3d8817e4Smiod])
621*3d8817e4Smiod
622*3d8817e4Smiod# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
623*3d8817e4Smiod#   -- PORTME Some linkers may need a different reload flag.
624*3d8817e4SmiodAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
625*3d8817e4Smiod[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
626*3d8817e4Smiod[lt_cv_ld_reload_flag='-r'])
627*3d8817e4Smiodreload_flag=$lt_cv_ld_reload_flag
628*3d8817e4Smiodtest -n "$reload_flag" && reload_flag=" $reload_flag"
629*3d8817e4Smiod])
630*3d8817e4Smiod
631*3d8817e4Smiod# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
632*3d8817e4Smiod#  -- PORTME fill in with the dynamic library characteristics
633*3d8817e4SmiodAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
634*3d8817e4Smiod[AC_CACHE_CHECK([how to recognise dependant libraries],
635*3d8817e4Smiodlt_cv_deplibs_check_method,
636*3d8817e4Smiod[lt_cv_file_magic_cmd='$MAGIC_CMD'
637*3d8817e4Smiodlt_cv_file_magic_test_file=
638*3d8817e4Smiodlt_cv_deplibs_check_method='unknown'
639*3d8817e4Smiod# Need to set the preceding variable on all platforms that support
640*3d8817e4Smiod# interlibrary dependencies.
641*3d8817e4Smiod# 'none' -- dependencies not supported.
642*3d8817e4Smiod# `unknown' -- same as none, but documents that we really don't know.
643*3d8817e4Smiod# 'pass_all' -- all dependencies passed with no checks.
644*3d8817e4Smiod# 'test_compile' -- check by making test program.
645*3d8817e4Smiod# 'file_magic [regex]' -- check by looking for files in library path
646*3d8817e4Smiod# which responds to the $file_magic_cmd with a given egrep regex.
647*3d8817e4Smiod# If you have `file' or equivalent on your system and you're not sure
648*3d8817e4Smiod# whether `pass_all' will *always* work, you probably want this one.
649*3d8817e4Smiod
650*3d8817e4Smiodcase $host_os in
651*3d8817e4Smiodaix*)
652*3d8817e4Smiod  lt_cv_deplibs_check_method=pass_all
653*3d8817e4Smiod  ;;
654*3d8817e4Smiod
655*3d8817e4Smiodbeos*)
656*3d8817e4Smiod  lt_cv_deplibs_check_method=pass_all
657*3d8817e4Smiod  ;;
658*3d8817e4Smiod
659*3d8817e4Smiodbsdi4*)
660*3d8817e4Smiod  lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
661*3d8817e4Smiod  lt_cv_file_magic_cmd='/usr/bin/file -L'
662*3d8817e4Smiod  lt_cv_file_magic_test_file=/shlib/libc.so
663*3d8817e4Smiod  ;;
664*3d8817e4Smiod
665*3d8817e4Smiodcygwin* | mingw* |pw32*)
666*3d8817e4Smiod  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
667*3d8817e4Smiod  lt_cv_file_magic_cmd='$OBJDUMP -f'
668*3d8817e4Smiod  ;;
669*3d8817e4Smiod
670*3d8817e4Smioddarwin* | rhapsody*)
671*3d8817e4Smiod  # this will be overwritten by pass_all, but leave it in just in case
672*3d8817e4Smiod  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
673*3d8817e4Smiod  lt_cv_file_magic_cmd='/usr/bin/file -L'
674*3d8817e4Smiod  case "$host_os" in
675*3d8817e4Smiod  rhapsody* | darwin1.[012])
676*3d8817e4Smiod    lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
677*3d8817e4Smiod    ;;
678*3d8817e4Smiod  *) # Darwin 1.3 on
679*3d8817e4Smiod    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
680*3d8817e4Smiod    ;;
681*3d8817e4Smiod  esac
682*3d8817e4Smiod  lt_cv_deplibs_check_method=pass_all
683*3d8817e4Smiod  ;;
684*3d8817e4Smiod
685*3d8817e4Smiodfreebsd* | kfreebsd*-gnu)
686*3d8817e4Smiod  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
687*3d8817e4Smiod    case $host_cpu in
688*3d8817e4Smiod    i*86 )
689*3d8817e4Smiod      # Not sure whether the presence of OpenBSD here was a mistake.
690*3d8817e4Smiod      # Let's accept both of them until this is cleared up.
691*3d8817e4Smiod      lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
692*3d8817e4Smiod      lt_cv_file_magic_cmd=/usr/bin/file
693*3d8817e4Smiod      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
694*3d8817e4Smiod      ;;
695*3d8817e4Smiod    esac
696*3d8817e4Smiod  else
697*3d8817e4Smiod    lt_cv_deplibs_check_method=pass_all
698*3d8817e4Smiod  fi
699*3d8817e4Smiod  ;;
700*3d8817e4Smiod
701*3d8817e4Smiodgnu*)
702*3d8817e4Smiod  lt_cv_deplibs_check_method=pass_all
703*3d8817e4Smiod  ;;
704*3d8817e4Smiod
705*3d8817e4Smiodhpux10.20*|hpux11*)
706*3d8817e4Smiod  case $host_cpu in
707*3d8817e4Smiod  hppa*)
708*3d8817e4Smiod    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
709*3d8817e4Smiod    lt_cv_file_magic_cmd=/usr/bin/file
710*3d8817e4Smiod    lt_cv_file_magic_test_file=/usr/lib/libc.sl
711*3d8817e4Smiod    ;;
712*3d8817e4Smiod  ia64*)
713*3d8817e4Smiod    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64']
714*3d8817e4Smiod    lt_cv_file_magic_cmd=/usr/bin/file
715*3d8817e4Smiod    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
716*3d8817e4Smiod    ;;
717*3d8817e4Smiod  esac
718*3d8817e4Smiod  ;;
719*3d8817e4Smiod
720*3d8817e4Smiodirix5* | irix6*)
721*3d8817e4Smiod  case $host_os in
722*3d8817e4Smiod  irix5*)
723*3d8817e4Smiod    # this will be overridden with pass_all, but let us keep it just in case
724*3d8817e4Smiod    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
725*3d8817e4Smiod    ;;
726*3d8817e4Smiod  *)
727*3d8817e4Smiod    case $LD in
728*3d8817e4Smiod    *-32|*"-32 ") libmagic=32-bit;;
729*3d8817e4Smiod    *-n32|*"-n32 ") libmagic=N32;;
730*3d8817e4Smiod    *-64|*"-64 ") libmagic=64-bit;;
731*3d8817e4Smiod    *) libmagic=never-match;;
732*3d8817e4Smiod    esac
733*3d8817e4Smiod    # this will be overridden with pass_all, but let us keep it just in case
734*3d8817e4Smiod    lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
735*3d8817e4Smiod    ;;
736*3d8817e4Smiod  esac
737*3d8817e4Smiod  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
738*3d8817e4Smiod  lt_cv_deplibs_check_method=pass_all
739*3d8817e4Smiod  ;;
740*3d8817e4Smiod
741*3d8817e4Smiod# This must be Linux ELF.
742*3d8817e4Smiodlinux-gnu*)
743*3d8817e4Smiod  lt_cv_deplibs_check_method=pass_all
744*3d8817e4Smiod  ;;
745*3d8817e4Smiod
746*3d8817e4Smiodnetbsd* | knetbsd*-gnu)
747*3d8817e4Smiod  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
748*3d8817e4Smiod    [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
749*3d8817e4Smiod  else
750*3d8817e4Smiod    [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
751*3d8817e4Smiod  fi
752*3d8817e4Smiod  ;;
753*3d8817e4Smiod
754*3d8817e4Smiodnewsos6)
755*3d8817e4Smiod  [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
756*3d8817e4Smiod  lt_cv_file_magic_cmd=/usr/bin/file
757*3d8817e4Smiod  lt_cv_file_magic_test_file=/usr/lib/libnls.so
758*3d8817e4Smiod  ;;
759*3d8817e4Smiod
760*3d8817e4Smiodosf3* | osf4* | osf5*)
761*3d8817e4Smiod  # this will be overridden with pass_all, but let us keep it just in case
762*3d8817e4Smiod  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
763*3d8817e4Smiod  lt_cv_file_magic_test_file=/shlib/libc.so
764*3d8817e4Smiod  lt_cv_deplibs_check_method=pass_all
765*3d8817e4Smiod  ;;
766*3d8817e4Smiod
767*3d8817e4Smiodsco3.2v5*)
768*3d8817e4Smiod  lt_cv_deplibs_check_method=pass_all
769*3d8817e4Smiod  ;;
770*3d8817e4Smiod
771*3d8817e4Smiodsolaris*)
772*3d8817e4Smiod  lt_cv_deplibs_check_method=pass_all
773*3d8817e4Smiod  lt_cv_file_magic_test_file=/lib/libc.so
774*3d8817e4Smiod  ;;
775*3d8817e4Smiod
776*3d8817e4Smiod[sysv5uw[78]* | sysv4*uw2*)]
777*3d8817e4Smiod  lt_cv_deplibs_check_method=pass_all
778*3d8817e4Smiod  ;;
779*3d8817e4Smiod
780*3d8817e4Smiodsysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
781*3d8817e4Smiod  case $host_vendor in
782*3d8817e4Smiod  ncr)
783*3d8817e4Smiod    lt_cv_deplibs_check_method=pass_all
784*3d8817e4Smiod    ;;
785*3d8817e4Smiod  motorola)
786*3d8817e4Smiod    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]']
787*3d8817e4Smiod    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
788*3d8817e4Smiod    ;;
789*3d8817e4Smiod  esac
790*3d8817e4Smiod  ;;
791*3d8817e4Smiodesac
792*3d8817e4Smiod])
793*3d8817e4Smiodfile_magic_cmd=$lt_cv_file_magic_cmd
794*3d8817e4Smioddeplibs_check_method=$lt_cv_deplibs_check_method
795*3d8817e4Smiod])
796*3d8817e4Smiod
797*3d8817e4Smiod
798*3d8817e4Smiod# AC_PROG_NM - find the path to a BSD-compatible name lister
799*3d8817e4SmiodAC_DEFUN([AC_PROG_NM],
800*3d8817e4Smiod[AC_MSG_CHECKING([for BSD-compatible nm])
801*3d8817e4SmiodAC_CACHE_VAL(lt_cv_path_NM,
802*3d8817e4Smiod[if test -n "$NM"; then
803*3d8817e4Smiod  # Let the user override the test.
804*3d8817e4Smiod  lt_cv_path_NM="$NM"
805*3d8817e4Smiodelse
806*3d8817e4Smiod  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
807*3d8817e4Smiod  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
808*3d8817e4Smiod    test -z "$ac_dir" && ac_dir=.
809*3d8817e4Smiod    tmp_nm=$ac_dir/${ac_tool_prefix}nm
810*3d8817e4Smiod    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
811*3d8817e4Smiod      # Check to see if the nm accepts a BSD-compat flag.
812*3d8817e4Smiod      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
813*3d8817e4Smiod      #   nm: unknown option "B" ignored
814*3d8817e4Smiod      # Tru64's nm complains that /dev/null is an invalid object file
815*3d8817e4Smiod      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
816*3d8817e4Smiod	lt_cv_path_NM="$tmp_nm -B"
817*3d8817e4Smiod	break
818*3d8817e4Smiod      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
819*3d8817e4Smiod	lt_cv_path_NM="$tmp_nm -p"
820*3d8817e4Smiod	break
821*3d8817e4Smiod      else
822*3d8817e4Smiod	lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
823*3d8817e4Smiod	continue # so that we can try to find one that supports BSD flags
824*3d8817e4Smiod      fi
825*3d8817e4Smiod    fi
826*3d8817e4Smiod  done
827*3d8817e4Smiod  IFS="$ac_save_ifs"
828*3d8817e4Smiod  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
829*3d8817e4Smiodfi])
830*3d8817e4SmiodNM="$lt_cv_path_NM"
831*3d8817e4SmiodAC_MSG_RESULT([$NM])
832*3d8817e4Smiod])
833*3d8817e4Smiod
834*3d8817e4Smiod# AC_CHECK_LIBM - check for math library
835*3d8817e4SmiodAC_DEFUN([AC_CHECK_LIBM],
836*3d8817e4Smiod[AC_REQUIRE([AC_CANONICAL_HOST])dnl
837*3d8817e4SmiodLIBM=
838*3d8817e4Smiodcase $host in
839*3d8817e4Smiod*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
840*3d8817e4Smiod  # These system don't have libm
841*3d8817e4Smiod  # on darwin the libm is a symbolic link to libSystem.dylib
842*3d8817e4Smiod  ;;
843*3d8817e4Smiod*-ncr-sysv4.3*)
844*3d8817e4Smiod  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
845*3d8817e4Smiod  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
846*3d8817e4Smiod  ;;
847*3d8817e4Smiod*)
848*3d8817e4Smiod  AC_CHECK_LIB(m, main, LIBM="-lm")
849*3d8817e4Smiod  ;;
850*3d8817e4Smiodesac
851*3d8817e4Smiod])
852*3d8817e4Smiod
853*3d8817e4Smiod# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
854*3d8817e4Smiod# the libltdl convenience library and INCLTDL to the include flags for
855*3d8817e4Smiod# the libltdl header and adds --enable-ltdl-convenience to the
856*3d8817e4Smiod# configure arguments.  Note that LIBLTDL and INCLTDL are not
857*3d8817e4Smiod# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
858*3d8817e4Smiod# provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
859*3d8817e4Smiod# with '${top_builddir}/' and INCLTDL will be prefixed with
860*3d8817e4Smiod# '${top_srcdir}/' (note the single quotes!).  If your package is not
861*3d8817e4Smiod# flat and you're not using automake, define top_builddir and
862*3d8817e4Smiod# top_srcdir appropriately in the Makefiles.
863*3d8817e4SmiodAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
864*3d8817e4Smiod[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
865*3d8817e4Smiod  case $enable_ltdl_convenience in
866*3d8817e4Smiod  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
867*3d8817e4Smiod  "") enable_ltdl_convenience=yes
868*3d8817e4Smiod      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
869*3d8817e4Smiod  esac
870*3d8817e4Smiod  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
871*3d8817e4Smiod  INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
872*3d8817e4Smiod])
873*3d8817e4Smiod
874*3d8817e4Smiod# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
875*3d8817e4Smiod# the libltdl installable library and INCLTDL to the include flags for
876*3d8817e4Smiod# the libltdl header and adds --enable-ltdl-install to the configure
877*3d8817e4Smiod# arguments.  Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
878*3d8817e4Smiod# AC_CONFIG_SUBDIRS called.  If DIR is not provided and an installed
879*3d8817e4Smiod# libltdl is not found, it is assumed to be `libltdl'.  LIBLTDL will
880*3d8817e4Smiod# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
881*3d8817e4Smiod# with '${top_srcdir}/' (note the single quotes!).  If your package is
882*3d8817e4Smiod# not flat and you're not using automake, define top_builddir and
883*3d8817e4Smiod# top_srcdir appropriately in the Makefiles.
884*3d8817e4Smiod# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
885*3d8817e4SmiodAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
886*3d8817e4Smiod[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
887*3d8817e4Smiod  AC_CHECK_LIB(ltdl, main,
888*3d8817e4Smiod  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
889*3d8817e4Smiod  [if test x"$enable_ltdl_install" = xno; then
890*3d8817e4Smiod     AC_MSG_WARN([libltdl not installed, but installation disabled])
891*3d8817e4Smiod   else
892*3d8817e4Smiod     enable_ltdl_install=yes
893*3d8817e4Smiod   fi
894*3d8817e4Smiod  ])
895*3d8817e4Smiod  if test x"$enable_ltdl_install" = x"yes"; then
896*3d8817e4Smiod    ac_configure_args="$ac_configure_args --enable-ltdl-install"
897*3d8817e4Smiod    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
898*3d8817e4Smiod    INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
899*3d8817e4Smiod  else
900*3d8817e4Smiod    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
901*3d8817e4Smiod    LIBLTDL="-lltdl"
902*3d8817e4Smiod    INCLTDL=
903*3d8817e4Smiod  fi
904*3d8817e4Smiod])
905*3d8817e4Smiod
906*3d8817e4Smiod# If this macro is not defined by Autoconf, define it here.
907*3d8817e4Smiodifdef([AC_PROVIDE_IFELSE],
908*3d8817e4Smiod      [],
909*3d8817e4Smiod      [define([AC_PROVIDE_IFELSE],
910*3d8817e4Smiod              [ifdef([AC_PROVIDE_$1],
911*3d8817e4Smiod                     [$2], [$3])])])
912*3d8817e4Smiod
913*3d8817e4Smiod# AC_LIBTOOL_CXX - enable support for C++ libraries
914*3d8817e4SmiodAC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
915*3d8817e4Smiod
916*3d8817e4SmiodAC_DEFUN([_AC_LIBTOOL_CXX],
917*3d8817e4Smiod[AC_REQUIRE([AC_PROG_CXX])
918*3d8817e4SmiodAC_REQUIRE([AC_PROG_CXXCPP])
919*3d8817e4SmiodLIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
920*3d8817e4Smiodlt_save_CC="$CC"
921*3d8817e4Smiodlt_save_CFLAGS="$CFLAGS"
922*3d8817e4Smioddnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
923*3d8817e4Smioddnl is set to the C++ compiler.
924*3d8817e4SmiodAR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
925*3d8817e4SmiodMAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
926*3d8817e4SmiodLN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
927*3d8817e4SmiodAS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
928*3d8817e4Smiodobjext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
929*3d8817e4Smioddeplibs_check_method="$deplibs_check_method" \
930*3d8817e4Smiodfile_magic_cmd="$file_magic_cmd" \
931*3d8817e4Smiod${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
932*3d8817e4Smiod--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
933*3d8817e4Smiod|| AC_MSG_ERROR([libtool tag configuration failed])
934*3d8817e4SmiodCC="$lt_save_CC"
935*3d8817e4SmiodCFLAGS="$lt_save_CFLAGS"
936*3d8817e4Smiod
937*3d8817e4Smiod# Redirect the config.log output again, so that the ltconfig log is not
938*3d8817e4Smiod# clobbered by the next message.
939*3d8817e4Smiodexec 5>>./config.log
940*3d8817e4Smiod])
941*3d8817e4Smiod
942*3d8817e4Smiod# AC_LIBTOOL_GCJ - enable support for GCJ libraries
943*3d8817e4SmiodAC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
944*3d8817e4Smiod
945*3d8817e4SmiodAC_DEFUN([_AC_LIBTOOL_GCJ],
946*3d8817e4Smiod[AC_REQUIRE([AC_PROG_LIBTOOL])
947*3d8817e4SmiodAC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
948*3d8817e4Smiod  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
949*3d8817e4Smiod    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
950*3d8817e4Smiod      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
951*3d8817e4Smiod         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
952*3d8817e4Smiod           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
953*3d8817e4SmiodLIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
954*3d8817e4Smiodlt_save_CC="$CC"
955*3d8817e4Smiodlt_save_CFLAGS="$CFLAGS"
956*3d8817e4Smioddnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
957*3d8817e4Smioddnl is set to the C++ compiler.
958*3d8817e4SmiodAR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
959*3d8817e4SmiodMAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
960*3d8817e4SmiodLN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
961*3d8817e4SmiodAS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
962*3d8817e4Smiodobjext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
963*3d8817e4Smioddeplibs_check_method="$deplibs_check_method" \
964*3d8817e4Smiodfile_magic_cmd="$file_magic_cmd" \
965*3d8817e4Smiod${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
966*3d8817e4Smiod--build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
967*3d8817e4Smiod|| AC_MSG_ERROR([libtool tag configuration failed])
968*3d8817e4SmiodCC="$lt_save_CC"
969*3d8817e4SmiodCFLAGS="$lt_save_CFLAGS"
970*3d8817e4Smiod
971*3d8817e4Smiod# Redirect the config.log output again, so that the ltconfig log is not
972*3d8817e4Smiod# clobbered by the next message.
973*3d8817e4Smiodexec 5>>./config.log
974*3d8817e4Smiod])
975*3d8817e4Smiod
976*3d8817e4Smioddnl old names
977*3d8817e4SmiodAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
978*3d8817e4SmiodAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
979*3d8817e4SmiodAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
980*3d8817e4SmiodAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
981*3d8817e4SmiodAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
982*3d8817e4SmiodAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
983*3d8817e4SmiodAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
984*3d8817e4Smiod
985*3d8817e4Smioddnl This is just to silence aclocal about the macro not being used
986*3d8817e4Smiodifelse([AC_DISABLE_FAST_INSTALL])dnl
987*3d8817e4Smiod
988*3d8817e4SmiodAC_DEFUN([LT_AC_PROG_GCJ],
989*3d8817e4Smiod[AC_CHECK_TOOL(GCJ, gcj, no)
990*3d8817e4Smiod  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
991*3d8817e4Smiod  AC_SUBST(GCJFLAGS)
992*3d8817e4Smiod])
993