1 # generated automatically by aclocal 1.7.9 -*- Autoconf -*-
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.
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
14 # Do all the work for Automake. -*- Autoconf -*-
16 # This macro actually does too much some checks are only needed if
17 # your package does certain things. But this isn't really a big deal.
19 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
20 # Free Software Foundation, Inc.
22 # This program is free software; you can redistribute it and/or modify
23 # it under the terms of the GNU General Public License as published by
24 # the Free Software Foundation; either version 2, or (at your option)
27 # This program is distributed in the hope that it will be useful,
28 # but WITHOUT ANY WARRANTY; without even the implied warranty of
29 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 # GNU General Public License for more details.
32 # You should have received a copy of the GNU General Public License
33 # along with this program; if not, write to the Free Software
34 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
41 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
42 # the ones we care about.
43 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
45 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
46 # AM_INIT_AUTOMAKE([OPTIONS])
47 # -----------------------------------------------
48 # The call with PACKAGE and VERSION arguments is the old style
49 # call (pre autoconf-2.50), which is being phased out. PACKAGE
50 # and VERSION should now be passed to AC_INIT and removed from
51 # the call to AM_INIT_AUTOMAKE.
52 # We support both call styles for the transition. After
53 # the next Automake release, Autoconf can make the AC_INIT
54 # arguments mandatory, and then we can depend on a new Autoconf
55 # release and drop the old call support.
56 AC_DEFUN([AM_INIT_AUTOMAKE],
57 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
58 AC_REQUIRE([AC_PROG_INSTALL])dnl
59 # test to see if srcdir already configured
60 if test "`cd $srcdir && pwd`" != "`pwd`" &&
61 test -f $srcdir/config.status; then
62 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
65 # test whether we have cygpath
66 if test -z "$CYGPATH_W"; then
67 if (cygpath --version) >/dev/null 2>/dev/null; then
68 CYGPATH_W='cygpath -w'
75 # Define the identity of the package.
76 dnl Distinguish between old-style and new-style calls.
78 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
79 AC_SUBST([PACKAGE], [$1])dnl
80 AC_SUBST([VERSION], [$2])],
81 [_AM_SET_OPTIONS([$1])dnl
82 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
83 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
85 _AM_IF_OPTION([no-define],,
86 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
87 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
89 # Some tools Automake needs.
90 AC_REQUIRE([AM_SANITY_CHECK])dnl
91 AC_REQUIRE([AC_ARG_PROGRAM])dnl
92 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
93 AM_MISSING_PROG(AUTOCONF, autoconf)
94 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
95 AM_MISSING_PROG(AUTOHEADER, autoheader)
96 AM_MISSING_PROG(MAKEINFO, makeinfo)
97 AM_MISSING_PROG(AMTAR, tar)
100 # We need awk for the "check" target. The system "awk" is bad on
102 AC_REQUIRE([AC_PROG_AWK])dnl
103 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
104 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
106 _AM_IF_OPTION([no-dependencies],,
107 [AC_PROVIDE_IFELSE([AC_PROG_CC],
108 [_AM_DEPENDENCIES(CC)],
109 [define([AC_PROG_CC],
110 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
111 AC_PROVIDE_IFELSE([AC_PROG_CXX],
112 [_AM_DEPENDENCIES(CXX)],
113 [define([AC_PROG_CXX],
114 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
119 # When config.status generates a header, we must update the stamp-h file.
120 # This file resides in the same directory as the config header
121 # that is generated. The stamp files are numbered to have different names.
123 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
124 # loop where config.status creates the headers, so we can generate
125 # our stamp files there.
126 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
127 [# Compute $1's index in $config_headers.
129 for _am_header in $config_headers :; do
134 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
137 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
139 # Copyright 2002 Free Software Foundation, Inc.
141 # This program is free software; you can redistribute it and/or modify
142 # it under the terms of the GNU General Public License as published by
143 # the Free Software Foundation; either version 2, or (at your option)
146 # This program is distributed in the hope that it will be useful,
147 # but WITHOUT ANY WARRANTY; without even the implied warranty of
148 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
149 # GNU General Public License for more details.
151 # You should have received a copy of the GNU General Public License
152 # along with this program; if not, write to the Free Software
153 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
155 # AM_AUTOMAKE_VERSION(VERSION)
156 # ----------------------------
157 # Automake X.Y traces this macro to ensure aclocal.m4 has been
158 # generated from the m4 files accompanying Automake X.Y.
159 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
161 # AM_SET_CURRENT_AUTOMAKE_VERSION
162 # -------------------------------
163 # Call AM_AUTOMAKE_VERSION so it can be traced.
164 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
165 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
166 [AM_AUTOMAKE_VERSION([1.7.9])])
168 # Helper functions for option handling. -*- Autoconf -*-
170 # Copyright 2001, 2002 Free Software Foundation, Inc.
172 # This program is free software; you can redistribute it and/or modify
173 # it under the terms of the GNU General Public License as published by
174 # the Free Software Foundation; either version 2, or (at your option)
177 # This program is distributed in the hope that it will be useful,
178 # but WITHOUT ANY WARRANTY; without even the implied warranty of
179 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
180 # GNU General Public License for more details.
182 # You should have received a copy of the GNU General Public License
183 # along with this program; if not, write to the Free Software
184 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
189 # _AM_MANGLE_OPTION(NAME)
190 # -----------------------
191 AC_DEFUN([_AM_MANGLE_OPTION],
192 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
194 # _AM_SET_OPTION(NAME)
195 # ------------------------------
196 # Set option NAME. Presently that only means defining a flag for this option.
197 AC_DEFUN([_AM_SET_OPTION],
198 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
200 # _AM_SET_OPTIONS(OPTIONS)
201 # ----------------------------------
202 # OPTIONS is a space-separated list of Automake options.
203 AC_DEFUN([_AM_SET_OPTIONS],
204 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
206 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
207 # -------------------------------------------
208 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
209 AC_DEFUN([_AM_IF_OPTION],
210 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
213 # Check to make sure that the build environment is sane.
216 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
218 # This program is free software; you can redistribute it and/or modify
219 # it under the terms of the GNU General Public License as published by
220 # the Free Software Foundation; either version 2, or (at your option)
223 # This program is distributed in the hope that it will be useful,
224 # but WITHOUT ANY WARRANTY; without even the implied warranty of
225 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
226 # GNU General Public License for more details.
228 # You should have received a copy of the GNU General Public License
229 # along with this program; if not, write to the Free Software
230 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
237 AC_DEFUN([AM_SANITY_CHECK],
238 [AC_MSG_CHECKING([whether build environment is sane])
241 echo timestamp > conftest.file
242 # Do `set' in a subshell so we don't clobber the current shell's
243 # arguments. Must try -L first in case configure is actually a
244 # symlink; some systems play weird games with the mod time of symlinks
245 # (eg FreeBSD returns the mod time of the symlink's containing
248 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
249 if test "$[*]" = "X"; then
251 set X `ls -t $srcdir/configure conftest.file`
254 if test "$[*]" != "X $srcdir/configure conftest.file" \
255 && test "$[*]" != "X conftest.file $srcdir/configure"; then
257 # If neither matched, then we have a broken ls. This can happen
258 # if, for instance, CONFIG_SHELL is bash and it inherits a
259 # broken ls alias from the environment. This has actually
260 # happened. Such a system could not be considered "sane".
261 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
262 alias in your environment])
265 test "$[2]" = conftest.file
271 AC_MSG_ERROR([newly created file is older than distributed files!
272 Check your system clock])
279 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
281 # This program is free software; you can redistribute it and/or modify
282 # it under the terms of the GNU General Public License as published by
283 # the Free Software Foundation; either version 2, or (at your option)
286 # This program is distributed in the hope that it will be useful,
287 # but WITHOUT ANY WARRANTY; without even the implied warranty of
288 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
289 # GNU General Public License for more details.
291 # You should have received a copy of the GNU General Public License
292 # along with this program; if not, write to the Free Software
293 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
298 # AM_MISSING_PROG(NAME, PROGRAM)
299 # ------------------------------
300 AC_DEFUN([AM_MISSING_PROG],
301 [AC_REQUIRE([AM_MISSING_HAS_RUN])
302 $1=${$1-"${am_missing_run}$2"}
308 # Define MISSING if not defined so far and test if it supports --run.
309 # If it does, set am_missing_run to use it, otherwise, to nothing.
310 AC_DEFUN([AM_MISSING_HAS_RUN],
311 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
312 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
313 # Use eval to expand $SHELL
314 if eval "$MISSING --run true"; then
315 am_missing_run="$MISSING --run "
318 AC_MSG_WARN([`missing' script is too old or missing])
324 # Copyright 2001 Free Software Foundation, Inc.
326 # This program is free software; you can redistribute it and/or modify
327 # it under the terms of the GNU General Public License as published by
328 # the Free Software Foundation; either version 2, or (at your option)
331 # This program is distributed in the hope that it will be useful,
332 # but WITHOUT ANY WARRANTY; without even the implied warranty of
333 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
334 # GNU General Public License for more details.
336 # You should have received a copy of the GNU General Public License
337 # along with this program; if not, write to the Free Software
338 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
341 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
342 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
343 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
345 # Of course, Automake must honor this variable whenever it calls a
346 # tool from the auxiliary directory. The problem is that $srcdir (and
347 # therefore $ac_aux_dir as well) can be either absolute or relative,
348 # depending on how configure is run. This is pretty annoying, since
349 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
350 # source directory, any form will work fine, but in subdirectories a
351 # relative path needs to be adjusted first.
353 # $ac_aux_dir/missing
354 # fails when called from a subdirectory if $ac_aux_dir is relative
355 # $top_srcdir/$ac_aux_dir/missing
356 # fails if $ac_aux_dir is absolute,
357 # fails when called from a subdirectory in a VPATH build with
358 # a relative $ac_aux_dir
360 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
361 # are both prefixed by $srcdir. In an in-source build this is usually
362 # harmless because $srcdir is `.', but things will broke when you
363 # start a VPATH build or use an absolute $srcdir.
365 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
366 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
367 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
368 # and then we would define $MISSING as
369 # MISSING="\${SHELL} $am_aux_dir/missing"
370 # This will work as long as MISSING is not called from configure, because
371 # unfortunately $(top_srcdir) has no meaning in configure.
372 # However there are other variables, like CC, which are often used in
373 # configure, and could therefore not use this "fixed" $ac_aux_dir.
375 # Another solution, used here, is to always expand $ac_aux_dir to an
376 # absolute PATH. The drawback is that using absolute paths prevent a
377 # configured tree to be moved without reconfiguration.
379 # Rely on autoconf to set up CDPATH properly.
382 AC_DEFUN([AM_AUX_DIR_EXPAND], [
383 # expand $ac_aux_dir to an absolute path
384 am_aux_dir=`cd $ac_aux_dir && pwd`
389 # Define $install_sh.
391 # Copyright 2001 Free Software Foundation, Inc.
393 # This program is free software; you can redistribute it and/or modify
394 # it under the terms of the GNU General Public License as published by
395 # the Free Software Foundation; either version 2, or (at your option)
398 # This program is distributed in the hope that it will be useful,
399 # but WITHOUT ANY WARRANTY; without even the implied warranty of
400 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
401 # GNU General Public License for more details.
403 # You should have received a copy of the GNU General Public License
404 # along with this program; if not, write to the Free Software
405 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
408 AC_DEFUN([AM_PROG_INSTALL_SH],
409 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
410 install_sh=${install_sh-"$am_aux_dir/install-sh"}
411 AC_SUBST(install_sh)])
413 # AM_PROG_INSTALL_STRIP
415 # Copyright 2001 Free Software Foundation, Inc.
417 # This program is free software; you can redistribute it and/or modify
418 # it under the terms of the GNU General Public License as published by
419 # the Free Software Foundation; either version 2, or (at your option)
422 # This program is distributed in the hope that it will be useful,
423 # but WITHOUT ANY WARRANTY; without even the implied warranty of
424 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
425 # GNU General Public License for more details.
427 # You should have received a copy of the GNU General Public License
428 # along with this program; if not, write to the Free Software
429 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
432 # One issue with vendor `install' (even GNU) is that you can't
433 # specify the program used to strip binaries. This is especially
434 # annoying in cross-compiling environments, where the build's strip
435 # is unlikely to handle the host's binaries.
436 # Fortunately install-sh will honor a STRIPPROG variable, so we
437 # always use install-sh in `make install-strip', and initialize
438 # STRIPPROG with the value of the STRIP variable (set by the user).
439 AC_DEFUN([AM_PROG_INSTALL_STRIP],
440 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
441 # Installed binaries are usually stripped using `strip' when the user
442 # run `make install-strip'. However `strip' might not be the right
443 # tool to use in cross-compilation environments, therefore Automake
444 # will honor the `STRIP' environment variable to overrule this program.
445 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
446 if test "$cross_compiling" != no; then
447 AC_CHECK_TOOL([STRIP], [strip], :)
449 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
450 AC_SUBST([INSTALL_STRIP_PROGRAM])])
453 # Copyright (C) 2003 Free Software Foundation, Inc.
455 # This program is free software; you can redistribute it and/or modify
456 # it under the terms of the GNU General Public License as published by
457 # the Free Software Foundation; either version 2, or (at your option)
460 # This program is distributed in the hope that it will be useful,
461 # but WITHOUT ANY WARRANTY; without even the implied warranty of
462 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
463 # GNU General Public License for more details.
465 # You should have received a copy of the GNU General Public License
466 # along with this program; if not, write to the Free Software
467 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
472 # Check whether the underlying file-system supports filenames
473 # with a leading dot. For instance MS-DOS doesn't.
474 AC_DEFUN([AM_SET_LEADING_DOT],
475 [rm -rf .tst 2>/dev/null
476 mkdir .tst 2>/dev/null
477 if test -d .tst; then
482 rmdir .tst 2>/dev/null
483 AC_SUBST([am__leading_dot])])
485 # serial 5 -*- Autoconf -*-
487 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
489 # This program is free software; you can redistribute it and/or modify
490 # it under the terms of the GNU General Public License as published by
491 # the Free Software Foundation; either version 2, or (at your option)
494 # This program is distributed in the hope that it will be useful,
495 # but WITHOUT ANY WARRANTY; without even the implied warranty of
496 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
497 # GNU General Public License for more details.
499 # You should have received a copy of the GNU General Public License
500 # along with this program; if not, write to the Free Software
501 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
505 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
506 # written in clear, in which case automake, when reading aclocal.m4,
507 # will think it sees a *use*, and therefore will trigger all it's
508 # C support machinery. Also note that it means that autoscan, seeing
509 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
513 # _AM_DEPENDENCIES(NAME)
514 # ----------------------
515 # See how the compiler implements dependency checking.
516 # NAME is "CC", "CXX", "GCJ", or "OBJC".
517 # We try a few techniques and use that to set a single cache variable.
519 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
520 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
521 # dependency, and given that the user is not expected to run this macro,
522 # just rely on AC_PROG_CC.
523 AC_DEFUN([_AM_DEPENDENCIES],
524 [AC_REQUIRE([AM_SET_DEPDIR])dnl
525 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
526 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
527 AC_REQUIRE([AM_DEP_TRACK])dnl
529 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
530 [$1], CXX, [depcc="$CXX" am_compiler_list=],
531 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
532 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
533 [depcc="$$1" am_compiler_list=])
535 AC_CACHE_CHECK([dependency style of $depcc],
536 [am_cv_$1_dependencies_compiler_type],
537 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
538 # We make a subdir and do the tests there. Otherwise we can end up
539 # making bogus files that we don't know about and never remove. For
540 # instance it was reported that on HP-UX the gcc test will end up
541 # making a dummy file named `D' -- because `-MD' means `put the output
544 # Copy depcomp to subdir because otherwise we won't find it if we're
545 # using a relative directory.
546 cp "$am_depcomp" conftest.dir
548 # We will build objects and dependencies in a subdirectory because
549 # it helps to detect inapplicable dependency modes. For instance
550 # both Tru64's cc and ICC support -MD to output dependencies as a
551 # side effect of compilation, but ICC will put the dependencies in
552 # the current directory while Tru64 will put them in the object
556 am_cv_$1_dependencies_compiler_type=none
557 if test "$am_compiler_list" = ""; then
558 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
560 for depmode in $am_compiler_list; do
561 # Setup a source with many dependencies, because some compilers
562 # like to wrap large dependency lists on column 80 (with \), and
563 # we should not choose a depcomp mode which is confused by this.
565 # We need to recreate these files for each test, as the compiler may
566 # overwrite some of them when testing with obscure command lines.
567 # This happens at least with the AIX C compiler.
569 for i in 1 2 3 4 5 6; do
570 echo '#include "conftst'$i'.h"' >> sub/conftest.c
573 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
577 # after this tag, mechanisms are not by side-effect, so they'll
578 # only be used when explicitly requested
579 if test "x$enable_dependency_tracking" = xyes; then
587 # We check with `-c' and `-o' for the sake of the "dashmstdout"
588 # mode. It turns out that the SunPro C++ compiler does not properly
589 # handle `-M -o', and we need to detect this.
590 if depmode=$depmode \
591 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
592 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
593 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
594 >/dev/null 2>conftest.err &&
595 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
596 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
597 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
598 # icc doesn't choke on unknown options, it will just issue warnings
599 # (even with -Werror). So we grep stderr for any message
600 # that says an option was ignored.
601 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
602 am_cv_$1_dependencies_compiler_type=$depmode
611 am_cv_$1_dependencies_compiler_type=none
614 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
615 AM_CONDITIONAL([am__fastdep$1], [
616 test "x$enable_dependency_tracking" != xno \
617 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
623 # Choose a directory name for dependency files.
624 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
625 AC_DEFUN([AM_SET_DEPDIR],
626 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
627 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
633 AC_DEFUN([AM_DEP_TRACK],
634 [AC_ARG_ENABLE(dependency-tracking,
635 [ --disable-dependency-tracking Speeds up one-time builds
636 --enable-dependency-tracking Do not reject slow dependency extractors])
637 if test "x$enable_dependency_tracking" != xno; then
638 am_depcomp="$ac_aux_dir/depcomp"
641 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
642 AC_SUBST([AMDEPBACKSLASH])
645 # Generate code to set up dependency tracking. -*- Autoconf -*-
647 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
649 # This program is free software; you can redistribute it and/or modify
650 # it under the terms of the GNU General Public License as published by
651 # the Free Software Foundation; either version 2, or (at your option)
654 # This program is distributed in the hope that it will be useful,
655 # but WITHOUT ANY WARRANTY; without even the implied warranty of
656 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
657 # GNU General Public License for more details.
659 # You should have received a copy of the GNU General Public License
660 # along with this program; if not, write to the Free Software
661 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
666 # _AM_OUTPUT_DEPENDENCY_COMMANDS
667 # ------------------------------
668 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
669 [for mf in $CONFIG_FILES; do
670 # Strip MF so we end up with the name of the file.
671 mf=`echo "$mf" | sed -e 's/:.*$//'`
672 # Check whether this is an Automake generated Makefile or not.
673 # We used to match only the files named `Makefile.in', but
674 # some people rename them; so instead we look at the file content.
675 # Grep'ing the first line is not enough: some people post-process
676 # each Makefile.in and add a new line on top of each file to say so.
677 # So let's grep whole file.
678 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
679 dirpart=`AS_DIRNAME("$mf")`
683 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
684 # Extract the definition of DEP_FILES from the Makefile without
686 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
687 test -z "$DEPDIR" && continue
688 # When using ansi2knr, U may be empty or an underscore; expand it
689 U=`sed -n -e '/^U = / s///p' < "$mf"`
690 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
691 # We invoke sed twice because it is the simplest approach to
692 # changing $(DEPDIR) to its actual value in the expansion.
693 for file in `sed -n -e '
694 /^DEP_FILES = .*\\\\$/ {
703 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
704 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
705 # Make sure the directory exists.
706 test -f "$dirpart/$file" && continue
707 fdir=`AS_DIRNAME(["$file"])`
708 AS_MKDIR_P([$dirpart/$fdir])
709 # echo "creating $dirpart/$file"
710 echo '# dummy' > "$dirpart/$file"
713 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
716 # AM_OUTPUT_DEPENDENCY_COMMANDS
717 # -----------------------------
718 # This macro should only be invoked once -- use via AC_REQUIRE.
720 # This code is only required when automatic dependency tracking
721 # is enabled. FIXME. This creates each `.P' file that we will
722 # need in order to bootstrap the dependency handling code.
723 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
724 [AC_CONFIG_COMMANDS([depfiles],
725 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
726 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
729 # Check to see how 'make' treats includes. -*- Autoconf -*-
731 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
733 # This program is free software; you can redistribute it and/or modify
734 # it under the terms of the GNU General Public License as published by
735 # the Free Software Foundation; either version 2, or (at your option)
738 # This program is distributed in the hope that it will be useful,
739 # but WITHOUT ANY WARRANTY; without even the implied warranty of
740 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
741 # GNU General Public License for more details.
743 # You should have received a copy of the GNU General Public License
744 # along with this program; if not, write to the Free Software
745 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
752 # Check to see how make treats includes.
753 AC_DEFUN([AM_MAKE_INCLUDE],
754 [am_make=${MAKE-make}
755 cat > confinc << 'END'
760 # If we don't find an include directive, just comment out the code.
761 AC_MSG_CHECKING([for style of include used by $am_make])
765 # First try GNU make style include.
766 echo "include confinc" > confmf
767 # We grep out `Entering directory' and `Leaving directory'
768 # messages which can occur if `w' ends up in MAKEFLAGS.
769 # In particular we don't look at `^make:' because GNU make might
770 # be invoked under some other name (usually "gmake"), in which
771 # case it prints its new name instead of `make'.
772 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
777 # Now try BSD make style include.
778 if test "$am__include" = "#"; then
779 echo '.include "confinc"' > confmf
780 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
786 AC_SUBST([am__include])
787 AC_SUBST([am__quote])
788 AC_MSG_RESULT([$_am_result])
792 # AM_CONDITIONAL -*- Autoconf -*-
794 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
796 # This program is free software; you can redistribute it and/or modify
797 # it under the terms of the GNU General Public License as published by
798 # the Free Software Foundation; either version 2, or (at your option)
801 # This program is distributed in the hope that it will be useful,
802 # but WITHOUT ANY WARRANTY; without even the implied warranty of
803 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
804 # GNU General Public License for more details.
806 # You should have received a copy of the GNU General Public License
807 # along with this program; if not, write to the Free Software
808 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
815 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
816 # -------------------------------------
817 # Define a conditional.
818 AC_DEFUN([AM_CONDITIONAL],
819 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
820 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
830 AC_CONFIG_COMMANDS_PRE(
831 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
832 AC_MSG_ERROR([conditional "$1" was never defined.
833 Usually this means the macro was only invoked conditionally.])
836 # Add --enable-maintainer-mode option to configure.
839 # Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
841 # This program is free software; you can redistribute it and/or modify
842 # it under the terms of the GNU General Public License as published by
843 # the Free Software Foundation; either version 2, or (at your option)
846 # This program is distributed in the hope that it will be useful,
847 # but WITHOUT ANY WARRANTY; without even the implied warranty of
848 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
849 # GNU General Public License for more details.
851 # You should have received a copy of the GNU General Public License
852 # along with this program; if not, write to the Free Software
853 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
858 AC_DEFUN([AM_MAINTAINER_MODE],
859 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
860 dnl maintainer-mode is disabled by default
861 AC_ARG_ENABLE(maintainer-mode,
862 [ --enable-maintainer-mode enable make rules and dependencies not useful
863 (and sometimes confusing) to the casual installer],
864 USE_MAINTAINER_MODE=$enableval,
865 USE_MAINTAINER_MODE=no)
866 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
867 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
868 MAINT=$MAINTAINER_MODE_TRUE
873 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
875 dnl TiMidity++ -- MIDI to WAVE converter and player
876 dnl Copyright (C) 1999-2002 Masanao Izumo <mo@goice.co.jp>
877 dnl Copyright (C) 1995 Tuukka Toivonen <tt@cgs.fi>
879 dnl This program is free software; you can redistribute it and/or modify
880 dnl it under the terms of the GNU General Public License as published by
881 dnl the Free Software Foundation; either version 2 of the License, or
882 dnl (at your option) any later version.
884 dnl This program is distributed in the hope that it will be useful,
885 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
886 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
887 dnl GNU General Public License for more details.
889 dnl You should have received a copy of the GNU General Public License
890 dnl along with this program; if not, write to the Free Software
891 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
893 dnl MY_DEFINE(VARIABLE)
895 [cat >> confdefs.h <<EOF
900 dnl CONFIG_INTERFACE(package,macro_name,interface_id,help
902 dnl action-if-yes-or-dynamic,
904 dnl action-if-yes,action-if-dynamic,action-if-no)
906 AC_DEFUN(CONFIG_INTERFACE,
907 [AC_ARG_ENABLE($1,[$4],
908 [case "x$enable_$1" in xyes|xdynamic) $5 ;; esac])
909 case "x$enable_$1" in
912 AM_CONDITIONAL(ENABLE_$2, true)
916 dynamic_targets="$dynamic_targets interface_$3.\$(so)"
926 dnl CHECK_DLSYM_UNDERSCORE([ACTION-IF-NEED [, ACTION IF-NOT-NEED]])
928 dnl CC CFLAGS CPPFLAGS LDFLAGS LIBS SHCFLAGS SHLD SHLDFLAGS
929 dnl ac_cv_header_dlfcn_h lib_dl_opt so
930 AC_DEFUN(CHECK_DLSYM_UNDERSCORE,
931 [dnl Check if dlsym need a leading underscore
932 AC_MSG_CHECKING(whether your dlsym() needs a leading underscore)
933 AC_CACHE_VAL(timidity_cv_func_dlsym_underscore,
934 [case "$ac_cv_header_dlfcn_h" in
935 yes) i_dlfcn=define;;
946 #include <dlfcn.h> /* the dynamic linker include file for Sunos/Solaris */
948 #include <sys/types.h>
962 int mode = RTLD_LAZY ;
964 handle = dlopen("./dyna.$so", mode) ;
965 if (handle == NULL) {
970 symbol = dlsym(handle, "fred") ;
971 if (symbol == NULL) {
972 /* try putting a leading underscore */
973 symbol = dlsym(handle, "_fred") ;
974 if (symbol == NULL) {
987 : Call the object file tmp-dyna.o in case dlext=o.
988 if ${CC-cc} $CFLAGS $SHCFLAGS $CPPFLAGS -c dyna.c > /dev/null 2>&1 &&
989 mv dyna.o tmp-dyna.o > /dev/null 2>&1 &&
990 $SHLD $SHLDFLAGS -o dyna.$so tmp-dyna.o > /dev/null 2>&1 &&
991 ${CC-cc} -o fred $CFLAGS $CPPFLAGS $LDFLAGS fred.c $LIBS $lib_dl_opt > /dev/null 2>&1; then
994 1) AC_MSG_WARN(Test program failed using dlopen. Perhaps you should not use dynamic loading.)
996 2) AC_MSG_WARN(Test program failed using dlsym. Perhaps you should not use dynamic loading.)
998 3) timidity_cv_func_dlsym_underscore=yes
1000 4) timidity_cv_func_dlsym_underscore=no
1004 AC_MSG_WARN(I can't compile and run the test program.)
1006 rm -f dyna.c dyna.o dyna.$so tmp-dyna.o fred.c fred.o fred
1008 case "x$timidity_cv_func_dlsym_underscore" in
1019 dnl contains program from perl5
1021 AC_DEFUN(CONTAINS_INIT,
1022 [dnl Some greps do not return status, grrr.
1023 AC_MSG_CHECKING(whether grep returns status)
1024 echo "grimblepritz" >grimble
1025 if grep blurfldyick grimble >/dev/null 2>&1 ; then
1026 contains="./contains"
1027 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
1030 contains="./contains"
1033 dnl the following should work in any shell
1035 grep) AC_MSG_RESULT(yes)
1038 AC_MSG_RESULT(AGH! Grep doesn't return a status. Attempting remedial action.)
1039 cat >./contains <<'EOSS'
1040 grep "[$]1" "[$]2" >.greptmp && cat .greptmp && test -s .greptmp
1042 chmod +x "./contains"
1047 dnl CONTAINS(word,filename,action-if-found,action-if-not-found)
1049 [if $contains "^[$1]"'[$]' $2 >/dev/null 2>&1; then
1056 dnl SET_UNIQ_WORDS(shell-variable,words...)
1057 AC_DEFUN(SET_UNIQ_WORDS,
1058 [rm -f wordtmp >/dev/null 2>&1
1061 CONTAINS([$f],wordtmp,:,[echo $f >>wordtmp; val="$val $f"])
1064 rm -f wordtmp >/dev/null 2>&1
1068 dnl WAPI_CHECK_FUNC(FUNCTION, INCLUDES, TEST-BODY,
1069 [ACTION-FI-FOUND [, ACTION-IF-NOT-FOUND]])
1070 AC_DEFUN(WAPI_CHECK_FUNC,
1071 [AC_MSG_CHECKING(for $1)
1072 AC_CACHE_VAL(wapi_cv_func_$1,
1073 [AC_TRY_LINK([#include <windows.h>
1076 wapi_cv_func_$1=yes, wapi_cv_func_$1=no)])
1077 if eval "test \"`echo '$wapi_cv_func_'$1`\" = yes"; then
1079 ifelse([$4], , :, [$4])
1082 ifelse([$5], , , [$5
1087 dnl WAPI_CHECK_LIB(LIBRARY, FUNCTION,
1088 dnl INCLUDES, TEST-BODY
1089 dnl [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
1090 dnl [, OTHER-LIBRARIES]]])
1091 AC_DEFUN(WAPI_CHECK_LIB,
1092 [AC_MSG_CHECKING([for $2 in -l$1])
1093 ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
1094 AC_CACHE_VAL(wapi_cv_lib_$ac_lib_var,
1095 [ac_save_LIBS="$LIBS"
1096 LIBS="-l$1 $7 $LIBS"
1097 AC_TRY_LINK([#include <windows.h>
1100 eval "wapi_cv_lib_$ac_lib_var=yes",
1101 eval "wapi_cv_lib_$ac_lib_var=no")
1102 LIBS="$ac_save_LIBS"
1104 if eval "test \"`echo '$wapi_cv_lib_'$ac_lib_var`\" = yes"; then
1106 ifelse([$5], ,LIBS="-l$1 $LIBS", [$5])
1109 ifelse([$6], , , [$6
1114 dnl EXTRACT_CPPFLAGS(CPPFLAGS-to-append,others-to-append,FLAGS)
1115 AC_DEFUN(EXTRACT_CPPFLAGS,
1118 .-I?*|.-D?*) $1="[$]$1 $f" ;;
1125 dnl CHECK_COMPILER_OPTION(OPTIONS [, ACTION-IF-SUCCEED [, ACTION-IF-FAILED]])
1126 AC_DEFUN(CHECK_COMPILER_OPTION,
1127 [AC_MSG_CHECKING([whether -$1 option is recognized])
1128 ac_ccoption=`echo $1 | sed 'y%./+-%__p_%'`
1129 AC_CACHE_VAL(timidity_cv_ccoption_$ac_ccoption,
1130 [cat > conftest.$ac_ext <<EOF
1131 int main() {return 0;}
1133 if ${CC-cc} $LDFLAGS $CFLAGS -o conftest${ac_exeext} -$1 conftest.$ac_ext > conftest.out 2>&1; then
1134 if test -s conftest.out; then
1135 eval "timidity_cv_ccoption_$ac_ccoption=no"
1137 eval "timidity_cv_ccoption_$ac_ccoption=yes"
1140 eval "timidity_cv_ccoption_$ac_ccoption=no"
1143 if eval "test \"`echo '$timidity_cv_ccoption_'$ac_ccoption`\" = yes"; then
1145 ifelse([$2], , , [$2
1149 ifelse([$3], , , [$3
1155 dnl MY_SEARCH_LIBS(FUNCTION, LIBRARIES [, ACTION-IF-FOUND
1156 dnl [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
1157 dnl Search for a library defining FUNC, if it's not already available.
1159 AC_DEFUN(MY_SEARCH_LIBS,
1160 [AC_CACHE_CHECK([for library containing $1], [timidity_cv_search_$1],
1161 [ac_func_search_save_LIBS="$LIBS"
1162 timidity_cv_search_$1="no"
1164 LIBS="$i $5 $ac_func_search_save_LIBS"
1165 AC_TRY_LINK_FUNC([$1], [timidity_cv_search_$1="$i"; break])
1167 LIBS="$ac_func_search_save_LIBS"])
1168 if test "$timidity_cv_search_$1" != "no"; then
1174 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
1175 # Free Software Foundation, Inc.
1177 # This program is free software; you can redistribute it and/or modify
1178 # it under the terms of the GNU General Public License as published by
1179 # the Free Software Foundation; either version 2, or (at your option)
1180 # any later version.
1182 # This program is distributed in the hope that it will be useful,
1183 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1184 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1185 # GNU General Public License for more details.
1187 # You should have received a copy of the GNU General Public License
1188 # along with this program; if not, write to the Free Software
1189 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1196 AC_DEFUN([AM_PATH_LISPDIR],
1197 [AC_ARG_WITH(lispdir,
1198 [ --with-lispdir Override the default lisp directory ],
1199 [ lispdir="$withval"
1200 AC_MSG_CHECKING([where .elc files should go])
1201 AC_MSG_RESULT([$lispdir])],
1203 # If set to t, that means we are running in a shell under Emacs.
1204 # If you have an Emacs named "t", then use the full path.
1205 test x"$EMACS" = xt && EMACS=
1206 AC_CHECK_PROGS(EMACS, emacs xemacs, no)
1207 if test $EMACS != "no"; then
1208 if test x${lispdir+set} != xset; then
1209 AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir],
1210 [# If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly
1211 # Some emacsen will start up in interactive mode, requiring C-x C-c to exit,
1212 # which is non-obvious for non-emacs users.
1213 # Redirecting /dev/null should help a bit; pity we can't detect "broken"
1214 # emacsen earlier and avoid running this altogether.
1215 AC_RUN_LOG([$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out])
1216 am_cv_lispdir=`sed -n \
1218 -e '/.*\/lib\/x\?emacs\/site-lisp$/{s,.*/lib/\(x\?emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \
1219 -e '/.*\/share\/x\?emacs\/site-lisp$/{s,.*/share/\(x\?emacs/site-lisp\),${datadir}/\1,;p;q;}' \
1222 if test -z "$am_cv_lispdir"; then
1223 am_cv_lispdir='${datadir}/emacs/site-lisp'
1226 lispdir="$am_cv_lispdir"
1233 AU_DEFUN([ud_PATH_LISPDIR], [AM_PATH_LISPDIR])
1235 dnl Configure Paths for Alsa
1236 dnl Some modifications by Richard Boulton <richard-alsa@tartarus.org>
1237 dnl Christopher Lansdown <lansdoct@cs.alfred.edu>
1238 dnl Jaroslav Kysela <perex@suse.cz>
1239 dnl Modified for TiMidity++ by URABE, Shyouhei <root@mput.dip.jp>
1240 dnl Original : alsa.m4,v 1.22 2002/05/27 11:14:20 tiwai Exp
1241 dnl This version: alsa.m4, 2002/10/08 22:30:18 JST
1242 dnl AM_PATH_ALSA([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
1243 dnl Test for libasound, and define ALSA_CFLAGS and ALSA_LIBS as appropriate.
1244 dnl enables arguments --with-alsa-prefix=
1245 dnl --with-alsa-enc-prefix=
1246 dnl --disable-alsatest (this has no effect, as yet)
1248 dnl For backwards compatibility, if ACTION_IF_NOT_FOUND is not specified,
1249 dnl and the alsa libraries are not found, a fatal AC_MSG_ERROR() will result.
1251 AC_DEFUN(AM_PATH_ALSA,
1252 [dnl Save the original CFLAGS, LDFLAGS, and LIBS
1253 alsa_save_CFLAGS="$CFLAGS"
1254 alsa_save_LDFLAGS="$LDFLAGS"
1255 alsa_save_LIBS="$LIBS"
1259 dnl Get the cflags and libraries for alsa
1261 AC_ARG_WITH(alsa-prefix,
1262 [ --with-alsa-prefix=PFX Prefix where Alsa library is installed(optional)],
1263 [alsa_prefix="$withval"], [alsa_prefix=""])
1265 AC_ARG_WITH(alsa-inc-prefix,
1266 [ --with-alsa-inc-prefix=PFX Prefix where include libraries are (optional)],
1267 [alsa_inc_prefix="$withval"], [alsa_inc_prefix=""])
1269 dnl FIXME: this is not yet implemented
1270 AC_ARG_ENABLE(alsatest,
1271 [ --disable-alsatest Do not try to compile and run a test Alsa program],
1272 [enable_alsatest=no],
1273 [enable_alsatest=yes])
1275 dnl Add any special include directories
1276 AC_MSG_CHECKING(for ALSA CFLAGS)
1277 if test "$alsa_inc_prefix" != "" ; then
1278 ALSA_CFLAGS="$ALSA_CFLAGS -I$alsa_inc_prefix"
1279 CFLAGS="$CFLAGS -I$alsa_inc_prefix"
1281 AC_MSG_RESULT($ALSA_CFLAGS)
1283 dnl add any special lib dirs
1284 AC_MSG_CHECKING(for ALSA LDFLAGS)
1285 if test "$alsa_prefix" != "" ; then
1286 ALSA_LIBS="$ALSA_LIBS -L$alsa_prefix"
1287 LDFLAGS="$LDFLAGS $ALSA_LIBS"
1290 dnl add the alsa library
1291 ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread"
1292 LIBS=`echo $LIBS | sed 's/-lm//'`
1293 LIBS=`echo $LIBS | sed 's/-ldl//'`
1294 LIBS=`echo $LIBS | sed 's/-lpthread//'`
1295 LIBS=`echo $LIBS | sed 's/ //'`
1296 LIBS="$ALSA_LIBS $LIBS"
1297 AC_MSG_RESULT($ALSA_LIBS)
1299 dnl Check for a working version of libasound that is of the right version.
1300 min_alsa_version=ifelse([$1], ,0.1.1,$1)
1301 AC_MSG_CHECKING(for libasound headers version >= $min_alsa_version)
1303 alsa_min_major_version=`echo $min_alsa_version | \
1304 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1305 alsa_min_minor_version=`echo $min_alsa_version | \
1306 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1307 alsa_min_micro_version=`echo $min_alsa_version | \
1308 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1310 dnl This is the test program.
1311 AC_DEFUN([MPUT_ALSA_TRY],[
1312 /* ensure backward compatibility */
1313 #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
1314 #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
1316 #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
1317 #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
1319 #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
1320 #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
1323 # if(SND_LIB_MAJOR > $alsa_min_major_version)
1326 # if(SND_LIB_MAJOR < $alsa_min_major_version)
1330 # if(SND_LIB_MINOR > $alsa_min_minor_version)
1333 # if(SND_LIB_MINOR < $alsa_min_minor_version)
1337 # if(SND_LIB_SUBMINOR < $alsa_min_micro_version)
1343 ])dnl macro MPUT_ALSA_TRY
1348 #include <alsa/asoundlib.h>
1351 [AC_MSG_RESULT(found.)],
1353 #include <sys/asoundlib.h>
1356 [AC_MSG_RESULT(found.)],
1357 [AC_MSG_RESULT(not present.)
1358 ifelse([$3], ,[AC_MSG_RESULT(libasound was not found anywhere.)])
1360 ifelse([$3], ,[AC_MSG_RESULT(Sufficiently new version of libasound not found.)])
1364 dnl Now that we know we have the right version, why not see if we
1365 dnl have the library and not just the headers.
1366 AC_CHECK_LIB([asound],[snd_ctl_open], ,
1367 [ifelse([$3], ,[AC_MSG_RESULT(No linkable libasound was found.)])
1371 if test "x$alsa_found" = "xyes" ; then
1372 ifelse([$2], , :, [$2])
1373 LIBS=`echo $LIBS | sed 's/-lasound//g'`
1374 LIBS=`echo $LIBS | sed 's/ //'`
1375 LIBS="-lasound $LIBS"
1377 ifelse([$3], , :, [$3])
1378 CFLAGS="$alsa_save_CFLAGS"
1379 LDFLAGS="$alsa_save_LDFLAGS"
1380 LIBS="$alsa_save_LIBS"
1385 dnl That should be it. Now just export out symbols:
1386 AC_SUBST(ALSA_CFLAGS)
1389 dnl This should be pulled in from arts.m4
1391 dnl Oh my word, I've never hacked automake before - let me know if this is a
1392 dnl complete rubbish!
1393 dnl Peter L Jones 2002-05-12
1394 dnl Snarfed from the ESD code below - but the faults are all mine!
1397 dnl AM_PATH_ARTS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
1398 dnl Test for aRts, and define ARTS_CFLAGS and ARTS_LIBS
1400 AC_DEFUN(AM_PATH_ARTS,
1402 dnl Get the cflags and libraries from the arts-config script
1404 AC_ARG_WITH(arts-prefix,[ --with-arts-prefix=PFX Prefix where ARTS is installed (optional)],
1405 arts_prefix="$withval", arts_prefix="")
1406 AC_ARG_ENABLE(artstest, [ --disable-artstest Do not try to compile and run a test ARTS program],
1407 , enable_artstest=yes)
1409 if test x$arts_prefix != x ; then
1410 arts_args="$arts_args --prefix=$arts_prefix"
1411 if test x${ARTS_CONFIG+set} != xset ; then
1412 ARTS_CONFIG=$arts_prefix/bin/artsc-config
1416 AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
1417 min_arts_version=ifelse([$1], ,0.9.5,$1)
1418 AC_MSG_CHECKING(for ARTS - version >= $min_arts_version)
1420 if test "$ARTS_CONFIG" = "no" ; then
1423 ARTS_CFLAGS=`$ARTS_CONFIG $artsconf_args --cflags`
1424 ARTS_LIBS=`$ARTS_CONFIG $artsconf_args --libs`
1426 arts_major_version=`$ARTS_CONFIG $arts_args --version | \
1427 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1428 arts_minor_version=`$ARTS_CONFIG $arts_args --version | \
1429 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1430 arts_micro_version=`$ARTS_CONFIG $arts_config_args --version | \
1431 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1432 if test "x$enable_artstest" = "xyes" ; then
1433 ac_save_CFLAGS="$CFLAGS"
1434 ac_save_LIBS="$LIBS"
1435 CFLAGS="$CFLAGS $ARTS_CFLAGS"
1436 LIBS="$LIBS $ARTS_LIBS"
1438 dnl Now check if the installed ARTS is sufficiently new. (Also sanity
1439 dnl checks the results of arts-config to some extent
1449 my_strdup (char *str)
1455 new_str = malloc ((strlen (str) + 1) * sizeof(char));
1456 strcpy (new_str, str);
1466 int major, minor, micro;
1469 system ("touch conf.artstest");
1471 /* HP/UX 9 (%@#!) writes to sscanf strings */
1472 tmp_version = my_strdup("$min_arts_version");
1473 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
1474 printf("%s, bad version string\n", "$min_arts_version");
1478 if (($arts_major_version > major) ||
1479 (($arts_major_version == major) && ($arts_minor_version > minor)) ||
1480 (($arts_major_version == major) && ($arts_minor_version == minor) && ($arts_micro_version >= micro)))
1486 printf("\n*** 'artsc-config --version' returned %d.%d.%d, but the minimum version\n", $arts_major_version, $arts_minor_version, $arts_micro_version);
1487 printf("*** of ARTS required is %d.%d.%d. If artsc-config is correct, then it is\n", major, minor, micro);
1488 printf("*** best to upgrade to the required version.\n");
1489 printf("*** If artsc-config was wrong, set the environment variable ARTS_CONFIG\n");
1490 printf("*** to point to the correct copy of artsc-config, and remove the file\n");
1491 printf("*** config.cache before re-running configure\n");
1496 ],, no_arts=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1497 CFLAGS="$ac_save_CFLAGS"
1498 LIBS="$ac_save_LIBS"
1501 if test "x$no_arts" = x ; then
1503 ifelse([$2], , :, [$2])
1506 if test "$ARTS_CONFIG" = "no" ; then
1507 echo "*** The artsc-config script installed by ARTS could not be found"
1508 echo "*** If ARTS was installed in PREFIX, make sure PREFIX/bin is in"
1509 echo "*** your path, or set the ARTS_CONFIG environment variable to the"
1510 echo "*** full path to artsc-config."
1512 if test -f conf.artstest ; then
1515 echo "*** Could not run ARTS test program, checking why..."
1516 CFLAGS="$CFLAGS $ARTS_CFLAGS"
1517 LIBS="$LIBS $ARTS_LIBS"
1522 [ echo "*** The test program compiled, but did not run. This usually means"
1523 echo "*** that the run-time linker is not finding ARTS or finding the wrong"
1524 echo "*** version of ARTS. If it is not finding ARTS, you'll need to set your"
1525 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1526 echo "*** to the installed location Also, make sure you have run ldconfig if that"
1527 echo "*** is required on your system"
1529 echo "*** If you have an old version installed, it is best to remove it, although"
1530 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
1531 [ echo "*** The test program failed to compile or link. See the file config.log for the"
1532 echo "*** exact error that occured. This usually means ARTS was incorrectly installed"
1533 echo "*** or that you have moved ARTS since it was installed. In the latter case, you"
1534 echo "*** may want to edit the arts-config script: $ARTS_CONFIG" ])
1535 CFLAGS="$ac_save_CFLAGS"
1536 LIBS="$ac_save_LIBS"
1541 ifelse([$3], , :, [$3])
1543 AC_SUBST(ARTS_CFLAGS)
1548 # Configure paths for ESD
1549 # Manish Singh 98-9-30
1550 # stolen back from Frank Belew
1551 # stolen from Manish Singh
1552 # Shamelessly stolen from Owen Taylor
1554 dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
1555 dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
1557 AC_DEFUN(AM_PATH_ESD,
1559 dnl Get the cflags and libraries from the esd-config script
1561 AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)],
1562 esd_prefix="$withval", esd_prefix="")
1563 AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)],
1564 esd_exec_prefix="$withval", esd_exec_prefix="")
1565 AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program],
1566 , enable_esdtest=yes)
1568 if test x$esd_exec_prefix != x ; then
1569 esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
1570 if test x${ESD_CONFIG+set} != xset ; then
1571 ESD_CONFIG=$esd_exec_prefix/bin/esd-config
1574 if test x$esd_prefix != x ; then
1575 esd_args="$esd_args --prefix=$esd_prefix"
1576 if test x${ESD_CONFIG+set} != xset ; then
1577 ESD_CONFIG=$esd_prefix/bin/esd-config
1581 AC_PATH_PROG(ESD_CONFIG, esd-config, no)
1582 min_esd_version=ifelse([$1], ,0.2.7,$1)
1583 AC_MSG_CHECKING(for ESD - version >= $min_esd_version)
1585 if test "$ESD_CONFIG" = "no" ; then
1590 ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
1591 ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`
1593 esd_major_version=`$ESD_CONFIG $esd_args --version | \
1594 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1595 esd_minor_version=`$ESD_CONFIG $esd_args --version | \
1596 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1597 esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
1598 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1599 if test "x$enable_esdtest" = "xyes" ; then
1600 ac_save_CFLAGS="$CFLAGS"
1601 ac_save_LIBS="$LIBS"
1602 CFLAGS="$CFLAGS $ESD_CFLAGS"
1603 LIBS="$LIBS $ESD_LIBS"
1605 dnl Now check if the installed ESD is sufficiently new. (Also sanity
1606 dnl checks the results of esd-config to some extent
1616 my_strdup (char *str)
1622 new_str = malloc ((strlen (str) + 1) * sizeof(char));
1623 strcpy (new_str, str);
1633 int major, minor, micro;
1636 system ("touch conf.esdtest");
1638 /* HP/UX 9 (%@#!) writes to sscanf strings */
1639 tmp_version = my_strdup("$min_esd_version");
1640 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
1641 printf("%s, bad version string\n", "$min_esd_version");
1645 if (($esd_major_version > major) ||
1646 (($esd_major_version == major) && ($esd_minor_version > minor)) ||
1647 (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
1653 printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
1654 printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
1655 printf("*** best to upgrade to the required version.\n");
1656 printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
1657 printf("*** to point to the correct copy of esd-config, and remove the file\n");
1658 printf("*** config.cache before re-running configure\n");
1663 ],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1664 CFLAGS="$ac_save_CFLAGS"
1665 LIBS="$ac_save_LIBS"
1669 if test "x$no_esd" = x ; then
1671 ifelse([$2], , :, [$2])
1674 if test "$ESD_CONFIG" = "no" ; then
1675 echo "*** The esd-config script installed by ESD could not be found"
1676 echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
1677 echo "*** your path, or set the ESD_CONFIG environment variable to the"
1678 echo "*** full path to esd-config."
1680 if test -f conf.esdtest ; then
1683 echo "*** Could not run ESD test program, checking why..."
1684 CFLAGS="$CFLAGS $ESD_CFLAGS"
1685 LIBS="$LIBS $ESD_LIBS"
1692 [ echo "*** The test program compiled, but did not run. This usually means"
1693 echo "*** that the run-time linker is not finding ESD or finding the wrong"
1694 echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
1695 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1696 echo "*** to the installed location Also, make sure you have run ldconfig if that"
1697 echo "*** is required on your system"
1699 echo "*** If you have an old version installed, it is best to remove it, although"
1700 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
1701 [ echo "*** The test program failed to compile or link. See the file config.log for the"
1702 echo "*** exact error that occured. This usually means ESD was incorrectly installed"
1703 echo "*** or that you have moved ESD since it was installed. In the latter case, you"
1704 echo "*** may want to edit the esd-config script: $ESD_CONFIG" ])
1705 CFLAGS="$ac_save_CFLAGS"
1706 LIBS="$ac_save_LIBS"
1712 ifelse([$3], , :, [$3])
1714 AC_SUBST(ESD_CFLAGS)
1719 dnl AM_ESD_SUPPORTS_MULTIPLE_RECORD([ACTION-IF-SUPPORTS [, ACTION-IF-NOT-SUPPORTS]])
1720 dnl Test, whether esd supports multiple recording clients (version >=0.2.21)
1722 AC_DEFUN(AM_ESD_SUPPORTS_MULTIPLE_RECORD,
1724 AC_MSG_NOTICE([whether installed esd version supports multiple recording clients])
1725 ac_save_ESD_CFLAGS="$ESD_CFLAGS"
1726 ac_save_ESD_LIBS="$ESD_LIBS"
1729 AM_CONDITIONAL(ESD_SUPPORTS_MULTIPLE_RECORD, true)
1730 AC_DEFINE(ESD_SUPPORTS_MULTIPLE_RECORD, 1,
1731 [Define if you have esound with support of multiple recording clients.])],
1733 ifelse([$2], , [AM_CONDITIONAL(ESD_SUPPORTS_MULTIPLE_RECORD, false)], [$2])
1734 if test "x$ac_save_ESD_CFLAGS" != x ; then
1735 ESD_CFLAGS="$ac_save_ESD_CFLAGS"
1737 if test "x$ac_save_ESD_LIBS" != x ; then
1738 ESD_LIBS="$ac_save_ESD_LIBS"
1744 # Configure paths for libao
1745 # Jack Moffitt <jack@icecast.org> 10-21-2000
1746 # Shamelessly stolen from Owen Taylor and Manish Singh
1748 dnl XIPH_PATH_AO([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1749 dnl Test for libao, and define AO_CFLAGS and AO_LIBS
1751 AC_DEFUN(XIPH_PATH_AO,
1753 dnl Get the cflags and libraries
1755 AC_ARG_WITH(ao,[ --with-ao=PFX Prefix where libao is installed (optional)], ao_prefix="$withval", ao_prefix="")
1756 AC_ARG_WITH(ao-libraries,[ --with-ao-libraries=DIR Directory where libao library is installed (optional)], ao_libraries="$withval", ao_libraries="")
1757 AC_ARG_WITH(ao-includes,[ --with-ao-includes=DIR Directory where libao header files are installed (optional)], ao_includes="$withval", ao_includes="")
1758 AC_ARG_ENABLE(aotest, [ --disable-aotest Do not try to compile and run a test ao program],, enable_aotest=yes)
1761 if test "x$ao_libraries" != "x" ; then
1762 AO_LIBS="-L$ao_libraries"
1763 elif test "x$ao_prefix" != "x"; then
1764 AO_LIBS="-L$ao_prefix/lib"
1765 elif test "x$prefix" != "xNONE"; then
1766 AO_LIBS="-L$prefix/lib"
1769 if test "x$ao_includes" != "x" ; then
1770 AO_CFLAGS="-I$ao_includes"
1771 elif test "x$ao_prefix" != "x"; then
1772 AO_CFLAGS="-I$ao_prefix/include"
1773 elif test "x$prefix" != "xNONE"; then
1774 AO_CFLAGS="-I$prefix/include"
1777 # see where dl* and friends live
1778 AC_CHECK_FUNCS(dlopen, [AO_DL_LIBS=""], [
1779 AC_CHECK_LIB(dl, dlopen, [AO_DL_LIBS="-ldl"], [
1780 AC_MSG_WARN([could not find dlopen() needed by libao sound drivers
1781 your system may not be supported.])
1785 AO_LIBS="$AO_LIBS -lao $AO_DL_LIBS"
1787 AC_MSG_CHECKING(for ao)
1791 if test "x$enable_aotest" = "xyes" ; then
1792 ac_save_CFLAGS="$CFLAGS"
1793 ac_save_LIBS="$LIBS"
1794 CFLAGS="$CFLAGS $AO_CFLAGS"
1795 LIBS="$LIBS $AO_LIBS"
1797 dnl Now check if the installed ao is sufficiently new.
1808 system("touch conf.aotest");
1812 ],, no_ao=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1813 CFLAGS="$ac_save_CFLAGS"
1814 LIBS="$ac_save_LIBS"
1817 if test "x$no_ao" = "x" ; then
1819 ifelse([$1], , :, [$1])
1822 if test -f conf.aotest ; then
1825 echo "*** Could not run ao test program, checking why..."
1826 CFLAGS="$CFLAGS $AO_CFLAGS"
1827 LIBS="$LIBS $AO_LIBS"
1832 [ echo "*** The test program compiled, but did not run. This usually means"
1833 echo "*** that the run-time linker is not finding ao or finding the wrong"
1834 echo "*** version of ao. If it is not finding ao, you'll need to set your"
1835 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1836 echo "*** to the installed location Also, make sure you have run ldconfig if that"
1837 echo "*** is required on your system"
1839 echo "*** If you have an old version installed, it is best to remove it, although"
1840 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
1841 [ echo "*** The test program failed to compile or link. See the file config.log for the"
1842 echo "*** exact error that occured. This usually means ao was incorrectly installed"
1843 echo "*** or that you have moved ao since it was installed." ])
1844 CFLAGS="$ac_save_CFLAGS"
1845 LIBS="$ac_save_LIBS"
1849 ifelse([$2], , :, [$2])
1856 # Configure paths for libogg
1857 # Jack Moffitt <jack@icecast.org> 10-21-2000
1858 # Shamelessly stolen from Owen Taylor and Manish Singh
1860 dnl AM_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1861 dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
1863 AC_DEFUN(AM_PATH_OGG,
1865 dnl Get the cflags and libraries
1867 AC_ARG_WITH(ogg,[ --with-ogg=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
1868 AC_ARG_WITH(ogg-libraries,[ --with-ogg-libraries=DIR Directory where libogg library is installed (optional)], ogg_libraries="$withval", ogg_libraries="")
1869 AC_ARG_WITH(ogg-includes,[ --with-ogg-includes=DIR Directory where libogg header files are installed (optional)], ogg_includes="$withval", ogg_includes="")
1870 AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
1872 if test "x$ogg_libraries" != "x" ; then
1873 OGG_LIBS="-L$ogg_libraries"
1874 elif test "x$ogg_prefix" != "x" ; then
1875 OGG_LIBS="-L$ogg_prefix/lib"
1876 elif test "x$prefix" != "xNONE" ; then
1877 OGG_LIBS="-L$prefix/lib"
1880 OGG_LIBS="$OGG_LIBS -logg"
1882 if test "x$ogg_includes" != "x" ; then
1883 OGG_CFLAGS="-I$ogg_includes"
1884 elif test "x$ogg_prefix" != "x" ; then
1885 OGG_CFLAGS="-I$ogg_prefix/include"
1886 elif test "x$prefix" != "xNONE"; then
1887 OGG_CFLAGS="-I$prefix/include"
1890 AC_MSG_CHECKING(for Ogg)
1894 if test "x$enable_oggtest" = "xyes" ; then
1895 ac_save_CFLAGS="$CFLAGS"
1896 ac_save_LIBS="$LIBS"
1897 CFLAGS="$CFLAGS $OGG_CFLAGS"
1898 LIBS="$LIBS $OGG_LIBS"
1900 dnl Now check if the installed Ogg is sufficiently new.
1907 #include <ogg/ogg.h>
1911 system("touch conf.oggtest");
1915 ],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1916 CFLAGS="$ac_save_CFLAGS"
1917 LIBS="$ac_save_LIBS"
1920 if test "x$no_ogg" = "x" ; then
1922 ifelse([$1], , :, [$1])
1925 if test -f conf.oggtest ; then
1928 echo "*** Could not run Ogg test program, checking why..."
1929 CFLAGS="$CFLAGS $OGG_CFLAGS"
1930 LIBS="$LIBS $OGG_LIBS"
1933 #include <ogg/ogg.h>
1935 [ echo "*** The test program compiled, but did not run. This usually means"
1936 echo "*** that the run-time linker is not finding Ogg or finding the wrong"
1937 echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
1938 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1939 echo "*** to the installed location Also, make sure you have run ldconfig if that"
1940 echo "*** is required on your system"
1942 echo "*** If you have an old version installed, it is best to remove it, although"
1943 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
1944 [ echo "*** The test program failed to compile or link. See the file config.log for the"
1945 echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
1946 echo "*** or that you have moved Ogg since it was installed. In the latter case, you"
1947 echo "*** may want to edit the ogg-config script: $OGG_CONFIG" ])
1948 CFLAGS="$ac_save_CFLAGS"
1949 LIBS="$ac_save_LIBS"
1953 ifelse([$2], , :, [$2])
1955 AC_SUBST(OGG_CFLAGS)
1960 # Configure paths for libvorbis
1961 # Jack Moffitt <jack@icecast.org> 10-21-2000
1962 # Shamelessly stolen from Owen Taylor and Manish Singh
1964 dnl AM_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1965 dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS
1967 AC_DEFUN(AM_PATH_VORBIS,
1969 dnl Get the cflags and libraries
1971 AC_ARG_WITH(vorbis,[ --with-vorbis=PFX Prefix where libvorbis is installed (optional)], vorbis_prefix="$withval", vorbis_prefix="")
1972 AC_ARG_WITH(vorbis-libraries,[ --with-vorbis-libraries=DIR Directory where libvorbis library is installed (optional)], vorbis_libraries="$withval", vorbis_libraries="")
1973 AC_ARG_WITH(vorbis-includes,[ --with-vorbis-includes=DIR Directory where libvorbis header files are installed (optional)], vorbis_includes="$withval", vorbis_includes="")
1974 AC_ARG_ENABLE(vorbistest, [ --disable-vorbistest Do not try to compile and run a test Vorbis program],, enable_vorbistest=yes)
1976 if test "x$vorbis_libraries" != "x" ; then
1977 VORBIS_LIBS="-L$vorbis_libraries"
1978 elif test "x$vorbis_prefix" != "x" ; then
1979 VORBIS_LIBS="-L$vorbis_prefix/lib"
1980 elif test "x$prefix" != "xNONE"; then
1981 VORBIS_LIBS="-L$prefix/lib"
1984 VORBIS_LIBS="$VORBIS_LIBS -lvorbis -lm"
1985 VORBISFILE_LIBS="-lvorbisfile"
1986 VORBISENC_LIBS="-lvorbisenc"
1988 if test "x$vorbis_includes" != "x" ; then
1989 VORBIS_CFLAGS="-I$vorbis_includes"
1990 elif test "x$vorbis_prefix" != "x" ; then
1991 VORBIS_CFLAGS="-I$vorbis_prefix/include"
1992 elif test "x$prefix" != "xNONE"; then
1993 VORBIS_CFLAGS="-I$prefix/include"
1997 AC_MSG_CHECKING(for Vorbis)
2001 if test "x$enable_vorbistest" = "xyes" ; then
2002 ac_save_CFLAGS="$CFLAGS"
2003 ac_save_LIBS="$LIBS"
2004 CFLAGS="$CFLAGS $VORBIS_CFLAGS $OGG_CFLAGS"
2005 LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
2007 dnl Now check if the installed Vorbis is sufficiently new.
2009 rm -f conf.vorbistest
2014 #include <vorbis/codec.h>
2018 system("touch conf.vorbistest");
2022 ],, no_vorbis=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
2023 CFLAGS="$ac_save_CFLAGS"
2024 LIBS="$ac_save_LIBS"
2027 if test "x$no_vorbis" = "x" ; then
2029 ifelse([$1], , :, [$1])
2032 if test -f conf.vorbistest ; then
2035 echo "*** Could not run Vorbis test program, checking why..."
2036 CFLAGS="$CFLAGS $VORBIS_CFLAGS"
2037 LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
2040 #include <vorbis/codec.h>
2042 [ echo "*** The test program compiled, but did not run. This usually means"
2043 echo "*** that the run-time linker is not finding Vorbis or finding the wrong"
2044 echo "*** version of Vorbis. If it is not finding Vorbis, you'll need to set your"
2045 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
2046 echo "*** to the installed location Also, make sure you have run ldconfig if that"
2047 echo "*** is required on your system"
2049 echo "*** If you have an old version installed, it is best to remove it, although"
2050 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
2051 [ echo "*** The test program failed to compile or link. See the file config.log for the"
2052 echo "*** exact error that occured. This usually means Vorbis was incorrectly installed"
2053 echo "*** or that you have moved Vorbis since it was installed." ])
2054 CFLAGS="$ac_save_CFLAGS"
2055 LIBS="$ac_save_LIBS"
2061 ifelse([$2], , :, [$2])
2063 AC_SUBST(VORBIS_CFLAGS)
2064 AC_SUBST(VORBIS_LIBS)
2065 AC_SUBST(VORBISFILE_LIBS)
2066 AC_SUBST(VORBISENC_LIBS)
2067 rm -f conf.vorbistest
2070 # Configure paths for libFLAC
2071 # "Inspired" by ogg.m4
2073 dnl AM_PATH_LIBFLAC([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
2074 dnl Test for libFLAC, and define LIBFLAC_CFLAGS and LIBFLAC_LIBS
2076 AC_DEFUN(AM_PATH_LIBFLAC,
2078 dnl Get the cflags and libraries
2080 AC_ARG_WITH(libFLAC,[ --with-libFLAC=PFX Prefix where libFLAC is installed (optional)], libFLAC_prefix="$withval", libFLAC_prefix="")
2081 AC_ARG_WITH(libFLAC-libraries,[ --with-libFLAC-libraries=DIR Directory where libFLAC library is installed (optional)], libFLAC_libraries="$withval", libFLAC_libraries="")
2082 AC_ARG_WITH(libFLAC-includes,[ --with-libFLAC-includes=DIR Directory where libFLAC header files are installed (optional)], libFLAC_includes="$withval", libFLAC_includes="")
2083 AC_ARG_ENABLE(libFLACtest, [ --disable-libFLACtest Do not try to compile and run a test libFLAC program],, enable_libFLACtest=yes)
2085 if test "x$libFLAC_libraries" != "x" ; then
2086 LIBFLAC_LIBS="-L$libFLAC_libraries"
2087 elif test "x$libFLAC_prefix" != "x" ; then
2088 LIBFLAC_LIBS="-L$libFLAC_prefix/lib"
2089 elif test "x$prefix" != "xNONE" ; then
2090 LIBFLAC_LIBS="-L$prefix/lib"
2093 LIBFLAC_LIBS="$LIBFLAC_LIBS -lFLAC -lm"
2095 if test "x$libFLAC_includes" != "x" ; then
2096 LIBFLAC_CFLAGS="-I$libFLAC_includes"
2097 elif test "x$libFLAC_prefix" != "x" ; then
2098 LIBFLAC_CFLAGS="-I$libFLAC_prefix/include"
2099 elif test "$prefix" != "xNONE"; then
2100 LIBFLAC_CFLAGS="-I$prefix/include"
2103 AC_MSG_CHECKING(for libFLAC)
2107 if test "x$enable_libFLACtest" = "xyes" ; then
2108 ac_save_CFLAGS="$CFLAGS"
2109 ac_save_CXXFLAGS="$CXXFLAGS"
2110 ac_save_LIBS="$LIBS"
2111 CFLAGS="$CFLAGS $LIBFLAC_CFLAGS"
2112 CXXFLAGS="$CXXFLAGS $LIBFLAC_CFLAGS"
2113 LIBS="$LIBS $LIBFLAC_LIBS"
2115 dnl Now check if the installed libFLAC is sufficiently new.
2117 rm -f conf.libFLACtest
2122 #include <FLAC/format.h>
2126 system("touch conf.libFLACtest");
2130 ],, no_libFLAC=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
2131 CFLAGS="$ac_save_CFLAGS"
2132 LIBS="$ac_save_LIBS"
2135 if test "x$no_libFLAC" = "x" ; then
2137 ifelse([$1], , :, [$1])
2140 if test -f conf.libFLACtest ; then
2143 echo "*** Could not run libFLAC test program, checking why..."
2144 CFLAGS="$CFLAGS $LIBFLAC_CFLAGS"
2145 LIBS="$LIBS $LIBFLAC_LIBS"
2148 #include <FLAC/format.h>
2150 [ echo "*** The test program compiled, but did not run. This usually means"
2151 echo "*** that the run-time linker is not finding libFLAC or finding the wrong"
2152 echo "*** version of libFLAC. If it is not finding libFLAC, you'll need to set your"
2153 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
2154 echo "*** to the installed location Also, make sure you have run ldconfig if that"
2155 echo "*** is required on your system"
2157 echo "*** If you have an old version installed, it is best to remove it, although"
2158 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
2159 [ echo "*** The test program failed to compile or link. See the file config.log for the"
2160 echo "*** exact error that occured. This usually means libFLAC was incorrectly installed"
2161 echo "*** or that you have moved libFLAC since it was installed. In the latter case, you"
2162 echo "*** may want to edit the libFLAC-config script: $LIBFLAC_CONFIG" ])
2163 CFLAGS="$ac_save_CFLAGS"
2164 LIBS="$ac_save_LIBS"
2168 ifelse([$2], , :, [$2])
2170 AC_SUBST(LIBFLAC_CFLAGS)
2171 AC_SUBST(LIBFLAC_LIBS)
2172 rm -f conf.libFLACtest
2175 # Configure paths for libOggFLAC
2176 # "Inspired" by ogg.m4
2178 dnl AM_PATH_LIBOGGFLAC([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
2179 dnl Test for libOggFLAC, and define LIBOGGFLAC_CFLAGS and LIBOGGFLAC_LIBS
2181 AC_DEFUN(AM_PATH_LIBOGGFLAC,
2183 dnl Get the cflags and libraries
2185 AC_ARG_WITH(libOggFLAC,[ --with-libOggFLAC=PFX Prefix where libOggFLAC is installed (optional)], libOggFLAC_prefix="$withval", libOggFLAC_prefix="")
2186 AC_ARG_WITH(libOggFLAC-libraries,[ --with-libOggFLAC-libraries=DIR Directory where libOggFLAC library is installed (optional)], libOggFLAC_libraries="$withval", libOggFLAC_libraries="")
2187 AC_ARG_WITH(libOggFLAC-includes,[ --with-libOggFLAC-includes=DIR Directory where libOggFLAC header files are installed (optional)], libOggFLAC_includes="$withval", libOggFLAC_includes="")
2188 AC_ARG_ENABLE(libOggFLACtest, [ --disable-libOggFLACtest Do not try to compile and run a test libOggFLAC program],, enable_libOggFLACtest=yes)
2190 if test "x$libOggFLAC_libraries" != "x" ; then
2191 LIBOGGFLAC_LIBS="-L$libOggFLAC_libraries"
2192 elif test "x$libOggFLAC_prefix" != "x" ; then
2193 LIBOGGFLAC_LIBS="-L$libOggFLAC_prefix/lib"
2194 elif test "x$prefix" != "xNONE" ; then
2195 LIBOGGFLAC_LIBS="-L$prefix/lib"
2198 LIBOGGFLAC_LIBS="$LIBOGGFLAC_LIBS -lOggFLAC -lFLAC -lm"
2200 if test "x$libOggFLAC_includes" != "x" ; then
2201 LIBOGGFLAC_CFLAGS="-I$libOggFLAC_includes"
2202 elif test "x$libOggFLAC_prefix" != "x" ; then
2203 LIBOGGFLAC_CFLAGS="-I$libOggFLAC_prefix/include"
2204 elif test "$prefix" != "xNONE"; then
2205 LIBOGGFLAC_CFLAGS="-I$prefix/include"
2208 AC_MSG_CHECKING(for libOggFLAC)
2212 if test "x$enable_libOggFLACtest" = "xyes" ; then
2213 ac_save_CFLAGS="$CFLAGS"
2214 ac_save_CXXFLAGS="$CXXFLAGS"
2215 ac_save_LIBS="$LIBS"
2216 CFLAGS="$CFLAGS $LIBOGGFLAC_CFLAGS"
2217 CXXFLAGS="$CXXFLAGS $LIBOGGFLAC_CFLAGS"
2218 LIBS="$LIBS $LIBOGGFLAC_LIBS"
2220 dnl Now check if the installed libOggFLAC is sufficiently new.
2222 rm -f conf.libOggFLACtest
2227 #include <OggFLAC/stream_decoder.h>
2231 system("touch conf.libOggFLACtest");
2235 ],, no_libOggFLAC=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
2236 CFLAGS="$ac_save_CFLAGS"
2237 LIBS="$ac_save_LIBS"
2240 if test "x$no_libOggFLAC" = "x" ; then
2242 ifelse([$1], , :, [$1])
2245 if test -f conf.libOggFLACtest ; then
2248 echo "*** Could not run libOggFLAC test program, checking why..."
2249 CFLAGS="$CFLAGS $LIBOGGFLAC_CFLAGS"
2250 LIBS="$LIBS $LIBOGGFLAC_LIBS"
2253 #include <OggFLAC/stream_decoder.h>
2255 [ echo "*** The test program compiled, but did not run. This usually means"
2256 echo "*** that the run-time linker is not finding libOggFLAC or finding the wrong"
2257 echo "*** version of libOggFLAC. If it is not finding libOggFLAC, you'll need to set your"
2258 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
2259 echo "*** to the installed location Also, make sure you have run ldconfig if that"
2260 echo "*** is required on your system"
2262 echo "*** If you have an old version installed, it is best to remove it, although"
2263 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
2264 [ echo "*** The test program failed to compile or link. See the file config.log for the"
2265 echo "*** exact error that occured. This usually means libOggFLAC was incorrectly installed"
2266 echo "*** or that you have moved libOggFLAC since it was installed. In the latter case, you"
2267 echo "*** may want to edit the libOggFLAC-config script: $LIBOGGFLAC_CONFIG" ])
2268 CFLAGS="$ac_save_CFLAGS"
2269 LIBS="$ac_save_LIBS"
2271 LIBOGGFLAC_CFLAGS=""
2273 ifelse([$2], , :, [$2])
2275 AC_SUBST(LIBOGGFLAC_CFLAGS)
2276 AC_SUBST(LIBOGGFLAC_LIBS)
2277 rm -f conf.libOggFLACtest
2280 # Configure paths for GTK+
2281 # Owen Taylor 97-11-3
2283 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
2284 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
2286 AC_DEFUN(AM_PATH_GTK,
2288 dnl Get the cflags and libraries from the gtk-config script
2290 AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
2291 gtk_config_prefix="$withval", gtk_config_prefix="")
2292 AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
2293 gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
2294 AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
2295 , enable_gtktest=yes)
2301 gtk_config_args="$gtk_config_args gthread"
2306 if test x$gtk_config_exec_prefix != x ; then
2307 gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
2308 if test x${GTK_CONFIG+set} != xset ; then
2309 GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
2312 if test x$gtk_config_prefix != x ; then
2313 gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
2314 if test x${GTK_CONFIG+set} != xset ; then
2315 GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
2319 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
2320 min_gtk_version=ifelse([$1], ,0.99.7,$1)
2321 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
2323 if test "$GTK_CONFIG" = "no" ; then
2326 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
2327 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
2328 gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
2329 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
2330 gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
2331 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
2332 gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
2333 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
2334 if test "x$enable_gtktest" = "xyes" ; then
2335 ac_save_CFLAGS="$CFLAGS"
2336 ac_save_LIBS="$LIBS"
2337 CFLAGS="$CFLAGS $GTK_CFLAGS"
2338 LIBS="$GTK_LIBS $LIBS"
2340 dnl Now check if the installed GTK is sufficiently new. (Also sanity
2341 dnl checks the results of gtk-config to some extent
2345 #include <gtk/gtk.h>
2352 int major, minor, micro;
2355 system ("touch conf.gtktest");
2357 /* HP/UX 9 (%@#!) writes to sscanf strings */
2358 tmp_version = g_strdup("$min_gtk_version");
2359 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
2360 printf("%s, bad version string\n", "$min_gtk_version");
2364 if ((gtk_major_version != $gtk_config_major_version) ||
2365 (gtk_minor_version != $gtk_config_minor_version) ||
2366 (gtk_micro_version != $gtk_config_micro_version))
2368 printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
2369 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
2370 gtk_major_version, gtk_minor_version, gtk_micro_version);
2371 printf ("*** was found! If gtk-config was correct, then it is best\n");
2372 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
2373 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
2374 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
2375 printf("*** required on your system.\n");
2376 printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
2377 printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
2378 printf("*** before re-running configure\n");
2380 #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
2381 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
2382 (gtk_minor_version != GTK_MINOR_VERSION) ||
2383 (gtk_micro_version != GTK_MICRO_VERSION))
2385 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
2386 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
2387 printf("*** library (version %d.%d.%d)\n",
2388 gtk_major_version, gtk_minor_version, gtk_micro_version);
2390 #endif /* defined (GTK_MAJOR_VERSION) ... */
2393 if ((gtk_major_version > major) ||
2394 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
2395 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
2401 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
2402 gtk_major_version, gtk_minor_version, gtk_micro_version);
2403 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
2404 major, minor, micro);
2405 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
2407 printf("*** If you have already installed a sufficiently new version, this error\n");
2408 printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
2409 printf("*** being found. The easiest way to fix this is to remove the old version\n");
2410 printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
2411 printf("*** correct copy of gtk-config. (In this case, you will have to\n");
2412 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
2413 printf("*** so that the correct libraries are found at run-time))\n");
2418 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
2419 CFLAGS="$ac_save_CFLAGS"
2420 LIBS="$ac_save_LIBS"
2423 if test "x$no_gtk" = x ; then
2425 ifelse([$2], , :, [$2])
2428 if test "$GTK_CONFIG" = "no" ; then
2429 echo "*** The gtk-config script installed by GTK could not be found"
2430 echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
2431 echo "*** your path, or set the GTK_CONFIG environment variable to the"
2432 echo "*** full path to gtk-config."
2434 if test -f conf.gtktest ; then
2437 echo "*** Could not run GTK test program, checking why..."
2438 CFLAGS="$CFLAGS $GTK_CFLAGS"
2439 LIBS="$LIBS $GTK_LIBS"
2441 #include <gtk/gtk.h>
2443 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
2444 [ echo "*** The test program compiled, but did not run. This usually means"
2445 echo "*** that the run-time linker is not finding GTK or finding the wrong"
2446 echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
2447 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
2448 echo "*** to the installed location Also, make sure you have run ldconfig if that"
2449 echo "*** is required on your system"
2451 echo "*** If you have an old version installed, it is best to remove it, although"
2452 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
2454 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
2455 echo "*** came with the system with the command"
2457 echo "*** rpm --erase --nodeps gtk gtk-devel" ],
2458 [ echo "*** The test program failed to compile or link. See the file config.log for the"
2459 echo "*** exact error that occured. This usually means GTK was incorrectly installed"
2460 echo "*** or that you have moved GTK since it was installed. In the latter case, you"
2461 echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
2462 CFLAGS="$ac_save_CFLAGS"
2463 LIBS="$ac_save_LIBS"
2468 ifelse([$3], , :, [$3])
2470 AC_SUBST(GTK_CFLAGS)