]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/cvs/aclocal.m4
This commit was generated by cvs2svn to compensate for changes in r168616,
[FreeBSD/FreeBSD.git] / contrib / cvs / aclocal.m4
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
14 /* This program is free software; you can redistribute it and/or modify
15    it under the terms of the GNU General Public License as published by
16    the Free Software Foundation; either version 2, or (at your option)
17    any later version.
18
19    This program is distributed in the hope that it will be useful,
20    but WITHOUT ANY WARRANTY; without even the implied warranty of
21    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22    GNU General Public License for more details.  */
23
24 AC_DEFUN([ACX_WITH_GSSAPI],[
25 #
26 # Use --with-gssapi[=DIR] to enable GSSAPI support.
27 #
28 # defaults to enabled with DIR in default list below
29 #
30 # Search for /SUNHEA/ and read the comments about this default below.
31 #
32 AC_ARG_WITH(
33   [gssapi],
34   AC_HELP_STRING(
35     [--with-gssapi],
36     [GSSAPI directory (default autoselects)]), ,
37   [with_gssapi=yes])dnl
38
39 dnl
40 dnl FIXME - cache withval and obliterate later cache values when options change
41 dnl
42 #
43 # Try to locate a GSSAPI installation if no location was specified, assuming
44 # GSSAPI was enabled (the default).
45
46 if test -n "$acx_gssapi_cv_gssapi"; then
47   # Granted, this is a slightly ugly way to print this info, but the
48   # AC_CHECK_HEADER used in the search for a GSSAPI installation makes using
49   # AC_CACHE_CHECK worse
50   AC_MSG_CHECKING([for GSSAPI])
51 else :; fi
52 AC_CACHE_VAL([acx_gssapi_cv_gssapi], [
53 if test x$with_gssapi = xyes; then
54   # --with but no location specified
55   # assume a gssapi.h or gssapi/gssapi.h locates our install.
56   #
57   # This isn't always strictly true.  For instance Solaris 7's SUNHEA (header)
58   # package installs gssapi.h whether or not the necessary libraries are
59   # installed.  I'm still not sure whether to consider this a bug.  The long
60   # way around is to not consider GSSPAI installed unless gss_import_name is
61   # found, but that brings up a lot of other hassles, like continuing to let
62   # gcc & ld generate the error messages when the user uses --with-gssapi=dir
63   # as a debugging aid.  The short way around is to disable GSSAPI by default,
64   # but I think Sun users have been faced with this for awhile and I haven't
65   # heard many complaints.
66   acx_gssapi_save_CPPFLAGS=$CPPFLAGS
67   for acx_gssapi_cv_gssapi in yes /usr/kerberos /usr/cygnus/kerbnet no; do
68     if test x$acx_gssapi_cv_gssapi = xno; then
69       break
70     fi
71     if test x$acx_gssapi_cv_gssapi = xyes; then
72       AC_MSG_CHECKING([for GSSAPI])
73       AC_MSG_RESULT([])
74     else
75       CPPFLAGS="$acx_gssapi_save_CPPFLAGS -I$acx_gssapi_cv_gssapi/include"
76       AC_MSG_CHECKING([for GSSAPI in $acx_gssapi_cv_gssapi])
77       AC_MSG_RESULT([])
78     fi
79     unset ac_cv_header_gssapi_h
80     unset ac_cv_header_gssapi_gssapi_h
81     unset ac_cv_header_krb5_h
82     AC_CHECK_HEADERS([gssapi.h gssapi/gssapi.h krb5.h])
83     if (test "$ac_cv_header_gssapi_h" = yes ||
84           test "$ac_cv_header_gssapi_gssapi_h" = yes) &&
85         test "$ac_cv_header_krb5_h" = yes; then
86       break
87     fi
88   done
89   CPPFLAGS=$acx_gssapi_save_CPPFLAGS
90 else
91   acx_gssapi_cv_gssapi=$with_gssapi
92 fi
93 AC_MSG_CHECKING([for GSSAPI])
94 ])dnl
95 AC_MSG_RESULT([$acx_gssapi_cv_gssapi])
96
97 #
98 # Set up GSSAPI includes for later use.  We don't bother to check for
99 # $acx_gssapi_cv_gssapi=no here since that will be caught later.
100 #
101 if test x$acx_gssapi_cv_gssapi = xyes; then
102   # no special includes necessary
103   GSSAPI_INCLUDES=""
104 else
105   # GSSAPI at $acx_gssapi_cv_gssapi (could be 'no')
106   GSSAPI_INCLUDES=" -I$acx_gssapi_cv_gssapi/include"
107 fi
108
109 #
110 # Get the rest of the information CVS needs to compile with GSSAPI support
111 #
112 if test x$acx_gssapi_cv_gssapi != xno; then
113   # define HAVE_GSSAPI and set up the includes
114   AC_DEFINE([HAVE_GSSAPI], ,
115 [Define if you have GSSAPI with Kerberos version 5 available.])
116   includeopt=$includeopt$GSSAPI_INCLUDES
117
118   # locate any other headers
119   acx_gssapi_save_CPPFLAGS=$CPPFLAGS
120   CPPFLAGS=$CPPFLAGS$GSSAPI_INCLUDES
121   dnl We don't use HAVE_KRB5_H anywhere, but including it here might make it
122   dnl easier to spot errors by reading configure output
123   AC_CHECK_HEADERS([gssapi.h gssapi/gssapi.h gssapi/gssapi_generic.h krb5.h])
124   # And look through them for GSS_C_NT_HOSTBASED_SERVICE or its alternatives
125   AC_CACHE_CHECK(
126     [for GSS_C_NT_HOSTBASED_SERVICE],
127     [acx_gssapi_cv_gss_c_nt_hostbased_service],
128   [
129     acx_gssapi_cv_gss_c_nt_hostbased_service=no
130     if test "$ac_cv_header_gssapi_h" = "yes"; then
131       AC_EGREP_HEADER(
132         [GSS_C_NT_HOSTBASED_SERVICE], [gssapi.h],
133         [acx_gssapi_cv_gss_c_nt_hostbased_service=yes],
134       [
135         AC_EGREP_HEADER(
136           [gss_nt_service_name], [gssapi.h],
137           [acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name])
138       ])
139     fi
140     if test $acx_gssapi_cv_gss_c_nt_hostbased_service = no &&
141        test "$ac_cv_header_gssapi_gssapi_h" = "yes"; then
142       AC_EGREP_HEADER(
143         [GSS_C_NT_HOSTBASED_SERVICE], [gssapi/gssapi.h],
144         [acx_gssapi_cv_gss_c_nt_hostbased_service=yes],
145       [
146         AC_EGREP_HEADER([gss_nt_service_name], [gssapi/gssapi.h],
147           [acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name])
148       ])
149     else :; fi
150     if test $acx_gssapi_cv_gss_c_nt_hostbased_service = no &&
151        test "$ac_cv_header_gssapi_gssapi_generic_h" = "yes"; then
152       AC_EGREP_HEADER(
153         [GSS_C_NT_HOSTBASED_SERVICE], [gssapi/gssapi_generic.h],
154         [acx_gssapi_cv_gss_c_nt_hostbased_service=yes],
155       [
156         AC_EGREP_HEADER(
157           [gss_nt_service_name], [gssapi/gssapi_generic.h],
158           [acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name])
159       ])
160     else :; fi
161   ])
162   if test $acx_gssapi_cv_gss_c_nt_hostbased_service != yes &&
163      test $acx_gssapi_cv_gss_c_nt_hostbased_service != no; then
164     # don't define for yes since that means it already means something and
165     # don't define for no since we'd rather the compiler catch the error
166     # It's debatable whether we'd prefer that the compiler catch the error
167     #  - it seems our estranged developer is more likely to be familiar with
168     #    the intricacies of the compiler than with those of autoconf, but by
169     #    the same token, maybe we'd rather alert them to the fact that most
170     #    of the support they need to fix the problem is installed if they can
171     #    simply locate the appropriate symbol.
172     AC_DEFINE_UNQUOTED(
173       [GSS_C_NT_HOSTBASED_SERVICE],
174       [$acx_gssapi_cv_gss_c_nt_hostbased_service],
175 [Define to an alternative value if GSS_C_NT_HOSTBASED_SERVICE isn't defined
176 in the gssapi.h header file.  MIT Kerberos 1.2.1 requires this.  Only relevant
177 when using GSSAPI.])
178   else :; fi
179
180   CPPFLAGS=$acx_gssapi_save_CPPFLAGS
181
182   # Expect the libs to be installed parallel to the headers
183   #
184   # We could try once with and once without, but I'm not sure it's worth the
185   # trouble.
186   if test x$acx_gssapi_cv_gssapi != xyes; then
187     if test -z "$LIBS"; then
188       LIBS="-L$acx_gssapi_cv_gssapi/lib"
189     else
190       LIBS="-L$acx_gssapi_cv_gssapi/lib $LIBS"
191     fi
192   else :; fi
193
194   dnl What happens if we want to enable, say, krb5 and some other GSSAPI
195   dnl authentication method at the same time?
196   #
197   # Some of the order below is particular due to library dependencies
198   #
199
200   #
201   # des                 Heimdal K 0.3d, but Heimdal seems to be set up such
202   #                     that it could have been installed from elsewhere.
203   #
204   AC_SEARCH_LIBS([des_set_odd_parity], [des])
205
206   #
207   # com_err             Heimdal K 0.3d
208   #
209   # com_err             MIT K5 v1.2.2-beta1
210   #
211   AC_SEARCH_LIBS([com_err], [com_err])
212
213   #
214   # asn1                Heimdal K 0.3d          -lcom_err
215   #
216   AC_SEARCH_LIBS([initialize_asn1_error_table_r], [asn1])
217
218   #
219   # resolv              required, but not installed by Heimdal K 0.3d
220   #
221   # resolv              MIT K5 1.2.2-beta1
222   #                     Linux 2.2.17
223   #
224   AC_SEARCH_LIBS([__dn_expand], [resolv])
225
226   #
227   # crypt              Needed by roken under FreeBSD 4.6.
228   #
229   AC_SEARCH_LIBS([crypt], [crypt])
230
231   #
232   # roken               Heimdal K 0.3d          -lresolv
233   # roken               FreeBSD 4.6             -lcrypt
234   #
235   AC_SEARCH_LIBS([roken_gethostbyaddr], [roken])
236
237   #
238   # k5crypto            MIT K5 v1.2.2-beta1
239   #
240   AC_SEARCH_LIBS([valid_enctype], [k5crypto])
241
242   #
243   # gen                 ? ? ?                   Needed on Irix 5.3 with some
244   #                     Irix 5.3                version of Kerberos.  I'm not
245   #                                             sure which since Irix didn't
246   #                                             get any testing this time
247   #                                             around.  Original comment:
248   #
249   # This is necessary on Irix 5.3, in order to link against libkrb5 --
250   # there, an_to_ln.o refers to things defined only in -lgen.
251   #
252   AC_SEARCH_LIBS([compile], [gen])
253
254   #
255   # krb5                ? ? ?                   -lgen -l???
256   #                     Irix 5.3
257   #
258   # krb5                MIT K5 v1.1.1
259   #
260   # krb5                MIT K5 v1.2.2-beta1     -lcrypto -lcom_err
261   #                     Linux 2.2.17
262   #
263   # krb5                MIT K5 v1.2.2-beta1     -lcrypto -lcom_err -lresolv
264   #
265   # krb5                Heimdal K 0.3d          -lasn1 -lroken -ldes
266   #
267   AC_SEARCH_LIBS([krb5_free_context], [krb5])
268
269   #
270   # gssapi_krb5         Only lib needed with MIT K5 v1.2.1, so find it first in
271   #                     order to prefer MIT Kerberos.  If both MIT & Heimdal
272   #                     Kerberos are installed and in the path, this will leave
273   #                     some of the libraries above in LIBS unnecessarily, but
274   #                     noone would ever do that, right?
275   #
276   # gssapi_krb5         MIT K5 v1.2.2-beta1     -lkrb5
277   #
278   # gssapi              Heimdal K 0.3d          -lkrb5
279   #
280   AC_SEARCH_LIBS([gss_import_name], [gssapi_krb5 gssapi])
281 fi
282 ])dnl
283
284
285
286 # size_max.m4 serial 2
287 dnl Copyright (C) 2003 Free Software Foundation, Inc.
288 dnl This file is free software, distributed under the terms of the GNU
289 dnl General Public License.  As a special exception to the GNU General
290 dnl Public License, this file may be distributed as part of a program
291 dnl that contains a configuration script generated by Autoconf, under
292 dnl the same distribution terms as the rest of that program.
293
294 dnl From Bruno Haible.
295
296 AC_DEFUN([gl_SIZE_MAX],
297 [
298   AC_CHECK_HEADERS(stdint.h)
299   dnl First test whether the system already has SIZE_MAX.
300   AC_MSG_CHECKING([for SIZE_MAX])
301   result=
302   AC_EGREP_CPP([Found it], [
303 #include <limits.h>
304 #if HAVE_STDINT_H
305 #include <stdint.h>
306 #endif
307 #ifdef SIZE_MAX
308 Found it
309 #endif
310 ], result=yes)
311   if test -z "$result"; then
312     dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
313     dnl than the type 'unsigned long'.
314     dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
315     dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
316     _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
317       [#include <stddef.h>], result=?)
318     _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
319       [#include <stddef.h>], result=?)
320     _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
321       [#include <stddef.h>], result=?)
322     if test "$fits_in_uint" = 1; then
323       dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
324       dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
325       AC_TRY_COMPILE([#include <stddef.h>
326         extern size_t foo;
327         extern unsigned long foo;
328         ], [], fits_in_uint=0)
329     fi
330     if test -z "$result"; then
331       if test "$fits_in_uint" = 1; then
332         result="$res_hi$res_lo"U
333       else
334         result="$res_hi$res_lo"UL
335       fi
336     else
337       dnl Shouldn't happen, but who knows...
338       result='~(size_t)0'
339     fi
340   fi
341   AC_MSG_RESULT([$result])
342   if test "$result" != yes; then
343     AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
344       [Define as the maximum value of type 'size_t', if the system doesn't define it.])
345   fi
346 ])
347
348
349
350 # xsize.m4 serial 3
351 dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
352 dnl This file is free software, distributed under the terms of the GNU
353 dnl General Public License.  As a special exception to the GNU General
354 dnl Public License, this file may be distributed as part of a program
355 dnl that contains a configuration script generated by Autoconf, under
356 dnl the same distribution terms as the rest of that program.
357
358 AC_DEFUN([gl_XSIZE],
359 [
360   dnl Prerequisites of lib/xsize.h.
361   AC_REQUIRE([gl_SIZE_MAX])
362   AC_REQUIRE([AC_C_INLINE])
363   AC_CHECK_HEADERS(stdint.h)
364 ])
365
366 # Do all the work for Automake.                            -*- Autoconf -*-
367
368 # This macro actually does too much some checks are only needed if
369 # your package does certain things.  But this isn't really a big deal.
370
371 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
372 # Free Software Foundation, Inc.
373
374 # This program is free software; you can redistribute it and/or modify
375 # it under the terms of the GNU General Public License as published by
376 # the Free Software Foundation; either version 2, or (at your option)
377 # any later version.
378
379 # This program is distributed in the hope that it will be useful,
380 # but WITHOUT ANY WARRANTY; without even the implied warranty of
381 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
382 # GNU General Public License for more details.
383
384 # You should have received a copy of the GNU General Public License
385 # along with this program; if not, write to the Free Software
386 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
387 # 02111-1307, USA.
388
389 # serial 10
390
391 AC_PREREQ([2.54])
392
393 # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
394 # the ones we care about.
395 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
396
397 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
398 # AM_INIT_AUTOMAKE([OPTIONS])
399 # -----------------------------------------------
400 # The call with PACKAGE and VERSION arguments is the old style
401 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
402 # and VERSION should now be passed to AC_INIT and removed from
403 # the call to AM_INIT_AUTOMAKE.
404 # We support both call styles for the transition.  After
405 # the next Automake release, Autoconf can make the AC_INIT
406 # arguments mandatory, and then we can depend on a new Autoconf
407 # release and drop the old call support.
408 AC_DEFUN([AM_INIT_AUTOMAKE],
409 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
410  AC_REQUIRE([AC_PROG_INSTALL])dnl
411 # test to see if srcdir already configured
412 if test "`cd $srcdir && pwd`" != "`pwd`" &&
413    test -f $srcdir/config.status; then
414   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
415 fi
416
417 # test whether we have cygpath
418 if test -z "$CYGPATH_W"; then
419   if (cygpath --version) >/dev/null 2>/dev/null; then
420     CYGPATH_W='cygpath -w'
421   else
422     CYGPATH_W=echo
423   fi
424 fi
425 AC_SUBST([CYGPATH_W])
426
427 # Define the identity of the package.
428 dnl Distinguish between old-style and new-style calls.
429 m4_ifval([$2],
430 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
431  AC_SUBST([PACKAGE], [$1])dnl
432  AC_SUBST([VERSION], [$2])],
433 [_AM_SET_OPTIONS([$1])dnl
434  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
435  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
436
437 _AM_IF_OPTION([no-define],,
438 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
439  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
440
441 # Some tools Automake needs.
442 AC_REQUIRE([AM_SANITY_CHECK])dnl
443 AC_REQUIRE([AC_ARG_PROGRAM])dnl
444 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
445 AM_MISSING_PROG(AUTOCONF, autoconf)
446 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
447 AM_MISSING_PROG(AUTOHEADER, autoheader)
448 AM_MISSING_PROG(MAKEINFO, makeinfo)
449 AM_MISSING_PROG(AMTAR, tar)
450 AM_PROG_INSTALL_SH
451 AM_PROG_INSTALL_STRIP
452 # We need awk for the "check" target.  The system "awk" is bad on
453 # some platforms.
454 AC_REQUIRE([AC_PROG_AWK])dnl
455 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
456 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
457
458 _AM_IF_OPTION([no-dependencies],,
459 [AC_PROVIDE_IFELSE([AC_PROG_CC],
460                   [_AM_DEPENDENCIES(CC)],
461                   [define([AC_PROG_CC],
462                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
463 AC_PROVIDE_IFELSE([AC_PROG_CXX],
464                   [_AM_DEPENDENCIES(CXX)],
465                   [define([AC_PROG_CXX],
466                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
467 ])
468 ])
469
470
471 # When config.status generates a header, we must update the stamp-h file.
472 # This file resides in the same directory as the config header
473 # that is generated.  The stamp files are numbered to have different names.
474
475 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
476 # loop where config.status creates the headers, so we can generate
477 # our stamp files there.
478 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
479 [# Compute $1's index in $config_headers.
480 _am_stamp_count=1
481 for _am_header in $config_headers :; do
482   case $_am_header in
483     $1 | $1:* )
484       break ;;
485     * )
486       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
487   esac
488 done
489 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
490
491 # Copyright 2002  Free Software Foundation, Inc.
492
493 # This program is free software; you can redistribute it and/or modify
494 # it under the terms of the GNU General Public License as published by
495 # the Free Software Foundation; either version 2, or (at your option)
496 # any later version.
497
498 # This program is distributed in the hope that it will be useful,
499 # but WITHOUT ANY WARRANTY; without even the implied warranty of
500 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
501 # GNU General Public License for more details.
502
503 # You should have received a copy of the GNU General Public License
504 # along with this program; if not, write to the Free Software
505 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
506
507 # AM_AUTOMAKE_VERSION(VERSION)
508 # ----------------------------
509 # Automake X.Y traces this macro to ensure aclocal.m4 has been
510 # generated from the m4 files accompanying Automake X.Y.
511 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
512
513 # AM_SET_CURRENT_AUTOMAKE_VERSION
514 # -------------------------------
515 # Call AM_AUTOMAKE_VERSION so it can be traced.
516 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
517 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
518          [AM_AUTOMAKE_VERSION([1.7.9])])
519
520 # Helper functions for option handling.                    -*- Autoconf -*-
521
522 # Copyright 2001, 2002  Free Software Foundation, Inc.
523
524 # This program is free software; you can redistribute it and/or modify
525 # it under the terms of the GNU General Public License as published by
526 # the Free Software Foundation; either version 2, or (at your option)
527 # any later version.
528
529 # This program is distributed in the hope that it will be useful,
530 # but WITHOUT ANY WARRANTY; without even the implied warranty of
531 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
532 # GNU General Public License for more details.
533
534 # You should have received a copy of the GNU General Public License
535 # along with this program; if not, write to the Free Software
536 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
537 # 02111-1307, USA.
538
539 # serial 2
540
541 # _AM_MANGLE_OPTION(NAME)
542 # -----------------------
543 AC_DEFUN([_AM_MANGLE_OPTION],
544 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
545
546 # _AM_SET_OPTION(NAME)
547 # ------------------------------
548 # Set option NAME.  Presently that only means defining a flag for this option.
549 AC_DEFUN([_AM_SET_OPTION],
550 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
551
552 # _AM_SET_OPTIONS(OPTIONS)
553 # ----------------------------------
554 # OPTIONS is a space-separated list of Automake options.
555 AC_DEFUN([_AM_SET_OPTIONS],
556 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
557
558 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
559 # -------------------------------------------
560 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
561 AC_DEFUN([_AM_IF_OPTION],
562 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
563
564 #
565 # Check to make sure that the build environment is sane.
566 #
567
568 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
569
570 # This program is free software; you can redistribute it and/or modify
571 # it under the terms of the GNU General Public License as published by
572 # the Free Software Foundation; either version 2, or (at your option)
573 # any later version.
574
575 # This program is distributed in the hope that it will be useful,
576 # but WITHOUT ANY WARRANTY; without even the implied warranty of
577 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
578 # GNU General Public License for more details.
579
580 # You should have received a copy of the GNU General Public License
581 # along with this program; if not, write to the Free Software
582 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
583 # 02111-1307, USA.
584
585 # serial 3
586
587 # AM_SANITY_CHECK
588 # ---------------
589 AC_DEFUN([AM_SANITY_CHECK],
590 [AC_MSG_CHECKING([whether build environment is sane])
591 # Just in case
592 sleep 1
593 echo timestamp > conftest.file
594 # Do `set' in a subshell so we don't clobber the current shell's
595 # arguments.  Must try -L first in case configure is actually a
596 # symlink; some systems play weird games with the mod time of symlinks
597 # (eg FreeBSD returns the mod time of the symlink's containing
598 # directory).
599 if (
600    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
601    if test "$[*]" = "X"; then
602       # -L didn't work.
603       set X `ls -t $srcdir/configure conftest.file`
604    fi
605    rm -f conftest.file
606    if test "$[*]" != "X $srcdir/configure conftest.file" \
607       && test "$[*]" != "X conftest.file $srcdir/configure"; then
608
609       # If neither matched, then we have a broken ls.  This can happen
610       # if, for instance, CONFIG_SHELL is bash and it inherits a
611       # broken ls alias from the environment.  This has actually
612       # happened.  Such a system could not be considered "sane".
613       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
614 alias in your environment])
615    fi
616
617    test "$[2]" = conftest.file
618    )
619 then
620    # Ok.
621    :
622 else
623    AC_MSG_ERROR([newly created file is older than distributed files!
624 Check your system clock])
625 fi
626 AC_MSG_RESULT(yes)])
627
628 #  -*- Autoconf -*-
629
630
631 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
632
633 # This program is free software; you can redistribute it and/or modify
634 # it under the terms of the GNU General Public License as published by
635 # the Free Software Foundation; either version 2, or (at your option)
636 # any later version.
637
638 # This program is distributed in the hope that it will be useful,
639 # but WITHOUT ANY WARRANTY; without even the implied warranty of
640 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
641 # GNU General Public License for more details.
642
643 # You should have received a copy of the GNU General Public License
644 # along with this program; if not, write to the Free Software
645 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
646 # 02111-1307, USA.
647
648 # serial 3
649
650 # AM_MISSING_PROG(NAME, PROGRAM)
651 # ------------------------------
652 AC_DEFUN([AM_MISSING_PROG],
653 [AC_REQUIRE([AM_MISSING_HAS_RUN])
654 $1=${$1-"${am_missing_run}$2"}
655 AC_SUBST($1)])
656
657
658 # AM_MISSING_HAS_RUN
659 # ------------------
660 # Define MISSING if not defined so far and test if it supports --run.
661 # If it does, set am_missing_run to use it, otherwise, to nothing.
662 AC_DEFUN([AM_MISSING_HAS_RUN],
663 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
664 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
665 # Use eval to expand $SHELL
666 if eval "$MISSING --run true"; then
667   am_missing_run="$MISSING --run "
668 else
669   am_missing_run=
670   AC_MSG_WARN([`missing' script is too old or missing])
671 fi
672 ])
673
674 # AM_AUX_DIR_EXPAND
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
693 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
694 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
695 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
696 #
697 # Of course, Automake must honor this variable whenever it calls a
698 # tool from the auxiliary directory.  The problem is that $srcdir (and
699 # therefore $ac_aux_dir as well) can be either absolute or relative,
700 # depending on how configure is run.  This is pretty annoying, since
701 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
702 # source directory, any form will work fine, but in subdirectories a
703 # relative path needs to be adjusted first.
704 #
705 # $ac_aux_dir/missing
706 #    fails when called from a subdirectory if $ac_aux_dir is relative
707 # $top_srcdir/$ac_aux_dir/missing
708 #    fails if $ac_aux_dir is absolute,
709 #    fails when called from a subdirectory in a VPATH build with
710 #          a relative $ac_aux_dir
711 #
712 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
713 # are both prefixed by $srcdir.  In an in-source build this is usually
714 # harmless because $srcdir is `.', but things will broke when you
715 # start a VPATH build or use an absolute $srcdir.
716 #
717 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
718 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
719 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
720 # and then we would define $MISSING as
721 #   MISSING="\${SHELL} $am_aux_dir/missing"
722 # This will work as long as MISSING is not called from configure, because
723 # unfortunately $(top_srcdir) has no meaning in configure.
724 # However there are other variables, like CC, which are often used in
725 # configure, and could therefore not use this "fixed" $ac_aux_dir.
726 #
727 # Another solution, used here, is to always expand $ac_aux_dir to an
728 # absolute PATH.  The drawback is that using absolute paths prevent a
729 # configured tree to be moved without reconfiguration.
730
731 # Rely on autoconf to set up CDPATH properly.
732 AC_PREREQ([2.50])
733
734 AC_DEFUN([AM_AUX_DIR_EXPAND], [
735 # expand $ac_aux_dir to an absolute path
736 am_aux_dir=`cd $ac_aux_dir && pwd`
737 ])
738
739 # AM_PROG_INSTALL_SH
740 # ------------------
741 # Define $install_sh.
742
743 # Copyright 2001 Free Software Foundation, Inc.
744
745 # This program is free software; you can redistribute it and/or modify
746 # it under the terms of the GNU General Public License as published by
747 # the Free Software Foundation; either version 2, or (at your option)
748 # any later version.
749
750 # This program is distributed in the hope that it will be useful,
751 # but WITHOUT ANY WARRANTY; without even the implied warranty of
752 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
753 # GNU General Public License for more details.
754
755 # You should have received a copy of the GNU General Public License
756 # along with this program; if not, write to the Free Software
757 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
758 # 02111-1307, USA.
759
760 AC_DEFUN([AM_PROG_INSTALL_SH],
761 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
762 install_sh=${install_sh-"$am_aux_dir/install-sh"}
763 AC_SUBST(install_sh)])
764
765 # AM_PROG_INSTALL_STRIP
766
767 # Copyright 2001 Free Software Foundation, Inc.
768
769 # This program is free software; you can redistribute it and/or modify
770 # it under the terms of the GNU General Public License as published by
771 # the Free Software Foundation; either version 2, or (at your option)
772 # any later version.
773
774 # This program is distributed in the hope that it will be useful,
775 # but WITHOUT ANY WARRANTY; without even the implied warranty of
776 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
777 # GNU General Public License for more details.
778
779 # You should have received a copy of the GNU General Public License
780 # along with this program; if not, write to the Free Software
781 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
782 # 02111-1307, USA.
783
784 # One issue with vendor `install' (even GNU) is that you can't
785 # specify the program used to strip binaries.  This is especially
786 # annoying in cross-compiling environments, where the build's strip
787 # is unlikely to handle the host's binaries.
788 # Fortunately install-sh will honor a STRIPPROG variable, so we
789 # always use install-sh in `make install-strip', and initialize
790 # STRIPPROG with the value of the STRIP variable (set by the user).
791 AC_DEFUN([AM_PROG_INSTALL_STRIP],
792 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
793 # Installed binaries are usually stripped using `strip' when the user
794 # run `make install-strip'.  However `strip' might not be the right
795 # tool to use in cross-compilation environments, therefore Automake
796 # will honor the `STRIP' environment variable to overrule this program.
797 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
798 if test "$cross_compiling" != no; then
799   AC_CHECK_TOOL([STRIP], [strip], :)
800 fi
801 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
802 AC_SUBST([INSTALL_STRIP_PROGRAM])])
803
804 #                                                          -*- Autoconf -*-
805 # Copyright (C) 2003  Free Software Foundation, Inc.
806
807 # This program is free software; you can redistribute it and/or modify
808 # it under the terms of the GNU General Public License as published by
809 # the Free Software Foundation; either version 2, or (at your option)
810 # any later version.
811
812 # This program is distributed in the hope that it will be useful,
813 # but WITHOUT ANY WARRANTY; without even the implied warranty of
814 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
815 # GNU General Public License for more details.
816
817 # You should have received a copy of the GNU General Public License
818 # along with this program; if not, write to the Free Software
819 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
820 # 02111-1307, USA.
821
822 # serial 1
823
824 # Check whether the underlying file-system supports filenames
825 # with a leading dot.  For instance MS-DOS doesn't.
826 AC_DEFUN([AM_SET_LEADING_DOT],
827 [rm -rf .tst 2>/dev/null
828 mkdir .tst 2>/dev/null
829 if test -d .tst; then
830   am__leading_dot=.
831 else
832   am__leading_dot=_
833 fi
834 rmdir .tst 2>/dev/null
835 AC_SUBST([am__leading_dot])])
836
837 # serial 5                                              -*- Autoconf -*-
838
839 # Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
840
841 # This program is free software; you can redistribute it and/or modify
842 # it under the terms of the GNU General Public License as published by
843 # the Free Software Foundation; either version 2, or (at your option)
844 # any later version.
845
846 # This program is distributed in the hope that it will be useful,
847 # but WITHOUT ANY WARRANTY; without even the implied warranty of
848 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
849 # GNU General Public License for more details.
850
851 # You should have received a copy of the GNU General Public License
852 # along with this program; if not, write to the Free Software
853 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
854 # 02111-1307, USA.
855
856
857 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
858 # written in clear, in which case automake, when reading aclocal.m4,
859 # will think it sees a *use*, and therefore will trigger all it's
860 # C support machinery.  Also note that it means that autoscan, seeing
861 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
862
863
864
865 # _AM_DEPENDENCIES(NAME)
866 # ----------------------
867 # See how the compiler implements dependency checking.
868 # NAME is "CC", "CXX", "GCJ", or "OBJC".
869 # We try a few techniques and use that to set a single cache variable.
870 #
871 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
872 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
873 # dependency, and given that the user is not expected to run this macro,
874 # just rely on AC_PROG_CC.
875 AC_DEFUN([_AM_DEPENDENCIES],
876 [AC_REQUIRE([AM_SET_DEPDIR])dnl
877 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
878 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
879 AC_REQUIRE([AM_DEP_TRACK])dnl
880
881 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
882        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
883        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
884        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
885                    [depcc="$$1"   am_compiler_list=])
886
887 AC_CACHE_CHECK([dependency style of $depcc],
888                [am_cv_$1_dependencies_compiler_type],
889 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
890   # We make a subdir and do the tests there.  Otherwise we can end up
891   # making bogus files that we don't know about and never remove.  For
892   # instance it was reported that on HP-UX the gcc test will end up
893   # making a dummy file named `D' -- because `-MD' means `put the output
894   # in D'.
895   mkdir conftest.dir
896   # Copy depcomp to subdir because otherwise we won't find it if we're
897   # using a relative directory.
898   cp "$am_depcomp" conftest.dir
899   cd conftest.dir
900   # We will build objects and dependencies in a subdirectory because
901   # it helps to detect inapplicable dependency modes.  For instance
902   # both Tru64's cc and ICC support -MD to output dependencies as a
903   # side effect of compilation, but ICC will put the dependencies in
904   # the current directory while Tru64 will put them in the object
905   # directory.
906   mkdir sub
907
908   am_cv_$1_dependencies_compiler_type=none
909   if test "$am_compiler_list" = ""; then
910      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
911   fi
912   for depmode in $am_compiler_list; do
913     # Setup a source with many dependencies, because some compilers
914     # like to wrap large dependency lists on column 80 (with \), and
915     # we should not choose a depcomp mode which is confused by this.
916     #
917     # We need to recreate these files for each test, as the compiler may
918     # overwrite some of them when testing with obscure command lines.
919     # This happens at least with the AIX C compiler.
920     : > sub/conftest.c
921     for i in 1 2 3 4 5 6; do
922       echo '#include "conftst'$i'.h"' >> sub/conftest.c
923       : > sub/conftst$i.h
924     done
925     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
926
927     case $depmode in
928     nosideeffect)
929       # after this tag, mechanisms are not by side-effect, so they'll
930       # only be used when explicitly requested
931       if test "x$enable_dependency_tracking" = xyes; then
932         continue
933       else
934         break
935       fi
936       ;;
937     none) break ;;
938     esac
939     # We check with `-c' and `-o' for the sake of the "dashmstdout"
940     # mode.  It turns out that the SunPro C++ compiler does not properly
941     # handle `-M -o', and we need to detect this.
942     if depmode=$depmode \
943        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
944        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
945        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
946          >/dev/null 2>conftest.err &&
947        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
948        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
949        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
950       # icc doesn't choke on unknown options, it will just issue warnings
951       # (even with -Werror).  So we grep stderr for any message
952       # that says an option was ignored.
953       if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
954         am_cv_$1_dependencies_compiler_type=$depmode
955         break
956       fi
957     fi
958   done
959
960   cd ..
961   rm -rf conftest.dir
962 else
963   am_cv_$1_dependencies_compiler_type=none
964 fi
965 ])
966 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
967 AM_CONDITIONAL([am__fastdep$1], [
968   test "x$enable_dependency_tracking" != xno \
969   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
970 ])
971
972
973 # AM_SET_DEPDIR
974 # -------------
975 # Choose a directory name for dependency files.
976 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
977 AC_DEFUN([AM_SET_DEPDIR],
978 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
979 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
980 ])
981
982
983 # AM_DEP_TRACK
984 # ------------
985 AC_DEFUN([AM_DEP_TRACK],
986 [AC_ARG_ENABLE(dependency-tracking,
987 [  --disable-dependency-tracking Speeds up one-time builds
988   --enable-dependency-tracking  Do not reject slow dependency extractors])
989 if test "x$enable_dependency_tracking" != xno; then
990   am_depcomp="$ac_aux_dir/depcomp"
991   AMDEPBACKSLASH='\'
992 fi
993 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
994 AC_SUBST([AMDEPBACKSLASH])
995 ])
996
997 # Generate code to set up dependency tracking.   -*- Autoconf -*-
998
999 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
1000
1001 # This program is free software; you can redistribute it and/or modify
1002 # it under the terms of the GNU General Public License as published by
1003 # the Free Software Foundation; either version 2, or (at your option)
1004 # any later version.
1005
1006 # This program is distributed in the hope that it will be useful,
1007 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1008 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1009 # GNU General Public License for more details.
1010
1011 # You should have received a copy of the GNU General Public License
1012 # along with this program; if not, write to the Free Software
1013 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1014 # 02111-1307, USA.
1015
1016 #serial 2
1017
1018 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1019 # ------------------------------
1020 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1021 [for mf in $CONFIG_FILES; do
1022   # Strip MF so we end up with the name of the file.
1023   mf=`echo "$mf" | sed -e 's/:.*$//'`
1024   # Check whether this is an Automake generated Makefile or not.
1025   # We used to match only the files named `Makefile.in', but
1026   # some people rename them; so instead we look at the file content.
1027   # Grep'ing the first line is not enough: some people post-process
1028   # each Makefile.in and add a new line on top of each file to say so.
1029   # So let's grep whole file.
1030   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
1031     dirpart=`AS_DIRNAME("$mf")`
1032   else
1033     continue
1034   fi
1035   grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
1036   # Extract the definition of DEP_FILES from the Makefile without
1037   # running `make'.
1038   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
1039   test -z "$DEPDIR" && continue
1040   # When using ansi2knr, U may be empty or an underscore; expand it
1041   U=`sed -n -e '/^U = / s///p' < "$mf"`
1042   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
1043   # We invoke sed twice because it is the simplest approach to
1044   # changing $(DEPDIR) to its actual value in the expansion.
1045   for file in `sed -n -e '
1046     /^DEP_FILES = .*\\\\$/ {
1047       s/^DEP_FILES = //
1048       :loop
1049         s/\\\\$//
1050         p
1051         n
1052         /\\\\$/ b loop
1053       p
1054     }
1055     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
1056        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1057     # Make sure the directory exists.
1058     test -f "$dirpart/$file" && continue
1059     fdir=`AS_DIRNAME(["$file"])`
1060     AS_MKDIR_P([$dirpart/$fdir])
1061     # echo "creating $dirpart/$file"
1062     echo '# dummy' > "$dirpart/$file"
1063   done
1064 done
1065 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1066
1067
1068 # AM_OUTPUT_DEPENDENCY_COMMANDS
1069 # -----------------------------
1070 # This macro should only be invoked once -- use via AC_REQUIRE.
1071 #
1072 # This code is only required when automatic dependency tracking
1073 # is enabled.  FIXME.  This creates each `.P' file that we will
1074 # need in order to bootstrap the dependency handling code.
1075 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1076 [AC_CONFIG_COMMANDS([depfiles],
1077      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1078      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1079 ])
1080
1081 # Check to see how 'make' treats includes.      -*- Autoconf -*-
1082
1083 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
1084
1085 # This program is free software; you can redistribute it and/or modify
1086 # it under the terms of the GNU General Public License as published by
1087 # the Free Software Foundation; either version 2, or (at your option)
1088 # any later version.
1089
1090 # This program is distributed in the hope that it will be useful,
1091 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1092 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1093 # GNU General Public License for more details.
1094
1095 # You should have received a copy of the GNU General Public License
1096 # along with this program; if not, write to the Free Software
1097 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1098 # 02111-1307, USA.
1099
1100 # serial 2
1101
1102 # AM_MAKE_INCLUDE()
1103 # -----------------
1104 # Check to see how make treats includes.
1105 AC_DEFUN([AM_MAKE_INCLUDE],
1106 [am_make=${MAKE-make}
1107 cat > confinc << 'END'
1108 am__doit:
1109         @echo done
1110 .PHONY: am__doit
1111 END
1112 # If we don't find an include directive, just comment out the code.
1113 AC_MSG_CHECKING([for style of include used by $am_make])
1114 am__include="#"
1115 am__quote=
1116 _am_result=none
1117 # First try GNU make style include.
1118 echo "include confinc" > confmf
1119 # We grep out `Entering directory' and `Leaving directory'
1120 # messages which can occur if `w' ends up in MAKEFLAGS.
1121 # In particular we don't look at `^make:' because GNU make might
1122 # be invoked under some other name (usually "gmake"), in which
1123 # case it prints its new name instead of `make'.
1124 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
1125    am__include=include
1126    am__quote=
1127    _am_result=GNU
1128 fi
1129 # Now try BSD make style include.
1130 if test "$am__include" = "#"; then
1131    echo '.include "confinc"' > confmf
1132    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1133       am__include=.include
1134       am__quote="\""
1135       _am_result=BSD
1136    fi
1137 fi
1138 AC_SUBST([am__include])
1139 AC_SUBST([am__quote])
1140 AC_MSG_RESULT([$_am_result])
1141 rm -f confinc confmf
1142 ])
1143
1144 # AM_CONDITIONAL                                              -*- Autoconf -*-
1145
1146 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
1147
1148 # This program is free software; you can redistribute it and/or modify
1149 # it under the terms of the GNU General Public License as published by
1150 # the Free Software Foundation; either version 2, or (at your option)
1151 # any later version.
1152
1153 # This program is distributed in the hope that it will be useful,
1154 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1155 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1156 # GNU General Public License for more details.
1157
1158 # You should have received a copy of the GNU General Public License
1159 # along with this program; if not, write to the Free Software
1160 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1161 # 02111-1307, USA.
1162
1163 # serial 5
1164
1165 AC_PREREQ(2.52)
1166
1167 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1168 # -------------------------------------
1169 # Define a conditional.
1170 AC_DEFUN([AM_CONDITIONAL],
1171 [ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1172         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1173 AC_SUBST([$1_TRUE])
1174 AC_SUBST([$1_FALSE])
1175 if $2; then
1176   $1_TRUE=
1177   $1_FALSE='#'
1178 else
1179   $1_TRUE='#'
1180   $1_FALSE=
1181 fi
1182 AC_CONFIG_COMMANDS_PRE(
1183 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1184   AC_MSG_ERROR([conditional "$1" was never defined.
1185 Usually this means the macro was only invoked conditionally.])
1186 fi])])
1187
1188 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
1189
1190 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
1191
1192 # This program is free software; you can redistribute it and/or modify
1193 # it under the terms of the GNU General Public License as published by
1194 # the Free Software Foundation; either version 2, or (at your option)
1195 # any later version.
1196
1197 # This program is distributed in the hope that it will be useful,
1198 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1199 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1200 # GNU General Public License for more details.
1201
1202 # You should have received a copy of the GNU General Public License
1203 # along with this program; if not, write to the Free Software
1204 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1205 # 02111-1307, USA.
1206
1207 AC_PREREQ([2.52])
1208
1209 # serial 6
1210
1211 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
1212 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1213
1214 # Add --enable-maintainer-mode option to configure.
1215 # From Jim Meyering
1216
1217 # Copyright 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
1218
1219 # This program is free software; you can redistribute it and/or modify
1220 # it under the terms of the GNU General Public License as published by
1221 # the Free Software Foundation; either version 2, or (at your option)
1222 # any later version.
1223
1224 # This program is distributed in the hope that it will be useful,
1225 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1226 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1227 # GNU General Public License for more details.
1228
1229 # You should have received a copy of the GNU General Public License
1230 # along with this program; if not, write to the Free Software
1231 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1232 # 02111-1307, USA.
1233
1234 # serial 2
1235
1236 AC_DEFUN([AM_MAINTAINER_MODE],
1237 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1238   dnl maintainer-mode is disabled by default
1239   AC_ARG_ENABLE(maintainer-mode,
1240 [  --enable-maintainer-mode enable make rules and dependencies not useful
1241                           (and sometimes confusing) to the casual installer],
1242       USE_MAINTAINER_MODE=$enableval,
1243       USE_MAINTAINER_MODE=no)
1244   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1245   AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
1246   MAINT=$MAINTAINER_MODE_TRUE
1247   AC_SUBST(MAINT)dnl
1248 ]
1249 )
1250
1251 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1252
1253 # serial 2
1254
1255 # AM_PROG_CC_C_O
1256 # --------------
1257 # Like AC_PROG_CC_C_O, but changed for automake.
1258
1259 # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
1260
1261 # This program is free software; you can redistribute it and/or modify
1262 # it under the terms of the GNU General Public License as published by
1263 # the Free Software Foundation; either version 2, or (at your option)
1264 # any later version.
1265
1266 # This program is distributed in the hope that it will be useful,
1267 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1268 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1269 # GNU General Public License for more details.
1270
1271 # You should have received a copy of the GNU General Public License
1272 # along with this program; if not, write to the Free Software
1273 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1274 # 02111-1307, USA.
1275
1276 AC_DEFUN([AM_PROG_CC_C_O],
1277 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
1278 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1279 # FIXME: we rely on the cache variable name because
1280 # there is no other way.
1281 set dummy $CC
1282 ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1283 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
1284    # Losing compiler, so override with the script.
1285    # FIXME: It is wrong to rewrite CC.
1286    # But if we don't then we get into trouble of one sort or another.
1287    # A longer-term fix would be to have automake use am__CC in this case,
1288    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1289    CC="$am_aux_dir/compile $CC"
1290 fi
1291 ])
1292