Update debian/changelog for new version
[fmit.git] / aclocal.m4
1 # generated automatically by aclocal 1.9.6 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005  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 Configure Paths for Alsa
15 dnl Some modifications by Richard Boulton <richard-alsa@tartarus.org>
16 dnl Christopher Lansdown <lansdoct@cs.alfred.edu>
17 dnl Jaroslav Kysela <perex@suse.cz>
18 dnl Last modification: $Id: alsa.m4,v 1.24 2004/09/15 18:48:07 tiwai Exp $
19 dnl AM_PATH_ALSA([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
20 dnl Test for libasound, and define ALSA_CFLAGS and ALSA_LIBS as appropriate.
21 dnl enables arguments --with-alsa-prefix=
22 dnl                   --with-alsa-enc-prefix=
23 dnl                   --disable-alsatest
24 dnl
25 dnl For backwards compatibility, if ACTION_IF_NOT_FOUND is not specified,
26 dnl and the alsa libraries are not found, a fatal AC_MSG_ERROR() will result.
27 dnl
28 AC_DEFUN([AM_PATH_ALSA],
29 [dnl Save the original CFLAGS, LDFLAGS, and LIBS
30 alsa_save_CFLAGS="$CFLAGS"
31 alsa_save_LDFLAGS="$LDFLAGS"
32 alsa_save_LIBS="$LIBS"
33 alsa_found=yes
34
35 dnl
36 dnl Get the cflags and libraries for alsa
37 dnl
38 AC_ARG_WITH(alsa-prefix,
39 [  --with-alsa-prefix=PFX  Prefix where Alsa library is installed(optional)],
40 [alsa_prefix="$withval"], [alsa_prefix=""])
41
42 AC_ARG_WITH(alsa-inc-prefix,
43 [  --with-alsa-inc-prefix=PFX  Prefix where include libraries are (optional)],
44 [alsa_inc_prefix="$withval"], [alsa_inc_prefix=""])
45
46 dnl FIXME: this is not yet implemented
47 AC_ARG_ENABLE(alsatest,
48 [  --disable-alsatest      Do not try to compile and run a test Alsa program],
49 [enable_alsatest="$enableval"],
50 [enable_alsatest=yes])
51
52 dnl Add any special include directories
53 AC_MSG_CHECKING(for ALSA CFLAGS)
54 if test "$alsa_inc_prefix" != "" ; then
55         ALSA_CFLAGS="$ALSA_CFLAGS -I$alsa_inc_prefix"
56         CFLAGS="$CFLAGS -I$alsa_inc_prefix"
57 fi
58 AC_MSG_RESULT($ALSA_CFLAGS)
59
60 dnl add any special lib dirs
61 AC_MSG_CHECKING(for ALSA LDFLAGS)
62 if test "$alsa_prefix" != "" ; then
63         ALSA_LIBS="$ALSA_LIBS -L$alsa_prefix"
64         LDFLAGS="$LDFLAGS $ALSA_LIBS"
65 fi
66
67 dnl add the alsa library
68 ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread"
69 LIBS="$ALSA_LIBS $LIBS"
70 AC_MSG_RESULT($ALSA_LIBS)
71
72 dnl Check for a working version of libasound that is of the right version.
73 min_alsa_version=ifelse([$1], ,0.1.1,$1)
74 AC_MSG_CHECKING(for libasound headers version >= $min_alsa_version)
75 no_alsa=""
76     alsa_min_major_version=`echo $min_alsa_version | \
77            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
78     alsa_min_minor_version=`echo $min_alsa_version | \
79            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
80     alsa_min_micro_version=`echo $min_alsa_version | \
81            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
82
83 AC_LANG_SAVE
84 AC_LANG_C
85 AC_TRY_COMPILE([
86 #include <alsa/asoundlib.h>
87 ], [
88 /* ensure backward compatibility */
89 #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
90 #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
91 #endif
92 #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
93 #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
94 #endif
95 #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
96 #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
97 #endif
98
99 #  if(SND_LIB_MAJOR > $alsa_min_major_version)
100   exit(0);
101 #  else
102 #    if(SND_LIB_MAJOR < $alsa_min_major_version)
103 #       error not present
104 #    endif
105
106 #   if(SND_LIB_MINOR > $alsa_min_minor_version)
107   exit(0);
108 #   else
109 #     if(SND_LIB_MINOR < $alsa_min_minor_version)
110 #          error not present
111 #      endif
112
113 #      if(SND_LIB_SUBMINOR < $alsa_min_micro_version)
114 #        error not present
115 #      endif
116 #    endif
117 #  endif
118 exit(0);
119 ],
120   [AC_MSG_RESULT(found.)],
121   [AC_MSG_RESULT(not present.)
122    ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libasound not found.)])
123    alsa_found=no]
124 )
125 AC_LANG_RESTORE
126
127 dnl Now that we know that we have the right version, let's see if we have the library and not just the headers.
128 if test "x$enable_alsatest" = "xyes"; then
129 AC_CHECK_LIB([asound], [snd_ctl_open],,
130         [ifelse([$3], , [AC_MSG_ERROR(No linkable libasound was found.)])
131          alsa_found=no]
132 )
133 fi
134
135 if test "x$alsa_found" = "xyes" ; then
136    ifelse([$2], , :, [$2])
137    LIBS=`echo $LIBS | sed 's/-lasound//g'`
138    LIBS=`echo $LIBS | sed 's/  //'`
139    LIBS="-lasound $LIBS"
140 fi
141 if test "x$alsa_found" = "xno" ; then
142    ifelse([$3], , :, [$3])
143    CFLAGS="$alsa_save_CFLAGS"
144    LDFLAGS="$alsa_save_LDFLAGS"
145    LIBS="$alsa_save_LIBS"
146    ALSA_CFLAGS=""
147    ALSA_LIBS=""
148 fi
149
150 dnl That should be it.  Now just export out symbols:
151 AC_SUBST(ALSA_CFLAGS)
152 AC_SUBST(ALSA_LIBS)
153 ])
154
155
156 # Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
157 #
158 # This file is free software; the Free Software Foundation
159 # gives unlimited permission to copy and/or distribute it,
160 # with or without modifications, as long as this notice is preserved.
161
162 # AM_AUTOMAKE_VERSION(VERSION)
163 # ----------------------------
164 # Automake X.Y traces this macro to ensure aclocal.m4 has been
165 # generated from the m4 files accompanying Automake X.Y.
166 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
167
168 # AM_SET_CURRENT_AUTOMAKE_VERSION
169 # -------------------------------
170 # Call AM_AUTOMAKE_VERSION so it can be traced.
171 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
172 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
173          [AM_AUTOMAKE_VERSION([1.9.6])])
174
175 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
176
177 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
178 #
179 # This file is free software; the Free Software Foundation
180 # gives unlimited permission to copy and/or distribute it,
181 # with or without modifications, as long as this notice is preserved.
182
183 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
184 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
185 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
186 #
187 # Of course, Automake must honor this variable whenever it calls a
188 # tool from the auxiliary directory.  The problem is that $srcdir (and
189 # therefore $ac_aux_dir as well) can be either absolute or relative,
190 # depending on how configure is run.  This is pretty annoying, since
191 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
192 # source directory, any form will work fine, but in subdirectories a
193 # relative path needs to be adjusted first.
194 #
195 # $ac_aux_dir/missing
196 #    fails when called from a subdirectory if $ac_aux_dir is relative
197 # $top_srcdir/$ac_aux_dir/missing
198 #    fails if $ac_aux_dir is absolute,
199 #    fails when called from a subdirectory in a VPATH build with
200 #          a relative $ac_aux_dir
201 #
202 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
203 # are both prefixed by $srcdir.  In an in-source build this is usually
204 # harmless because $srcdir is `.', but things will broke when you
205 # start a VPATH build or use an absolute $srcdir.
206 #
207 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
208 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
209 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
210 # and then we would define $MISSING as
211 #   MISSING="\${SHELL} $am_aux_dir/missing"
212 # This will work as long as MISSING is not called from configure, because
213 # unfortunately $(top_srcdir) has no meaning in configure.
214 # However there are other variables, like CC, which are often used in
215 # configure, and could therefore not use this "fixed" $ac_aux_dir.
216 #
217 # Another solution, used here, is to always expand $ac_aux_dir to an
218 # absolute PATH.  The drawback is that using absolute paths prevent a
219 # configured tree to be moved without reconfiguration.
220
221 AC_DEFUN([AM_AUX_DIR_EXPAND],
222 [dnl Rely on autoconf to set up CDPATH properly.
223 AC_PREREQ([2.50])dnl
224 # expand $ac_aux_dir to an absolute path
225 am_aux_dir=`cd $ac_aux_dir && pwd`
226 ])
227
228 # AM_CONDITIONAL                                            -*- Autoconf -*-
229
230 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
231 # Free Software Foundation, Inc.
232 #
233 # This file is free software; the Free Software Foundation
234 # gives unlimited permission to copy and/or distribute it,
235 # with or without modifications, as long as this notice is preserved.
236
237 # serial 7
238
239 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
240 # -------------------------------------
241 # Define a conditional.
242 AC_DEFUN([AM_CONDITIONAL],
243 [AC_PREREQ(2.52)dnl
244  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
245         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
246 AC_SUBST([$1_TRUE])
247 AC_SUBST([$1_FALSE])
248 if $2; then
249   $1_TRUE=
250   $1_FALSE='#'
251 else
252   $1_TRUE='#'
253   $1_FALSE=
254 fi
255 AC_CONFIG_COMMANDS_PRE(
256 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
257   AC_MSG_ERROR([[conditional "$1" was never defined.
258 Usually this means the macro was only invoked conditionally.]])
259 fi])])
260
261
262 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
263 # Free Software Foundation, Inc.
264 #
265 # This file is free software; the Free Software Foundation
266 # gives unlimited permission to copy and/or distribute it,
267 # with or without modifications, as long as this notice is preserved.
268
269 # serial 8
270
271 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
272 # written in clear, in which case automake, when reading aclocal.m4,
273 # will think it sees a *use*, and therefore will trigger all it's
274 # C support machinery.  Also note that it means that autoscan, seeing
275 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
276
277
278 # _AM_DEPENDENCIES(NAME)
279 # ----------------------
280 # See how the compiler implements dependency checking.
281 # NAME is "CC", "CXX", "GCJ", or "OBJC".
282 # We try a few techniques and use that to set a single cache variable.
283 #
284 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
285 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
286 # dependency, and given that the user is not expected to run this macro,
287 # just rely on AC_PROG_CC.
288 AC_DEFUN([_AM_DEPENDENCIES],
289 [AC_REQUIRE([AM_SET_DEPDIR])dnl
290 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
291 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
292 AC_REQUIRE([AM_DEP_TRACK])dnl
293
294 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
295        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
296        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
297        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
298                    [depcc="$$1"   am_compiler_list=])
299
300 AC_CACHE_CHECK([dependency style of $depcc],
301                [am_cv_$1_dependencies_compiler_type],
302 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
303   # We make a subdir and do the tests there.  Otherwise we can end up
304   # making bogus files that we don't know about and never remove.  For
305   # instance it was reported that on HP-UX the gcc test will end up
306   # making a dummy file named `D' -- because `-MD' means `put the output
307   # in D'.
308   mkdir conftest.dir
309   # Copy depcomp to subdir because otherwise we won't find it if we're
310   # using a relative directory.
311   cp "$am_depcomp" conftest.dir
312   cd conftest.dir
313   # We will build objects and dependencies in a subdirectory because
314   # it helps to detect inapplicable dependency modes.  For instance
315   # both Tru64's cc and ICC support -MD to output dependencies as a
316   # side effect of compilation, but ICC will put the dependencies in
317   # the current directory while Tru64 will put them in the object
318   # directory.
319   mkdir sub
320
321   am_cv_$1_dependencies_compiler_type=none
322   if test "$am_compiler_list" = ""; then
323      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
324   fi
325   for depmode in $am_compiler_list; do
326     # Setup a source with many dependencies, because some compilers
327     # like to wrap large dependency lists on column 80 (with \), and
328     # we should not choose a depcomp mode which is confused by this.
329     #
330     # We need to recreate these files for each test, as the compiler may
331     # overwrite some of them when testing with obscure command lines.
332     # This happens at least with the AIX C compiler.
333     : > sub/conftest.c
334     for i in 1 2 3 4 5 6; do
335       echo '#include "conftst'$i'.h"' >> sub/conftest.c
336       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
337       # Solaris 8's {/usr,}/bin/sh.
338       touch sub/conftst$i.h
339     done
340     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
341
342     case $depmode in
343     nosideeffect)
344       # after this tag, mechanisms are not by side-effect, so they'll
345       # only be used when explicitly requested
346       if test "x$enable_dependency_tracking" = xyes; then
347         continue
348       else
349         break
350       fi
351       ;;
352     none) break ;;
353     esac
354     # We check with `-c' and `-o' for the sake of the "dashmstdout"
355     # mode.  It turns out that the SunPro C++ compiler does not properly
356     # handle `-M -o', and we need to detect this.
357     if depmode=$depmode \
358        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
359        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
360        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
361          >/dev/null 2>conftest.err &&
362        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
363        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
364        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
365       # icc doesn't choke on unknown options, it will just issue warnings
366       # or remarks (even with -Werror).  So we grep stderr for any message
367       # that says an option was ignored or not supported.
368       # When given -MP, icc 7.0 and 7.1 complain thusly:
369       #   icc: Command line warning: ignoring option '-M'; no argument required
370       # The diagnosis changed in icc 8.0:
371       #   icc: Command line remark: option '-MP' not supported
372       if (grep 'ignoring option' conftest.err ||
373           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
374         am_cv_$1_dependencies_compiler_type=$depmode
375         break
376       fi
377     fi
378   done
379
380   cd ..
381   rm -rf conftest.dir
382 else
383   am_cv_$1_dependencies_compiler_type=none
384 fi
385 ])
386 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
387 AM_CONDITIONAL([am__fastdep$1], [
388   test "x$enable_dependency_tracking" != xno \
389   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
390 ])
391
392
393 # AM_SET_DEPDIR
394 # -------------
395 # Choose a directory name for dependency files.
396 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
397 AC_DEFUN([AM_SET_DEPDIR],
398 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
399 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
400 ])
401
402
403 # AM_DEP_TRACK
404 # ------------
405 AC_DEFUN([AM_DEP_TRACK],
406 [AC_ARG_ENABLE(dependency-tracking,
407 [  --disable-dependency-tracking  speeds up one-time build
408   --enable-dependency-tracking   do not reject slow dependency extractors])
409 if test "x$enable_dependency_tracking" != xno; then
410   am_depcomp="$ac_aux_dir/depcomp"
411   AMDEPBACKSLASH='\'
412 fi
413 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
414 AC_SUBST([AMDEPBACKSLASH])
415 ])
416
417 # Generate code to set up dependency tracking.              -*- Autoconf -*-
418
419 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
420 # Free Software Foundation, Inc.
421 #
422 # This file is free software; the Free Software Foundation
423 # gives unlimited permission to copy and/or distribute it,
424 # with or without modifications, as long as this notice is preserved.
425
426 #serial 3
427
428 # _AM_OUTPUT_DEPENDENCY_COMMANDS
429 # ------------------------------
430 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
431 [for mf in $CONFIG_FILES; do
432   # Strip MF so we end up with the name of the file.
433   mf=`echo "$mf" | sed -e 's/:.*$//'`
434   # Check whether this is an Automake generated Makefile or not.
435   # We used to match only the files named `Makefile.in', but
436   # some people rename them; so instead we look at the file content.
437   # Grep'ing the first line is not enough: some people post-process
438   # each Makefile.in and add a new line on top of each file to say so.
439   # So let's grep whole file.
440   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
441     dirpart=`AS_DIRNAME("$mf")`
442   else
443     continue
444   fi
445   # Extract the definition of DEPDIR, am__include, and am__quote
446   # from the Makefile without running `make'.
447   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
448   test -z "$DEPDIR" && continue
449   am__include=`sed -n 's/^am__include = //p' < "$mf"`
450   test -z "am__include" && continue
451   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
452   # When using ansi2knr, U may be empty or an underscore; expand it
453   U=`sed -n 's/^U = //p' < "$mf"`
454   # Find all dependency output files, they are included files with
455   # $(DEPDIR) in their names.  We invoke sed twice because it is the
456   # simplest approach to changing $(DEPDIR) to its actual value in the
457   # expansion.
458   for file in `sed -n "
459     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
460        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
461     # Make sure the directory exists.
462     test -f "$dirpart/$file" && continue
463     fdir=`AS_DIRNAME(["$file"])`
464     AS_MKDIR_P([$dirpart/$fdir])
465     # echo "creating $dirpart/$file"
466     echo '# dummy' > "$dirpart/$file"
467   done
468 done
469 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
470
471
472 # AM_OUTPUT_DEPENDENCY_COMMANDS
473 # -----------------------------
474 # This macro should only be invoked once -- use via AC_REQUIRE.
475 #
476 # This code is only required when automatic dependency tracking
477 # is enabled.  FIXME.  This creates each `.P' file that we will
478 # need in order to bootstrap the dependency handling code.
479 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
480 [AC_CONFIG_COMMANDS([depfiles],
481      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
482      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
483 ])
484
485 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
486 # Free Software Foundation, Inc.
487 #
488 # This file is free software; the Free Software Foundation
489 # gives unlimited permission to copy and/or distribute it,
490 # with or without modifications, as long as this notice is preserved.
491
492 # serial 8
493
494 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
495 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
496
497 # Do all the work for Automake.                             -*- Autoconf -*-
498
499 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
500 # Free Software Foundation, Inc.
501 #
502 # This file is free software; the Free Software Foundation
503 # gives unlimited permission to copy and/or distribute it,
504 # with or without modifications, as long as this notice is preserved.
505
506 # serial 12
507
508 # This macro actually does too much.  Some checks are only needed if
509 # your package does certain things.  But this isn't really a big deal.
510
511 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
512 # AM_INIT_AUTOMAKE([OPTIONS])
513 # -----------------------------------------------
514 # The call with PACKAGE and VERSION arguments is the old style
515 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
516 # and VERSION should now be passed to AC_INIT and removed from
517 # the call to AM_INIT_AUTOMAKE.
518 # We support both call styles for the transition.  After
519 # the next Automake release, Autoconf can make the AC_INIT
520 # arguments mandatory, and then we can depend on a new Autoconf
521 # release and drop the old call support.
522 AC_DEFUN([AM_INIT_AUTOMAKE],
523 [AC_PREREQ([2.58])dnl
524 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
525 dnl the ones we care about.
526 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
527 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
528 AC_REQUIRE([AC_PROG_INSTALL])dnl
529 # test to see if srcdir already configured
530 if test "`cd $srcdir && pwd`" != "`pwd`" &&
531    test -f $srcdir/config.status; then
532   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
533 fi
534
535 # test whether we have cygpath
536 if test -z "$CYGPATH_W"; then
537   if (cygpath --version) >/dev/null 2>/dev/null; then
538     CYGPATH_W='cygpath -w'
539   else
540     CYGPATH_W=echo
541   fi
542 fi
543 AC_SUBST([CYGPATH_W])
544
545 # Define the identity of the package.
546 dnl Distinguish between old-style and new-style calls.
547 m4_ifval([$2],
548 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
549  AC_SUBST([PACKAGE], [$1])dnl
550  AC_SUBST([VERSION], [$2])],
551 [_AM_SET_OPTIONS([$1])dnl
552  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
553  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
554
555 _AM_IF_OPTION([no-define],,
556 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
557  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
558
559 # Some tools Automake needs.
560 AC_REQUIRE([AM_SANITY_CHECK])dnl
561 AC_REQUIRE([AC_ARG_PROGRAM])dnl
562 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
563 AM_MISSING_PROG(AUTOCONF, autoconf)
564 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
565 AM_MISSING_PROG(AUTOHEADER, autoheader)
566 AM_MISSING_PROG(MAKEINFO, makeinfo)
567 AM_PROG_INSTALL_SH
568 AM_PROG_INSTALL_STRIP
569 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
570 # We need awk for the "check" target.  The system "awk" is bad on
571 # some platforms.
572 AC_REQUIRE([AC_PROG_AWK])dnl
573 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
574 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
575 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
576               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
577                              [_AM_PROG_TAR([v7])])])
578 _AM_IF_OPTION([no-dependencies],,
579 [AC_PROVIDE_IFELSE([AC_PROG_CC],
580                   [_AM_DEPENDENCIES(CC)],
581                   [define([AC_PROG_CC],
582                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
583 AC_PROVIDE_IFELSE([AC_PROG_CXX],
584                   [_AM_DEPENDENCIES(CXX)],
585                   [define([AC_PROG_CXX],
586                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
587 ])
588 ])
589
590
591 # When config.status generates a header, we must update the stamp-h file.
592 # This file resides in the same directory as the config header
593 # that is generated.  The stamp files are numbered to have different names.
594
595 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
596 # loop where config.status creates the headers, so we can generate
597 # our stamp files there.
598 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
599 [# Compute $1's index in $config_headers.
600 _am_stamp_count=1
601 for _am_header in $config_headers :; do
602   case $_am_header in
603     $1 | $1:* )
604       break ;;
605     * )
606       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
607   esac
608 done
609 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
610
611 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
612 #
613 # This file is free software; the Free Software Foundation
614 # gives unlimited permission to copy and/or distribute it,
615 # with or without modifications, as long as this notice is preserved.
616
617 # AM_PROG_INSTALL_SH
618 # ------------------
619 # Define $install_sh.
620 AC_DEFUN([AM_PROG_INSTALL_SH],
621 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
622 install_sh=${install_sh-"$am_aux_dir/install-sh"}
623 AC_SUBST(install_sh)])
624
625 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
626 #
627 # This file is free software; the Free Software Foundation
628 # gives unlimited permission to copy and/or distribute it,
629 # with or without modifications, as long as this notice is preserved.
630
631 # serial 2
632
633 # Check whether the underlying file-system supports filenames
634 # with a leading dot.  For instance MS-DOS doesn't.
635 AC_DEFUN([AM_SET_LEADING_DOT],
636 [rm -rf .tst 2>/dev/null
637 mkdir .tst 2>/dev/null
638 if test -d .tst; then
639   am__leading_dot=.
640 else
641   am__leading_dot=_
642 fi
643 rmdir .tst 2>/dev/null
644 AC_SUBST([am__leading_dot])])
645
646 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
647
648 # Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
649 #
650 # This file is free software; the Free Software Foundation
651 # gives unlimited permission to copy and/or distribute it,
652 # with or without modifications, as long as this notice is preserved.
653
654 # serial 3
655
656 # AM_MAKE_INCLUDE()
657 # -----------------
658 # Check to see how make treats includes.
659 AC_DEFUN([AM_MAKE_INCLUDE],
660 [am_make=${MAKE-make}
661 cat > confinc << 'END'
662 am__doit:
663         @echo done
664 .PHONY: am__doit
665 END
666 # If we don't find an include directive, just comment out the code.
667 AC_MSG_CHECKING([for style of include used by $am_make])
668 am__include="#"
669 am__quote=
670 _am_result=none
671 # First try GNU make style include.
672 echo "include confinc" > confmf
673 # We grep out `Entering directory' and `Leaving directory'
674 # messages which can occur if `w' ends up in MAKEFLAGS.
675 # In particular we don't look at `^make:' because GNU make might
676 # be invoked under some other name (usually "gmake"), in which
677 # case it prints its new name instead of `make'.
678 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
679    am__include=include
680    am__quote=
681    _am_result=GNU
682 fi
683 # Now try BSD make style include.
684 if test "$am__include" = "#"; then
685    echo '.include "confinc"' > confmf
686    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
687       am__include=.include
688       am__quote="\""
689       _am_result=BSD
690    fi
691 fi
692 AC_SUBST([am__include])
693 AC_SUBST([am__quote])
694 AC_MSG_RESULT([$_am_result])
695 rm -f confinc confmf
696 ])
697
698 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
699
700 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
701 # Free Software Foundation, Inc.
702 #
703 # This file is free software; the Free Software Foundation
704 # gives unlimited permission to copy and/or distribute it,
705 # with or without modifications, as long as this notice is preserved.
706
707 # serial 4
708
709 # AM_MISSING_PROG(NAME, PROGRAM)
710 # ------------------------------
711 AC_DEFUN([AM_MISSING_PROG],
712 [AC_REQUIRE([AM_MISSING_HAS_RUN])
713 $1=${$1-"${am_missing_run}$2"}
714 AC_SUBST($1)])
715
716
717 # AM_MISSING_HAS_RUN
718 # ------------------
719 # Define MISSING if not defined so far and test if it supports --run.
720 # If it does, set am_missing_run to use it, otherwise, to nothing.
721 AC_DEFUN([AM_MISSING_HAS_RUN],
722 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
723 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
724 # Use eval to expand $SHELL
725 if eval "$MISSING --run true"; then
726   am_missing_run="$MISSING --run "
727 else
728   am_missing_run=
729   AC_MSG_WARN([`missing' script is too old or missing])
730 fi
731 ])
732
733 # Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
734 #
735 # This file is free software; the Free Software Foundation
736 # gives unlimited permission to copy and/or distribute it,
737 # with or without modifications, as long as this notice is preserved.
738
739 # AM_PROG_MKDIR_P
740 # ---------------
741 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
742 #
743 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
744 # created by `make install' are always world readable, even if the
745 # installer happens to have an overly restrictive umask (e.g. 077).
746 # This was a mistake.  There are at least two reasons why we must not
747 # use `-m 0755':
748 #   - it causes special bits like SGID to be ignored,
749 #   - it may be too restrictive (some setups expect 775 directories).
750 #
751 # Do not use -m 0755 and let people choose whatever they expect by
752 # setting umask.
753 #
754 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
755 # Some implementations (such as Solaris 8's) are not thread-safe: if a
756 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
757 # concurrently, both version can detect that a/ is missing, but only
758 # one can create it and the other will error out.  Consequently we
759 # restrict ourselves to GNU make (using the --version option ensures
760 # this.)
761 AC_DEFUN([AM_PROG_MKDIR_P],
762 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
763   # We used to keeping the `.' as first argument, in order to
764   # allow $(mkdir_p) to be used without argument.  As in
765   #   $(mkdir_p) $(somedir)
766   # where $(somedir) is conditionally defined.  However this is wrong
767   # for two reasons:
768   #  1. if the package is installed by a user who cannot write `.'
769   #     make install will fail,
770   #  2. the above comment should most certainly read
771   #     $(mkdir_p) $(DESTDIR)$(somedir)
772   #     so it does not work when $(somedir) is undefined and
773   #     $(DESTDIR) is not.
774   #  To support the latter case, we have to write
775   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
776   #  so the `.' trick is pointless.
777   mkdir_p='mkdir -p --'
778 else
779   # On NextStep and OpenStep, the `mkdir' command does not
780   # recognize any option.  It will interpret all options as
781   # directories to create, and then abort because `.' already
782   # exists.
783   for d in ./-p ./--version;
784   do
785     test -d $d && rmdir $d
786   done
787   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
788   if test -f "$ac_aux_dir/mkinstalldirs"; then
789     mkdir_p='$(mkinstalldirs)'
790   else
791     mkdir_p='$(install_sh) -d'
792   fi
793 fi
794 AC_SUBST([mkdir_p])])
795
796 # Helper functions for option handling.                     -*- Autoconf -*-
797
798 # Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
799 #
800 # This file is free software; the Free Software Foundation
801 # gives unlimited permission to copy and/or distribute it,
802 # with or without modifications, as long as this notice is preserved.
803
804 # serial 3
805
806 # _AM_MANGLE_OPTION(NAME)
807 # -----------------------
808 AC_DEFUN([_AM_MANGLE_OPTION],
809 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
810
811 # _AM_SET_OPTION(NAME)
812 # ------------------------------
813 # Set option NAME.  Presently that only means defining a flag for this option.
814 AC_DEFUN([_AM_SET_OPTION],
815 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
816
817 # _AM_SET_OPTIONS(OPTIONS)
818 # ----------------------------------
819 # OPTIONS is a space-separated list of Automake options.
820 AC_DEFUN([_AM_SET_OPTIONS],
821 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
822
823 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
824 # -------------------------------------------
825 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
826 AC_DEFUN([_AM_IF_OPTION],
827 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
828
829 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
830
831 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
832 # Free Software Foundation, Inc.
833 #
834 # This file is free software; the Free Software Foundation
835 # gives unlimited permission to copy and/or distribute it,
836 # with or without modifications, as long as this notice is preserved.
837
838 # serial 4
839
840 # AM_SANITY_CHECK
841 # ---------------
842 AC_DEFUN([AM_SANITY_CHECK],
843 [AC_MSG_CHECKING([whether build environment is sane])
844 # Just in case
845 sleep 1
846 echo timestamp > conftest.file
847 # Do `set' in a subshell so we don't clobber the current shell's
848 # arguments.  Must try -L first in case configure is actually a
849 # symlink; some systems play weird games with the mod time of symlinks
850 # (eg FreeBSD returns the mod time of the symlink's containing
851 # directory).
852 if (
853    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
854    if test "$[*]" = "X"; then
855       # -L didn't work.
856       set X `ls -t $srcdir/configure conftest.file`
857    fi
858    rm -f conftest.file
859    if test "$[*]" != "X $srcdir/configure conftest.file" \
860       && test "$[*]" != "X conftest.file $srcdir/configure"; then
861
862       # If neither matched, then we have a broken ls.  This can happen
863       # if, for instance, CONFIG_SHELL is bash and it inherits a
864       # broken ls alias from the environment.  This has actually
865       # happened.  Such a system could not be considered "sane".
866       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
867 alias in your environment])
868    fi
869
870    test "$[2]" = conftest.file
871    )
872 then
873    # Ok.
874    :
875 else
876    AC_MSG_ERROR([newly created file is older than distributed files!
877 Check your system clock])
878 fi
879 AC_MSG_RESULT(yes)])
880
881 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
882 #
883 # This file is free software; the Free Software Foundation
884 # gives unlimited permission to copy and/or distribute it,
885 # with or without modifications, as long as this notice is preserved.
886
887 # AM_PROG_INSTALL_STRIP
888 # ---------------------
889 # One issue with vendor `install' (even GNU) is that you can't
890 # specify the program used to strip binaries.  This is especially
891 # annoying in cross-compiling environments, where the build's strip
892 # is unlikely to handle the host's binaries.
893 # Fortunately install-sh will honor a STRIPPROG variable, so we
894 # always use install-sh in `make install-strip', and initialize
895 # STRIPPROG with the value of the STRIP variable (set by the user).
896 AC_DEFUN([AM_PROG_INSTALL_STRIP],
897 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
898 # Installed binaries are usually stripped using `strip' when the user
899 # run `make install-strip'.  However `strip' might not be the right
900 # tool to use in cross-compilation environments, therefore Automake
901 # will honor the `STRIP' environment variable to overrule this program.
902 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
903 if test "$cross_compiling" != no; then
904   AC_CHECK_TOOL([STRIP], [strip], :)
905 fi
906 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
907 AC_SUBST([INSTALL_STRIP_PROGRAM])])
908
909 # Check how to create a tarball.                            -*- Autoconf -*-
910
911 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
912 #
913 # This file is free software; the Free Software Foundation
914 # gives unlimited permission to copy and/or distribute it,
915 # with or without modifications, as long as this notice is preserved.
916
917 # serial 2
918
919 # _AM_PROG_TAR(FORMAT)
920 # --------------------
921 # Check how to create a tarball in format FORMAT.
922 # FORMAT should be one of `v7', `ustar', or `pax'.
923 #
924 # Substitute a variable $(am__tar) that is a command
925 # writing to stdout a FORMAT-tarball containing the directory
926 # $tardir.
927 #     tardir=directory && $(am__tar) > result.tar
928 #
929 # Substitute a variable $(am__untar) that extract such
930 # a tarball read from stdin.
931 #     $(am__untar) < result.tar
932 AC_DEFUN([_AM_PROG_TAR],
933 [# Always define AMTAR for backward compatibility.
934 AM_MISSING_PROG([AMTAR], [tar])
935 m4_if([$1], [v7],
936      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
937      [m4_case([$1], [ustar],, [pax],,
938               [m4_fatal([Unknown tar format])])
939 AC_MSG_CHECKING([how to create a $1 tar archive])
940 # Loop over all known methods to create a tar archive until one works.
941 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
942 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
943 # Do not fold the above two line into one, because Tru64 sh and
944 # Solaris sh will not grok spaces in the rhs of `-'.
945 for _am_tool in $_am_tools
946 do
947   case $_am_tool in
948   gnutar)
949     for _am_tar in tar gnutar gtar;
950     do
951       AM_RUN_LOG([$_am_tar --version]) && break
952     done
953     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
954     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
955     am__untar="$_am_tar -xf -"
956     ;;
957   plaintar)
958     # Must skip GNU tar: if it does not support --format= it doesn't create
959     # ustar tarball either.
960     (tar --version) >/dev/null 2>&1 && continue
961     am__tar='tar chf - "$$tardir"'
962     am__tar_='tar chf - "$tardir"'
963     am__untar='tar xf -'
964     ;;
965   pax)
966     am__tar='pax -L -x $1 -w "$$tardir"'
967     am__tar_='pax -L -x $1 -w "$tardir"'
968     am__untar='pax -r'
969     ;;
970   cpio)
971     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
972     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
973     am__untar='cpio -i -H $1 -d'
974     ;;
975   none)
976     am__tar=false
977     am__tar_=false
978     am__untar=false
979     ;;
980   esac
981
982   # If the value was cached, stop now.  We just wanted to have am__tar
983   # and am__untar set.
984   test -n "${am_cv_prog_tar_$1}" && break
985
986   # tar/untar a dummy directory, and stop if the command works
987   rm -rf conftest.dir
988   mkdir conftest.dir
989   echo GrepMe > conftest.dir/file
990   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
991   rm -rf conftest.dir
992   if test -s conftest.tar; then
993     AM_RUN_LOG([$am__untar <conftest.tar])
994     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
995   fi
996 done
997 rm -rf conftest.dir
998
999 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1000 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1001 AC_SUBST([am__tar])
1002 AC_SUBST([am__untar])
1003 ]) # _AM_PROG_TAR
1004
1005 m4_include([m4/ac_cxx_exceptions.m4])
1006 m4_include([m4/ac_cxx_have_complex.m4])
1007 m4_include([m4/ac_cxx_have_numeric_limits.m4])
1008 m4_include([m4/ac_cxx_have_sstream.m4])
1009 m4_include([m4/ac_cxx_have_stl.m4])
1010 m4_include([m4/ac_cxx_namespaces.m4])
1011 m4_include([m4/ac_cxx_templates.m4])
1012 m4_include([m4/bnv_have_qt.m4])
1013 m4_include([m4/mdl_have_opengl.m4])