www.usr.com/support/gpl/USR9108_release1.3.tar.gz
[bcm963xx.git] / userapps / opensource / siproxd / aclocal.m4
1 # generated automatically by aclocal 1.7.8 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 dnl --------------------------------------------------------------------
15 dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
16 dnl
17 dnl This macro figures out how to build C programs using POSIX
18 dnl threads.  It sets the PTHREAD_LIBS output variable to the threads
19 dnl library and linker flags, and the PTHREAD_CFLAGS output variable
20 dnl to any special C compiler flags that are needed.  (The user can also
21 dnl force certain compiler flags/libs to be tested by setting these
22 dnl environment variables.)
23 dnl
24 dnl Also sets PTHREAD_CC to any special C compiler that is needed for
25 dnl multi-threaded programs (defaults to the value of CC otherwise).
26 dnl (This is necessary on AIX to use the special cc_r compiler alias.)
27 dnl
28 dnl If you are only building threads programs, you may wish to
29 dnl use these variables in your default LIBS, CFLAGS, and CC:
30 dnl
31 dnl        LIBS="$PTHREAD_LIBS $LIBS"
32 dnl        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
33 dnl        CC="$PTHREAD_CC"
34 dnl
35 dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
36 dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE
37 dnl to that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
38 dnl
39 dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
40 dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands
41 dnl to run it if it is not found.  If ACTION-IF-FOUND is not specified,
42 dnl the default action will define HAVE_PTHREAD.
43 dnl
44 dnl Please let the authors know if this macro fails on any platform,
45 dnl or if you have any other suggestions or comments.  This macro was
46 dnl based on work by SGJ on autoconf scripts for FFTW (www.fftw.org)
47 dnl (with help from M. Frigo), as well as ac_pthread and hb_pthread
48 dnl macros posted by AFC to the autoconf macro repository.  We are also
49 dnl grateful for the helpful feedback of numerous users.
50 dnl
51 dnl @version $Id: acinclude.m4,v 1.6 2004/11/03 21:23:32 hb9xar Exp $
52 dnl @author Steven G. Johnson <stevenj@alum.mit.edu> and Alejandro Forero Cuervo <bachue@bachue.com>
53
54 AC_DEFUN([ACX_PTHREAD], [
55 AC_REQUIRE([AC_CANONICAL_HOST])
56 acx_pthread_ok=no
57
58 # We used to check for pthread.h first, but this fails if pthread.h
59 # requires special compiler flags (e.g. on True64 or Sequent).
60 # It gets checked for in the link test anyway.
61
62 # First of all, check if the user has set any of the PTHREAD_LIBS,
63 # etcetera environment variables, and if threads linking works using
64 # them:
65 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
66         save_CFLAGS="$CFLAGS"
67         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
68         save_LIBS="$LIBS"
69         LIBS="$PTHREAD_LIBS $LIBS"
70         AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
71         AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
72         AC_MSG_RESULT($acx_pthread_ok)
73         if test x"$acx_pthread_ok" = xno; then
74                 PTHREAD_LIBS=""
75                 PTHREAD_CFLAGS=""
76         fi
77         LIBS="$save_LIBS"
78         CFLAGS="$save_CFLAGS"
79 fi
80
81 # We must check for the threads library under a number of different
82 # names; the ordering is very important because some systems
83 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
84 # libraries is broken (non-POSIX).
85
86 # Create a list of thread flags to try.  Items starting with a "-" are
87 # C compiler flags, and other items are library names, except for "none"
88 # which indicates that we try without any flags at all.
89
90 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
91
92 # The ordering *is* (sometimes) important.  Some notes on the
93 # individual items follow:
94
95 # pthreads: AIX (must check this before -lpthread)
96 # none: in case threads are in libc; should be tried before -Kthread and
97 #       other compiler flags to prevent continual compiler warnings
98 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
99 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
100 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
101 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
102 # -pthreads: Solaris/gcc
103 # -mthreads: Mingw32/gcc, Lynx/gcc
104 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
105 #      doesn't hurt to check since this sometimes defines pthreads too;
106 #      also defines -D_REENTRANT)
107 # pthread: Linux, etcetera
108 # --thread-safe: KAI C++
109
110 case "${host_cpu}-${host_os}" in
111         *solaris*)
112
113         # On Solaris (at least, for some versions), libc contains stubbed
114         # (non-functional) versions of the pthreads routines, so link-based
115         # tests will erroneously succeed.  (We need to link with -pthread or
116         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
117         # a function called by this macro, so we could check for that, but
118         # who knows whether they'll stub that too in a future libc.)  So,
119         # we'll just look for -pthreads and -lpthread first:
120
121         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
122         ;;
123 esac
124
125 if test x"$acx_pthread_ok" = xno; then
126 for flag in $acx_pthread_flags; do
127
128         case $flag in
129                 none)
130                 AC_MSG_CHECKING([whether pthreads work without any flags])
131                 ;;
132
133                 -*)
134                 AC_MSG_CHECKING([whether pthreads work with $flag])
135                 PTHREAD_CFLAGS="$flag"
136                 ;;
137
138                 *)
139                 AC_MSG_CHECKING([for the pthreads library -l$flag])
140                 PTHREAD_LIBS="-l$flag"
141                 ;;
142         esac
143
144         save_LIBS="$LIBS"
145         save_CFLAGS="$CFLAGS"
146         LIBS="$PTHREAD_LIBS $LIBS"
147         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
148
149         # Check for various functions.  We must include pthread.h,
150         # since some functions may be macros.  (On the Sequent, we
151         # need a special flag -Kthread to make this header compile.)
152         # We check for pthread_join because it is in -lpthread on IRIX
153         # while pthread_create is in libc.  We check for pthread_attr_init
154         # due to DEC craziness with -lpthreads.  We check for
155         # pthread_cleanup_push because it is one of the few pthread
156         # functions on Solaris that doesn't have a non-functional libc stub.
157         # We try pthread_create on general principles.
158         AC_TRY_LINK([#include <pthread.h>],
159                     [pthread_t th; pthread_join(th, 0);
160                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
161                      pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
162                     [acx_pthread_ok=yes])
163
164         LIBS="$save_LIBS"
165         CFLAGS="$save_CFLAGS"
166
167         AC_MSG_RESULT($acx_pthread_ok)
168         if test "x$acx_pthread_ok" = xyes; then
169                 break;
170         fi
171
172         PTHREAD_LIBS=""
173         PTHREAD_CFLAGS=""
174 done
175 fi
176
177 # Various other checks:
178 if test "x$acx_pthread_ok" = xyes; then
179         save_LIBS="$LIBS"
180         LIBS="$PTHREAD_LIBS $LIBS"
181         save_CFLAGS="$CFLAGS"
182         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
183
184         # Detect AIX lossage: threads are created detached by default
185         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
186         AC_MSG_CHECKING([for joinable pthread attribute])
187         AC_TRY_LINK([#include <pthread.h>],
188                     [int attr=PTHREAD_CREATE_JOINABLE;],
189                     ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
190         if test x"$ok" = xunknown; then
191                 AC_TRY_LINK([#include <pthread.h>],
192                             [int attr=PTHREAD_CREATE_UNDETACHED;],
193                             ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
194         fi
195         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
196                 AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
197                           [Define to the necessary symbol if this constant
198                            uses a non-standard name on your system.])
199         fi
200         AC_MSG_RESULT(${ok})
201         if test x"$ok" = xunknown; then
202                 AC_MSG_WARN([we do not know how to create joinable pthreads])
203         fi
204
205         AC_MSG_CHECKING([if more special flags are required for pthreads])
206         flag=no
207         case "${host_cpu}-${host_os}" in
208                 *-aix* | *-freebsd*)     flag="-D_THREAD_SAFE";;
209                 *solaris* | alpha*-osf*) flag="-D_REENTRANT";;
210         esac
211         AC_MSG_RESULT(${flag})
212         if test "x$flag" != xno; then
213                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
214         fi
215
216         LIBS="$save_LIBS"
217         CFLAGS="$save_CFLAGS"
218
219         # More AIX lossage: must compile with cc_r
220         AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
221 else
222         PTHREAD_CC="$CC"
223 fi
224
225 AC_SUBST(PTHREAD_LIBS)
226 AC_SUBST(PTHREAD_CFLAGS)
227 AC_SUBST(PTHREAD_CC)
228
229 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
230 if test x"$acx_pthread_ok" = xyes; then
231         ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
232         :
233 else
234         acx_pthread_ok=no
235         $2
236 fi
237
238 ])dnl ACX_PTHREAD
239
240 dnl @synopsis ACX_WHICH_GETHOSTBYNAME_R
241 dnl
242 dnl Provides a test to determine the correct 
243 dnl way to call gethostbyname_r
244 dnl
245 dnl defines HAVE_FUNC_GETHOSTBYNAME_R_6 if it needs 6 arguments (e.g linux)
246 dnl defines HAVE_FUNC_GETHOSTBYNAME_R_5 if it needs 5 arguments (e.g. solaris)
247 dnl defines HAVE_FUNC_GETHOSTBYNAME_R_3 if it needs 3 arguments (e.g. osf/1)
248 dnl
249 dnl if used in conjunction in gethostname.c the api demonstrated
250 dnl in test.c can be used regardless of which gethostbyname_r 
251 dnl exists. These example files found at
252 dnl http://www.csn.ul.ie/~caolan/publink/gethostbyname_r
253 dnl
254 dnl @version $Id: acinclude.m4,v 1.6 2004/11/03 21:23:32 hb9xar Exp $
255 dnl @author Caolan McNamara <caolan@skynet.ie>
256 dnl
257 dnl based on David Arnold's autoconf suggestion in the threads faq
258 dnl
259 AC_DEFUN([ACX_WHICH_GETHOSTBYNAME_R], [
260
261 AC_CHECK_FUNC(gethostbyname_r, [
262   AC_MSG_CHECKING(how many arguments takes gethostbyname_r)
263   AC_TRY_COMPILE([
264         #include <stdlib.h>
265         #include <netdb.h>], [
266         char *name;
267         struct hostent *he;
268         struct hostent_data data;
269         (void) gethostbyname_r(name, he, &data);
270   ],acx_which_gethostname_r=three, [
271 dnl
272     AC_TRY_COMPILE([
273         #include <stdlib.h>
274         #include <netdb.h>], [
275         char *name;
276         struct hostent *he, *res;
277         char buffer[2048];
278         int buflen = 2048;
279         int h_errnop;
280         (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
281     ],acx_which_gethostname_r=six, [
282 dnl
283       AC_TRY_COMPILE([
284         #include <stdlib.h>
285         #include <netdb.h>], [
286         char *name;
287         struct hostent *he;
288         char buffer[2048];
289         int buflen = 2048;
290         int h_errnop;
291         (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
292       ],acx_which_gethostname_r=five,acx_which_gethostname_r=no)
293
294     ])
295   ])
296 ], acx_which_gethostname_r=no)
297
298 if test $acx_which_gethostname_r = six; then
299   AC_DEFINE(HAVE_FUNC_GETHOSTBYNAME_R_6,,[gethostbyname_r takes 6 arguments])
300 elif test $acx_which_gethostname_r = five; then
301   AC_DEFINE(HAVE_FUNC_GETHOSTBYNAME_R_5,,[gethostbyname_r takes 5 arguments])
302 elif test $acx_which_gethostname_r = three; then
303   AC_DEFINE(HAVE_FUNC_GETHOSTBYNAME_R_3,,[gethostbyname_r takes 3 arguments])
304
305 fi
306
307 AC_MSG_RESULT($acx_which_gethostname_r)
308
309 ])dnl ACX_WHICH_GETHOSTBYNAME_R
310
311
312 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
313
314 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
315
316 # This program is free software; you can redistribute it and/or modify
317 # it under the terms of the GNU General Public License as published by
318 # the Free Software Foundation; either version 2, or (at your option)
319 # any later version.
320
321 # This program is distributed in the hope that it will be useful,
322 # but WITHOUT ANY WARRANTY; without even the implied warranty of
323 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
324 # GNU General Public License for more details.
325
326 # You should have received a copy of the GNU General Public License
327 # along with this program; if not, write to the Free Software
328 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
329 # 02111-1307, USA.
330
331 AC_PREREQ([2.52])
332
333 # serial 6
334
335 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
336 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
337
338 # Do all the work for Automake.                            -*- Autoconf -*-
339
340 # This macro actually does too much some checks are only needed if
341 # your package does certain things.  But this isn't really a big deal.
342
343 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
344 # Free Software Foundation, Inc.
345
346 # This program is free software; you can redistribute it and/or modify
347 # it under the terms of the GNU General Public License as published by
348 # the Free Software Foundation; either version 2, or (at your option)
349 # any later version.
350
351 # This program is distributed in the hope that it will be useful,
352 # but WITHOUT ANY WARRANTY; without even the implied warranty of
353 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
354 # GNU General Public License for more details.
355
356 # You should have received a copy of the GNU General Public License
357 # along with this program; if not, write to the Free Software
358 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
359 # 02111-1307, USA.
360
361 # serial 10
362
363 AC_PREREQ([2.54])
364
365 # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
366 # the ones we care about.
367 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
368
369 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
370 # AM_INIT_AUTOMAKE([OPTIONS])
371 # -----------------------------------------------
372 # The call with PACKAGE and VERSION arguments is the old style
373 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
374 # and VERSION should now be passed to AC_INIT and removed from
375 # the call to AM_INIT_AUTOMAKE.
376 # We support both call styles for the transition.  After
377 # the next Automake release, Autoconf can make the AC_INIT
378 # arguments mandatory, and then we can depend on a new Autoconf
379 # release and drop the old call support.
380 AC_DEFUN([AM_INIT_AUTOMAKE],
381 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
382  AC_REQUIRE([AC_PROG_INSTALL])dnl
383 # test to see if srcdir already configured
384 if test "`cd $srcdir && pwd`" != "`pwd`" &&
385    test -f $srcdir/config.status; then
386   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
387 fi
388
389 # test whether we have cygpath
390 if test -z "$CYGPATH_W"; then
391   if (cygpath --version) >/dev/null 2>/dev/null; then
392     CYGPATH_W='cygpath -w'
393   else
394     CYGPATH_W=echo
395   fi
396 fi
397 AC_SUBST([CYGPATH_W])
398
399 # Define the identity of the package.
400 dnl Distinguish between old-style and new-style calls.
401 m4_ifval([$2],
402 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
403  AC_SUBST([PACKAGE], [$1])dnl
404  AC_SUBST([VERSION], [$2])],
405 [_AM_SET_OPTIONS([$1])dnl
406  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
407  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
408
409 _AM_IF_OPTION([no-define],,
410 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
411  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
412
413 # Some tools Automake needs.
414 AC_REQUIRE([AM_SANITY_CHECK])dnl
415 AC_REQUIRE([AC_ARG_PROGRAM])dnl
416 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
417 AM_MISSING_PROG(AUTOCONF, autoconf)
418 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
419 AM_MISSING_PROG(AUTOHEADER, autoheader)
420 AM_MISSING_PROG(MAKEINFO, makeinfo)
421 AM_MISSING_PROG(AMTAR, tar)
422 AM_PROG_INSTALL_SH
423 AM_PROG_INSTALL_STRIP
424 # We need awk for the "check" target.  The system "awk" is bad on
425 # some platforms.
426 AC_REQUIRE([AC_PROG_AWK])dnl
427 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
428 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
429
430 _AM_IF_OPTION([no-dependencies],,
431 [AC_PROVIDE_IFELSE([AC_PROG_CC],
432                   [_AM_DEPENDENCIES(CC)],
433                   [define([AC_PROG_CC],
434                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
435 AC_PROVIDE_IFELSE([AC_PROG_CXX],
436                   [_AM_DEPENDENCIES(CXX)],
437                   [define([AC_PROG_CXX],
438                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
439 ])
440 ])
441
442
443 # When config.status generates a header, we must update the stamp-h file.
444 # This file resides in the same directory as the config header
445 # that is generated.  The stamp files are numbered to have different names.
446
447 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
448 # loop where config.status creates the headers, so we can generate
449 # our stamp files there.
450 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
451 [# Compute $1's index in $config_headers.
452 _am_stamp_count=1
453 for _am_header in $config_headers :; do
454   case $_am_header in
455     $1 | $1:* )
456       break ;;
457     * )
458       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
459   esac
460 done
461 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
462
463 # Copyright 2002  Free Software Foundation, Inc.
464
465 # This program is free software; you can redistribute it and/or modify
466 # it under the terms of the GNU General Public License as published by
467 # the Free Software Foundation; either version 2, or (at your option)
468 # any later version.
469
470 # This program is distributed in the hope that it will be useful,
471 # but WITHOUT ANY WARRANTY; without even the implied warranty of
472 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
473 # GNU General Public License for more details.
474
475 # You should have received a copy of the GNU General Public License
476 # along with this program; if not, write to the Free Software
477 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
478
479 # AM_AUTOMAKE_VERSION(VERSION)
480 # ----------------------------
481 # Automake X.Y traces this macro to ensure aclocal.m4 has been
482 # generated from the m4 files accompanying Automake X.Y.
483 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
484
485 # AM_SET_CURRENT_AUTOMAKE_VERSION
486 # -------------------------------
487 # Call AM_AUTOMAKE_VERSION so it can be traced.
488 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
489 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
490          [AM_AUTOMAKE_VERSION([1.7.8])])
491
492 # Helper functions for option handling.                    -*- Autoconf -*-
493
494 # Copyright 2001, 2002  Free Software Foundation, Inc.
495
496 # This program is free software; you can redistribute it and/or modify
497 # it under the terms of the GNU General Public License as published by
498 # the Free Software Foundation; either version 2, or (at your option)
499 # any later version.
500
501 # This program is distributed in the hope that it will be useful,
502 # but WITHOUT ANY WARRANTY; without even the implied warranty of
503 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
504 # GNU General Public License for more details.
505
506 # You should have received a copy of the GNU General Public License
507 # along with this program; if not, write to the Free Software
508 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
509 # 02111-1307, USA.
510
511 # serial 2
512
513 # _AM_MANGLE_OPTION(NAME)
514 # -----------------------
515 AC_DEFUN([_AM_MANGLE_OPTION],
516 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
517
518 # _AM_SET_OPTION(NAME)
519 # ------------------------------
520 # Set option NAME.  Presently that only means defining a flag for this option.
521 AC_DEFUN([_AM_SET_OPTION],
522 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
523
524 # _AM_SET_OPTIONS(OPTIONS)
525 # ----------------------------------
526 # OPTIONS is a space-separated list of Automake options.
527 AC_DEFUN([_AM_SET_OPTIONS],
528 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
529
530 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
531 # -------------------------------------------
532 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
533 AC_DEFUN([_AM_IF_OPTION],
534 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
535
536 #
537 # Check to make sure that the build environment is sane.
538 #
539
540 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
541
542 # This program is free software; you can redistribute it and/or modify
543 # it under the terms of the GNU General Public License as published by
544 # the Free Software Foundation; either version 2, or (at your option)
545 # any later version.
546
547 # This program is distributed in the hope that it will be useful,
548 # but WITHOUT ANY WARRANTY; without even the implied warranty of
549 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
550 # GNU General Public License for more details.
551
552 # You should have received a copy of the GNU General Public License
553 # along with this program; if not, write to the Free Software
554 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
555 # 02111-1307, USA.
556
557 # serial 3
558
559 # AM_SANITY_CHECK
560 # ---------------
561 AC_DEFUN([AM_SANITY_CHECK],
562 [AC_MSG_CHECKING([whether build environment is sane])
563 # Just in case
564 sleep 1
565 echo timestamp > conftest.file
566 # Do `set' in a subshell so we don't clobber the current shell's
567 # arguments.  Must try -L first in case configure is actually a
568 # symlink; some systems play weird games with the mod time of symlinks
569 # (eg FreeBSD returns the mod time of the symlink's containing
570 # directory).
571 if (
572    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
573    if test "$[*]" = "X"; then
574       # -L didn't work.
575       set X `ls -t $srcdir/configure conftest.file`
576    fi
577    rm -f conftest.file
578    if test "$[*]" != "X $srcdir/configure conftest.file" \
579       && test "$[*]" != "X conftest.file $srcdir/configure"; then
580
581       # If neither matched, then we have a broken ls.  This can happen
582       # if, for instance, CONFIG_SHELL is bash and it inherits a
583       # broken ls alias from the environment.  This has actually
584       # happened.  Such a system could not be considered "sane".
585       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
586 alias in your environment])
587    fi
588
589    test "$[2]" = conftest.file
590    )
591 then
592    # Ok.
593    :
594 else
595    AC_MSG_ERROR([newly created file is older than distributed files!
596 Check your system clock])
597 fi
598 AC_MSG_RESULT(yes)])
599
600 #  -*- Autoconf -*-
601
602
603 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
604
605 # This program is free software; you can redistribute it and/or modify
606 # it under the terms of the GNU General Public License as published by
607 # the Free Software Foundation; either version 2, or (at your option)
608 # any later version.
609
610 # This program is distributed in the hope that it will be useful,
611 # but WITHOUT ANY WARRANTY; without even the implied warranty of
612 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
613 # GNU General Public License for more details.
614
615 # You should have received a copy of the GNU General Public License
616 # along with this program; if not, write to the Free Software
617 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
618 # 02111-1307, USA.
619
620 # serial 3
621
622 # AM_MISSING_PROG(NAME, PROGRAM)
623 # ------------------------------
624 AC_DEFUN([AM_MISSING_PROG],
625 [AC_REQUIRE([AM_MISSING_HAS_RUN])
626 $1=${$1-"${am_missing_run}$2"}
627 AC_SUBST($1)])
628
629
630 # AM_MISSING_HAS_RUN
631 # ------------------
632 # Define MISSING if not defined so far and test if it supports --run.
633 # If it does, set am_missing_run to use it, otherwise, to nothing.
634 AC_DEFUN([AM_MISSING_HAS_RUN],
635 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
636 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
637 # Use eval to expand $SHELL
638 if eval "$MISSING --run true"; then
639   am_missing_run="$MISSING --run "
640 else
641   am_missing_run=
642   AC_MSG_WARN([`missing' script is too old or missing])
643 fi
644 ])
645
646 # AM_AUX_DIR_EXPAND
647
648 # Copyright 2001 Free Software Foundation, Inc.
649
650 # This program is free software; you can redistribute it and/or modify
651 # it under the terms of the GNU General Public License as published by
652 # the Free Software Foundation; either version 2, or (at your option)
653 # any later version.
654
655 # This program is distributed in the hope that it will be useful,
656 # but WITHOUT ANY WARRANTY; without even the implied warranty of
657 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
658 # GNU General Public License for more details.
659
660 # You should have received a copy of the GNU General Public License
661 # along with this program; if not, write to the Free Software
662 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
663 # 02111-1307, USA.
664
665 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
666 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
667 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
668 #
669 # Of course, Automake must honor this variable whenever it calls a
670 # tool from the auxiliary directory.  The problem is that $srcdir (and
671 # therefore $ac_aux_dir as well) can be either absolute or relative,
672 # depending on how configure is run.  This is pretty annoying, since
673 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
674 # source directory, any form will work fine, but in subdirectories a
675 # relative path needs to be adjusted first.
676 #
677 # $ac_aux_dir/missing
678 #    fails when called from a subdirectory if $ac_aux_dir is relative
679 # $top_srcdir/$ac_aux_dir/missing
680 #    fails if $ac_aux_dir is absolute,
681 #    fails when called from a subdirectory in a VPATH build with
682 #          a relative $ac_aux_dir
683 #
684 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
685 # are both prefixed by $srcdir.  In an in-source build this is usually
686 # harmless because $srcdir is `.', but things will broke when you
687 # start a VPATH build or use an absolute $srcdir.
688 #
689 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
690 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
691 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
692 # and then we would define $MISSING as
693 #   MISSING="\${SHELL} $am_aux_dir/missing"
694 # This will work as long as MISSING is not called from configure, because
695 # unfortunately $(top_srcdir) has no meaning in configure.
696 # However there are other variables, like CC, which are often used in
697 # configure, and could therefore not use this "fixed" $ac_aux_dir.
698 #
699 # Another solution, used here, is to always expand $ac_aux_dir to an
700 # absolute PATH.  The drawback is that using absolute paths prevent a
701 # configured tree to be moved without reconfiguration.
702
703 # Rely on autoconf to set up CDPATH properly.
704 AC_PREREQ([2.50])
705
706 AC_DEFUN([AM_AUX_DIR_EXPAND], [
707 # expand $ac_aux_dir to an absolute path
708 am_aux_dir=`cd $ac_aux_dir && pwd`
709 ])
710
711 # AM_PROG_INSTALL_SH
712 # ------------------
713 # Define $install_sh.
714
715 # Copyright 2001 Free Software Foundation, Inc.
716
717 # This program is free software; you can redistribute it and/or modify
718 # it under the terms of the GNU General Public License as published by
719 # the Free Software Foundation; either version 2, or (at your option)
720 # any later version.
721
722 # This program is distributed in the hope that it will be useful,
723 # but WITHOUT ANY WARRANTY; without even the implied warranty of
724 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
725 # GNU General Public License for more details.
726
727 # You should have received a copy of the GNU General Public License
728 # along with this program; if not, write to the Free Software
729 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
730 # 02111-1307, USA.
731
732 AC_DEFUN([AM_PROG_INSTALL_SH],
733 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
734 install_sh=${install_sh-"$am_aux_dir/install-sh"}
735 AC_SUBST(install_sh)])
736
737 # AM_PROG_INSTALL_STRIP
738
739 # Copyright 2001 Free Software Foundation, Inc.
740
741 # This program is free software; you can redistribute it and/or modify
742 # it under the terms of the GNU General Public License as published by
743 # the Free Software Foundation; either version 2, or (at your option)
744 # any later version.
745
746 # This program is distributed in the hope that it will be useful,
747 # but WITHOUT ANY WARRANTY; without even the implied warranty of
748 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
749 # GNU General Public License for more details.
750
751 # You should have received a copy of the GNU General Public License
752 # along with this program; if not, write to the Free Software
753 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
754 # 02111-1307, USA.
755
756 # One issue with vendor `install' (even GNU) is that you can't
757 # specify the program used to strip binaries.  This is especially
758 # annoying in cross-compiling environments, where the build's strip
759 # is unlikely to handle the host's binaries.
760 # Fortunately install-sh will honor a STRIPPROG variable, so we
761 # always use install-sh in `make install-strip', and initialize
762 # STRIPPROG with the value of the STRIP variable (set by the user).
763 AC_DEFUN([AM_PROG_INSTALL_STRIP],
764 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
765 # Installed binaries are usually stripped using `strip' when the user
766 # run `make install-strip'.  However `strip' might not be the right
767 # tool to use in cross-compilation environments, therefore Automake
768 # will honor the `STRIP' environment variable to overrule this program.
769 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
770 if test "$cross_compiling" != no; then
771   AC_CHECK_TOOL([STRIP], [strip], :)
772 fi
773 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
774 AC_SUBST([INSTALL_STRIP_PROGRAM])])
775
776 #                                                          -*- Autoconf -*-
777 # Copyright (C) 2003  Free Software Foundation, Inc.
778
779 # This program is free software; you can redistribute it and/or modify
780 # it under the terms of the GNU General Public License as published by
781 # the Free Software Foundation; either version 2, or (at your option)
782 # any later version.
783
784 # This program is distributed in the hope that it will be useful,
785 # but WITHOUT ANY WARRANTY; without even the implied warranty of
786 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
787 # GNU General Public License for more details.
788
789 # You should have received a copy of the GNU General Public License
790 # along with this program; if not, write to the Free Software
791 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
792 # 02111-1307, USA.
793
794 # serial 1
795
796 # Check whether the underlying file-system supports filenames
797 # with a leading dot.  For instance MS-DOS doesn't.
798 AC_DEFUN([AM_SET_LEADING_DOT],
799 [rm -rf .tst 2>/dev/null
800 mkdir .tst 2>/dev/null
801 if test -d .tst; then
802   am__leading_dot=.
803 else
804   am__leading_dot=_
805 fi
806 rmdir .tst 2>/dev/null
807 AC_SUBST([am__leading_dot])])
808
809 # serial 5                                              -*- Autoconf -*-
810
811 # Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
812
813 # This program is free software; you can redistribute it and/or modify
814 # it under the terms of the GNU General Public License as published by
815 # the Free Software Foundation; either version 2, or (at your option)
816 # any later version.
817
818 # This program is distributed in the hope that it will be useful,
819 # but WITHOUT ANY WARRANTY; without even the implied warranty of
820 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
821 # GNU General Public License for more details.
822
823 # You should have received a copy of the GNU General Public License
824 # along with this program; if not, write to the Free Software
825 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
826 # 02111-1307, USA.
827
828
829 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
830 # written in clear, in which case automake, when reading aclocal.m4,
831 # will think it sees a *use*, and therefore will trigger all it's
832 # C support machinery.  Also note that it means that autoscan, seeing
833 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
834
835
836
837 # _AM_DEPENDENCIES(NAME)
838 # ----------------------
839 # See how the compiler implements dependency checking.
840 # NAME is "CC", "CXX", "GCJ", or "OBJC".
841 # We try a few techniques and use that to set a single cache variable.
842 #
843 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
844 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
845 # dependency, and given that the user is not expected to run this macro,
846 # just rely on AC_PROG_CC.
847 AC_DEFUN([_AM_DEPENDENCIES],
848 [AC_REQUIRE([AM_SET_DEPDIR])dnl
849 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
850 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
851 AC_REQUIRE([AM_DEP_TRACK])dnl
852
853 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
854        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
855        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
856        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
857                    [depcc="$$1"   am_compiler_list=])
858
859 AC_CACHE_CHECK([dependency style of $depcc],
860                [am_cv_$1_dependencies_compiler_type],
861 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
862   # We make a subdir and do the tests there.  Otherwise we can end up
863   # making bogus files that we don't know about and never remove.  For
864   # instance it was reported that on HP-UX the gcc test will end up
865   # making a dummy file named `D' -- because `-MD' means `put the output
866   # in D'.
867   mkdir conftest.dir
868   # Copy depcomp to subdir because otherwise we won't find it if we're
869   # using a relative directory.
870   cp "$am_depcomp" conftest.dir
871   cd conftest.dir
872   # We will build objects and dependencies in a subdirectory because
873   # it helps to detect inapplicable dependency modes.  For instance
874   # both Tru64's cc and ICC support -MD to output dependencies as a
875   # side effect of compilation, but ICC will put the dependencies in
876   # the current directory while Tru64 will put them in the object
877   # directory.
878   mkdir sub
879
880   am_cv_$1_dependencies_compiler_type=none
881   if test "$am_compiler_list" = ""; then
882      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
883   fi
884   for depmode in $am_compiler_list; do
885     # Setup a source with many dependencies, because some compilers
886     # like to wrap large dependency lists on column 80 (with \), and
887     # we should not choose a depcomp mode which is confused by this.
888     #
889     # We need to recreate these files for each test, as the compiler may
890     # overwrite some of them when testing with obscure command lines.
891     # This happens at least with the AIX C compiler.
892     : > sub/conftest.c
893     for i in 1 2 3 4 5 6; do
894       echo '#include "conftst'$i'.h"' >> sub/conftest.c
895       : > sub/conftst$i.h
896     done
897     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
898
899     case $depmode in
900     nosideeffect)
901       # after this tag, mechanisms are not by side-effect, so they'll
902       # only be used when explicitly requested
903       if test "x$enable_dependency_tracking" = xyes; then
904         continue
905       else
906         break
907       fi
908       ;;
909     none) break ;;
910     esac
911     # We check with `-c' and `-o' for the sake of the "dashmstdout"
912     # mode.  It turns out that the SunPro C++ compiler does not properly
913     # handle `-M -o', and we need to detect this.
914     if depmode=$depmode \
915        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
916        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
917        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
918          >/dev/null 2>conftest.err &&
919        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
920        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
921        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
922       # icc doesn't choke on unknown options, it will just issue warnings
923       # (even with -Werror).  So we grep stderr for any message
924       # that says an option was ignored.
925       if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
926         am_cv_$1_dependencies_compiler_type=$depmode
927         break
928       fi
929     fi
930   done
931
932   cd ..
933   rm -rf conftest.dir
934 else
935   am_cv_$1_dependencies_compiler_type=none
936 fi
937 ])
938 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
939 AM_CONDITIONAL([am__fastdep$1], [
940   test "x$enable_dependency_tracking" != xno \
941   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
942 ])
943
944
945 # AM_SET_DEPDIR
946 # -------------
947 # Choose a directory name for dependency files.
948 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
949 AC_DEFUN([AM_SET_DEPDIR],
950 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
951 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
952 ])
953
954
955 # AM_DEP_TRACK
956 # ------------
957 AC_DEFUN([AM_DEP_TRACK],
958 [AC_ARG_ENABLE(dependency-tracking,
959 [  --disable-dependency-tracking Speeds up one-time builds
960   --enable-dependency-tracking  Do not reject slow dependency extractors])
961 if test "x$enable_dependency_tracking" != xno; then
962   am_depcomp="$ac_aux_dir/depcomp"
963   AMDEPBACKSLASH='\'
964 fi
965 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
966 AC_SUBST([AMDEPBACKSLASH])
967 ])
968
969 # Generate code to set up dependency tracking.   -*- Autoconf -*-
970
971 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
972
973 # This program is free software; you can redistribute it and/or modify
974 # it under the terms of the GNU General Public License as published by
975 # the Free Software Foundation; either version 2, or (at your option)
976 # any later version.
977
978 # This program is distributed in the hope that it will be useful,
979 # but WITHOUT ANY WARRANTY; without even the implied warranty of
980 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
981 # GNU General Public License for more details.
982
983 # You should have received a copy of the GNU General Public License
984 # along with this program; if not, write to the Free Software
985 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
986 # 02111-1307, USA.
987
988 #serial 2
989
990 # _AM_OUTPUT_DEPENDENCY_COMMANDS
991 # ------------------------------
992 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
993 [for mf in $CONFIG_FILES; do
994   # Strip MF so we end up with the name of the file.
995   mf=`echo "$mf" | sed -e 's/:.*$//'`
996   # Check whether this is an Automake generated Makefile or not.
997   # We used to match only the files named `Makefile.in', but
998   # some people rename them; so instead we look at the file content.
999   # Grep'ing the first line is not enough: some people post-process
1000   # each Makefile.in and add a new line on top of each file to say so.
1001   # So let's grep whole file.
1002   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
1003     dirpart=`AS_DIRNAME("$mf")`
1004   else
1005     continue
1006   fi
1007   grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
1008   # Extract the definition of DEP_FILES from the Makefile without
1009   # running `make'.
1010   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
1011   test -z "$DEPDIR" && continue
1012   # When using ansi2knr, U may be empty or an underscore; expand it
1013   U=`sed -n -e '/^U = / s///p' < "$mf"`
1014   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
1015   # We invoke sed twice because it is the simplest approach to
1016   # changing $(DEPDIR) to its actual value in the expansion.
1017   for file in `sed -n -e '
1018     /^DEP_FILES = .*\\\\$/ {
1019       s/^DEP_FILES = //
1020       :loop
1021         s/\\\\$//
1022         p
1023         n
1024         /\\\\$/ b loop
1025       p
1026     }
1027     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
1028        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1029     # Make sure the directory exists.
1030     test -f "$dirpart/$file" && continue
1031     fdir=`AS_DIRNAME(["$file"])`
1032     AS_MKDIR_P([$dirpart/$fdir])
1033     # echo "creating $dirpart/$file"
1034     echo '# dummy' > "$dirpart/$file"
1035   done
1036 done
1037 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1038
1039
1040 # AM_OUTPUT_DEPENDENCY_COMMANDS
1041 # -----------------------------
1042 # This macro should only be invoked once -- use via AC_REQUIRE.
1043 #
1044 # This code is only required when automatic dependency tracking
1045 # is enabled.  FIXME.  This creates each `.P' file that we will
1046 # need in order to bootstrap the dependency handling code.
1047 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1048 [AC_CONFIG_COMMANDS([depfiles],
1049      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1050      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1051 ])
1052
1053 # Check to see how 'make' treats includes.      -*- Autoconf -*-
1054
1055 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
1056
1057 # This program is free software; you can redistribute it and/or modify
1058 # it under the terms of the GNU General Public License as published by
1059 # the Free Software Foundation; either version 2, or (at your option)
1060 # any later version.
1061
1062 # This program is distributed in the hope that it will be useful,
1063 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1064 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1065 # GNU General Public License for more details.
1066
1067 # You should have received a copy of the GNU General Public License
1068 # along with this program; if not, write to the Free Software
1069 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1070 # 02111-1307, USA.
1071
1072 # serial 2
1073
1074 # AM_MAKE_INCLUDE()
1075 # -----------------
1076 # Check to see how make treats includes.
1077 AC_DEFUN([AM_MAKE_INCLUDE],
1078 [am_make=${MAKE-make}
1079 cat > confinc << 'END'
1080 am__doit:
1081         @echo done
1082 .PHONY: am__doit
1083 END
1084 # If we don't find an include directive, just comment out the code.
1085 AC_MSG_CHECKING([for style of include used by $am_make])
1086 am__include="#"
1087 am__quote=
1088 _am_result=none
1089 # First try GNU make style include.
1090 echo "include confinc" > confmf
1091 # We grep out `Entering directory' and `Leaving directory'
1092 # messages which can occur if `w' ends up in MAKEFLAGS.
1093 # In particular we don't look at `^make:' because GNU make might
1094 # be invoked under some other name (usually "gmake"), in which
1095 # case it prints its new name instead of `make'.
1096 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
1097    am__include=include
1098    am__quote=
1099    _am_result=GNU
1100 fi
1101 # Now try BSD make style include.
1102 if test "$am__include" = "#"; then
1103    echo '.include "confinc"' > confmf
1104    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1105       am__include=.include
1106       am__quote="\""
1107       _am_result=BSD
1108    fi
1109 fi
1110 AC_SUBST([am__include])
1111 AC_SUBST([am__quote])
1112 AC_MSG_RESULT([$_am_result])
1113 rm -f confinc confmf
1114 ])
1115
1116 # AM_CONDITIONAL                                              -*- Autoconf -*-
1117
1118 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
1119
1120 # This program is free software; you can redistribute it and/or modify
1121 # it under the terms of the GNU General Public License as published by
1122 # the Free Software Foundation; either version 2, or (at your option)
1123 # any later version.
1124
1125 # This program is distributed in the hope that it will be useful,
1126 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1127 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1128 # GNU General Public License for more details.
1129
1130 # You should have received a copy of the GNU General Public License
1131 # along with this program; if not, write to the Free Software
1132 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1133 # 02111-1307, USA.
1134
1135 # serial 5
1136
1137 AC_PREREQ(2.52)
1138
1139 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1140 # -------------------------------------
1141 # Define a conditional.
1142 AC_DEFUN([AM_CONDITIONAL],
1143 [ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1144         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1145 AC_SUBST([$1_TRUE])
1146 AC_SUBST([$1_FALSE])
1147 if $2; then
1148   $1_TRUE=
1149   $1_FALSE='#'
1150 else
1151   $1_TRUE='#'
1152   $1_FALSE=
1153 fi
1154 AC_CONFIG_COMMANDS_PRE(
1155 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1156   AC_MSG_ERROR([conditional "$1" was never defined.
1157 Usually this means the macro was only invoked conditionally.])
1158 fi])])
1159