1 # generated automatically by aclocal 1.7.6 -*- 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.6])])
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)
894 AC_DEFUN([MY_DEFINE],
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 if_$1.\$(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)
1048 AC_DEFUN([CONTAINS],
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
1175 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
1176 # Free Software Foundation, Inc.
1178 # This program is free software; you can redistribute it and/or modify
1179 # it under the terms of the GNU General Public License as published by
1180 # the Free Software Foundation; either version 2, or (at your option)
1181 # any later version.
1183 # This program is distributed in the hope that it will be useful,
1184 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1185 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1186 # GNU General Public License for more details.
1188 # You should have received a copy of the GNU General Public License
1189 # along with this program; if not, write to the Free Software
1190 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1197 AC_DEFUN([AM_PATH_LISPDIR],
1198 [AC_ARG_WITH(lispdir,
1199 [ --with-lispdir Override the default lisp directory ],
1200 [ lispdir="$withval"
1201 AC_MSG_CHECKING([where .elc files should go])
1202 AC_MSG_RESULT([$lispdir])],
1204 # If set to t, that means we are running in a shell under Emacs.
1205 # If you have an Emacs named "t", then use the full path.
1206 test x"$EMACS" = xt && EMACS=
1207 AC_CHECK_PROGS(EMACS, emacs xemacs, no)
1208 if test $EMACS != "no"; then
1209 if test x${lispdir+set} != xset; then
1210 AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir],
1211 [# If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly
1212 # Some emacsen will start up in interactive mode, requiring C-x C-c to exit,
1213 # which is non-obvious for non-emacs users.
1214 # Redirecting /dev/null should help a bit; pity we can't detect "broken"
1215 # emacsen earlier and avoid running this altogether.
1216 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])
1217 am_cv_lispdir=`sed -n \
1219 -e '/.*\/lib\/x\?emacs\/site-lisp$/{s,.*/lib/\(x\?emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \
1220 -e '/.*\/share\/x\?emacs\/site-lisp$/{s,.*/share/\(x\?emacs/site-lisp\),${datadir}/\1,;p;q;}' \
1223 if test -z "$am_cv_lispdir"; then
1224 am_cv_lispdir='${datadir}/emacs/site-lisp'
1227 lispdir="$am_cv_lispdir"
1234 AU_DEFUN([ud_PATH_LISPDIR], [AM_PATH_LISPDIR])
1236 dnl Configure Paths for Alsa
1237 dnl Some modifications by Richard Boulton <richard-alsa@tartarus.org>
1238 dnl Christopher Lansdown <lansdoct@cs.alfred.edu>
1239 dnl Jaroslav Kysela <perex@suse.cz>
1240 dnl Modified for TiMidity++ by URABE, Shyouhei <root@mput.dip.jp>
1241 dnl Original : alsa.m4,v 1.22 2002/05/27 11:14:20 tiwai Exp
1242 dnl This version: alsa.m4, 2002/10/08 22:30:18 JST
1243 dnl AM_PATH_ALSA([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
1244 dnl Test for libasound, and define ALSA_CFLAGS and ALSA_LIBS as appropriate.
1245 dnl enables arguments --with-alsa-prefix=
1246 dnl --with-alsa-enc-prefix=
1247 dnl --disable-alsatest (this has no effect, as yet)
1249 dnl For backwards compatibility, if ACTION_IF_NOT_FOUND is not specified,
1250 dnl and the alsa libraries are not found, a fatal AC_MSG_ERROR() will result.
1252 AC_DEFUN([AM_PATH_ALSA],
1253 [dnl Save the original CFLAGS, LDFLAGS, and LIBS
1254 alsa_save_CFLAGS="$CFLAGS"
1255 alsa_save_LDFLAGS="$LDFLAGS"
1256 alsa_save_LIBS="$LIBS"
1260 dnl Get the cflags and libraries for alsa
1262 AC_ARG_WITH(alsa-prefix,
1263 [ --with-alsa-prefix=PFX Prefix where Alsa library is installed(optional)],
1264 [alsa_prefix="$withval"], [alsa_prefix=""])
1266 AC_ARG_WITH(alsa-inc-prefix,
1267 [ --with-alsa-inc-prefix=PFX Prefix where include libraries are (optional)],
1268 [alsa_inc_prefix="$withval"], [alsa_inc_prefix=""])
1270 dnl FIXME: this is not yet implemented
1271 AC_ARG_ENABLE(alsatest,
1272 [ --disable-alsatest Do not try to compile and run a test Alsa program],
1273 [enable_alsatest=no],
1274 [enable_alsatest=yes])
1276 dnl Add any special include directories
1277 AC_MSG_CHECKING(for ALSA CFLAGS)
1278 if test "$alsa_inc_prefix" != "" ; then
1279 ALSA_CFLAGS="$ALSA_CFLAGS -I$alsa_inc_prefix"
1280 CFLAGS="$CFLAGS -I$alsa_inc_prefix"
1282 AC_MSG_RESULT($ALSA_CFLAGS)
1284 dnl add any special lib dirs
1285 AC_MSG_CHECKING(for ALSA LDFLAGS)
1286 if test "$alsa_prefix" != "" ; then
1287 ALSA_LIBS="$ALSA_LIBS -L$alsa_prefix"
1288 LDFLAGS="$LDFLAGS $ALSA_LIBS"
1291 dnl add the alsa library
1292 ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread"
1293 LIBS=`echo $LIBS | sed 's/-lm//'`
1294 LIBS=`echo $LIBS | sed 's/-ldl//'`
1295 LIBS=`echo $LIBS | sed 's/-lpthread//'`
1296 LIBS=`echo $LIBS | sed 's/ //'`
1297 LIBS="$ALSA_LIBS $LIBS"
1298 AC_MSG_RESULT($ALSA_LIBS)
1300 dnl Check for a working version of libasound that is of the right version.
1301 min_alsa_version=ifelse([$1], ,0.1.1,$1)
1302 AC_MSG_CHECKING(for libasound headers version >= $min_alsa_version)
1304 alsa_min_major_version=`echo $min_alsa_version | \
1305 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1306 alsa_min_minor_version=`echo $min_alsa_version | \
1307 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1308 alsa_min_micro_version=`echo $min_alsa_version | \
1309 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1311 dnl This is the test program.
1312 AC_DEFUN([MPUT_ALSA_TRY],[
1313 /* ensure backward compatibility */
1314 #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
1315 #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
1317 #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
1318 #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
1320 #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
1321 #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
1324 # if(SND_LIB_MAJOR > $alsa_min_major_version)
1327 # if(SND_LIB_MAJOR < $alsa_min_major_version)
1331 # if(SND_LIB_MINOR > $alsa_min_minor_version)
1334 # if(SND_LIB_MINOR < $alsa_min_minor_version)
1338 # if(SND_LIB_SUBMINOR < $alsa_min_micro_version)
1344 ])dnl macro MPUT_ALSA_TRY
1349 #include <alsa/asoundlib.h>
1352 [AC_MSG_RESULT(found.)],
1354 #include <sys/asoundlib.h>
1357 [AC_MSG_RESULT(found.)],
1358 [AC_MSG_RESULT(not present.)
1359 ifelse([$3], ,[AC_MSG_RESULT(libasound was not found anywhere.)])
1361 ifelse([$3], ,[AC_MSG_RESULT(Sufficiently new version of libasound not found.)])
1365 dnl Now that we know we have the right version, why not see if we
1366 dnl have the library and not just the headers.
1367 AC_CHECK_LIB([asound],[snd_ctl_open], ,
1368 [ifelse([$3], ,[AC_MSG_RESULT(No linkable libasound was found.)])
1372 if test "x$alsa_found" = "xyes" ; then
1373 ifelse([$2], , :, [$2])
1374 LIBS=`echo $LIBS | sed 's/-lasound//g'`
1375 LIBS=`echo $LIBS | sed 's/ //'`
1376 LIBS="-lasound $LIBS"
1378 ifelse([$3], , :, [$3])
1379 CFLAGS="$alsa_save_CFLAGS"
1380 LDFLAGS="$alsa_save_LDFLAGS"
1381 LIBS="$alsa_save_LIBS"
1386 dnl That should be it. Now just export out symbols:
1387 AC_SUBST(ALSA_CFLAGS)
1391 # Configure paths for ESD
1392 # Manish Singh 98-9-30
1393 # stolen back from Frank Belew
1394 # stolen from Manish Singh
1395 # Shamelessly stolen from Owen Taylor
1397 dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
1398 dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
1400 AC_DEFUN([AM_PATH_ESD],
1402 dnl Get the cflags and libraries from the esd-config script
1404 AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)],
1405 esd_prefix="$withval", esd_prefix="")
1406 AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)],
1407 esd_exec_prefix="$withval", esd_exec_prefix="")
1408 AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program],
1409 , enable_esdtest=yes)
1411 if test x$esd_exec_prefix != x ; then
1412 esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
1413 if test x${ESD_CONFIG+set} != xset ; then
1414 ESD_CONFIG=$esd_exec_prefix/bin/esd-config
1417 if test x$esd_prefix != x ; then
1418 esd_args="$esd_args --prefix=$esd_prefix"
1419 if test x${ESD_CONFIG+set} != xset ; then
1420 ESD_CONFIG=$esd_prefix/bin/esd-config
1424 AC_PATH_PROG(ESD_CONFIG, esd-config, no)
1425 min_esd_version=ifelse([$1], ,0.2.7,$1)
1426 AC_MSG_CHECKING(for ESD - version >= $min_esd_version)
1428 if test "$ESD_CONFIG" = "no" ; then
1433 ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
1434 ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`
1436 esd_major_version=`$ESD_CONFIG $esd_args --version | \
1437 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1438 esd_minor_version=`$ESD_CONFIG $esd_args --version | \
1439 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1440 esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
1441 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1442 if test "x$enable_esdtest" = "xyes" ; then
1443 ac_save_CFLAGS="$CFLAGS"
1444 ac_save_LIBS="$LIBS"
1445 CFLAGS="$CFLAGS $ESD_CFLAGS"
1446 LIBS="$LIBS $ESD_LIBS"
1448 dnl Now check if the installed ESD is sufficiently new. (Also sanity
1449 dnl checks the results of esd-config to some extent
1459 my_strdup (char *str)
1465 new_str = malloc ((strlen (str) + 1) * sizeof(char));
1466 strcpy (new_str, str);
1476 int major, minor, micro;
1479 system ("touch conf.esdtest");
1481 /* HP/UX 9 (%@#!) writes to sscanf strings */
1482 tmp_version = my_strdup("$min_esd_version");
1483 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
1484 printf("%s, bad version string\n", "$min_esd_version");
1488 if (($esd_major_version > major) ||
1489 (($esd_major_version == major) && ($esd_minor_version > minor)) ||
1490 (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
1496 printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
1497 printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
1498 printf("*** best to upgrade to the required version.\n");
1499 printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
1500 printf("*** to point to the correct copy of esd-config, and remove the file\n");
1501 printf("*** config.cache before re-running configure\n");
1506 ],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1507 CFLAGS="$ac_save_CFLAGS"
1508 LIBS="$ac_save_LIBS"
1512 if test "x$no_esd" = x ; then
1514 ifelse([$2], , :, [$2])
1517 if test "$ESD_CONFIG" = "no" ; then
1518 echo "*** The esd-config script installed by ESD could not be found"
1519 echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
1520 echo "*** your path, or set the ESD_CONFIG environment variable to the"
1521 echo "*** full path to esd-config."
1523 if test -f conf.esdtest ; then
1526 echo "*** Could not run ESD test program, checking why..."
1527 CFLAGS="$CFLAGS $ESD_CFLAGS"
1528 LIBS="$LIBS $ESD_LIBS"
1535 [ echo "*** The test program compiled, but did not run. This usually means"
1536 echo "*** that the run-time linker is not finding ESD or finding the wrong"
1537 echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
1538 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1539 echo "*** to the installed location Also, make sure you have run ldconfig if that"
1540 echo "*** is required on your system"
1542 echo "*** If you have an old version installed, it is best to remove it, although"
1543 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
1544 [ echo "*** The test program failed to compile or link. See the file config.log for the"
1545 echo "*** exact error that occured. This usually means ESD was incorrectly installed"
1546 echo "*** or that you have moved ESD since it was installed. In the latter case, you"
1547 echo "*** may want to edit the esd-config script: $ESD_CONFIG" ])
1548 CFLAGS="$ac_save_CFLAGS"
1549 LIBS="$ac_save_LIBS"
1555 ifelse([$3], , :, [$3])
1557 AC_SUBST(ESD_CFLAGS)
1562 dnl AM_ESD_SUPPORTS_MULTIPLE_RECORD([ACTION-IF-SUPPORTS [, ACTION-IF-NOT-SUPPORTS]])
1563 dnl Test, whether esd supports multiple recording clients (version >=0.2.21)
1565 AC_DEFUN([AM_ESD_SUPPORTS_MULTIPLE_RECORD],
1567 AC_MSG_NOTICE([whether installed esd version supports multiple recording clients])
1568 ac_save_ESD_CFLAGS="$ESD_CFLAGS"
1569 ac_save_ESD_LIBS="$ESD_LIBS"
1572 AM_CONDITIONAL(ESD_SUPPORTS_MULTIPLE_RECORD, true)
1573 AC_DEFINE(ESD_SUPPORTS_MULTIPLE_RECORD, 1,
1574 [Define if you have esound with support of multiple recording clients.])],
1576 ifelse([$2], , [AM_CONDITIONAL(ESD_SUPPORTS_MULTIPLE_RECORD, false)], [$2])
1577 if test "x$ac_save_ESD_CFLAGS" != x ; then
1578 ESD_CFLAGS="$ac_save_ESD_CFLAGS"
1580 if test "x$ac_save_ESD_LIBS" != x ; then
1581 ESD_LIBS="$ac_save_ESD_LIBS"
1587 # Configure paths for libao
1588 # Jack Moffitt <jack@icecast.org> 10-21-2000
1589 # Shamelessly stolen from Owen Taylor and Manish Singh
1591 dnl XIPH_PATH_AO([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1592 dnl Test for libao, and define AO_CFLAGS and AO_LIBS
1594 AC_DEFUN([XIPH_PATH_AO],
1596 dnl Get the cflags and libraries
1598 AC_ARG_WITH(ao,[ --with-ao=PFX Prefix where libao is installed (optional)], ao_prefix="$withval", ao_prefix="")
1599 AC_ARG_WITH(ao-libraries,[ --with-ao-libraries=DIR Directory where libao library is installed (optional)], ao_libraries="$withval", ao_libraries="")
1600 AC_ARG_WITH(ao-includes,[ --with-ao-includes=DIR Directory where libao header files are installed (optional)], ao_includes="$withval", ao_includes="")
1601 AC_ARG_ENABLE(aotest, [ --disable-aotest Do not try to compile and run a test ao program],, enable_aotest=yes)
1604 if test "x$ao_libraries" != "x" ; then
1605 AO_LIBS="-L$ao_libraries"
1606 elif test "x$ao_prefix" != "x"; then
1607 AO_LIBS="-L$ao_prefix/lib"
1608 elif test "x$prefix" != "xNONE"; then
1609 AO_LIBS="-L$prefix/lib"
1612 if test "x$ao_includes" != "x" ; then
1613 AO_CFLAGS="-I$ao_includes"
1614 elif test "x$ao_prefix" != "x"; then
1615 AO_CFLAGS="-I$ao_prefix/include"
1616 elif test "x$prefix" != "xNONE"; then
1617 AO_CFLAGS="-I$prefix/include"
1620 # see where dl* and friends live
1621 AC_CHECK_FUNCS(dlopen, [AO_DL_LIBS=""], [
1622 AC_CHECK_LIB(dl, dlopen, [AO_DL_LIBS="-ldl"], [
1623 AC_MSG_WARN([could not find dlopen() needed by libao sound drivers
1624 your system may not be supported.])
1628 AO_LIBS="$AO_LIBS -lao $AO_DL_LIBS"
1630 AC_MSG_CHECKING(for ao)
1634 if test "x$enable_aotest" = "xyes" ; then
1635 ac_save_CFLAGS="$CFLAGS"
1636 ac_save_LIBS="$LIBS"
1637 CFLAGS="$CFLAGS $AO_CFLAGS"
1638 LIBS="$LIBS $AO_LIBS"
1640 dnl Now check if the installed ao is sufficiently new.
1651 system("touch conf.aotest");
1655 ],, no_ao=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1656 CFLAGS="$ac_save_CFLAGS"
1657 LIBS="$ac_save_LIBS"
1660 if test "x$no_ao" = "x" ; then
1662 ifelse([$1], , :, [$1])
1665 if test -f conf.aotest ; then
1668 echo "*** Could not run ao test program, checking why..."
1669 CFLAGS="$CFLAGS $AO_CFLAGS"
1670 LIBS="$LIBS $AO_LIBS"
1675 [ echo "*** The test program compiled, but did not run. This usually means"
1676 echo "*** that the run-time linker is not finding ao or finding the wrong"
1677 echo "*** version of ao. If it is not finding ao, you'll need to set your"
1678 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1679 echo "*** to the installed location Also, make sure you have run ldconfig if that"
1680 echo "*** is required on your system"
1682 echo "*** If you have an old version installed, it is best to remove it, although"
1683 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
1684 [ echo "*** The test program failed to compile or link. See the file config.log for the"
1685 echo "*** exact error that occured. This usually means ao was incorrectly installed"
1686 echo "*** or that you have moved ao since it was installed." ])
1687 CFLAGS="$ac_save_CFLAGS"
1688 LIBS="$ac_save_LIBS"
1692 ifelse([$2], , :, [$2])
1699 # Configure paths for libogg
1700 # Jack Moffitt <jack@icecast.org> 10-21-2000
1701 # Shamelessly stolen from Owen Taylor and Manish Singh
1703 dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1704 dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
1706 AC_DEFUN([XIPH_PATH_OGG],
1708 dnl Get the cflags and libraries
1710 AC_ARG_WITH(ogg,[ --with-ogg=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
1711 AC_ARG_WITH(ogg-libraries,[ --with-ogg-libraries=DIR Directory where libogg library is installed (optional)], ogg_libraries="$withval", ogg_libraries="")
1712 AC_ARG_WITH(ogg-includes,[ --with-ogg-includes=DIR Directory where libogg header files are installed (optional)], ogg_includes="$withval", ogg_includes="")
1713 AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
1715 if test "x$ogg_libraries" != "x" ; then
1716 OGG_LIBS="-L$ogg_libraries"
1717 elif test "x$ogg_prefix" != "x" ; then
1718 OGG_LIBS="-L$ogg_prefix/lib"
1719 elif test "x$prefix" != "xNONE" ; then
1720 OGG_LIBS="-L$prefix/lib"
1723 OGG_LIBS="$OGG_LIBS -logg"
1725 if test "x$ogg_includes" != "x" ; then
1726 OGG_CFLAGS="-I$ogg_includes"
1727 elif test "x$ogg_prefix" != "x" ; then
1728 OGG_CFLAGS="-I$ogg_prefix/include"
1729 elif test "x$prefix" != "xNONE"; then
1730 OGG_CFLAGS="-I$prefix/include"
1733 AC_MSG_CHECKING(for Ogg)
1737 if test "x$enable_oggtest" = "xyes" ; then
1738 ac_save_CFLAGS="$CFLAGS"
1739 ac_save_LIBS="$LIBS"
1740 CFLAGS="$CFLAGS $OGG_CFLAGS"
1741 LIBS="$LIBS $OGG_LIBS"
1743 dnl Now check if the installed Ogg is sufficiently new.
1750 #include <ogg/ogg.h>
1754 system("touch conf.oggtest");
1758 ],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1759 CFLAGS="$ac_save_CFLAGS"
1760 LIBS="$ac_save_LIBS"
1763 if test "x$no_ogg" = "x" ; then
1765 ifelse([$1], , :, [$1])
1768 if test -f conf.oggtest ; then
1771 echo "*** Could not run Ogg test program, checking why..."
1772 CFLAGS="$CFLAGS $OGG_CFLAGS"
1773 LIBS="$LIBS $OGG_LIBS"
1776 #include <ogg/ogg.h>
1778 [ echo "*** The test program compiled, but did not run. This usually means"
1779 echo "*** that the run-time linker is not finding Ogg or finding the wrong"
1780 echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
1781 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1782 echo "*** to the installed location Also, make sure you have run ldconfig if that"
1783 echo "*** is required on your system"
1785 echo "*** If you have an old version installed, it is best to remove it, although"
1786 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
1787 [ echo "*** The test program failed to compile or link. See the file config.log for the"
1788 echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
1789 echo "*** or that you have moved Ogg since it was installed." ])
1790 CFLAGS="$ac_save_CFLAGS"
1791 LIBS="$ac_save_LIBS"
1795 ifelse([$2], , :, [$2])
1797 AC_SUBST(OGG_CFLAGS)
1802 # Configure paths for libvorbis
1803 # Jack Moffitt <jack@icecast.org> 10-21-2000
1804 # Shamelessly stolen from Owen Taylor and Manish Singh
1805 # thomasvs added check for vorbis_bitrate_addblock which is new in rc3
1807 dnl XIPH_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1808 dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS
1810 AC_DEFUN([XIPH_PATH_VORBIS],
1812 dnl Get the cflags and libraries
1814 AC_ARG_WITH(vorbis,[ --with-vorbis=PFX Prefix where libvorbis is installed (optional)], vorbis_prefix="$withval", vorbis_prefix="")
1815 AC_ARG_WITH(vorbis-libraries,[ --with-vorbis-libraries=DIR Directory where libvorbis library is installed (optional)], vorbis_libraries="$withval", vorbis_libraries="")
1816 AC_ARG_WITH(vorbis-includes,[ --with-vorbis-includes=DIR Directory where libvorbis header files are installed (optional)], vorbis_includes="$withval", vorbis_includes="")
1817 AC_ARG_ENABLE(vorbistest, [ --disable-vorbistest Do not try to compile and run a test Vorbis program],, enable_vorbistest=yes)
1819 if test "x$vorbis_libraries" != "x" ; then
1820 VORBIS_LIBS="-L$vorbis_libraries"
1821 elif test "x$vorbis_prefix" != "x" ; then
1822 VORBIS_LIBS="-L$vorbis_prefix/lib"
1823 elif test "x$prefix" != "xNONE"; then
1824 VORBIS_LIBS="-L$prefix/lib"
1827 VORBIS_LIBS="$VORBIS_LIBS -lvorbis -lm"
1828 VORBISFILE_LIBS="-lvorbisfile"
1829 VORBISENC_LIBS="-lvorbisenc"
1831 if test "x$vorbis_includes" != "x" ; then
1832 VORBIS_CFLAGS="-I$vorbis_includes"
1833 elif test "x$vorbis_prefix" != "x" ; then
1834 VORBIS_CFLAGS="-I$vorbis_prefix/include"
1835 elif test "x$prefix" != "xNONE"; then
1836 VORBIS_CFLAGS="-I$prefix/include"
1840 AC_MSG_CHECKING(for Vorbis)
1844 if test "x$enable_vorbistest" = "xyes" ; then
1845 ac_save_CFLAGS="$CFLAGS"
1846 ac_save_LIBS="$LIBS"
1847 CFLAGS="$CFLAGS $VORBIS_CFLAGS $OGG_CFLAGS"
1848 LIBS="$LIBS $VORBIS_LIBS $VORBISENC_LIBS $OGG_LIBS"
1850 dnl Now check if the installed Vorbis is sufficiently new.
1852 rm -f conf.vorbistest
1857 #include <vorbis/codec.h>
1858 #include <vorbis/vorbisenc.h>
1863 vorbis_dsp_state vd;
1866 vorbis_info_init (&vi);
1867 vorbis_encode_init (&vi, 2, 44100, -1, 128000, -1);
1868 vorbis_analysis_init (&vd, &vi);
1869 vorbis_block_init (&vd, &vb);
1870 /* this function was added in 1.0rc3, so this is what we're testing for */
1871 vorbis_bitrate_addblock (&vb);
1873 system("touch conf.vorbistest");
1877 ],, no_vorbis=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1878 CFLAGS="$ac_save_CFLAGS"
1879 LIBS="$ac_save_LIBS"
1882 if test "x$no_vorbis" = "x" ; then
1884 ifelse([$1], , :, [$1])
1887 if test -f conf.vorbistest ; then
1890 echo "*** Could not run Vorbis test program, checking why..."
1891 CFLAGS="$CFLAGS $VORBIS_CFLAGS"
1892 LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
1895 #include <vorbis/codec.h>
1897 [ echo "*** The test program compiled, but did not run. This usually means"
1898 echo "*** that the run-time linker is not finding Vorbis or finding the wrong"
1899 echo "*** version of Vorbis. If it is not finding Vorbis, you'll need to set your"
1900 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1901 echo "*** to the installed location Also, make sure you have run ldconfig if that"
1902 echo "*** is required on your system"
1904 echo "*** If you have an old version installed, it is best to remove it, although"
1905 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
1906 [ echo "*** The test program failed to compile or link. See the file config.log for the"
1907 echo "*** exact error that occured. This usually means Vorbis was incorrectly installed"
1908 echo "*** or that you have moved Vorbis since it was installed." ])
1909 CFLAGS="$ac_save_CFLAGS"
1910 LIBS="$ac_save_LIBS"
1916 ifelse([$2], , :, [$2])
1918 AC_SUBST(VORBIS_CFLAGS)
1919 AC_SUBST(VORBIS_LIBS)
1920 AC_SUBST(VORBISFILE_LIBS)
1921 AC_SUBST(VORBISENC_LIBS)
1922 rm -f conf.vorbistest
1925 # Configure paths for libFLAC
1926 # "Inspired" by ogg.m4
1928 dnl AM_PATH_LIBFLAC([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1929 dnl Test for libFLAC, and define LIBFLAC_CFLAGS and LIBFLAC_LIBS
1931 AC_DEFUN([AM_PATH_LIBFLAC],
1933 dnl Get the cflags and libraries
1935 AC_ARG_WITH(libFLAC,[ --with-libFLAC=PFX Prefix where libFLAC is installed (optional)], libFLAC_prefix="$withval", libFLAC_prefix="")
1936 AC_ARG_WITH(libFLAC-libraries,[ --with-libFLAC-libraries=DIR Directory where libFLAC library is installed (optional)], libFLAC_libraries="$withval", libFLAC_libraries="")
1937 AC_ARG_WITH(libFLAC-includes,[ --with-libFLAC-includes=DIR Directory where libFLAC header files are installed (optional)], libFLAC_includes="$withval", libFLAC_includes="")
1938 AC_ARG_ENABLE(libFLACtest, [ --disable-libFLACtest Do not try to compile and run a test libFLAC program],, enable_libFLACtest=yes)
1940 if test "x$libFLAC_libraries" != "x" ; then
1941 LIBFLAC_LIBS="-L$libFLAC_libraries"
1942 elif test "x$libFLAC_prefix" != "x" ; then
1943 LIBFLAC_LIBS="-L$libFLAC_prefix/lib"
1944 elif test "x$prefix" != "xNONE" ; then
1945 LIBFLAC_LIBS="-L$prefix/lib"
1948 LIBFLAC_LIBS="$LIBFLAC_LIBS -lFLAC -lm"
1950 if test "x$libFLAC_includes" != "x" ; then
1951 LIBFLAC_CFLAGS="-I$libFLAC_includes"
1952 elif test "x$libFLAC_prefix" != "x" ; then
1953 LIBFLAC_CFLAGS="-I$libFLAC_prefix/include"
1954 elif test "$prefix" != "xNONE"; then
1955 LIBFLAC_CFLAGS="-I$prefix/include"
1958 AC_MSG_CHECKING(for libFLAC)
1962 if test "x$enable_libFLACtest" = "xyes" ; then
1963 ac_save_CFLAGS="$CFLAGS"
1964 ac_save_CXXFLAGS="$CXXFLAGS"
1965 ac_save_LIBS="$LIBS"
1966 CFLAGS="$CFLAGS $LIBFLAC_CFLAGS"
1967 CXXFLAGS="$CXXFLAGS $LIBFLAC_CFLAGS"
1968 LIBS="$LIBS $LIBFLAC_LIBS"
1970 dnl Now check if the installed libFLAC is sufficiently new.
1972 rm -f conf.libFLACtest
1977 #include <FLAC/format.h>
1981 system("touch conf.libFLACtest");
1985 ],, no_libFLAC=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1986 CFLAGS="$ac_save_CFLAGS"
1987 LIBS="$ac_save_LIBS"
1990 if test "x$no_libFLAC" = "x" ; then
1992 ifelse([$1], , :, [$1])
1995 if test -f conf.libFLACtest ; then
1998 echo "*** Could not run libFLAC test program, checking why..."
1999 CFLAGS="$CFLAGS $LIBFLAC_CFLAGS"
2000 LIBS="$LIBS $LIBFLAC_LIBS"
2003 #include <FLAC/format.h>
2005 [ echo "*** The test program compiled, but did not run. This usually means"
2006 echo "*** that the run-time linker is not finding libFLAC or finding the wrong"
2007 echo "*** version of libFLAC. If it is not finding libFLAC, you'll need to set your"
2008 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
2009 echo "*** to the installed location Also, make sure you have run ldconfig if that"
2010 echo "*** is required on your system"
2012 echo "*** If you have an old version installed, it is best to remove it, although"
2013 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
2014 [ echo "*** The test program failed to compile or link. See the file config.log for the"
2015 echo "*** exact error that occured. This usually means libFLAC was incorrectly installed"
2016 echo "*** or that you have moved libFLAC since it was installed. In the latter case, you"
2017 echo "*** may want to edit the libFLAC-config script: $LIBFLAC_CONFIG" ])
2018 CFLAGS="$ac_save_CFLAGS"
2019 LIBS="$ac_save_LIBS"
2023 ifelse([$2], , :, [$2])
2025 AC_SUBST(LIBFLAC_CFLAGS)
2026 AC_SUBST(LIBFLAC_LIBS)
2027 rm -f conf.libFLACtest
2030 # Configure paths for libOggFLAC
2031 # "Inspired" by ogg.m4
2033 dnl AM_PATH_LIBOGGFLAC([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
2034 dnl Test for libOggFLAC, and define LIBOGGFLAC_CFLAGS and LIBOGGFLAC_LIBS
2036 AC_DEFUN([AM_PATH_LIBOGGFLAC],
2038 dnl Get the cflags and libraries
2040 AC_ARG_WITH(libOggFLAC,[ --with-libOggFLAC=PFX Prefix where libOggFLAC is installed (optional)], libOggFLAC_prefix="$withval", libOggFLAC_prefix="")
2041 AC_ARG_WITH(libOggFLAC-libraries,[ --with-libOggFLAC-libraries=DIR Directory where libOggFLAC library is installed (optional)], libOggFLAC_libraries="$withval", libOggFLAC_libraries="")
2042 AC_ARG_WITH(libOggFLAC-includes,[ --with-libOggFLAC-includes=DIR Directory where libOggFLAC header files are installed (optional)], libOggFLAC_includes="$withval", libOggFLAC_includes="")
2043 AC_ARG_ENABLE(libOggFLACtest, [ --disable-libOggFLACtest Do not try to compile and run a test libOggFLAC program],, enable_libOggFLACtest=yes)
2045 if test "x$libOggFLAC_libraries" != "x" ; then
2046 LIBOGGFLAC_LIBS="-L$libOggFLAC_libraries"
2047 elif test "x$libOggFLAC_prefix" != "x" ; then
2048 LIBOGGFLAC_LIBS="-L$libOggFLAC_prefix/lib"
2049 elif test "x$prefix" != "xNONE" ; then
2050 LIBOGGFLAC_LIBS="-L$prefix/lib"
2053 LIBOGGFLAC_LIBS="$LIBOGGFLAC_LIBS -lOggFLAC -lFLAC -lm"
2055 if test "x$libOggFLAC_includes" != "x" ; then
2056 LIBOGGFLAC_CFLAGS="-I$libOggFLAC_includes"
2057 elif test "x$libOggFLAC_prefix" != "x" ; then
2058 LIBOGGFLAC_CFLAGS="-I$libOggFLAC_prefix/include"
2059 elif test "$prefix" != "xNONE"; then
2060 LIBOGGFLAC_CFLAGS="-I$prefix/include"
2063 AC_MSG_CHECKING(for libOggFLAC)
2067 if test "x$enable_libOggFLACtest" = "xyes" ; then
2068 ac_save_CFLAGS="$CFLAGS"
2069 ac_save_CXXFLAGS="$CXXFLAGS"
2070 ac_save_LIBS="$LIBS"
2071 CFLAGS="$CFLAGS $LIBOGGFLAC_CFLAGS"
2072 CXXFLAGS="$CXXFLAGS $LIBOGGFLAC_CFLAGS"
2073 LIBS="$LIBS $LIBOGGFLAC_LIBS"
2075 dnl Now check if the installed libOggFLAC is sufficiently new.
2077 rm -f conf.libOggFLACtest
2082 #include <OggFLAC/stream_decoder.h>
2086 system("touch conf.libOggFLACtest");
2090 ],, no_libOggFLAC=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
2091 CFLAGS="$ac_save_CFLAGS"
2092 LIBS="$ac_save_LIBS"
2095 if test "x$no_libOggFLAC" = "x" ; then
2097 ifelse([$1], , :, [$1])
2100 if test -f conf.libOggFLACtest ; then
2103 echo "*** Could not run libOggFLAC test program, checking why..."
2104 CFLAGS="$CFLAGS $LIBOGGFLAC_CFLAGS"
2105 LIBS="$LIBS $LIBOGGFLAC_LIBS"
2108 #include <OggFLAC/stream_decoder.h>
2110 [ echo "*** The test program compiled, but did not run. This usually means"
2111 echo "*** that the run-time linker is not finding libOggFLAC or finding the wrong"
2112 echo "*** version of libOggFLAC. If it is not finding libOggFLAC, you'll need to set your"
2113 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
2114 echo "*** to the installed location Also, make sure you have run ldconfig if that"
2115 echo "*** is required on your system"
2117 echo "*** If you have an old version installed, it is best to remove it, although"
2118 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
2119 [ echo "*** The test program failed to compile or link. See the file config.log for the"
2120 echo "*** exact error that occured. This usually means libOggFLAC was incorrectly installed"
2121 echo "*** or that you have moved libOggFLAC since it was installed. In the latter case, you"
2122 echo "*** may want to edit the libOggFLAC-config script: $LIBOGGFLAC_CONFIG" ])
2123 CFLAGS="$ac_save_CFLAGS"
2124 LIBS="$ac_save_LIBS"
2126 LIBOGGFLAC_CFLAGS=""
2128 ifelse([$2], , :, [$2])
2130 AC_SUBST(LIBOGGFLAC_CFLAGS)
2131 AC_SUBST(LIBOGGFLAC_LIBS)
2132 rm -f conf.libOggFLACtest
2135 # Configure paths for GTK+
2136 # Owen Taylor 1997-2001
2138 dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
2139 dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
2140 dnl pass to pkg-config
2142 AC_DEFUN([AM_PATH_GTK_2_0],
2144 dnl Get the cflags and libraries from pkg-config
2146 AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
2147 , enable_gtktest=yes)
2149 pkg_config_args=gtk+-2.0
2154 pkg_config_args="$pkg_config_args gthread-2.0"
2161 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
2163 if test x$PKG_CONFIG != xno ; then
2164 if pkg-config --atleast-pkgconfig-version 0.7 ; then
2167 echo *** pkg-config too old; version 0.7 or better required.
2175 min_gtk_version=ifelse([$1], ,2.0.0,$1)
2176 AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
2178 if test x$PKG_CONFIG != xno ; then
2179 ## don't try to run the test against uninstalled libtool libs
2180 if $PKG_CONFIG --uninstalled $pkg_config_args; then
2181 echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
2185 if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
2192 if test x"$no_gtk" = x ; then
2193 GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
2194 GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
2195 gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
2196 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
2197 gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
2198 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
2199 gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
2200 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
2201 if test "x$enable_gtktest" = "xyes" ; then
2202 ac_save_CFLAGS="$CFLAGS"
2203 ac_save_LIBS="$LIBS"
2204 CFLAGS="$CFLAGS $GTK_CFLAGS"
2205 LIBS="$GTK_LIBS $LIBS"
2207 dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
2208 dnl checks the results of pkg-config to some extent)
2212 #include <gtk/gtk.h>
2219 int major, minor, micro;
2222 system ("touch conf.gtktest");
2224 /* HP/UX 9 (%@#!) writes to sscanf strings */
2225 tmp_version = g_strdup("$min_gtk_version");
2226 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
2227 printf("%s, bad version string\n", "$min_gtk_version");
2231 if ((gtk_major_version != $gtk_config_major_version) ||
2232 (gtk_minor_version != $gtk_config_minor_version) ||
2233 (gtk_micro_version != $gtk_config_micro_version))
2235 printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
2236 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
2237 gtk_major_version, gtk_minor_version, gtk_micro_version);
2238 printf ("*** was found! If pkg-config was correct, then it is best\n");
2239 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
2240 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
2241 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
2242 printf("*** required on your system.\n");
2243 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
2244 printf("*** to point to the correct configuration files\n");
2246 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
2247 (gtk_minor_version != GTK_MINOR_VERSION) ||
2248 (gtk_micro_version != GTK_MICRO_VERSION))
2250 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
2251 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
2252 printf("*** library (version %d.%d.%d)\n",
2253 gtk_major_version, gtk_minor_version, gtk_micro_version);
2257 if ((gtk_major_version > major) ||
2258 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
2259 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
2265 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
2266 gtk_major_version, gtk_minor_version, gtk_micro_version);
2267 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
2268 major, minor, micro);
2269 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
2271 printf("*** If you have already installed a sufficiently new version, this error\n");
2272 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
2273 printf("*** being found. The easiest way to fix this is to remove the old version\n");
2274 printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
2275 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
2276 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
2277 printf("*** so that the correct libraries are found at run-time))\n");
2282 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
2283 CFLAGS="$ac_save_CFLAGS"
2284 LIBS="$ac_save_LIBS"
2287 if test "x$no_gtk" = x ; then
2288 AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
2289 ifelse([$2], , :, [$2])
2292 if test "$PKG_CONFIG" = "no" ; then
2293 echo "*** A new enough version of pkg-config was not found."
2294 echo "*** See http://pkgconfig.sourceforge.net"
2296 if test -f conf.gtktest ; then
2299 echo "*** Could not run GTK+ test program, checking why..."
2300 ac_save_CFLAGS="$CFLAGS"
2301 ac_save_LIBS="$LIBS"
2302 CFLAGS="$CFLAGS $GTK_CFLAGS"
2303 LIBS="$LIBS $GTK_LIBS"
2305 #include <gtk/gtk.h>
2307 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
2308 [ echo "*** The test program compiled, but did not run. This usually means"
2309 echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
2310 echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
2311 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
2312 echo "*** to the installed location Also, make sure you have run ldconfig if that"
2313 echo "*** is required on your system"
2315 echo "*** If you have an old version installed, it is best to remove it, although"
2316 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
2317 [ echo "*** The test program failed to compile or link. See the file config.log for the"
2318 echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
2319 CFLAGS="$ac_save_CFLAGS"
2320 LIBS="$ac_save_LIBS"
2325 ifelse([$3], , :, [$3])
2327 AC_SUBST(GTK_CFLAGS)
2332 # Configure paths for GTK+
2333 # Owen Taylor 97-11-3
2335 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
2336 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
2338 AC_DEFUN([AM_PATH_GTK],
2340 dnl Get the cflags and libraries from the gtk-config script
2342 AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
2343 gtk_config_prefix="$withval", gtk_config_prefix="")
2344 AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
2345 gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
2346 AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
2347 , enable_gtktest=yes)
2353 gtk_config_args="$gtk_config_args gthread"
2358 if test x$gtk_config_exec_prefix != x ; then
2359 gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
2360 if test x${GTK_CONFIG+set} != xset ; then
2361 GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
2364 if test x$gtk_config_prefix != x ; then
2365 gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
2366 if test x${GTK_CONFIG+set} != xset ; then
2367 GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
2371 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
2372 min_gtk_version=ifelse([$1], ,0.99.7,$1)
2373 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
2375 if test "$GTK_CONFIG" = "no" ; then
2378 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
2379 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
2380 gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
2381 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
2382 gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
2383 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
2384 gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
2385 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
2386 if test "x$enable_gtktest" = "xyes" ; then
2387 ac_save_CFLAGS="$CFLAGS"
2388 ac_save_LIBS="$LIBS"
2389 CFLAGS="$CFLAGS $GTK_CFLAGS"
2390 LIBS="$GTK_LIBS $LIBS"
2392 dnl Now check if the installed GTK is sufficiently new. (Also sanity
2393 dnl checks the results of gtk-config to some extent
2397 #include <gtk/gtk.h>
2404 int major, minor, micro;
2407 system ("touch conf.gtktest");
2409 /* HP/UX 9 (%@#!) writes to sscanf strings */
2410 tmp_version = g_strdup("$min_gtk_version");
2411 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
2412 printf("%s, bad version string\n", "$min_gtk_version");
2416 if ((gtk_major_version != $gtk_config_major_version) ||
2417 (gtk_minor_version != $gtk_config_minor_version) ||
2418 (gtk_micro_version != $gtk_config_micro_version))
2420 printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
2421 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
2422 gtk_major_version, gtk_minor_version, gtk_micro_version);
2423 printf ("*** was found! If gtk-config was correct, then it is best\n");
2424 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
2425 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
2426 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
2427 printf("*** required on your system.\n");
2428 printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
2429 printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
2430 printf("*** before re-running configure\n");
2432 #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
2433 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
2434 (gtk_minor_version != GTK_MINOR_VERSION) ||
2435 (gtk_micro_version != GTK_MICRO_VERSION))
2437 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
2438 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
2439 printf("*** library (version %d.%d.%d)\n",
2440 gtk_major_version, gtk_minor_version, gtk_micro_version);
2442 #endif /* defined (GTK_MAJOR_VERSION) ... */
2445 if ((gtk_major_version > major) ||
2446 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
2447 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
2453 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
2454 gtk_major_version, gtk_minor_version, gtk_micro_version);
2455 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
2456 major, minor, micro);
2457 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
2459 printf("*** If you have already installed a sufficiently new version, this error\n");
2460 printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
2461 printf("*** being found. The easiest way to fix this is to remove the old version\n");
2462 printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
2463 printf("*** correct copy of gtk-config. (In this case, you will have to\n");
2464 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
2465 printf("*** so that the correct libraries are found at run-time))\n");
2470 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
2471 CFLAGS="$ac_save_CFLAGS"
2472 LIBS="$ac_save_LIBS"
2475 if test "x$no_gtk" = x ; then
2477 ifelse([$2], , :, [$2])
2480 if test "$GTK_CONFIG" = "no" ; then
2481 echo "*** The gtk-config script installed by GTK could not be found"
2482 echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
2483 echo "*** your path, or set the GTK_CONFIG environment variable to the"
2484 echo "*** full path to gtk-config."
2486 if test -f conf.gtktest ; then
2489 echo "*** Could not run GTK test program, checking why..."
2490 CFLAGS="$CFLAGS $GTK_CFLAGS"
2491 LIBS="$LIBS $GTK_LIBS"
2493 #include <gtk/gtk.h>
2495 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
2496 [ echo "*** The test program compiled, but did not run. This usually means"
2497 echo "*** that the run-time linker is not finding GTK or finding the wrong"
2498 echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
2499 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
2500 echo "*** to the installed location Also, make sure you have run ldconfig if that"
2501 echo "*** is required on your system"
2503 echo "*** If you have an old version installed, it is best to remove it, although"
2504 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
2506 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
2507 echo "*** came with the system with the command"
2509 echo "*** rpm --erase --nodeps gtk gtk-devel" ],
2510 [ echo "*** The test program failed to compile or link. See the file config.log for the"
2511 echo "*** exact error that occured. This usually means GTK was incorrectly installed"
2512 echo "*** or that you have moved GTK since it was installed. In the latter case, you"
2513 echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
2514 CFLAGS="$ac_save_CFLAGS"
2515 LIBS="$ac_save_LIBS"
2520 ifelse([$3], , :, [$3])
2522 AC_SUBST(GTK_CFLAGS)