OSDN Git Service

a32447a101c2321d1578015f928506cc797389dc
[pf3gnuchains/gcc-fork.git] / libmudflap / aclocal.m4
1 # generated automatically by aclocal 1.7.8 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14
15 # serial 46 AC_PROG_LIBTOOL
16 AC_DEFUN([AC_PROG_LIBTOOL],
17 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
18 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
19 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
20   AC_PROVIDE_IFELSE([AC_PROG_CXX],
21     [AC_LIBTOOL_CXX],
22     [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
23 ])])
24
25 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
26 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
27 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
28   AC_PROVIDE_IFELSE([AC_PROG_GCJ],
29     [AC_LIBTOOL_GCJ],
30     [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
31         [AC_LIBTOOL_GCJ],
32         [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
33           [AC_LIBTOOL_GCJ],
34         [ifdef([AC_PROG_GCJ],
35                [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
36 ])])
37          ifdef([A][M_PROG_GCJ],
38                [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
39 ])])
40          ifdef([LT_AC_PROG_GCJ],
41                [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
42 ])])])])])])
43
44 AC_DEFUN([_AC_PROG_LIBTOOL],
45 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
46 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
47 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
48
49 # Save cache, so that ltconfig can load it
50 AC_CACHE_SAVE
51
52 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
53 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
54 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
55 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
56 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
57 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
58 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
59 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
60 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
61 || AC_MSG_ERROR([libtool configure failed])
62
63 # Reload cache, that may have been modified by ltconfig
64 AC_CACHE_LOAD
65
66 # This can be used to rebuild libtool when needed
67 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
68
69 # Always use our own libtool.
70 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
71 AC_SUBST(LIBTOOL)dnl
72
73 # Redirect the config.log output again, so that the ltconfig log is not
74 # clobbered by the next message.
75 exec 5>>./config.log
76 ])
77
78 AC_DEFUN([AC_LIBTOOL_SETUP],
79 [AC_PREREQ(2.13)dnl
80 AC_REQUIRE([AC_ENABLE_SHARED])dnl
81 AC_REQUIRE([AC_ENABLE_STATIC])dnl
82 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
83 AC_REQUIRE([AC_CANONICAL_HOST])dnl
84 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
85 AC_REQUIRE([AC_PROG_CC])dnl
86 AC_REQUIRE([AC_PROG_LD])dnl
87 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
88 AC_REQUIRE([AC_PROG_NM])dnl
89 AC_REQUIRE([AC_PROG_LN_S])dnl
90 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
91 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
92 AC_REQUIRE([AC_OBJEXT])dnl
93 AC_REQUIRE([AC_EXEEXT])dnl
94 dnl
95
96 # Only perform the check for file, if the check method requires it
97 case $deplibs_check_method in
98 file_magic*)
99   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
100     AC_PATH_MAGIC
101   fi
102   ;;
103 esac
104
105 AC_CHECK_TOOL(RANLIB, ranlib, :)
106 AC_CHECK_TOOL(STRIP, strip, :)
107
108 # Check for any special flags to pass to ltconfig.
109 libtool_flags="--cache-file=$cache_file"
110 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
111 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
112 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
113 test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
114 test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
115 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
116 [libtool_flags="$libtool_flags --enable-dlopen"])
117 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
118 [libtool_flags="$libtool_flags --enable-win32-dll"])
119 AC_ARG_ENABLE(libtool-lock,
120   [  --disable-libtool-lock  avoid locking (might break parallel builds)])
121 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
122 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
123
124 AC_ARG_WITH(pic,
125   [  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
126      pic_mode="$withval", pic_mode=default)
127 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
128 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
129
130 # Some flags need to be propagated to the compiler or linker for good
131 # libtool support.
132 case $host in
133 *-*-irix6*)
134   # Find out which ABI we are using.
135   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
136   if AC_TRY_EVAL(ac_compile); then
137     case `/usr/bin/file conftest.$ac_objext` in
138     *32-bit*)
139       LD="${LD-ld} -32"
140       ;;
141     *N32*)
142       LD="${LD-ld} -n32"
143       ;;
144     *64-bit*)
145       LD="${LD-ld} -64"
146       ;;
147     esac
148   fi
149   rm -rf conftest*
150   ;;
151
152 ia64-*-hpux*)
153   # Find out which ABI we are using.
154   echo 'int i;' > conftest.$ac_ext
155   if AC_TRY_EVAL(ac_compile); then
156     case "`/usr/bin/file conftest.o`" in
157     *ELF-32*)
158       HPUX_IA64_MODE="32"
159       ;;
160     *ELF-64*)
161       HPUX_IA64_MODE="64"
162       ;;
163     esac
164   fi
165   rm -rf conftest*
166   ;;
167
168 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
169   # Find out which ABI we are using.
170   echo 'int i;' > conftest.$ac_ext
171   if AC_TRY_EVAL(ac_compile); then
172     case "`/usr/bin/file conftest.o`" in
173     *32-bit*)
174       case $host in
175         x86_64-*linux*)
176           LD="${LD-ld} -m elf_i386"
177           ;;
178         ppc64-*linux*)
179           LD="${LD-ld} -m elf32ppclinux"
180           ;;
181         s390x-*linux*)
182           LD="${LD-ld} -m elf_s390"
183           ;;
184         sparc64-*linux*)
185           LD="${LD-ld} -m elf32_sparc"
186           ;;
187       esac
188       ;;
189     *64-bit*)
190       case $host in
191         x86_64-*linux*)
192           LD="${LD-ld} -m elf_x86_64"
193           ;;
194         ppc*-*linux*|powerpc*-*linux*)
195           LD="${LD-ld} -m elf64ppc"
196           ;;
197         s390*-*linux*)
198           LD="${LD-ld} -m elf64_s390"
199           ;;
200         sparc*-*linux*)
201           LD="${LD-ld} -m elf64_sparc"
202           ;;
203       esac
204       ;;
205     esac
206   fi
207   rm -rf conftest*
208   ;;
209
210 *-*-sco3.2v5*)
211   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
212   SAVE_CFLAGS="$CFLAGS"
213   CFLAGS="$CFLAGS -belf"
214   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
215     [AC_LANG_SAVE
216      AC_LANG_C
217      AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
218      AC_LANG_RESTORE])
219   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
220     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
221     CFLAGS="$SAVE_CFLAGS"
222   fi
223   ;;
224
225 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
226 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
227   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
228   AC_CHECK_TOOL(AS, as, false)
229   AC_CHECK_TOOL(OBJDUMP, objdump, false)
230
231   # recent cygwin and mingw systems supply a stub DllMain which the user
232   # can override, but on older systems we have to supply one
233   AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
234     [AC_TRY_LINK([],
235       [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
236       DllMain (0, 0, 0);],
237       [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
238
239   case $host/$CC in
240   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
241     # old mingw systems require "-dll" to link a DLL, while more recent ones
242     # require "-mdll"
243     SAVE_CFLAGS="$CFLAGS"
244     CFLAGS="$CFLAGS -mdll"
245     AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
246       [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
247     CFLAGS="$SAVE_CFLAGS" ;;
248   *-*-cygwin* | *-*-pw32*)
249     # cygwin systems need to pass --dll to the linker, and not link
250     # crt.o which will require a WinMain@16 definition.
251     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
252   esac
253   ;;
254   ])
255 esac
256 ])
257
258 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
259 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
260
261 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
262 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
263
264 # AC_ENABLE_SHARED - implement the --enable-shared flag
265 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
266 #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
267 #   `yes'.
268 AC_DEFUN([AC_ENABLE_SHARED],
269 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
270 AC_ARG_ENABLE(shared,
271 changequote(<<, >>)dnl
272 <<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
273 changequote([, ])dnl
274 [p=${PACKAGE-default}
275 case $enableval in
276 yes) enable_shared=yes ;;
277 no) enable_shared=no ;;
278 *)
279   enable_shared=no
280   # Look at the argument we got.  We use all the common list separators.
281   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
282   for pkg in $enableval; do
283     if test "X$pkg" = "X$p"; then
284       enable_shared=yes
285     fi
286   done
287   IFS="$ac_save_ifs"
288   ;;
289 esac],
290 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
291 ])
292
293 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
294 AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
295 AC_ENABLE_SHARED(no)])
296
297 # AC_ENABLE_STATIC - implement the --enable-static flag
298 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
299 #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
300 #   `yes'.
301 AC_DEFUN([AC_ENABLE_STATIC],
302 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
303 AC_ARG_ENABLE(static,
304 changequote(<<, >>)dnl
305 <<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
306 changequote([, ])dnl
307 [p=${PACKAGE-default}
308 case $enableval in
309 yes) enable_static=yes ;;
310 no) enable_static=no ;;
311 *)
312   enable_static=no
313   # Look at the argument we got.  We use all the common list separators.
314   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
315   for pkg in $enableval; do
316     if test "X$pkg" = "X$p"; then
317       enable_static=yes
318     fi
319   done
320   IFS="$ac_save_ifs"
321   ;;
322 esac],
323 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
324 ])
325
326 # AC_DISABLE_STATIC - set the default static flag to --disable-static
327 AC_DEFUN([AC_DISABLE_STATIC],
328 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
329 AC_ENABLE_STATIC(no)])
330
331
332 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
333 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
334 #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
335 #   `yes'.
336 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
337 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
338 AC_ARG_ENABLE(fast-install,
339 changequote(<<, >>)dnl
340 <<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
341 changequote([, ])dnl
342 [p=${PACKAGE-default}
343 case $enableval in
344 yes) enable_fast_install=yes ;;
345 no) enable_fast_install=no ;;
346 *)
347   enable_fast_install=no
348   # Look at the argument we got.  We use all the common list separators.
349   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
350   for pkg in $enableval; do
351     if test "X$pkg" = "X$p"; then
352       enable_fast_install=yes
353     fi
354   done
355   IFS="$ac_save_ifs"
356   ;;
357 esac],
358 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
359 ])
360
361 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
362 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
363 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
364 AC_ENABLE_FAST_INSTALL(no)])
365
366 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
367 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
368 #   Where MODE is either `yes' or `no'.  If omitted, it defaults to
369 #   `both'.
370 AC_DEFUN([AC_LIBTOOL_PICMODE],
371 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
372 pic_mode=ifelse($#,1,$1,default)])
373
374
375 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
376 AC_DEFUN([AC_PATH_TOOL_PREFIX],
377 [AC_MSG_CHECKING([for $1])
378 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
379 [case $MAGIC_CMD in
380   /*)
381   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
382   ;;
383   ?:/*)
384   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
385   ;;
386   *)
387   ac_save_MAGIC_CMD="$MAGIC_CMD"
388   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
389 dnl $ac_dummy forces splitting on constant user-supplied paths.
390 dnl POSIX.2 word splitting is done only on the output of word expansions,
391 dnl not every word.  This closes a longstanding sh security hole.
392   ac_dummy="ifelse([$2], , $PATH, [$2])"
393   for ac_dir in $ac_dummy; do
394     test -z "$ac_dir" && ac_dir=.
395     if test -f $ac_dir/$1; then
396       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
397       if test -n "$file_magic_test_file"; then
398         case $deplibs_check_method in
399         "file_magic "*)
400           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
401           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
402           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
403             egrep "$file_magic_regex" > /dev/null; then
404             :
405           else
406             cat <<EOF 1>&2
407
408 *** Warning: the command libtool uses to detect shared libraries,
409 *** $file_magic_cmd, produces output that libtool cannot recognize.
410 *** The result is that libtool may fail to recognize shared libraries
411 *** as such.  This will affect the creation of libtool libraries that
412 *** depend on shared libraries, but programs linked with such libtool
413 *** libraries will work regardless of this problem.  Nevertheless, you
414 *** may want to report the problem to your system manager and/or to
415 *** bug-libtool@gnu.org
416
417 EOF
418           fi ;;
419         esac
420       fi
421       break
422     fi
423   done
424   IFS="$ac_save_ifs"
425   MAGIC_CMD="$ac_save_MAGIC_CMD"
426   ;;
427 esac])
428 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
429 if test -n "$MAGIC_CMD"; then
430   AC_MSG_RESULT($MAGIC_CMD)
431 else
432   AC_MSG_RESULT(no)
433 fi
434 ])
435
436
437 # AC_PATH_MAGIC - find a file program which can recognise a shared library
438 AC_DEFUN([AC_PATH_MAGIC],
439 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
440 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
441 if test -z "$lt_cv_path_MAGIC_CMD"; then
442   if test -n "$ac_tool_prefix"; then
443     AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
444   else
445     MAGIC_CMD=:
446   fi
447 fi
448 ])
449
450
451 # AC_PROG_LD - find the path to the GNU or non-GNU linker
452 AC_DEFUN([AC_PROG_LD],
453 [AC_ARG_WITH(gnu-ld,
454 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
455 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
456 AC_REQUIRE([AC_PROG_CC])dnl
457 AC_REQUIRE([AC_CANONICAL_HOST])dnl
458 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
459 ac_prog=ld
460 if test "$GCC" = yes; then
461   # Check if gcc -print-prog-name=ld gives a path.
462   AC_MSG_CHECKING([for ld used by GCC])
463   case $host in
464   *-*-mingw*)
465     # gcc leaves a trailing carriage return which upsets mingw
466     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
467   *)
468     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
469   esac
470   case $ac_prog in
471     # Accept absolute paths.
472     [[\\/]* | [A-Za-z]:[\\/]*)]
473       re_direlt=['/[^/][^/]*/\.\./']
474       # Canonicalize the path of ld
475       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
476       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
477         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
478       done
479       test -z "$LD" && LD="$ac_prog"
480       ;;
481   "")
482     # If it fails, then pretend we aren't using GCC.
483     ac_prog=ld
484     ;;
485   *)
486     # If it is relative, then search for the first ld in PATH.
487     with_gnu_ld=unknown
488     ;;
489   esac
490 elif test "$with_gnu_ld" = yes; then
491   AC_MSG_CHECKING([for GNU ld])
492 else
493   AC_MSG_CHECKING([for non-GNU ld])
494 fi
495 AC_CACHE_VAL(lt_cv_path_LD,
496 [if test -z "$LD"; then
497   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
498   for ac_dir in $PATH; do
499     test -z "$ac_dir" && ac_dir=.
500     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
501       lt_cv_path_LD="$ac_dir/$ac_prog"
502       # Check to see if the program is GNU ld.  I'd rather use --version,
503       # but apparently some GNU ld's only accept -v.
504       # Break only if it was the GNU/non-GNU ld that we prefer.
505       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
506         test "$with_gnu_ld" != no && break
507       else
508         test "$with_gnu_ld" != yes && break
509       fi
510     fi
511   done
512   IFS="$ac_save_ifs"
513 else
514   lt_cv_path_LD="$LD" # Let the user override the test with a path.
515 fi])
516 LD="$lt_cv_path_LD"
517 if test -n "$LD"; then
518   AC_MSG_RESULT($LD)
519 else
520   AC_MSG_RESULT(no)
521 fi
522 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
523 AC_PROG_LD_GNU
524 ])
525
526 AC_DEFUN([AC_PROG_LD_GNU],
527 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
528 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
529 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
530   lt_cv_prog_gnu_ld=yes
531 else
532   lt_cv_prog_gnu_ld=no
533 fi])
534 with_gnu_ld=$lt_cv_prog_gnu_ld
535 ])
536
537 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
538 #   -- PORTME Some linkers may need a different reload flag.
539 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
540 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
541 [lt_cv_ld_reload_flag='-r'])
542 reload_flag=$lt_cv_ld_reload_flag
543 test -n "$reload_flag" && reload_flag=" $reload_flag"
544 ])
545
546 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
547 #  -- PORTME fill in with the dynamic library characteristics
548 # Don't cache this sucker.
549 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
550 [AC_MSG_CHECKING([how to recognise dependant libraries])
551 lt_cv_file_magic_cmd='$MAGIC_CMD'
552 lt_cv_file_magic_test_file=
553 lt_cv_deplibs_check_method='unknown'
554 # Need to set the preceding variable on all platforms that support
555 # interlibrary dependencies.
556 # 'none' -- dependencies not supported.
557 # `unknown' -- same as none, but documents that we really don't know.
558 # 'pass_all' -- all dependencies passed with no checks.
559 # 'test_compile' -- check by making test program.
560 # 'file_magic [regex]' -- check by looking for files in library path
561 # which responds to the $file_magic_cmd with a given egrep regex.
562 # If you have `file' or equivalent on your system and you're not sure
563 # whether `pass_all' will *always* work, you probably want this one.
564
565 case $host_os in
566 aix*)
567   lt_cv_deplibs_check_method=pass_all
568   ;;
569
570 beos*)
571   lt_cv_deplibs_check_method=pass_all
572   ;;
573
574 bsdi4*)
575   lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
576   lt_cv_file_magic_cmd='/usr/bin/file -L'
577   lt_cv_file_magic_test_file=/shlib/libc.so
578   ;;
579
580 cygwin* | mingw* |pw32*)
581   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
582   lt_cv_file_magic_cmd='$OBJDUMP -f'
583   ;;
584
585 darwin* | rhapsody*)
586   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
587   lt_cv_file_magic_cmd='/usr/bin/file -L'
588   case "$host_os" in
589   rhapsody* | darwin1.[012])
590     lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
591     ;;
592   *) # Darwin 1.3 on
593     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
594     ;;
595   esac
596   ;;
597
598 freebsd* )
599   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
600     case $host_cpu in
601     i*86 )
602       # Not sure whether the presence of OpenBSD here was a mistake.
603       # Let's accept both of them until this is cleared up.
604       lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
605       lt_cv_file_magic_cmd=/usr/bin/file
606       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
607       ;;
608     esac
609   else
610     lt_cv_deplibs_check_method=pass_all
611   fi
612   ;;
613
614 gnu*)
615   lt_cv_deplibs_check_method=pass_all
616   ;;
617
618 hpux10.20*|hpux11*)
619   case $host_cpu in
620   hppa*)
621     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
622     lt_cv_file_magic_cmd=/usr/bin/file
623     lt_cv_file_magic_test_file=/usr/lib/libc.sl
624     ;;
625   ia64*)
626     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64']
627     lt_cv_file_magic_cmd=/usr/bin/file
628     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
629     ;;
630   esac
631   ;;
632
633 irix5* | irix6*)
634   case $host_os in
635   irix5*)
636     # this will be overridden with pass_all, but let us keep it just in case
637     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
638     ;;
639   *)
640     case $LD in
641     *-32|*"-32 ") libmagic=32-bit;;
642     *-n32|*"-n32 ") libmagic=N32;;
643     *-64|*"-64 ") libmagic=64-bit;;
644     *) libmagic=never-match;;
645     esac
646     # this will be overridden with pass_all, but let us keep it just in case
647     lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
648     ;;
649   esac
650   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
651   lt_cv_deplibs_check_method=pass_all
652   ;;
653
654 # This must be Linux ELF.
655 linux-gnu*)
656   case $host_cpu in
657   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | x86_64* | sh*)
658     lt_cv_deplibs_check_method=pass_all ;;
659     # NB 2003-06-03: According to Alexandre Oliva, x86_64 should not be
660     # in this list.  However, it works around a libtool problem that
661     # wrongly excludes -ldl/-lpthread from the libmudflap(th) dependencies.
662   *)
663     # glibc up to 2.1.1 does not perform some relocations on ARM
664     lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
665   esac
666   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
667   ;;
668
669 netbsd*)
670   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
671     [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
672   else
673     [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
674   fi
675   ;;
676
677 newsos6)
678   [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
679   lt_cv_file_magic_cmd=/usr/bin/file
680   lt_cv_file_magic_test_file=/usr/lib/libnls.so
681   ;;
682
683 osf3* | osf4* | osf5*)
684   # this will be overridden with pass_all, but let us keep it just in case
685   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
686   lt_cv_file_magic_test_file=/shlib/libc.so
687   lt_cv_deplibs_check_method=pass_all
688   ;;
689
690 sco3.2v5*)
691   lt_cv_deplibs_check_method=pass_all
692   ;;
693
694 solaris*)
695   lt_cv_deplibs_check_method=pass_all
696   lt_cv_file_magic_test_file=/lib/libc.so
697   ;;
698
699 [sysv5uw[78]* | sysv4*uw2*)]
700   lt_cv_deplibs_check_method=pass_all
701   ;;
702
703 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
704   case $host_vendor in
705   ncr)
706     lt_cv_deplibs_check_method=pass_all
707     ;;
708   motorola)
709     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]']
710     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
711     ;;
712   esac
713   ;;
714 esac
715 file_magic_cmd=$lt_cv_file_magic_cmd
716 deplibs_check_method=$lt_cv_deplibs_check_method
717 # NB: See above NB ... this is to make sure that the overriden
718 #     local libtool variant doesn't pollute the upstream cache
719 unset lt_cv_file_magic_cmd
720 unset lt_cv_deplibs_check_method
721 AC_MSG_RESULT($deplibs_check_method)
722 ])
723
724
725 # AC_PROG_NM - find the path to a BSD-compatible name lister
726 AC_DEFUN([AC_PROG_NM],
727 [AC_MSG_CHECKING([for BSD-compatible nm])
728 AC_CACHE_VAL(lt_cv_path_NM,
729 [if test -n "$NM"; then
730   # Let the user override the test.
731   lt_cv_path_NM="$NM"
732 else
733   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
734   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
735     test -z "$ac_dir" && ac_dir=.
736     tmp_nm=$ac_dir/${ac_tool_prefix}nm
737     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
738       # Check to see if the nm accepts a BSD-compat flag.
739       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
740       #   nm: unknown option "B" ignored
741       # Tru64's nm complains that /dev/null is an invalid object file
742       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
743         lt_cv_path_NM="$tmp_nm -B"
744         break
745       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
746         lt_cv_path_NM="$tmp_nm -p"
747         break
748       else
749         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
750         continue # so that we can try to find one that supports BSD flags
751       fi
752     fi
753   done
754   IFS="$ac_save_ifs"
755   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
756 fi])
757 NM="$lt_cv_path_NM"
758 AC_MSG_RESULT([$NM])
759 ])
760
761 # AC_CHECK_LIBM - check for math library
762 AC_DEFUN([AC_CHECK_LIBM],
763 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
764 LIBM=
765 case $host in
766 *-*-beos* | *-*-cygwin* | *-*-pw32*)
767   # These system don't have libm
768   ;;
769 *-ncr-sysv4.3*)
770   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
771   AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
772   ;;
773 *)
774   AC_CHECK_LIB(m, main, LIBM="-lm")
775   ;;
776 esac
777 ])
778
779 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
780 # the libltdl convenience library and INCLTDL to the include flags for
781 # the libltdl header and adds --enable-ltdl-convenience to the
782 # configure arguments.  Note that LIBLTDL and INCLTDL are not
783 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
784 # provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
785 # with '${top_builddir}/' and INCLTDL will be prefixed with
786 # '${top_srcdir}/' (note the single quotes!).  If your package is not
787 # flat and you're not using automake, define top_builddir and
788 # top_srcdir appropriately in the Makefiles.
789 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
790 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
791   case $enable_ltdl_convenience in
792   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
793   "") enable_ltdl_convenience=yes
794       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
795   esac
796   LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
797   INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
798 ])
799
800 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
801 # the libltdl installable library and INCLTDL to the include flags for
802 # the libltdl header and adds --enable-ltdl-install to the configure
803 # arguments.  Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
804 # AC_CONFIG_SUBDIRS called.  If DIR is not provided and an installed
805 # libltdl is not found, it is assumed to be `libltdl'.  LIBLTDL will
806 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
807 # with '${top_srcdir}/' (note the single quotes!).  If your package is
808 # not flat and you're not using automake, define top_builddir and
809 # top_srcdir appropriately in the Makefiles.
810 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
811 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
812 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
813   AC_CHECK_LIB(ltdl, main,
814   [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
815   [if test x"$enable_ltdl_install" = xno; then
816      AC_MSG_WARN([libltdl not installed, but installation disabled])
817    else
818      enable_ltdl_install=yes
819    fi
820   ])
821   if test x"$enable_ltdl_install" = x"yes"; then
822     ac_configure_args="$ac_configure_args --enable-ltdl-install"
823     LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
824     INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
825   else
826     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
827     LIBLTDL="-lltdl"
828     INCLTDL=
829   fi
830 ])
831
832 # If this macro is not defined by Autoconf, define it here.
833 ifdef([AC_PROVIDE_IFELSE],
834       [],
835       [define([AC_PROVIDE_IFELSE],
836               [ifdef([AC_PROVIDE_$1],
837                      [$2], [$3])])])
838
839 # AC_LIBTOOL_CXX - enable support for C++ libraries
840 AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
841
842 AC_DEFUN([_AC_LIBTOOL_CXX],
843 [AC_REQUIRE([AC_PROG_CXX])
844 AC_REQUIRE([AC_PROG_CXXCPP])
845 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
846 lt_save_CC="$CC"
847 lt_save_CFLAGS="$CFLAGS"
848 dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
849 dnl is set to the C++ compiler.
850 AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
851 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
852 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
853 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
854 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
855 deplibs_check_method="$deplibs_check_method" \
856 file_magic_cmd="$file_magic_cmd" \
857 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
858 --build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
859 || AC_MSG_ERROR([libtool tag configuration failed])
860 CC="$lt_save_CC"
861 CFLAGS="$lt_save_CFLAGS"
862
863 # Redirect the config.log output again, so that the ltconfig log is not
864 # clobbered by the next message.
865 exec 5>>./config.log
866 ])
867
868 # AC_LIBTOOL_GCJ - enable support for GCJ libraries
869 AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
870
871 AC_DEFUN([_AC_LIBTOOL_GCJ],
872 [AC_REQUIRE([AC_PROG_LIBTOOL])
873 AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
874   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
875     [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
876       [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
877          [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
878            [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
879 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
880 lt_save_CC="$CC"
881 lt_save_CFLAGS="$CFLAGS"
882 dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
883 dnl is set to the C++ compiler.
884 AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
885 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
886 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
887 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
888 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
889 deplibs_check_method="$deplibs_check_method" \
890 file_magic_cmd="$file_magic_cmd" \
891 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
892 --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
893 || AC_MSG_ERROR([libtool tag configuration failed])
894 CC="$lt_save_CC"
895 CFLAGS="$lt_save_CFLAGS"
896
897 # Redirect the config.log output again, so that the ltconfig log is not
898 # clobbered by the next message.
899 exec 5>>./config.log
900 ])
901
902 dnl old names
903 AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
904 AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
905 AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
906 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
907 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
908 AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
909 AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
910
911 dnl This is just to silence aclocal about the macro not being used
912 ifelse([AC_DISABLE_FAST_INSTALL])dnl
913
914 AC_DEFUN([LT_AC_PROG_GCJ],
915 [AC_CHECK_TOOL(GCJ, gcj, no)
916   test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
917   AC_SUBST(GCJFLAGS)
918 ])
919
920 # Do all the work for Automake.                            -*- Autoconf -*-
921
922 # This macro actually does too much some checks are only needed if
923 # your package does certain things.  But this isn't really a big deal.
924
925 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
926 # Free Software Foundation, Inc.
927
928 # This program is free software; you can redistribute it and/or modify
929 # it under the terms of the GNU General Public License as published by
930 # the Free Software Foundation; either version 2, or (at your option)
931 # any later version.
932
933 # This program is distributed in the hope that it will be useful,
934 # but WITHOUT ANY WARRANTY; without even the implied warranty of
935 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
936 # GNU General Public License for more details.
937
938 # You should have received a copy of the GNU General Public License
939 # along with this program; if not, write to the Free Software
940 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
941 # 02111-1307, USA.
942
943 # serial 10
944
945 AC_PREREQ([2.54])
946
947 # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
948 # the ones we care about.
949 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
950
951 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
952 # AM_INIT_AUTOMAKE([OPTIONS])
953 # -----------------------------------------------
954 # The call with PACKAGE and VERSION arguments is the old style
955 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
956 # and VERSION should now be passed to AC_INIT and removed from
957 # the call to AM_INIT_AUTOMAKE.
958 # We support both call styles for the transition.  After
959 # the next Automake release, Autoconf can make the AC_INIT
960 # arguments mandatory, and then we can depend on a new Autoconf
961 # release and drop the old call support.
962 AC_DEFUN([AM_INIT_AUTOMAKE],
963 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
964  AC_REQUIRE([AC_PROG_INSTALL])dnl
965 # test to see if srcdir already configured
966 if test "`cd $srcdir && pwd`" != "`pwd`" &&
967    test -f $srcdir/config.status; then
968   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
969 fi
970
971 # test whether we have cygpath
972 if test -z "$CYGPATH_W"; then
973   if (cygpath --version) >/dev/null 2>/dev/null; then
974     CYGPATH_W='cygpath -w'
975   else
976     CYGPATH_W=echo
977   fi
978 fi
979 AC_SUBST([CYGPATH_W])
980
981 # Define the identity of the package.
982 dnl Distinguish between old-style and new-style calls.
983 m4_ifval([$2],
984 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
985  AC_SUBST([PACKAGE], [$1])dnl
986  AC_SUBST([VERSION], [$2])],
987 [_AM_SET_OPTIONS([$1])dnl
988  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
989  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
990
991 _AM_IF_OPTION([no-define],,
992 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
993  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
994
995 # Some tools Automake needs.
996 AC_REQUIRE([AM_SANITY_CHECK])dnl
997 AC_REQUIRE([AC_ARG_PROGRAM])dnl
998 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
999 AM_MISSING_PROG(AUTOCONF, autoconf)
1000 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1001 AM_MISSING_PROG(AUTOHEADER, autoheader)
1002 AM_MISSING_PROG(MAKEINFO, makeinfo)
1003 AM_MISSING_PROG(AMTAR, tar)
1004 AM_PROG_INSTALL_SH
1005 AM_PROG_INSTALL_STRIP
1006 # We need awk for the "check" target.  The system "awk" is bad on
1007 # some platforms.
1008 AC_REQUIRE([AC_PROG_AWK])dnl
1009 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1010 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1011
1012 _AM_IF_OPTION([no-dependencies],,
1013 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1014                   [_AM_DEPENDENCIES(CC)],
1015                   [define([AC_PROG_CC],
1016                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1017 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1018                   [_AM_DEPENDENCIES(CXX)],
1019                   [define([AC_PROG_CXX],
1020                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1021 ])
1022 ])
1023
1024
1025 # When config.status generates a header, we must update the stamp-h file.
1026 # This file resides in the same directory as the config header
1027 # that is generated.  The stamp files are numbered to have different names.
1028
1029 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1030 # loop where config.status creates the headers, so we can generate
1031 # our stamp files there.
1032 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1033 [# Compute $1's index in $config_headers.
1034 _am_stamp_count=1
1035 for _am_header in $config_headers :; do
1036   case $_am_header in
1037     $1 | $1:* )
1038       break ;;
1039     * )
1040       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1041   esac
1042 done
1043 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1044
1045 # Copyright 2002  Free Software Foundation, Inc.
1046
1047 # This program is free software; you can redistribute it and/or modify
1048 # it under the terms of the GNU General Public License as published by
1049 # the Free Software Foundation; either version 2, or (at your option)
1050 # any later version.
1051
1052 # This program is distributed in the hope that it will be useful,
1053 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1054 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1055 # GNU General Public License for more details.
1056
1057 # You should have received a copy of the GNU General Public License
1058 # along with this program; if not, write to the Free Software
1059 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1060
1061 # AM_AUTOMAKE_VERSION(VERSION)
1062 # ----------------------------
1063 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1064 # generated from the m4 files accompanying Automake X.Y.
1065 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
1066
1067 # AM_SET_CURRENT_AUTOMAKE_VERSION
1068 # -------------------------------
1069 # Call AM_AUTOMAKE_VERSION so it can be traced.
1070 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
1071 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1072          [AM_AUTOMAKE_VERSION([1.7.8])])
1073
1074 # Helper functions for option handling.                    -*- Autoconf -*-
1075
1076 # Copyright 2001, 2002  Free Software Foundation, Inc.
1077
1078 # This program is free software; you can redistribute it and/or modify
1079 # it under the terms of the GNU General Public License as published by
1080 # the Free Software Foundation; either version 2, or (at your option)
1081 # any later version.
1082
1083 # This program is distributed in the hope that it will be useful,
1084 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1085 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1086 # GNU General Public License for more details.
1087
1088 # You should have received a copy of the GNU General Public License
1089 # along with this program; if not, write to the Free Software
1090 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1091 # 02111-1307, USA.
1092
1093 # serial 2
1094
1095 # _AM_MANGLE_OPTION(NAME)
1096 # -----------------------
1097 AC_DEFUN([_AM_MANGLE_OPTION],
1098 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1099
1100 # _AM_SET_OPTION(NAME)
1101 # ------------------------------
1102 # Set option NAME.  Presently that only means defining a flag for this option.
1103 AC_DEFUN([_AM_SET_OPTION],
1104 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1105
1106 # _AM_SET_OPTIONS(OPTIONS)
1107 # ----------------------------------
1108 # OPTIONS is a space-separated list of Automake options.
1109 AC_DEFUN([_AM_SET_OPTIONS],
1110 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1111
1112 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1113 # -------------------------------------------
1114 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1115 AC_DEFUN([_AM_IF_OPTION],
1116 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1117
1118 #
1119 # Check to make sure that the build environment is sane.
1120 #
1121
1122 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
1123
1124 # This program is free software; you can redistribute it and/or modify
1125 # it under the terms of the GNU General Public License as published by
1126 # the Free Software Foundation; either version 2, or (at your option)
1127 # any later version.
1128
1129 # This program is distributed in the hope that it will be useful,
1130 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1131 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1132 # GNU General Public License for more details.
1133
1134 # You should have received a copy of the GNU General Public License
1135 # along with this program; if not, write to the Free Software
1136 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1137 # 02111-1307, USA.
1138
1139 # serial 3
1140
1141 # AM_SANITY_CHECK
1142 # ---------------
1143 AC_DEFUN([AM_SANITY_CHECK],
1144 [AC_MSG_CHECKING([whether build environment is sane])
1145 # Just in case
1146 sleep 1
1147 echo timestamp > conftest.file
1148 # Do `set' in a subshell so we don't clobber the current shell's
1149 # arguments.  Must try -L first in case configure is actually a
1150 # symlink; some systems play weird games with the mod time of symlinks
1151 # (eg FreeBSD returns the mod time of the symlink's containing
1152 # directory).
1153 if (
1154    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1155    if test "$[*]" = "X"; then
1156       # -L didn't work.
1157       set X `ls -t $srcdir/configure conftest.file`
1158    fi
1159    rm -f conftest.file
1160    if test "$[*]" != "X $srcdir/configure conftest.file" \
1161       && test "$[*]" != "X conftest.file $srcdir/configure"; then
1162
1163       # If neither matched, then we have a broken ls.  This can happen
1164       # if, for instance, CONFIG_SHELL is bash and it inherits a
1165       # broken ls alias from the environment.  This has actually
1166       # happened.  Such a system could not be considered "sane".
1167       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1168 alias in your environment])
1169    fi
1170
1171    test "$[2]" = conftest.file
1172    )
1173 then
1174    # Ok.
1175    :
1176 else
1177    AC_MSG_ERROR([newly created file is older than distributed files!
1178 Check your system clock])
1179 fi
1180 AC_MSG_RESULT(yes)])
1181
1182 #  -*- Autoconf -*-
1183
1184
1185 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
1186
1187 # This program is free software; you can redistribute it and/or modify
1188 # it under the terms of the GNU General Public License as published by
1189 # the Free Software Foundation; either version 2, or (at your option)
1190 # any later version.
1191
1192 # This program is distributed in the hope that it will be useful,
1193 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1194 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1195 # GNU General Public License for more details.
1196
1197 # You should have received a copy of the GNU General Public License
1198 # along with this program; if not, write to the Free Software
1199 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1200 # 02111-1307, USA.
1201
1202 # serial 3
1203
1204 # AM_MISSING_PROG(NAME, PROGRAM)
1205 # ------------------------------
1206 AC_DEFUN([AM_MISSING_PROG],
1207 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1208 $1=${$1-"${am_missing_run}$2"}
1209 AC_SUBST($1)])
1210
1211
1212 # AM_MISSING_HAS_RUN
1213 # ------------------
1214 # Define MISSING if not defined so far and test if it supports --run.
1215 # If it does, set am_missing_run to use it, otherwise, to nothing.
1216 AC_DEFUN([AM_MISSING_HAS_RUN],
1217 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1218 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
1219 # Use eval to expand $SHELL
1220 if eval "$MISSING --run true"; then
1221   am_missing_run="$MISSING --run "
1222 else
1223   am_missing_run=
1224   AC_MSG_WARN([`missing' script is too old or missing])
1225 fi
1226 ])
1227
1228 # AM_AUX_DIR_EXPAND
1229
1230 # Copyright 2001 Free Software Foundation, Inc.
1231
1232 # This program is free software; you can redistribute it and/or modify
1233 # it under the terms of the GNU General Public License as published by
1234 # the Free Software Foundation; either version 2, or (at your option)
1235 # any later version.
1236
1237 # This program is distributed in the hope that it will be useful,
1238 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1239 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1240 # GNU General Public License for more details.
1241
1242 # You should have received a copy of the GNU General Public License
1243 # along with this program; if not, write to the Free Software
1244 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1245 # 02111-1307, USA.
1246
1247 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1248 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
1249 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
1250 #
1251 # Of course, Automake must honor this variable whenever it calls a
1252 # tool from the auxiliary directory.  The problem is that $srcdir (and
1253 # therefore $ac_aux_dir as well) can be either absolute or relative,
1254 # depending on how configure is run.  This is pretty annoying, since
1255 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
1256 # source directory, any form will work fine, but in subdirectories a
1257 # relative path needs to be adjusted first.
1258 #
1259 # $ac_aux_dir/missing
1260 #    fails when called from a subdirectory if $ac_aux_dir is relative
1261 # $top_srcdir/$ac_aux_dir/missing
1262 #    fails if $ac_aux_dir is absolute,
1263 #    fails when called from a subdirectory in a VPATH build with
1264 #          a relative $ac_aux_dir
1265 #
1266 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1267 # are both prefixed by $srcdir.  In an in-source build this is usually
1268 # harmless because $srcdir is `.', but things will broke when you
1269 # start a VPATH build or use an absolute $srcdir.
1270 #
1271 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1272 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
1273 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1274 # and then we would define $MISSING as
1275 #   MISSING="\${SHELL} $am_aux_dir/missing"
1276 # This will work as long as MISSING is not called from configure, because
1277 # unfortunately $(top_srcdir) has no meaning in configure.
1278 # However there are other variables, like CC, which are often used in
1279 # configure, and could therefore not use this "fixed" $ac_aux_dir.
1280 #
1281 # Another solution, used here, is to always expand $ac_aux_dir to an
1282 # absolute PATH.  The drawback is that using absolute paths prevent a
1283 # configured tree to be moved without reconfiguration.
1284
1285 # Rely on autoconf to set up CDPATH properly.
1286 AC_PREREQ([2.50])
1287
1288 AC_DEFUN([AM_AUX_DIR_EXPAND], [
1289 # expand $ac_aux_dir to an absolute path
1290 am_aux_dir=`cd $ac_aux_dir && pwd`
1291 ])
1292
1293 # AM_PROG_INSTALL_SH
1294 # ------------------
1295 # Define $install_sh.
1296
1297 # Copyright 2001 Free Software Foundation, Inc.
1298
1299 # This program is free software; you can redistribute it and/or modify
1300 # it under the terms of the GNU General Public License as published by
1301 # the Free Software Foundation; either version 2, or (at your option)
1302 # any later version.
1303
1304 # This program is distributed in the hope that it will be useful,
1305 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1306 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1307 # GNU General Public License for more details.
1308
1309 # You should have received a copy of the GNU General Public License
1310 # along with this program; if not, write to the Free Software
1311 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1312 # 02111-1307, USA.
1313
1314 AC_DEFUN([AM_PROG_INSTALL_SH],
1315 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1316 install_sh=${install_sh-"$am_aux_dir/install-sh"}
1317 AC_SUBST(install_sh)])
1318
1319 # AM_PROG_INSTALL_STRIP
1320
1321 # Copyright 2001 Free Software Foundation, Inc.
1322
1323 # This program is free software; you can redistribute it and/or modify
1324 # it under the terms of the GNU General Public License as published by
1325 # the Free Software Foundation; either version 2, or (at your option)
1326 # any later version.
1327
1328 # This program is distributed in the hope that it will be useful,
1329 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1330 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1331 # GNU General Public License for more details.
1332
1333 # You should have received a copy of the GNU General Public License
1334 # along with this program; if not, write to the Free Software
1335 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1336 # 02111-1307, USA.
1337
1338 # One issue with vendor `install' (even GNU) is that you can't
1339 # specify the program used to strip binaries.  This is especially
1340 # annoying in cross-compiling environments, where the build's strip
1341 # is unlikely to handle the host's binaries.
1342 # Fortunately install-sh will honor a STRIPPROG variable, so we
1343 # always use install-sh in `make install-strip', and initialize
1344 # STRIPPROG with the value of the STRIP variable (set by the user).
1345 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1346 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1347 # Installed binaries are usually stripped using `strip' when the user
1348 # run `make install-strip'.  However `strip' might not be the right
1349 # tool to use in cross-compilation environments, therefore Automake
1350 # will honor the `STRIP' environment variable to overrule this program.
1351 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1352 if test "$cross_compiling" != no; then
1353   AC_CHECK_TOOL([STRIP], [strip], :)
1354 fi
1355 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
1356 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1357
1358 #                                                          -*- Autoconf -*-
1359 # Copyright (C) 2003  Free Software Foundation, Inc.
1360
1361 # This program is free software; you can redistribute it and/or modify
1362 # it under the terms of the GNU General Public License as published by
1363 # the Free Software Foundation; either version 2, or (at your option)
1364 # any later version.
1365
1366 # This program is distributed in the hope that it will be useful,
1367 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1368 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1369 # GNU General Public License for more details.
1370
1371 # You should have received a copy of the GNU General Public License
1372 # along with this program; if not, write to the Free Software
1373 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1374 # 02111-1307, USA.
1375
1376 # serial 1
1377
1378 # Check whether the underlying file-system supports filenames
1379 # with a leading dot.  For instance MS-DOS doesn't.
1380 AC_DEFUN([AM_SET_LEADING_DOT],
1381 [rm -rf .tst 2>/dev/null
1382 mkdir .tst 2>/dev/null
1383 if test -d .tst; then
1384   am__leading_dot=.
1385 else
1386   am__leading_dot=_
1387 fi
1388 rmdir .tst 2>/dev/null
1389 AC_SUBST([am__leading_dot])])
1390
1391 # serial 5                                              -*- Autoconf -*-
1392
1393 # Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
1394
1395 # This program is free software; you can redistribute it and/or modify
1396 # it under the terms of the GNU General Public License as published by
1397 # the Free Software Foundation; either version 2, or (at your option)
1398 # any later version.
1399
1400 # This program is distributed in the hope that it will be useful,
1401 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1402 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1403 # GNU General Public License for more details.
1404
1405 # You should have received a copy of the GNU General Public License
1406 # along with this program; if not, write to the Free Software
1407 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1408 # 02111-1307, USA.
1409
1410
1411 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1412 # written in clear, in which case automake, when reading aclocal.m4,
1413 # will think it sees a *use*, and therefore will trigger all it's
1414 # C support machinery.  Also note that it means that autoscan, seeing
1415 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1416
1417
1418
1419 # _AM_DEPENDENCIES(NAME)
1420 # ----------------------
1421 # See how the compiler implements dependency checking.
1422 # NAME is "CC", "CXX", "GCJ", or "OBJC".
1423 # We try a few techniques and use that to set a single cache variable.
1424 #
1425 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1426 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1427 # dependency, and given that the user is not expected to run this macro,
1428 # just rely on AC_PROG_CC.
1429 AC_DEFUN([_AM_DEPENDENCIES],
1430 [AC_REQUIRE([AM_SET_DEPDIR])dnl
1431 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1432 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1433 AC_REQUIRE([AM_DEP_TRACK])dnl
1434
1435 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
1436        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
1437        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1438        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
1439                    [depcc="$$1"   am_compiler_list=])
1440
1441 AC_CACHE_CHECK([dependency style of $depcc],
1442                [am_cv_$1_dependencies_compiler_type],
1443 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1444   # We make a subdir and do the tests there.  Otherwise we can end up
1445   # making bogus files that we don't know about and never remove.  For
1446   # instance it was reported that on HP-UX the gcc test will end up
1447   # making a dummy file named `D' -- because `-MD' means `put the output
1448   # in D'.
1449   mkdir conftest.dir
1450   # Copy depcomp to subdir because otherwise we won't find it if we're
1451   # using a relative directory.
1452   cp "$am_depcomp" conftest.dir
1453   cd conftest.dir
1454   # We will build objects and dependencies in a subdirectory because
1455   # it helps to detect inapplicable dependency modes.  For instance
1456   # both Tru64's cc and ICC support -MD to output dependencies as a
1457   # side effect of compilation, but ICC will put the dependencies in
1458   # the current directory while Tru64 will put them in the object
1459   # directory.
1460   mkdir sub
1461
1462   am_cv_$1_dependencies_compiler_type=none
1463   if test "$am_compiler_list" = ""; then
1464      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1465   fi
1466   for depmode in $am_compiler_list; do
1467     # Setup a source with many dependencies, because some compilers
1468     # like to wrap large dependency lists on column 80 (with \), and
1469     # we should not choose a depcomp mode which is confused by this.
1470     #
1471     # We need to recreate these files for each test, as the compiler may
1472     # overwrite some of them when testing with obscure command lines.
1473     # This happens at least with the AIX C compiler.
1474     : > sub/conftest.c
1475     for i in 1 2 3 4 5 6; do
1476       echo '#include "conftst'$i'.h"' >> sub/conftest.c
1477       : > sub/conftst$i.h
1478     done
1479     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1480
1481     case $depmode in
1482     nosideeffect)
1483       # after this tag, mechanisms are not by side-effect, so they'll
1484       # only be used when explicitly requested
1485       if test "x$enable_dependency_tracking" = xyes; then
1486         continue
1487       else
1488         break
1489       fi
1490       ;;
1491     none) break ;;
1492     esac
1493     # We check with `-c' and `-o' for the sake of the "dashmstdout"
1494     # mode.  It turns out that the SunPro C++ compiler does not properly
1495     # handle `-M -o', and we need to detect this.
1496     if depmode=$depmode \
1497        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
1498        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1499        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
1500          >/dev/null 2>conftest.err &&
1501        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1502        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
1503        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1504       # icc doesn't choke on unknown options, it will just issue warnings
1505       # (even with -Werror).  So we grep stderr for any message
1506       # that says an option was ignored.
1507       if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
1508         am_cv_$1_dependencies_compiler_type=$depmode
1509         break
1510       fi
1511     fi
1512   done
1513
1514   cd ..
1515   rm -rf conftest.dir
1516 else
1517   am_cv_$1_dependencies_compiler_type=none
1518 fi
1519 ])
1520 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1521 AM_CONDITIONAL([am__fastdep$1], [
1522   test "x$enable_dependency_tracking" != xno \
1523   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1524 ])
1525
1526
1527 # AM_SET_DEPDIR
1528 # -------------
1529 # Choose a directory name for dependency files.
1530 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
1531 AC_DEFUN([AM_SET_DEPDIR],
1532 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1533 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1534 ])
1535
1536
1537 # AM_DEP_TRACK
1538 # ------------
1539 AC_DEFUN([AM_DEP_TRACK],
1540 [AC_ARG_ENABLE(dependency-tracking,
1541 [  --disable-dependency-tracking Speeds up one-time builds
1542   --enable-dependency-tracking  Do not reject slow dependency extractors])
1543 if test "x$enable_dependency_tracking" != xno; then
1544   am_depcomp="$ac_aux_dir/depcomp"
1545   AMDEPBACKSLASH='\'
1546 fi
1547 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1548 AC_SUBST([AMDEPBACKSLASH])
1549 ])
1550
1551 # Generate code to set up dependency tracking.   -*- Autoconf -*-
1552
1553 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
1554
1555 # This program is free software; you can redistribute it and/or modify
1556 # it under the terms of the GNU General Public License as published by
1557 # the Free Software Foundation; either version 2, or (at your option)
1558 # any later version.
1559
1560 # This program is distributed in the hope that it will be useful,
1561 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1562 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1563 # GNU General Public License for more details.
1564
1565 # You should have received a copy of the GNU General Public License
1566 # along with this program; if not, write to the Free Software
1567 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1568 # 02111-1307, USA.
1569
1570 #serial 2
1571
1572 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1573 # ------------------------------
1574 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1575 [for mf in $CONFIG_FILES; do
1576   # Strip MF so we end up with the name of the file.
1577   mf=`echo "$mf" | sed -e 's/:.*$//'`
1578   # Check whether this is an Automake generated Makefile or not.
1579   # We used to match only the files named `Makefile.in', but
1580   # some people rename them; so instead we look at the file content.
1581   # Grep'ing the first line is not enough: some people post-process
1582   # each Makefile.in and add a new line on top of each file to say so.
1583   # So let's grep whole file.
1584   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
1585     dirpart=`AS_DIRNAME("$mf")`
1586   else
1587     continue
1588   fi
1589   grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
1590   # Extract the definition of DEP_FILES from the Makefile without
1591   # running `make'.
1592   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
1593   test -z "$DEPDIR" && continue
1594   # When using ansi2knr, U may be empty or an underscore; expand it
1595   U=`sed -n -e '/^U = / s///p' < "$mf"`
1596   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
1597   # We invoke sed twice because it is the simplest approach to
1598   # changing $(DEPDIR) to its actual value in the expansion.
1599   for file in `sed -n -e '
1600     /^DEP_FILES = .*\\\\$/ {
1601       s/^DEP_FILES = //
1602       :loop
1603         s/\\\\$//
1604         p
1605         n
1606         /\\\\$/ b loop
1607       p
1608     }
1609     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
1610        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1611     # Make sure the directory exists.
1612     test -f "$dirpart/$file" && continue
1613     fdir=`AS_DIRNAME(["$file"])`
1614     AS_MKDIR_P([$dirpart/$fdir])
1615     # echo "creating $dirpart/$file"
1616     echo '# dummy' > "$dirpart/$file"
1617   done
1618 done
1619 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1620
1621
1622 # AM_OUTPUT_DEPENDENCY_COMMANDS
1623 # -----------------------------
1624 # This macro should only be invoked once -- use via AC_REQUIRE.
1625 #
1626 # This code is only required when automatic dependency tracking
1627 # is enabled.  FIXME.  This creates each `.P' file that we will
1628 # need in order to bootstrap the dependency handling code.
1629 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1630 [AC_CONFIG_COMMANDS([depfiles],
1631      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1632      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1633 ])
1634
1635 # Check to see how 'make' treats includes.      -*- Autoconf -*-
1636
1637 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
1638
1639 # This program is free software; you can redistribute it and/or modify
1640 # it under the terms of the GNU General Public License as published by
1641 # the Free Software Foundation; either version 2, or (at your option)
1642 # any later version.
1643
1644 # This program is distributed in the hope that it will be useful,
1645 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1646 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1647 # GNU General Public License for more details.
1648
1649 # You should have received a copy of the GNU General Public License
1650 # along with this program; if not, write to the Free Software
1651 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1652 # 02111-1307, USA.
1653
1654 # serial 2
1655
1656 # AM_MAKE_INCLUDE()
1657 # -----------------
1658 # Check to see how make treats includes.
1659 AC_DEFUN([AM_MAKE_INCLUDE],
1660 [am_make=${MAKE-make}
1661 cat > confinc << 'END'
1662 am__doit:
1663         @echo done
1664 .PHONY: am__doit
1665 END
1666 # If we don't find an include directive, just comment out the code.
1667 AC_MSG_CHECKING([for style of include used by $am_make])
1668 am__include="#"
1669 am__quote=
1670 _am_result=none
1671 # First try GNU make style include.
1672 echo "include confinc" > confmf
1673 # We grep out `Entering directory' and `Leaving directory'
1674 # messages which can occur if `w' ends up in MAKEFLAGS.
1675 # In particular we don't look at `^make:' because GNU make might
1676 # be invoked under some other name (usually "gmake"), in which
1677 # case it prints its new name instead of `make'.
1678 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
1679    am__include=include
1680    am__quote=
1681    _am_result=GNU
1682 fi
1683 # Now try BSD make style include.
1684 if test "$am__include" = "#"; then
1685    echo '.include "confinc"' > confmf
1686    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1687       am__include=.include
1688       am__quote="\""
1689       _am_result=BSD
1690    fi
1691 fi
1692 AC_SUBST([am__include])
1693 AC_SUBST([am__quote])
1694 AC_MSG_RESULT([$_am_result])
1695 rm -f confinc confmf
1696 ])
1697
1698 # AM_CONDITIONAL                                              -*- Autoconf -*-
1699
1700 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
1701
1702 # This program is free software; you can redistribute it and/or modify
1703 # it under the terms of the GNU General Public License as published by
1704 # the Free Software Foundation; either version 2, or (at your option)
1705 # any later version.
1706
1707 # This program is distributed in the hope that it will be useful,
1708 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1709 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1710 # GNU General Public License for more details.
1711
1712 # You should have received a copy of the GNU General Public License
1713 # along with this program; if not, write to the Free Software
1714 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1715 # 02111-1307, USA.
1716
1717 # serial 5
1718
1719 AC_PREREQ(2.52)
1720
1721 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1722 # -------------------------------------
1723 # Define a conditional.
1724 AC_DEFUN([AM_CONDITIONAL],
1725 [ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1726         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1727 AC_SUBST([$1_TRUE])
1728 AC_SUBST([$1_FALSE])
1729 if $2; then
1730   $1_TRUE=
1731   $1_FALSE='#'
1732 else
1733   $1_TRUE='#'
1734   $1_FALSE=
1735 fi
1736 AC_CONFIG_COMMANDS_PRE(
1737 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1738   AC_MSG_ERROR([conditional "$1" was never defined.
1739 Usually this means the macro was only invoked conditionally.])
1740 fi])])
1741
1742 # Add --enable-maintainer-mode option to configure.
1743 # From Jim Meyering
1744
1745 # Copyright 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
1746
1747 # This program is free software; you can redistribute it and/or modify
1748 # it under the terms of the GNU General Public License as published by
1749 # the Free Software Foundation; either version 2, or (at your option)
1750 # any later version.
1751
1752 # This program is distributed in the hope that it will be useful,
1753 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1754 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1755 # GNU General Public License for more details.
1756
1757 # You should have received a copy of the GNU General Public License
1758 # along with this program; if not, write to the Free Software
1759 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1760 # 02111-1307, USA.
1761
1762 # serial 2
1763
1764 AC_DEFUN([AM_MAINTAINER_MODE],
1765 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1766   dnl maintainer-mode is disabled by default
1767   AC_ARG_ENABLE(maintainer-mode,
1768 [  --enable-maintainer-mode enable make rules and dependencies not useful
1769                           (and sometimes confusing) to the casual installer],
1770       USE_MAINTAINER_MODE=$enableval,
1771       USE_MAINTAINER_MODE=no)
1772   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1773   AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
1774   MAINT=$MAINTAINER_MODE_TRUE
1775   AC_SUBST(MAINT)dnl
1776 ]
1777 )
1778
1779 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1780
1781 # Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
1782
1783 # This program is free software; you can redistribute it and/or modify
1784 # it under the terms of the GNU General Public License as published by
1785 # the Free Software Foundation; either version 2, or (at your option)
1786 # any later version.
1787
1788 # This program is distributed in the hope that it will be useful,
1789 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1790 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1791 # GNU General Public License for more details.
1792
1793 # You should have received a copy of the GNU General Public License
1794 # along with this program; if not, write to the Free Software
1795 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1796 # 02111-1307, USA.
1797
1798 # serial 3
1799
1800 # AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
1801 # ---------------------------------------------------
1802 # Add --enable-multilib to configure.
1803 AC_DEFUN([AM_ENABLE_MULTILIB],
1804 [# Default to --enable-multilib
1805 AC_ARG_ENABLE(multilib,
1806 [  --enable-multilib         build many library versions (default)],
1807 [case "$enableval" in
1808   yes) multilib=yes ;;
1809   no)  multilib=no ;;
1810   *)   AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
1811  esac],
1812               [multilib=yes])
1813
1814 # We may get other options which we leave undocumented:
1815 # --with-target-subdir, --with-multisrctop, --with-multisubdir
1816 # See config-ml.in if you want the gory details.
1817
1818 if test "$srcdir" = "."; then
1819   if test "$with_target_subdir" != "."; then
1820     multi_basedir="$srcdir/$with_multisrctop../$2"
1821   else
1822     multi_basedir="$srcdir/$with_multisrctop$2"
1823   fi
1824 else
1825   multi_basedir="$srcdir/$2"
1826 fi
1827 AC_SUBST(multi_basedir)
1828
1829 AC_OUTPUT_COMMANDS([
1830 # Only add multilib support code if we just rebuilt the top-level
1831 # Makefile.
1832 case " $CONFIG_FILES " in
1833  *" ]m4_default([$1],Makefile)[ "*)
1834    ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
1835    ;;
1836 esac],
1837                    [
1838 srcdir="$srcdir"
1839 host="$host"
1840 target="$target"
1841 with_multisubdir="$with_multisubdir"
1842 with_multisrctop="$with_multisrctop"
1843 with_target_subdir="$with_target_subdir"
1844 ac_configure_args="${multilib_arg} ${ac_configure_args}"
1845 multi_basedir="$multi_basedir"
1846 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1847 CC="$CC"])])dnl
1848
1849 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
1850
1851 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
1852
1853 # This program is free software; you can redistribute it and/or modify
1854 # it under the terms of the GNU General Public License as published by
1855 # the Free Software Foundation; either version 2, or (at your option)
1856 # any later version.
1857
1858 # This program is distributed in the hope that it will be useful,
1859 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1860 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1861 # GNU General Public License for more details.
1862
1863 # You should have received a copy of the GNU General Public License
1864 # along with this program; if not, write to the Free Software
1865 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1866 # 02111-1307, USA.
1867
1868 AC_PREREQ([2.52])
1869
1870 # serial 6
1871
1872 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
1873 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1874