]> git.draconx.ca Git - gob-dx.git/blob - aclocal.m4
a323a4e625516b3da7095787f4958c2deec8a0b8
[gob-dx.git] / aclocal.m4
1 # generated automatically by aclocal 1.7.3 -*- 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 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
15
16 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
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 # 02111-1307, USA.
32
33 AC_PREREQ([2.52])
34
35 # serial 6
36
37 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
38 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
39
40 # Do all the work for Automake.                            -*- Autoconf -*-
41
42 # This macro actually does too much some checks are only needed if
43 # your package does certain things.  But this isn't really a big deal.
44
45 # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
46 # Free Software Foundation, Inc.
47
48 # This program is free software; you can redistribute it and/or modify
49 # it under the terms of the GNU General Public License as published by
50 # the Free Software Foundation; either version 2, or (at your option)
51 # any later version.
52
53 # This program is distributed in the hope that it will be useful,
54 # but WITHOUT ANY WARRANTY; without even the implied warranty of
55 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
56 # GNU General Public License for more details.
57
58 # You should have received a copy of the GNU General Public License
59 # along with this program; if not, write to the Free Software
60 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
61 # 02111-1307, USA.
62
63 # serial 9
64
65 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
66 # written in clear, in which case automake, when reading aclocal.m4,
67 # will think it sees a *use*, and therefore will trigger all it's
68 # C support machinery.  Also note that it means that autoscan, seeing
69 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
70
71
72 AC_PREREQ([2.54])
73
74 # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
75 # the ones we care about.
76 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
77
78 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
79 # AM_INIT_AUTOMAKE([OPTIONS])
80 # -----------------------------------------------
81 # The call with PACKAGE and VERSION arguments is the old style
82 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
83 # and VERSION should now be passed to AC_INIT and removed from
84 # the call to AM_INIT_AUTOMAKE.
85 # We support both call styles for the transition.  After
86 # the next Automake release, Autoconf can make the AC_INIT
87 # arguments mandatory, and then we can depend on a new Autoconf
88 # release and drop the old call support.
89 AC_DEFUN([AM_INIT_AUTOMAKE],
90 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
91  AC_REQUIRE([AC_PROG_INSTALL])dnl
92 # test to see if srcdir already configured
93 if test "`cd $srcdir && pwd`" != "`pwd`" &&
94    test -f $srcdir/config.status; then
95   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
96 fi
97
98 # test whether we have cygpath
99 if test -z "$CYGPATH_W"; then
100   if (cygpath --version) >/dev/null 2>/dev/null; then
101     CYGPATH_W='cygpath -w'
102   else
103     CYGPATH_W=echo
104   fi
105 fi
106 AC_SUBST([CYGPATH_W])
107
108 # Define the identity of the package.
109 dnl Distinguish between old-style and new-style calls.
110 m4_ifval([$2],
111 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
112  AC_SUBST([PACKAGE], [$1])dnl
113  AC_SUBST([VERSION], [$2])],
114 [_AM_SET_OPTIONS([$1])dnl
115  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
116  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
117
118 _AM_IF_OPTION([no-define],,
119 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
120  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
121
122 # Some tools Automake needs.
123 AC_REQUIRE([AM_SANITY_CHECK])dnl
124 AC_REQUIRE([AC_ARG_PROGRAM])dnl
125 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
126 AM_MISSING_PROG(AUTOCONF, autoconf)
127 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
128 AM_MISSING_PROG(AUTOHEADER, autoheader)
129 AM_MISSING_PROG(MAKEINFO, makeinfo)
130 AM_MISSING_PROG(AMTAR, tar)
131 AM_PROG_INSTALL_SH
132 AM_PROG_INSTALL_STRIP
133 # We need awk for the "check" target.  The system "awk" is bad on
134 # some platforms.
135 AC_REQUIRE([AC_PROG_AWK])dnl
136 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
137 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
138
139 _AM_IF_OPTION([no-dependencies],,
140 [AC_PROVIDE_IFELSE([AC_PROG_CC],
141                   [_AM_DEPENDENCIES(CC)],
142                   [define([AC_PROG_CC],
143                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
144 AC_PROVIDE_IFELSE([AC_PROG_CXX],
145                   [_AM_DEPENDENCIES(CXX)],
146                   [define([AC_PROG_CXX],
147                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
148 ])
149 ])
150
151
152 # When config.status generates a header, we must update the stamp-h file.
153 # This file resides in the same directory as the config header
154 # that is generated.  The stamp files are numbered to have different names.
155
156 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
157 # loop where config.status creates the headers, so we can generate
158 # our stamp files there.
159 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
160 [# Compute $1's index in $config_headers.
161 _am_stamp_count=1
162 for _am_header in $config_headers :; do
163   case $_am_header in
164     $1 | $1:* )
165       break ;;
166     * )
167       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
168   esac
169 done
170 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
171
172 # Copyright 2002  Free Software Foundation, Inc.
173
174 # This program is free software; you can redistribute it and/or modify
175 # it under the terms of the GNU General Public License as published by
176 # the Free Software Foundation; either version 2, or (at your option)
177 # any later version.
178
179 # This program is distributed in the hope that it will be useful,
180 # but WITHOUT ANY WARRANTY; without even the implied warranty of
181 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
182 # GNU General Public License for more details.
183
184 # You should have received a copy of the GNU General Public License
185 # along with this program; if not, write to the Free Software
186 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
187
188 # AM_AUTOMAKE_VERSION(VERSION)
189 # ----------------------------
190 # Automake X.Y traces this macro to ensure aclocal.m4 has been
191 # generated from the m4 files accompanying Automake X.Y.
192 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
193
194 # AM_SET_CURRENT_AUTOMAKE_VERSION
195 # -------------------------------
196 # Call AM_AUTOMAKE_VERSION so it can be traced.
197 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
198 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
199          [AM_AUTOMAKE_VERSION([1.7.3])])
200
201 # Helper functions for option handling.                    -*- Autoconf -*-
202
203 # Copyright 2001, 2002  Free Software Foundation, Inc.
204
205 # This program is free software; you can redistribute it and/or modify
206 # it under the terms of the GNU General Public License as published by
207 # the Free Software Foundation; either version 2, or (at your option)
208 # any later version.
209
210 # This program is distributed in the hope that it will be useful,
211 # but WITHOUT ANY WARRANTY; without even the implied warranty of
212 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
213 # GNU General Public License for more details.
214
215 # You should have received a copy of the GNU General Public License
216 # along with this program; if not, write to the Free Software
217 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
218 # 02111-1307, USA.
219
220 # serial 2
221
222 # _AM_MANGLE_OPTION(NAME)
223 # -----------------------
224 AC_DEFUN([_AM_MANGLE_OPTION],
225 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
226
227 # _AM_SET_OPTION(NAME)
228 # ------------------------------
229 # Set option NAME.  Presently that only means defining a flag for this option.
230 AC_DEFUN([_AM_SET_OPTION],
231 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
232
233 # _AM_SET_OPTIONS(OPTIONS)
234 # ----------------------------------
235 # OPTIONS is a space-separated list of Automake options.
236 AC_DEFUN([_AM_SET_OPTIONS],
237 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
238
239 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
240 # -------------------------------------------
241 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
242 AC_DEFUN([_AM_IF_OPTION],
243 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
244
245 #
246 # Check to make sure that the build environment is sane.
247 #
248
249 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
250
251 # This program is free software; you can redistribute it and/or modify
252 # it under the terms of the GNU General Public License as published by
253 # the Free Software Foundation; either version 2, or (at your option)
254 # any later version.
255
256 # This program is distributed in the hope that it will be useful,
257 # but WITHOUT ANY WARRANTY; without even the implied warranty of
258 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
259 # GNU General Public License for more details.
260
261 # You should have received a copy of the GNU General Public License
262 # along with this program; if not, write to the Free Software
263 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
264 # 02111-1307, USA.
265
266 # serial 3
267
268 # AM_SANITY_CHECK
269 # ---------------
270 AC_DEFUN([AM_SANITY_CHECK],
271 [AC_MSG_CHECKING([whether build environment is sane])
272 # Just in case
273 sleep 1
274 echo timestamp > conftest.file
275 # Do `set' in a subshell so we don't clobber the current shell's
276 # arguments.  Must try -L first in case configure is actually a
277 # symlink; some systems play weird games with the mod time of symlinks
278 # (eg FreeBSD returns the mod time of the symlink's containing
279 # directory).
280 if (
281    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
282    if test "$[*]" = "X"; then
283       # -L didn't work.
284       set X `ls -t $srcdir/configure conftest.file`
285    fi
286    rm -f conftest.file
287    if test "$[*]" != "X $srcdir/configure conftest.file" \
288       && test "$[*]" != "X conftest.file $srcdir/configure"; then
289
290       # If neither matched, then we have a broken ls.  This can happen
291       # if, for instance, CONFIG_SHELL is bash and it inherits a
292       # broken ls alias from the environment.  This has actually
293       # happened.  Such a system could not be considered "sane".
294       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
295 alias in your environment])
296    fi
297
298    test "$[2]" = conftest.file
299    )
300 then
301    # Ok.
302    :
303 else
304    AC_MSG_ERROR([newly created file is older than distributed files!
305 Check your system clock])
306 fi
307 AC_MSG_RESULT(yes)])
308
309 #  -*- Autoconf -*-
310
311
312 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
313
314 # This program is free software; you can redistribute it and/or modify
315 # it under the terms of the GNU General Public License as published by
316 # the Free Software Foundation; either version 2, or (at your option)
317 # any later version.
318
319 # This program is distributed in the hope that it will be useful,
320 # but WITHOUT ANY WARRANTY; without even the implied warranty of
321 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
322 # GNU General Public License for more details.
323
324 # You should have received a copy of the GNU General Public License
325 # along with this program; if not, write to the Free Software
326 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
327 # 02111-1307, USA.
328
329 # serial 3
330
331 # AM_MISSING_PROG(NAME, PROGRAM)
332 # ------------------------------
333 AC_DEFUN([AM_MISSING_PROG],
334 [AC_REQUIRE([AM_MISSING_HAS_RUN])
335 $1=${$1-"${am_missing_run}$2"}
336 AC_SUBST($1)])
337
338
339 # AM_MISSING_HAS_RUN
340 # ------------------
341 # Define MISSING if not defined so far and test if it supports --run.
342 # If it does, set am_missing_run to use it, otherwise, to nothing.
343 AC_DEFUN([AM_MISSING_HAS_RUN],
344 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
345 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
346 # Use eval to expand $SHELL
347 if eval "$MISSING --run true"; then
348   am_missing_run="$MISSING --run "
349 else
350   am_missing_run=
351   AC_MSG_WARN([`missing' script is too old or missing])
352 fi
353 ])
354
355 # AM_AUX_DIR_EXPAND
356
357 # Copyright 2001 Free Software Foundation, Inc.
358
359 # This program is free software; you can redistribute it and/or modify
360 # it under the terms of the GNU General Public License as published by
361 # the Free Software Foundation; either version 2, or (at your option)
362 # any later version.
363
364 # This program is distributed in the hope that it will be useful,
365 # but WITHOUT ANY WARRANTY; without even the implied warranty of
366 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
367 # GNU General Public License for more details.
368
369 # You should have received a copy of the GNU General Public License
370 # along with this program; if not, write to the Free Software
371 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
372 # 02111-1307, USA.
373
374 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
375 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
376 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
377 #
378 # Of course, Automake must honor this variable whenever it calls a
379 # tool from the auxiliary directory.  The problem is that $srcdir (and
380 # therefore $ac_aux_dir as well) can be either absolute or relative,
381 # depending on how configure is run.  This is pretty annoying, since
382 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
383 # source directory, any form will work fine, but in subdirectories a
384 # relative path needs to be adjusted first.
385 #
386 # $ac_aux_dir/missing
387 #    fails when called from a subdirectory if $ac_aux_dir is relative
388 # $top_srcdir/$ac_aux_dir/missing
389 #    fails if $ac_aux_dir is absolute,
390 #    fails when called from a subdirectory in a VPATH build with
391 #          a relative $ac_aux_dir
392 #
393 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
394 # are both prefixed by $srcdir.  In an in-source build this is usually
395 # harmless because $srcdir is `.', but things will broke when you
396 # start a VPATH build or use an absolute $srcdir.
397 #
398 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
399 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
400 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
401 # and then we would define $MISSING as
402 #   MISSING="\${SHELL} $am_aux_dir/missing"
403 # This will work as long as MISSING is not called from configure, because
404 # unfortunately $(top_srcdir) has no meaning in configure.
405 # However there are other variables, like CC, which are often used in
406 # configure, and could therefore not use this "fixed" $ac_aux_dir.
407 #
408 # Another solution, used here, is to always expand $ac_aux_dir to an
409 # absolute PATH.  The drawback is that using absolute paths prevent a
410 # configured tree to be moved without reconfiguration.
411
412 # Rely on autoconf to set up CDPATH properly.
413 AC_PREREQ([2.50])
414
415 AC_DEFUN([AM_AUX_DIR_EXPAND], [
416 # expand $ac_aux_dir to an absolute path
417 am_aux_dir=`cd $ac_aux_dir && pwd`
418 ])
419
420 # AM_PROG_INSTALL_SH
421 # ------------------
422 # Define $install_sh.
423
424 # Copyright 2001 Free Software Foundation, Inc.
425
426 # This program is free software; you can redistribute it and/or modify
427 # it under the terms of the GNU General Public License as published by
428 # the Free Software Foundation; either version 2, or (at your option)
429 # any later version.
430
431 # This program is distributed in the hope that it will be useful,
432 # but WITHOUT ANY WARRANTY; without even the implied warranty of
433 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
434 # GNU General Public License for more details.
435
436 # You should have received a copy of the GNU General Public License
437 # along with this program; if not, write to the Free Software
438 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
439 # 02111-1307, USA.
440
441 AC_DEFUN([AM_PROG_INSTALL_SH],
442 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
443 install_sh=${install_sh-"$am_aux_dir/install-sh"}
444 AC_SUBST(install_sh)])
445
446 # AM_PROG_INSTALL_STRIP
447
448 # Copyright 2001 Free Software Foundation, Inc.
449
450 # This program is free software; you can redistribute it and/or modify
451 # it under the terms of the GNU General Public License as published by
452 # the Free Software Foundation; either version 2, or (at your option)
453 # any later version.
454
455 # This program is distributed in the hope that it will be useful,
456 # but WITHOUT ANY WARRANTY; without even the implied warranty of
457 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
458 # GNU General Public License for more details.
459
460 # You should have received a copy of the GNU General Public License
461 # along with this program; if not, write to the Free Software
462 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
463 # 02111-1307, USA.
464
465 # One issue with vendor `install' (even GNU) is that you can't
466 # specify the program used to strip binaries.  This is especially
467 # annoying in cross-compiling environments, where the build's strip
468 # is unlikely to handle the host's binaries.
469 # Fortunately install-sh will honor a STRIPPROG variable, so we
470 # always use install-sh in `make install-strip', and initialize
471 # STRIPPROG with the value of the STRIP variable (set by the user).
472 AC_DEFUN([AM_PROG_INSTALL_STRIP],
473 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
474 # Installed binaries are usually stripped using `strip' when the user
475 # run `make install-strip'.  However `strip' might not be the right
476 # tool to use in cross-compilation environments, therefore Automake
477 # will honor the `STRIP' environment variable to overrule this program.
478 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
479 if test "$cross_compiling" != no; then
480   AC_CHECK_TOOL([STRIP], [strip], :)
481 fi
482 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
483 AC_SUBST([INSTALL_STRIP_PROGRAM])])
484
485 #                                                          -*- Autoconf -*-
486 # Copyright (C) 2003  Free Software Foundation, Inc.
487
488 # This program is free software; you can redistribute it and/or modify
489 # it under the terms of the GNU General Public License as published by
490 # the Free Software Foundation; either version 2, or (at your option)
491 # any later version.
492
493 # This program is distributed in the hope that it will be useful,
494 # but WITHOUT ANY WARRANTY; without even the implied warranty of
495 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
496 # GNU General Public License for more details.
497
498 # You should have received a copy of the GNU General Public License
499 # along with this program; if not, write to the Free Software
500 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
501 # 02111-1307, USA.
502
503 # serial 1
504
505 # Check whether the underlying file-system supports filenames
506 # with a leading dot.  For instance MS-DOS doesn't.
507 AC_DEFUN([AM_SET_LEADING_DOT],
508 [rm -rf .tst 2>/dev/null
509 mkdir .tst 2>/dev/null
510 if test -d .tst; then
511   am__leading_dot=.
512 else
513   am__leading_dot=_
514 fi
515 rmdir .tst 2>/dev/null
516 AC_SUBST([am__leading_dot])])
517
518 # serial 5                                              -*- Autoconf -*-
519
520 # Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
521
522 # This program is free software; you can redistribute it and/or modify
523 # it under the terms of the GNU General Public License as published by
524 # the Free Software Foundation; either version 2, or (at your option)
525 # any later version.
526
527 # This program is distributed in the hope that it will be useful,
528 # but WITHOUT ANY WARRANTY; without even the implied warranty of
529 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
530 # GNU General Public License for more details.
531
532 # You should have received a copy of the GNU General Public License
533 # along with this program; if not, write to the Free Software
534 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
535 # 02111-1307, USA.
536
537
538 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
539 # written in clear, in which case automake, when reading aclocal.m4,
540 # will think it sees a *use*, and therefore will trigger all it's
541 # C support machinery.  Also note that it means that autoscan, seeing
542 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
543
544
545
546 # _AM_DEPENDENCIES(NAME)
547 # ----------------------
548 # See how the compiler implements dependency checking.
549 # NAME is "CC", "CXX", "GCJ", or "OBJC".
550 # We try a few techniques and use that to set a single cache variable.
551 #
552 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
553 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
554 # dependency, and given that the user is not expected to run this macro,
555 # just rely on AC_PROG_CC.
556 AC_DEFUN([_AM_DEPENDENCIES],
557 [AC_REQUIRE([AM_SET_DEPDIR])dnl
558 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
559 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
560 AC_REQUIRE([AM_DEP_TRACK])dnl
561
562 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
563        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
564        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
565        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
566                    [depcc="$$1"   am_compiler_list=])
567
568 AC_CACHE_CHECK([dependency style of $depcc],
569                [am_cv_$1_dependencies_compiler_type],
570 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
571   # We make a subdir and do the tests there.  Otherwise we can end up
572   # making bogus files that we don't know about and never remove.  For
573   # instance it was reported that on HP-UX the gcc test will end up
574   # making a dummy file named `D' -- because `-MD' means `put the output
575   # in D'.
576   mkdir conftest.dir
577   # Copy depcomp to subdir because otherwise we won't find it if we're
578   # using a relative directory.
579   cp "$am_depcomp" conftest.dir
580   cd conftest.dir
581
582   am_cv_$1_dependencies_compiler_type=none
583   if test "$am_compiler_list" = ""; then
584      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
585   fi
586   for depmode in $am_compiler_list; do
587     # We need to recreate these files for each test, as the compiler may
588     # overwrite some of them when testing with obscure command lines.
589     # This happens at least with the AIX C compiler.
590     echo '#include "conftest.h"' > conftest.c
591     echo 'int i;' > conftest.h
592     echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
593
594     case $depmode in
595     nosideeffect)
596       # after this tag, mechanisms are not by side-effect, so they'll
597       # only be used when explicitly requested
598       if test "x$enable_dependency_tracking" = xyes; then
599         continue
600       else
601         break
602       fi
603       ;;
604     none) break ;;
605     esac
606     # We check with `-c' and `-o' for the sake of the "dashmstdout"
607     # mode.  It turns out that the SunPro C++ compiler does not properly
608     # handle `-M -o', and we need to detect this.
609     if depmode=$depmode \
610        source=conftest.c object=conftest.o \
611        depfile=conftest.Po tmpdepfile=conftest.TPo \
612        $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \
613          >/dev/null 2>conftest.err &&
614        grep conftest.h conftest.Po > /dev/null 2>&1 &&
615        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
616       # icc doesn't choke on unknown options, it will just issue warnings
617       # (even with -Werror).  So we grep stderr for any message
618       # that says an option was ignored.
619       if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
620         am_cv_$1_dependencies_compiler_type=$depmode
621         break
622       fi
623     fi
624   done
625
626   cd ..
627   rm -rf conftest.dir
628 else
629   am_cv_$1_dependencies_compiler_type=none
630 fi
631 ])
632 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
633 AM_CONDITIONAL([am__fastdep$1], [
634   test "x$enable_dependency_tracking" != xno \
635   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
636 ])
637
638
639 # AM_SET_DEPDIR
640 # -------------
641 # Choose a directory name for dependency files.
642 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
643 AC_DEFUN([AM_SET_DEPDIR],
644 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
645 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
646 ])
647
648
649 # AM_DEP_TRACK
650 # ------------
651 AC_DEFUN([AM_DEP_TRACK],
652 [AC_ARG_ENABLE(dependency-tracking,
653 [  --disable-dependency-tracking Speeds up one-time builds
654   --enable-dependency-tracking  Do not reject slow dependency extractors])
655 if test "x$enable_dependency_tracking" != xno; then
656   am_depcomp="$ac_aux_dir/depcomp"
657   AMDEPBACKSLASH='\'
658 fi
659 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
660 AC_SUBST([AMDEPBACKSLASH])
661 ])
662
663 # Generate code to set up dependency tracking.   -*- Autoconf -*-
664
665 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
666
667 # This program is free software; you can redistribute it and/or modify
668 # it under the terms of the GNU General Public License as published by
669 # the Free Software Foundation; either version 2, or (at your option)
670 # any later version.
671
672 # This program is distributed in the hope that it will be useful,
673 # but WITHOUT ANY WARRANTY; without even the implied warranty of
674 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
675 # GNU General Public License for more details.
676
677 # You should have received a copy of the GNU General Public License
678 # along with this program; if not, write to the Free Software
679 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
680 # 02111-1307, USA.
681
682 #serial 2
683
684 # _AM_OUTPUT_DEPENDENCY_COMMANDS
685 # ------------------------------
686 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
687 [for mf in $CONFIG_FILES; do
688   # Strip MF so we end up with the name of the file.
689   mf=`echo "$mf" | sed -e 's/:.*$//'`
690   # Check whether this is an Automake generated Makefile or not.
691   # We used to match only the files named `Makefile.in', but
692   # some people rename them; so instead we look at the file content.
693   # Grep'ing the first line is not enough: some people post-process
694   # each Makefile.in and add a new line on top of each file to say so.
695   # So let's grep whole file.
696   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
697     dirpart=`AS_DIRNAME("$mf")`
698   else
699     continue
700   fi
701   grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
702   # Extract the definition of DEP_FILES from the Makefile without
703   # running `make'.
704   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
705   test -z "$DEPDIR" && continue
706   # When using ansi2knr, U may be empty or an underscore; expand it
707   U=`sed -n -e '/^U = / s///p' < "$mf"`
708   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
709   # We invoke sed twice because it is the simplest approach to
710   # changing $(DEPDIR) to its actual value in the expansion.
711   for file in `sed -n -e '
712     /^DEP_FILES = .*\\\\$/ {
713       s/^DEP_FILES = //
714       :loop
715         s/\\\\$//
716         p
717         n
718         /\\\\$/ b loop
719       p
720     }
721     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
722        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
723     # Make sure the directory exists.
724     test -f "$dirpart/$file" && continue
725     fdir=`AS_DIRNAME(["$file"])`
726     AS_MKDIR_P([$dirpart/$fdir])
727     # echo "creating $dirpart/$file"
728     echo '# dummy' > "$dirpart/$file"
729   done
730 done
731 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
732
733
734 # AM_OUTPUT_DEPENDENCY_COMMANDS
735 # -----------------------------
736 # This macro should only be invoked once -- use via AC_REQUIRE.
737 #
738 # This code is only required when automatic dependency tracking
739 # is enabled.  FIXME.  This creates each `.P' file that we will
740 # need in order to bootstrap the dependency handling code.
741 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
742 [AC_CONFIG_COMMANDS([depfiles],
743      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
744      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
745 ])
746
747 # Check to see how 'make' treats includes.      -*- Autoconf -*-
748
749 # Copyright (C) 2001, 2002 Free Software Foundation, Inc.
750
751 # This program is free software; you can redistribute it and/or modify
752 # it under the terms of the GNU General Public License as published by
753 # the Free Software Foundation; either version 2, or (at your option)
754 # any later version.
755
756 # This program is distributed in the hope that it will be useful,
757 # but WITHOUT ANY WARRANTY; without even the implied warranty of
758 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
759 # GNU General Public License for more details.
760
761 # You should have received a copy of the GNU General Public License
762 # along with this program; if not, write to the Free Software
763 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
764 # 02111-1307, USA.
765
766 # serial 2
767
768 # AM_MAKE_INCLUDE()
769 # -----------------
770 # Check to see how make treats includes.
771 AC_DEFUN([AM_MAKE_INCLUDE],
772 [am_make=${MAKE-make}
773 cat > confinc << 'END'
774 doit:
775         @echo done
776 END
777 # If we don't find an include directive, just comment out the code.
778 AC_MSG_CHECKING([for style of include used by $am_make])
779 am__include="#"
780 am__quote=
781 _am_result=none
782 # First try GNU make style include.
783 echo "include confinc" > confmf
784 # We grep out `Entering directory' and `Leaving directory'
785 # messages which can occur if `w' ends up in MAKEFLAGS.
786 # In particular we don't look at `^make:' because GNU make might
787 # be invoked under some other name (usually "gmake"), in which
788 # case it prints its new name instead of `make'.
789 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
790    am__include=include
791    am__quote=
792    _am_result=GNU
793 fi
794 # Now try BSD make style include.
795 if test "$am__include" = "#"; then
796    echo '.include "confinc"' > confmf
797    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
798       am__include=.include
799       am__quote="\""
800       _am_result=BSD
801    fi
802 fi
803 AC_SUBST(am__include)
804 AC_SUBST(am__quote)
805 AC_MSG_RESULT($_am_result)
806 rm -f confinc confmf
807 ])
808
809 # AM_CONDITIONAL                                              -*- Autoconf -*-
810
811 # Copyright 1997, 2000, 2001 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 # serial 5
829
830 AC_PREREQ(2.52)
831
832 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
833 # -------------------------------------
834 # Define a conditional.
835 AC_DEFUN([AM_CONDITIONAL],
836 [ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
837         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
838 AC_SUBST([$1_TRUE])
839 AC_SUBST([$1_FALSE])
840 if $2; then
841   $1_TRUE=
842   $1_FALSE='#'
843 else
844   $1_TRUE='#'
845   $1_FALSE=
846 fi
847 AC_CONFIG_COMMANDS_PRE(
848 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
849   AC_MSG_ERROR([conditional "$1" was never defined.
850 Usually this means the macro was only invoked conditionally.])
851 fi])])
852
853 # Add --enable-maintainer-mode option to configure.
854 # From Jim Meyering
855
856 # Copyright 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
857
858 # This program is free software; you can redistribute it and/or modify
859 # it under the terms of the GNU General Public License as published by
860 # the Free Software Foundation; either version 2, or (at your option)
861 # any later version.
862
863 # This program is distributed in the hope that it will be useful,
864 # but WITHOUT ANY WARRANTY; without even the implied warranty of
865 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
866 # GNU General Public License for more details.
867
868 # You should have received a copy of the GNU General Public License
869 # along with this program; if not, write to the Free Software
870 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
871 # 02111-1307, USA.
872
873 # serial 2
874
875 AC_DEFUN([AM_MAINTAINER_MODE],
876 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
877   dnl maintainer-mode is disabled by default
878   AC_ARG_ENABLE(maintainer-mode,
879 [  --enable-maintainer-mode enable make rules and dependencies not useful
880                           (and sometimes confusing) to the casual installer],
881       USE_MAINTAINER_MODE=$enableval,
882       USE_MAINTAINER_MODE=no)
883   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
884   AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
885   MAINT=$MAINTAINER_MODE_TRUE
886   AC_SUBST(MAINT)dnl
887 ]
888 )
889
890 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
891
892 #serial 1
893 # This test replaces the one in autoconf.
894 # Currently this macro should have the same name as the autoconf macro
895 # because gettext's gettext.m4 (distributed in the automake package)
896 # still uses it.  Otherwise, the use in gettext.m4 makes autoheader
897 # give these diagnostics:
898 #   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
899 #   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
900
901 undefine([AC_ISC_POSIX])
902
903 AC_DEFUN([AC_ISC_POSIX],
904   [
905     dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
906     AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
907   ]
908 )
909
910
911 # Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
912
913 # This program is free software; you can redistribute it and/or modify
914 # it under the terms of the GNU General Public License as published by
915 # the Free Software Foundation; either version 2, or (at your option)
916 # any later version.
917
918 # This program is distributed in the hope that it will be useful,
919 # but WITHOUT ANY WARRANTY; without even the implied warranty of
920 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
921 # GNU General Public License for more details.
922
923 # You should have received a copy of the GNU General Public License
924 # along with this program; if not, write to the Free Software
925 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
926 # 02111-1307, USA.
927
928 # serial 3
929
930 AC_PREREQ(2.50)
931
932 # AM_PROG_LEX
933 # -----------
934 # Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
935 # "missing" invocation, for better error output.
936 AC_DEFUN([AM_PROG_LEX],
937 [AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
938 AC_REQUIRE([AC_PROG_LEX])dnl
939 if test "$LEX" = :; then
940   LEX=${am_missing_run}flex
941 fi])
942
943
944 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
945 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
946 dnl also defines GSTUFF_PKG_ERRORS on error
947 AC_DEFUN(PKG_CHECK_MODULES, [
948   succeeded=no
949
950   if test -z "$PKG_CONFIG"; then
951     AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
952   fi
953
954   if test "$PKG_CONFIG" = "no" ; then
955      echo "*** The pkg-config script could not be found. Make sure it is"
956      echo "*** in your path, or set the PKG_CONFIG environment variable"
957      echo "*** to the full path to pkg-config."
958      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
959   else
960      PKG_CONFIG_MIN_VERSION=0.9.0
961      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
962         AC_MSG_CHECKING(for $2)
963
964         if $PKG_CONFIG --exists "$2" ; then
965             AC_MSG_RESULT(yes)
966             succeeded=yes
967
968             AC_MSG_CHECKING($1_CFLAGS)
969             $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
970             AC_MSG_RESULT($$1_CFLAGS)
971
972             AC_MSG_CHECKING($1_LIBS)
973             $1_LIBS=`$PKG_CONFIG --libs "$2"`
974             AC_MSG_RESULT($$1_LIBS)
975         else
976             $1_CFLAGS=""
977             $1_LIBS=""
978             ## If we have a custom action on failure, don't print errors, but 
979             ## do set a variable so people can do so.
980             $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
981             ifelse([$4], ,echo $$1_PKG_ERRORS,)
982         fi
983
984         AC_SUBST($1_CFLAGS)
985         AC_SUBST($1_LIBS)
986      else
987         echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
988         echo "*** See http://www.freedesktop.org/software/pkgconfig"
989      fi
990   fi
991
992   if test $succeeded = yes; then
993      ifelse([$3], , :, [$3])
994   else
995      ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
996   fi
997 ])
998
999
1000