root/morphix/trunk/ibuild/aclocal.m4

Revision 2, 36.0 kB (checked in by nextime, 2 years ago)

Initial import, branching from morphix svn

Line 
1 # generated automatically by aclocal 1.9.3 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
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 #                                                        -*- Autoconf -*-
15 # Copyright (C) 2002, 2003  Free Software Foundation, Inc.
16 # Generated from amversion.in; do not edit by hand.
17
18 # This program is free software; you can redistribute it and/or modify
19 # it under the terms of the GNU General Public License as published by
20 # the Free Software Foundation; either version 2, or (at your option)
21 # any later version.
22
23 # This program is distributed in the hope that it will be useful,
24 # but WITHOUT ANY WARRANTY; without even the implied warranty of
25 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26 # GNU General Public License for more details.
27
28 # You should have received a copy of the GNU General Public License
29 # along with this program; if not, write to the Free Software
30 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
31
32 # AM_AUTOMAKE_VERSION(VERSION)
33 # ----------------------------
34 # Automake X.Y traces this macro to ensure aclocal.m4 has been
35 # generated from the m4 files accompanying Automake X.Y.
36 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
37
38 # AM_SET_CURRENT_AUTOMAKE_VERSION
39 # -------------------------------
40 # Call AM_AUTOMAKE_VERSION so it can be traced.
41 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
42 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
43          [AM_AUTOMAKE_VERSION([1.9.3])])
44
45 # AM_AUX_DIR_EXPAND
46
47 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
48
49 # This program is free software; you can redistribute it and/or modify
50 # it under the terms of the GNU General Public License as published by
51 # the Free Software Foundation; either version 2, or (at your option)
52 # any later version.
53
54 # This program is distributed in the hope that it will be useful,
55 # but WITHOUT ANY WARRANTY; without even the implied warranty of
56 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
57 # GNU General Public License for more details.
58
59 # You should have received a copy of the GNU General Public License
60 # along with this program; if not, write to the Free Software
61 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
62 # 02111-1307, USA.
63
64 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
65 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
66 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
67 #
68 # Of course, Automake must honor this variable whenever it calls a
69 # tool from the auxiliary directory.  The problem is that $srcdir (and
70 # therefore $ac_aux_dir as well) can be either absolute or relative,
71 # depending on how configure is run.  This is pretty annoying, since
72 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
73 # source directory, any form will work fine, but in subdirectories a
74 # relative path needs to be adjusted first.
75 #
76 # $ac_aux_dir/missing
77 #    fails when called from a subdirectory if $ac_aux_dir is relative
78 # $top_srcdir/$ac_aux_dir/missing
79 #    fails if $ac_aux_dir is absolute,
80 #    fails when called from a subdirectory in a VPATH build with
81 #          a relative $ac_aux_dir
82 #
83 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
84 # are both prefixed by $srcdir.  In an in-source build this is usually
85 # harmless because $srcdir is `.', but things will broke when you
86 # start a VPATH build or use an absolute $srcdir.
87 #
88 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
89 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
90 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
91 # and then we would define $MISSING as
92 #   MISSING="\${SHELL} $am_aux_dir/missing"
93 # This will work as long as MISSING is not called from configure, because
94 # unfortunately $(top_srcdir) has no meaning in configure.
95 # However there are other variables, like CC, which are often used in
96 # configure, and could therefore not use this "fixed" $ac_aux_dir.
97 #
98 # Another solution, used here, is to always expand $ac_aux_dir to an
99 # absolute PATH.  The drawback is that using absolute paths prevent a
100 # configured tree to be moved without reconfiguration.
101
102 AC_DEFUN([AM_AUX_DIR_EXPAND],
103 [dnl Rely on autoconf to set up CDPATH properly.
104 AC_PREREQ([2.50])dnl
105 # expand $ac_aux_dir to an absolute path
106 am_aux_dir=`cd $ac_aux_dir && pwd`
107 ])
108
109 # AM_CONDITIONAL                                              -*- Autoconf -*-
110
111 # Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
112
113 # This program is free software; you can redistribute it and/or modify
114 # it under the terms of the GNU General Public License as published by
115 # the Free Software Foundation; either version 2, or (at your option)
116 # any later version.
117
118 # This program is distributed in the hope that it will be useful,
119 # but WITHOUT ANY WARRANTY; without even the implied warranty of
120 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
121 # GNU General Public License for more details.
122
123 # You should have received a copy of the GNU General Public License
124 # along with this program; if not, write to the Free Software
125 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
126 # 02111-1307, USA.
127
128 # serial 6
129
130 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
131 # -------------------------------------
132 # Define a conditional.
133 AC_DEFUN([AM_CONDITIONAL],
134 [AC_PREREQ(2.52)dnl
135  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
136         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
137 AC_SUBST([$1_TRUE])
138 AC_SUBST([$1_FALSE])
139 if $2; then
140   $1_TRUE=
141   $1_FALSE='#'
142 else
143   $1_TRUE='#'
144   $1_FALSE=
145 fi
146 AC_CONFIG_COMMANDS_PRE(
147 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
148   AC_MSG_ERROR([[conditional "$1" was never defined.
149 Usually this means the macro was only invoked conditionally.]])
150 fi])])
151
152 # Do all the work for Automake.                            -*- Autoconf -*-
153
154 # This macro actually does too much some checks are only needed if
155 # your package does certain things.  But this isn't really a big deal.
156
157 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
158 # Free Software Foundation, Inc.
159
160 # This program is free software; you can redistribute it and/or modify
161 # it under the terms of the GNU General Public License as published by
162 # the Free Software Foundation; either version 2, or (at your option)
163 # any later version.
164
165 # This program is distributed in the hope that it will be useful,
166 # but WITHOUT ANY WARRANTY; without even the implied warranty of
167 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
168 # GNU General Public License for more details.
169
170 # You should have received a copy of the GNU General Public License
171 # along with this program; if not, write to the Free Software
172 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
173 # 02111-1307, USA.
174
175 # serial 11
176
177 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
178 # AM_INIT_AUTOMAKE([OPTIONS])
179 # -----------------------------------------------
180 # The call with PACKAGE and VERSION arguments is the old style
181 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
182 # and VERSION should now be passed to AC_INIT and removed from
183 # the call to AM_INIT_AUTOMAKE.
184 # We support both call styles for the transition.  After
185 # the next Automake release, Autoconf can make the AC_INIT
186 # arguments mandatory, and then we can depend on a new Autoconf
187 # release and drop the old call support.
188 AC_DEFUN([AM_INIT_AUTOMAKE],
189 [AC_PREREQ([2.58])dnl
190 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
191 dnl the ones we care about.
192 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
193 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
194 AC_REQUIRE([AC_PROG_INSTALL])dnl
195 # test to see if srcdir already configured
196 if test "`cd $srcdir && pwd`" != "`pwd`" &&
197    test -f $srcdir/config.status; then
198   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
199 fi
200
201 # test whether we have cygpath
202 if test -z "$CYGPATH_W"; then
203   if (cygpath --version) >/dev/null 2>/dev/null; then
204     CYGPATH_W='cygpath -w'
205   else
206     CYGPATH_W=echo
207   fi
208 fi
209 AC_SUBST([CYGPATH_W])
210
211 # Define the identity of the package.
212 dnl Distinguish between old-style and new-style calls.
213 m4_ifval([$2],
214 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
215  AC_SUBST([PACKAGE], [$1])dnl
216  AC_SUBST([VERSION], [$2])],
217 [_AM_SET_OPTIONS([$1])dnl
218  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
219  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
220
221 _AM_IF_OPTION([no-define],,
222 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
223  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
224
225 # Some tools Automake needs.
226 AC_REQUIRE([AM_SANITY_CHECK])dnl
227 AC_REQUIRE([AC_ARG_PROGRAM])dnl
228 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
229 AM_MISSING_PROG(AUTOCONF, autoconf)
230 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
231 AM_MISSING_PROG(AUTOHEADER, autoheader)
232 AM_MISSING_PROG(MAKEINFO, makeinfo)
233 AM_PROG_INSTALL_SH
234 AM_PROG_INSTALL_STRIP
235 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
236 # We need awk for the "check" target.  The system "awk" is bad on
237 # some platforms.
238 AC_REQUIRE([AC_PROG_AWK])dnl
239 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
240 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
241 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
242               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
243                              [_AM_PROG_TAR([v7])])])
244 _AM_IF_OPTION([no-dependencies],,
245 [AC_PROVIDE_IFELSE([AC_PROG_CC],
246                   [_AM_DEPENDENCIES(CC)],
247                   [define([AC_PROG_CC],
248                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
249 AC_PROVIDE_IFELSE([AC_PROG_CXX],
250                   [_AM_DEPENDENCIES(CXX)],
251                   [define([AC_PROG_CXX],
252                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
253 ])
254 ])
255
256
257 # When config.status generates a header, we must update the stamp-h file.
258 # This file resides in the same directory as the config header
259 # that is generated.  The stamp files are numbered to have different names.
260
261 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
262 # loop where config.status creates the headers, so we can generate
263 # our stamp files there.
264 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
265 [# Compute $1's index in $config_headers.
266 _am_stamp_count=1
267 for _am_header in $config_headers :; do
268   case $_am_header in
269     $1 | $1:* )
270       break ;;
271     * )
272       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
273   esac
274 done
275 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
276
277 # AM_PROG_INSTALL_SH
278 # ------------------
279 # Define $install_sh.
280
281 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
282
283 # This program is free software; you can redistribute it and/or modify
284 # it under the terms of the GNU General Public License as published by
285 # the Free Software Foundation; either version 2, or (at your option)
286 # any later version.
287
288 # This program is distributed in the hope that it will be useful,
289 # but WITHOUT ANY WARRANTY; without even the implied warranty of
290 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
291 # GNU General Public License for more details.
292
293 # You should have received a copy of the GNU General Public License
294 # along with this program; if not, write to the Free Software
295 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
296 # 02111-1307, USA.
297
298 AC_DEFUN([AM_PROG_INSTALL_SH],
299 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
300 install_sh=${install_sh-"$am_aux_dir/install-sh"}
301 AC_SUBST(install_sh)])
302
303 #                                                          -*- Autoconf -*-
304 # Copyright (C) 2003  Free Software Foundation, Inc.
305
306 # This program is free software; you can redistribute it and/or modify
307 # it under the terms of the GNU General Public License as published by
308 # the Free Software Foundation; either version 2, or (at your option)
309 # any later version.
310
311 # This program is distributed in the hope that it will be useful,
312 # but WITHOUT ANY WARRANTY; without even the implied warranty of
313 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
314 # GNU General Public License for more details.
315
316 # You should have received a copy of the GNU General Public License
317 # along with this program; if not, write to the Free Software
318 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
319 # 02111-1307, USA.
320
321 # serial 1
322
323 # Check whether the underlying file-system supports filenames
324 # with a leading dot.  For instance MS-DOS doesn't.
325 AC_DEFUN([AM_SET_LEADING_DOT],
326 [rm -rf .tst 2>/dev/null
327 mkdir .tst 2>/dev/null
328 if test -d .tst; then
329   am__leading_dot=.
330 else
331   am__leading_dot=_
332 fi
333 rmdir .tst 2>/dev/null
334 AC_SUBST([am__leading_dot])])
335
336 # Add --enable-maintainer-mode option to configure.
337 # From Jim Meyering
338
339 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
340 # Free Software Foundation, Inc.
341
342 # This program is free software; you can redistribute it and/or modify
343 # it under the terms of the GNU General Public License as published by
344 # the Free Software Foundation; either version 2, or (at your option)
345 # any later version.
346
347 # This program is distributed in the hope that it will be useful,
348 # but WITHOUT ANY WARRANTY; without even the implied warranty of
349 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
350 # GNU General Public License for more details.
351
352 # You should have received a copy of the GNU General Public License
353 # along with this program; if not, write to the Free Software
354 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
355 # 02111-1307, USA.
356
357 # serial 3
358
359 AC_DEFUN([AM_MAINTAINER_MODE],
360 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
361   dnl maintainer-mode is disabled by default
362   AC_ARG_ENABLE(maintainer-mode,
363 [  --enable-maintainer-mode  enable make rules and dependencies not useful
364                           (and sometimes confusing) to the casual installer],
365       USE_MAINTAINER_MODE=$enableval,
366       USE_MAINTAINER_MODE=no)
367   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
368   AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
369   MAINT=$MAINTAINER_MODE_TRUE
370   AC_SUBST(MAINT)dnl
371 ]
372 )
373
374 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
375
376 #  -*- Autoconf -*-
377
378
379 # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
380
381 # This program is free software; you can redistribute it and/or modify
382 # it under the terms of the GNU General Public License as published by
383 # the Free Software Foundation; either version 2, or (at your option)
384 # any later version.
385
386 # This program is distributed in the hope that it will be useful,
387 # but WITHOUT ANY WARRANTY; without even the implied warranty of
388 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
389 # GNU General Public License for more details.
390
391 # You should have received a copy of the GNU General Public License
392 # along with this program; if not, write to the Free Software
393 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
394 # 02111-1307, USA.
395
396 # serial 3
397
398 # AM_MISSING_PROG(NAME, PROGRAM)
399 # ------------------------------
400 AC_DEFUN([AM_MISSING_PROG],
401 [AC_REQUIRE([AM_MISSING_HAS_RUN])
402 $1=${$1-"${am_missing_run}$2"}
403 AC_SUBST($1)])
404
405
406 # AM_MISSING_HAS_RUN
407 # ------------------
408 # Define MISSING if not defined so far and test if it supports --run.
409 # If it does, set am_missing_run to use it, otherwise, to nothing.
410 AC_DEFUN([AM_MISSING_HAS_RUN],
411 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
412 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
413 # Use eval to expand $SHELL
414 if eval "$MISSING --run true"; then
415   am_missing_run="$MISSING --run "
416 else
417   am_missing_run=
418   AC_MSG_WARN([`missing' script is too old or missing])
419 fi
420 ])
421
422 # AM_PROG_MKDIR_P
423 # ---------------
424 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
425
426 # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
427
428 # This program is free software; you can redistribute it and/or modify
429 # it under the terms of the GNU General Public License as published by
430 # the Free Software Foundation; either version 2, or (at your option)
431 # any later version.
432
433 # This program is distributed in the hope that it will be useful,
434 # but WITHOUT ANY WARRANTY; without even the implied warranty of
435 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
436 # GNU General Public License for more details.
437
438 # You should have received a copy of the GNU General Public License
439 # along with this program; if not, write to the Free Software
440 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
441 # 02111-1307, USA.
442
443 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
444 # created by `make install' are always world readable, even if the
445 # installer happens to have an overly restrictive umask (e.g. 077).
446 # This was a mistake.  There are at least two reasons why we must not
447 # use `-m 0755':
448 #   - it causes special bits like SGID to be ignored,
449 #   - it may be too restrictive (some setups expect 775 directories).
450 #
451 # Do not use -m 0755 and let people choose whatever they expect by
452 # setting umask.
453 #
454 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
455 # Some implementations (such as Solaris 8's) are not thread-safe: if a
456 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
457 # concurrently, both version can detect that a/ is missing, but only
458 # one can create it and the other will error out.  Consequently we
459 # restrict ourselves to GNU make (using the --version option ensures
460 # this.)
461 AC_DEFUN([AM_PROG_MKDIR_P],
462 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
463   # We used to keeping the `.' as first argument, in order to
464   # allow $(mkdir_p) to be used without argument.  As in
465   #   $(mkdir_p) $(somedir)
466   # where $(somedir) is conditionally defined.  However this is wrong
467   # for two reasons:
468   #  1. if the package is installed by a user who cannot write `.'
469   #     make install will fail,
470   #  2. the above comment should most certainly read
471   #     $(mkdir_p) $(DESTDIR)$(somedir)
472   #     so it does not work when $(somedir) is undefined and
473   #     $(DESTDIR) is not.
474   #  To support the latter case, we have to write
475   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
476   #  so the `.' trick is pointless.
477   mkdir_p='mkdir -p --'
478 else
479   # On NextStep and OpenStep, the `mkdir' command does not
480   # recognize any option.  It will interpret all options as
481   # directories to create, and then abort because `.' already
482   # exists.
483   for d in ./-p ./--version;
484   do
485     test -d $d && rmdir $d
486   done
487   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
488   if test -f "$ac_aux_dir/mkinstalldirs"; then
489     mkdir_p='$(mkinstalldirs)'
490   else
491     mkdir_p='$(install_sh) -d'
492   fi
493 fi
494 AC_SUBST([mkdir_p])])
495
496 # Helper functions for option handling.                    -*- Autoconf -*-
497
498 # Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
499
500 # This program is free software; you can redistribute it and/or modify
501 # it under the terms of the GNU General Public License as published by
502 # the Free Software Foundation; either version 2, or (at your option)
503 # any later version.
504
505 # This program is distributed in the hope that it will be useful,
506 # but WITHOUT ANY WARRANTY; without even the implied warranty of
507 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
508 # GNU General Public License for more details.
509
510 # You should have received a copy of the GNU General Public License
511 # along with this program; if not, write to the Free Software
512 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
513 # 02111-1307, USA.
514
515 # serial 2
516
517 # _AM_MANGLE_OPTION(NAME)
518 # -----------------------
519 AC_DEFUN([_AM_MANGLE_OPTION],
520 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
521
522 # _AM_SET_OPTION(NAME)
523 # ------------------------------
524 # Set option NAME.  Presently that only means defining a flag for this option.
525 AC_DEFUN([_AM_SET_OPTION],
526 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
527
528 # _AM_SET_OPTIONS(OPTIONS)
529 # ----------------------------------
530 # OPTIONS is a space-separated list of Automake options.
531 AC_DEFUN([_AM_SET_OPTIONS],
532 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
533
534 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
535 # -------------------------------------------
536 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
537 AC_DEFUN([_AM_IF_OPTION],
538 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
539
540
541 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
542 # Free Software Foundation, Inc.
543
544 # This program is free software; you can redistribute it and/or modify
545 # it under the terms of the GNU General Public License as published by
546 # the Free Software Foundation; either version 2, or (at your option)
547 # any later version.
548
549 # This program is distributed in the hope that it will be useful,
550 # but WITHOUT ANY WARRANTY; without even the implied warranty of
551 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
552 # GNU General Public License for more details.
553
554 # You should have received a copy of the GNU General Public License
555 # along with this program; if not, write to the Free Software
556 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
557 # 02111-1307, USA.
558
559 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
560
561 # Adds support for distributing Python modules and packages.  To
562 # install modules, copy them to $(pythondir), using the python_PYTHON
563 # automake variable.  To install a package with the same name as the
564 # automake package, install to $(pkgpythondir), or use the
565 # pkgpython_PYTHON automake variable.
566
567 # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
568 # locations to install python extension modules (shared libraries).
569 # Another macro is required to find the appropriate flags to compile
570 # extension modules.
571
572 # If your package is configured with a different prefix to python,
573 # users will have to add the install directory to the PYTHONPATH
574 # environment variable, or create a .pth file (see the python
575 # documentation for details).
576
577 # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
578 # cause an error if the version of python installed on the system
579 # doesn't meet the requirement.  MINIMUM-VERSION should consist of
580 # numbers and dots only.
581
582 AC_DEFUN([AM_PATH_PYTHON],
583  [
584   dnl Find a Python interpreter.  Python versions prior to 1.5 are not
585   dnl supported because the default installation locations changed from
586   dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages
587   dnl in 1.5.
588   m4_define([_AM_PYTHON_INTERPRETER_LIST],
589             [python python2 python2.4 python2.3 python2.2 dnl
590 python2.1 python2.0 python1.6 python1.5])
591
592   m4_if([$1],[],[
593     dnl No version check is needed.
594     # Find any Python interpreter.
595     if test -z "$PYTHON"; then
596       PYTHON=:
597       AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST)
598     fi
599     am_display_PYTHON=python
600   ], [
601     dnl A version check is needed.
602     if test -n "$PYTHON"; then
603       # If the user set $PYTHON, use it and don't search something else.
604       AC_MSG_CHECKING([whether $PYTHON version >= $1])
605       AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
606                               [AC_MSG_RESULT(yes)],
607                               [AC_MSG_ERROR(too old)])
608       am_display_PYTHON=$PYTHON
609     else
610       # Otherwise, try each interpreter until we find one that satisfies
611       # VERSION.
612       AC_CACHE_CHECK([for a Python interpreter with version >= $1],
613         [am_cv_pathless_PYTHON],[
614         for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
615           test "$am_cv_pathless_PYTHON" = none && break
616           AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
617         done])
618       # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
619       if test "$am_cv_pathless_PYTHON" = none; then
620         PYTHON=:
621       else
622         AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
623       fi
624       am_display_PYTHON=$am_cv_pathless_PYTHON
625     fi
626   ])
627
628   if test "$PYTHON" = :; then
629   dnl Run any user-specified action, or abort.
630     m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
631   else
632
633   dnl Query Python for its version number.  Getting [:3] seems to be
634   dnl the best way to do this; it's what "site.py" does in the standard
635   dnl library.
636
637   AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
638     [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`])
639   AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
640
641   dnl Use the values of $prefix and $exec_prefix for the corresponding
642   dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
643   dnl distinct variables so they can be overridden if need be.  However,
644   dnl general consensus is that you shouldn't need this ability.
645
646   AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
647   AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
648
649   dnl At times (like when building shared libraries) you may want
650   dnl to know which OS platform Python thinks this is.
651
652   AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
653     [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`])
654   AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
655
656
657   dnl Set up 4 directories:
658
659   dnl pythondir -- where to install python scripts.  This is the
660   dnl   site-packages directory, not the python standard library
661   dnl   directory like in previous automake betas.  This behavior
662   dnl   is more consistent with lispdir.m4 for example.
663   dnl Query distutils for this directory.  distutils does not exist in
664   dnl Python 1.5, so we fall back to the hardcoded directory if it
665   dnl doesn't work.
666   AC_CACHE_CHECK([for $am_display_PYTHON script directory],
667     [am_cv_python_pythondir],
668     [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
669      echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
670   AC_SUBST([pythondir], [$am_cv_python_pythondir])
671
672   dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
673   dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
674   dnl   more consistent with the rest of automake.
675
676   AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
677
678   dnl pyexecdir -- directory for installing python extension modules
679   dnl   (shared libraries)
680   dnl Query distutils for this directory.  distutils does not exist in
681   dnl Python 1.5, so we fall back to the hardcoded directory if it
682   dnl doesn't work.
683   AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
684     [am_cv_python_pyexecdir],
685     [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
686      echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`])
687   AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
688
689   dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
690
691   AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
692
693   dnl Run any user-specified action.
694   $2
695   fi
696
697 ])
698
699
700 # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
701 # ---------------------------------------------------------------------------
702 # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
703 # Run ACTION-IF-FALSE otherwise.
704 # This test uses sys.hexversion instead of the string equivalent (first
705 # word of sys.version), in order to cope with versions such as 2.2c1.
706 # hexversion has been introduced in Python 1.5.2; it's probably not
707 # worth to support older versions (1.5.1 was released on October 31, 1998).
708 AC_DEFUN([AM_PYTHON_CHECK_VERSION],
709  [prog="import sys, string
710 # split strings by '.' and convert to numeric.  Append some zeros
711 # because we need at least 4 digits for the hex conversion.
712 minver = map(int, string.split('$2', '.')) + [[0, 0, 0]]
713 minverhex = 0
714 for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
715 sys.exit(sys.hexversion < minverhex)"
716   AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
717
718 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.     -*- Autoconf -*-
719
720 # This program is free software; you can redistribute it and/or modify
721 # it under the terms of the GNU General Public License as published by
722 # the Free Software Foundation; either version 2, or (at your option)
723 # any later version.
724
725 # This program is distributed in the hope that it will be useful,
726 # but WITHOUT ANY WARRANTY; without even the implied warranty of
727 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
728 # GNU General Public License for more details.
729
730 # You should have received a copy of the GNU General Public License
731 # along with this program; if not, write to the Free Software
732 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
733 # 02111-1307, USA.
734
735 # AM_RUN_LOG(COMMAND)
736 # -------------------
737 # Run COMMAND, save the exit status in ac_status, and log it.
738 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
739 AC_DEFUN([AM_RUN_LOG],
740 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
741    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
742    ac_status=$?
743    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
744    (exit $ac_status); }])
745
746 #
747 # Check to make sure that the build environment is sane.
748 #
749
750 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
751
752 # This program is free software; you can redistribute it and/or modify
753 # it under the terms of the GNU General Public License as published by
754 # the Free Software Foundation; either version 2, or (at your option)
755 # any later version.
756
757 # This program is distributed in the hope that it will be useful,
758 # but WITHOUT ANY WARRANTY; without even the implied warranty of
759 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
760 # GNU General Public License for more details.
761
762 # You should have received a copy of the GNU General Public License
763 # along with this program; if not, write to the Free Software
764 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
765 # 02111-1307, USA.
766
767 # serial 3
768
769 # AM_SANITY_CHECK
770 # ---------------
771 AC_DEFUN([AM_SANITY_CHECK],
772 [AC_MSG_CHECKING([whether build environment is sane])
773 # Just in case
774 sleep 1
775 echo timestamp > conftest.file
776 # Do `set' in a subshell so we don't clobber the current shell's
777 # arguments.  Must try -L first in case configure is actually a
778 # symlink; some systems play weird games with the mod time of symlinks
779 # (eg FreeBSD returns the mod time of the symlink's containing
780 # directory).
781 if (
782    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
783    if test "$[*]" = "X"; then
784       # -L didn't work.
785       set X `ls -t $srcdir/configure conftest.file`
786    fi
787    rm -f conftest.file
788    if test "$[*]" != "X $srcdir/configure conftest.file" \
789       && test "$[*]" != "X conftest.file $srcdir/configure"; then
790
791       # If neither matched, then we have a broken ls.  This can happen
792       # if, for instance, CONFIG_SHELL is bash and it inherits a
793       # broken ls alias from the environment.  This has actually
794       # happened.  Such a system could not be considered "sane".
795       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
796 alias in your environment])
797    fi
798
799    test "$[2]" = conftest.file
800    )
801 then
802    # Ok.
803    :
804 else
805    AC_MSG_ERROR([newly created file is older than distributed files!
806 Check your system clock])
807 fi
808 AC_MSG_RESULT(yes)])
809
810 # AM_PROG_INSTALL_STRIP
811
812 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
813
814 # This program is free software; you can redistribute it and/or modify
815 # it under the terms of the GNU General Public License as published by
816 # the Free Software Foundation; either version 2, or (at your option)
817 # any later version.
818
819 # This program is distributed in the hope that it will be useful,
820 # but WITHOUT ANY WARRANTY; without even the implied warranty of
821 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
822 # GNU General Public License for more details.
823
824 # You should have received a copy of the GNU General Public License
825 # along with this program; if not, write to the Free Software
826 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
827 # 02111-1307, USA.
828
829 # One issue with vendor `install' (even GNU) is that you can't
830 # specify the program used to strip binaries.  This is especially
831 # annoying in cross-compiling environments, where the build's strip
832 # is unlikely to handle the host's binaries.
833 # Fortunately install-sh will honor a STRIPPROG variable, so we
834 # always use install-sh in `make install-strip', and initialize
835 # STRIPPROG with the value of the STRIP variable (set by the user).