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