1 # aclocal.m4 generated automatically by aclocal 1.5
3 # Copyright 1996, 1997, 1998, 1999, 2000, 2001
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 dnl TiMidity++ -- MIDI to WAVE converter and player
15 dnl Copyright (C) 1999-2002 Masanao Izumo <mo@goice.co.jp>
16 dnl Copyright (C) 1995 Tuukka Toivonen <tt@cgs.fi>
18 dnl This program is free software; you can redistribute it and/or modify
19 dnl it under the terms of the GNU General Public License as published by
20 dnl the Free Software Foundation; either version 2 of the License, or
21 dnl (at your option) any later version.
23 dnl This program is distributed in the hope that it will be useful,
24 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
25 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 dnl GNU General Public License for more details.
28 dnl You should have received a copy of the GNU General Public License
29 dnl along with this program; if not, write to the Free Software
30 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32 dnl MY_DEFINE(VARIABLE)
34 [cat >> confdefs.h <<EOF
39 dnl CONFIG_INTERFACE(package,macro_name,interface_id,help
41 dnl action-if-yes-or-dynamic,
43 dnl action-if-yes,action-if-dynamic,action-if-no)
45 AC_DEFUN(CONFIG_INTERFACE,
46 [AC_ARG_ENABLE($1,[$4],
47 [case "x$enable_$1" in xyes|xdynamic) $5 ;; esac])
51 AM_CONDITIONAL(ENABLE_$2, true)
55 dynamic_targets="$dynamic_targets interface_$3.\$(so)"
66 dnl alsa.m4 starts form here
67 dnl Configure Paths for Alsa
68 dnl Christopher Lansdown (lansdoct@cs.alfred.edu)
70 dnl modified for TiMidity++ by Isaku Yamahata(yamahata@kusm.kyoto-u.ac.jp)
72 dnl AM_PATH_ALSA_LOCAL(MINIMUM-VERSION)
73 dnl Test for libasound, and define ALSA_CFLAGS and ALSA_LIBS as appropriate.
74 dnl if there exit ALSA, define have_alsa=yes, otherwise no.
75 dnl enables arguments --with-alsa-prefix= --with-alsa-enc-prefix= --disable-alsatest
77 AC_DEFUN(AM_PATH_ALSA_LOCAL,
79 dnl Get the clfags and libraries for alsa
82 AC_ARG_WITH(alsa-prefix,[ --with-alsa-prefix=PFX Prefix where Alsa library is installed(optional)],
83 [alsa_prefix="$withval"], [alsa_prefix=""])
84 AC_ARG_WITH(alsa-inc-prefix, [ --with-alsa-inc-prefix=PFX Prefix where include libraries are (optional)],
85 [alsa_inc_prefix="$withval"], [alsa_inc_prefix=""])
86 AC_ARG_ENABLE(alsatest, [ --disable-alsatest Do not try to compile and run a test Alsa program], [enable_alsatest=no], [enable_alsatest=yes])
88 dnl Add any special include directories
89 AC_MSG_CHECKING(for ALSA CFLAGS)
90 if test "$alsa_inc_prefix" != "" ; then
91 ALSA_CFLAGS="$ALSA_CFLAGS -I$alsa_inc_prefix"
92 CFLAGS="$CFLAGS -I$alsa_inc_prefix"
94 AC_MSG_RESULT($ALSA_CFLAGS)
96 dnl add any special lib dirs
97 AC_MSG_CHECKING(for ALSA LDFLAGS)
98 if test "$alsa_prefix" != "" ; then
99 ALSA_LIBS="$ALSA_LIBS -L$alsa_prefix"
100 LIBS="-L$alsa_prefix"
103 dnl add the alsa library
104 ALSA_LIBS="$ALSA_LIBS -lasound"
105 AC_MSG_RESULT($ALSA_LIBS)
107 dnl Check for the presence of the library
108 dnl if test $enable_alsatest = yes; then
109 dnl AC_MSG_CHECKING(for working libasound)
110 dnl KEEP_LDFLAGS="$LDFLAGS"
111 dnl LDFLAGS="$LDFLAGS $ALSA_LIBS"
113 dnl #include <sys/asoundlib.h>
120 dnl [AC_MSG_RESULT("present")],
121 dnl [AC_MSG_RESULT("not found. ")
122 dnl AC_MSG_ERROR(Fatal error: Install alsa-lib package or use --with-alsa-prefix option...)],
123 dnl [AC_MSG_RESULT(unsopported)
124 dnl AC_MSG_ERROR(Cross-compiling isn't supported...)]
126 dnl LDFLAGS="$KEEP_LDFLAGS"
129 dnl Check for a working version of libasound that is of the right version.
130 min_alsa_version=ifelse([$1], ,0.1.1,$1)
131 AC_MSG_CHECKING(for libasound headers version >= $min_alsa_version)
133 alsa_min_major_version=`echo $min_alsa_version | \
134 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
135 alsa_min_minor_version=`echo $min_alsa_version | \
136 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
137 alsa_min_micro_version=`echo $min_alsa_version | \
138 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
141 #include <sys/asoundlib.h>
143 /* ensure backward compatibility */
144 #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
145 #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
147 #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
148 #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
150 #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
151 #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
154 # if(SND_LIB_MAJOR > $alsa_min_major_version)
157 # if(SND_LIB_MAJOR < $alsa_min_major_version)
161 # if(SND_LIB_MINOR > $alsa_min_minor_version)
164 # if(SND_LIB_MINOR < $alsa_min_minor_version)
168 # if(SND_LIB_SUBMINOR < $alsa_min_micro_version)
175 [AC_MSG_RESULT(found.)
177 [AC_MSG_RESULT(not present.)]
180 dnl Now that we know that we have the right version, let's see if we have the library and not just the headers.
181 AC_CHECK_LIB([asound], [snd_cards],,
182 [AC_MSG_RESULT(No linkable libasound was found.)]
185 dnl That should be it. Now just export out symbols:
186 AC_SUBST(ALSA_CFLAGS)
189 dnl alsa.m4 ends here
191 # Configure paths for ESD
192 # Manish Singh 98-9-30
193 # stolen back from Frank Belew
194 # stolen from Manish Singh
195 # Shamelessly stolen from Owen Taylor
197 dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
198 dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
200 AC_DEFUN(AM_PATH_ESD,
202 dnl Get the cflags and libraries from the esd-config script
204 AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)],
205 esd_prefix="$withval", esd_prefix="")
206 AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)],
207 esd_exec_prefix="$withval", esd_exec_prefix="")
208 AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program],
209 , enable_esdtest=yes)
211 if test x$esd_exec_prefix != x ; then
212 esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
213 if test x${ESD_CONFIG+set} != xset ; then
214 ESD_CONFIG=$esd_exec_prefix/bin/esd-config
217 if test x$esd_prefix != x ; then
218 esd_args="$esd_args --prefix=$esd_prefix"
219 if test x${ESD_CONFIG+set} != xset ; then
220 ESD_CONFIG=$esd_prefix/bin/esd-config
224 AC_PATH_PROG(ESD_CONFIG, esd-config, no)
225 min_esd_version=ifelse([$1], ,0.2.7,$1)
226 AC_MSG_CHECKING(for ESD - version >= $min_esd_version)
228 if test "$ESD_CONFIG" = "no" ; then
231 ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
232 ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`
234 esd_major_version=`$ESD_CONFIG $esd_args --version | \
235 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
236 esd_minor_version=`$ESD_CONFIG $esd_args --version | \
237 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
238 esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
239 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
240 if test "x$enable_esdtest" = "xyes" ; then
241 ac_save_CFLAGS="$CFLAGS"
243 CFLAGS="$CFLAGS $ESD_CFLAGS"
244 LIBS="$LIBS $ESD_LIBS"
246 dnl Now check if the installed ESD is sufficiently new. (Also sanity
247 dnl checks the results of esd-config to some extent
257 my_strdup (char *str)
263 new_str = malloc ((strlen (str) + 1) * sizeof(char));
264 strcpy (new_str, str);
274 int major, minor, micro;
277 system ("touch conf.esdtest");
279 /* HP/UX 9 (%@#!) writes to sscanf strings */
280 tmp_version = my_strdup("$min_esd_version");
281 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
282 printf("%s, bad version string\n", "$min_esd_version");
286 if (($esd_major_version > major) ||
287 (($esd_major_version == major) && ($esd_minor_version > minor)) ||
288 (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
294 printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
295 printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
296 printf("*** best to upgrade to the required version.\n");
297 printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
298 printf("*** to point to the correct copy of esd-config, and remove the file\n");
299 printf("*** config.cache before re-running configure\n");
304 ],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
305 CFLAGS="$ac_save_CFLAGS"
309 if test "x$no_esd" = x ; then
311 ifelse([$2], , :, [$2])
314 if test "$ESD_CONFIG" = "no" ; then
315 echo "*** The esd-config script installed by ESD could not be found"
316 echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
317 echo "*** your path, or set the ESD_CONFIG environment variable to the"
318 echo "*** full path to esd-config."
320 if test -f conf.esdtest ; then
323 echo "*** Could not run ESD test program, checking why..."
324 CFLAGS="$CFLAGS $ESD_CFLAGS"
325 LIBS="$LIBS $ESD_LIBS"
330 [ echo "*** The test program compiled, but did not run. This usually means"
331 echo "*** that the run-time linker is not finding ESD or finding the wrong"
332 echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
333 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
334 echo "*** to the installed location Also, make sure you have run ldconfig if that"
335 echo "*** is required on your system"
337 echo "*** If you have an old version installed, it is best to remove it, although"
338 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
339 [ echo "*** The test program failed to compile or link. See the file config.log for the"
340 echo "*** exact error that occured. This usually means ESD was incorrectly installed"
341 echo "*** or that you have moved ESD since it was installed. In the latter case, you"
342 echo "*** may want to edit the esd-config script: $ESD_CONFIG" ])
343 CFLAGS="$ac_save_CFLAGS"
349 ifelse([$3], , :, [$3])
356 dnl CHECK_DLSYM_UNDERSCORE([ACTION-IF-NEED [, ACTION IF-NOT-NEED]])
358 dnl CC CFLAGS CPPFLAGS LDFLAGS LIBS SHCFLAGS SHLD SHLDFLAGS
359 dnl ac_cv_header_dlfcn_h lib_dl_opt so
360 AC_DEFUN(CHECK_DLSYM_UNDERSCORE,
361 [dnl Check if dlsym need a leading underscore
362 AC_MSG_CHECKING(whether your dlsym() needs a leading underscore)
363 AC_CACHE_VAL(timidity_cv_func_dlsym_underscore,
364 [case "$ac_cv_header_dlfcn_h" in
365 yes) i_dlfcn=define;;
376 #include <dlfcn.h> /* the dynamic linker include file for Sunos/Solaris */
378 #include <sys/types.h>
392 int mode = RTLD_LAZY ;
394 handle = dlopen("./dyna.$so", mode) ;
395 if (handle == NULL) {
400 symbol = dlsym(handle, "fred") ;
401 if (symbol == NULL) {
402 /* try putting a leading underscore */
403 symbol = dlsym(handle, "_fred") ;
404 if (symbol == NULL) {
417 : Call the object file tmp-dyna.o in case dlext=o.
418 if ${CC-cc} $CFLAGS $SHCFLAGS $CPPFLAGS -c dyna.c > /dev/null 2>&1 &&
419 mv dyna.o tmp-dyna.o > /dev/null 2>&1 &&
420 $SHLD $SHLDFLAGS -o dyna.$so tmp-dyna.o > /dev/null 2>&1 &&
421 ${CC-cc} -o fred $CFLAGS $CPPFLAGS $LDFLAGS fred.c $LIBS $lib_dl_opt > /dev/null 2>&1; then
424 1) AC_MSG_WARN(Test program failed using dlopen. Perhaps you should not use dynamic loading.)
426 2) AC_MSG_WARN(Test program failed using dlsym. Perhaps you should not use dynamic loading.)
428 3) timidity_cv_func_dlsym_underscore=yes
430 4) timidity_cv_func_dlsym_underscore=no
434 AC_MSG_WARN(I can't compile and run the test program.)
436 rm -f dyna.c dyna.o dyna.$so tmp-dyna.o fred.c fred.o fred
438 case "x$timidity_cv_func_dlsym_underscore" in
449 dnl contains program from perl5
451 AC_DEFUN(CONTAINS_INIT,
452 [dnl Some greps do not return status, grrr.
453 AC_MSG_CHECKING(whether grep returns status)
454 echo "grimblepritz" >grimble
455 if grep blurfldyick grimble >/dev/null 2>&1 ; then
456 contains="./contains"
457 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
460 contains="./contains"
463 dnl the following should work in any shell
465 grep) AC_MSG_RESULT(yes)
468 AC_MSG_RESULT(AGH! Grep doesn't return a status. Attempting remedial action.)
469 cat >./contains <<'EOSS'
470 grep "[$]1" "[$]2" >.greptmp && cat .greptmp && test -s .greptmp
472 chmod +x "./contains"
478 dnl CONTAINS(word,filename,action-if-found,action-if-not-found)
480 [if $contains "^[$1]"'[$]' $2 >/dev/null 2>&1; then
488 dnl SET_UNIQ_WORDS(shell-variable,words...)
489 AC_DEFUN(SET_UNIQ_WORDS,
490 [rm -f wordtmp >/dev/null 2>&1
493 CONTAINS([$f],wordtmp,:,[echo $f >>wordtmp; val="$val $f"])
496 rm -f wordtmp >/dev/null 2>&1
500 dnl WAPI_CHECK_FUNC(FUNCTION, INCLUDES, TEST-BODY,
501 [ACTION-FI-FOUND [, ACTION-IF-NOT-FOUND]])
502 AC_DEFUN(WAPI_CHECK_FUNC,
503 [AC_MSG_CHECKING(for $1)
504 AC_CACHE_VAL(wapi_cv_func_$1,
505 [AC_TRY_LINK([#include <windows.h>
508 wapi_cv_func_$1=yes, wapi_cv_func_$1=no)])
509 if eval "test \"`echo '$wapi_cv_func_'$1`\" = yes"; then
511 ifelse([$4], , :, [$4])
520 dnl WAPI_CHECK_LIB(LIBRARY, FUNCTION,
521 dnl INCLUDES, TEST-BODY
522 dnl [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
523 dnl [, OTHER-LIBRARIES]]])
524 AC_DEFUN(WAPI_CHECK_LIB,
525 [AC_MSG_CHECKING([for $2 in -l$1])
526 ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
527 AC_CACHE_VAL(wapi_cv_lib_$ac_lib_var,
528 [ac_save_LIBS="$LIBS"
530 AC_TRY_LINK([#include <windows.h>
533 eval "wapi_cv_lib_$ac_lib_var=yes",
534 eval "wapi_cv_lib_$ac_lib_var=no")
537 if eval "test \"`echo '$wapi_cv_lib_'$ac_lib_var`\" = yes"; then
539 ifelse([$5], ,LIBS="-l$1 $LIBS", [$5])
548 dnl EXTRACT_CPPFLAGS(CPPFLAGS-to-append,others-to-append,FLAGS)
549 AC_DEFUN(EXTRACT_CPPFLAGS,
552 .-I?*|.-D?*) $1="[$]$1 $f" ;;
559 dnl CHECK_COMPILER_OPTION(OPTIONS [, ACTION-IF-SUCCEED [, ACTION-IF-FAILED]])
560 AC_DEFUN(CHECK_COMPILER_OPTION,
561 [AC_MSG_CHECKING([whether -$1 option is recognized])
562 ac_ccoption=`echo $1 | sed 'y%./+-%__p_%'`
563 AC_CACHE_VAL(timidity_cv_ccoption_$ac_ccoption,
564 [cat > conftest.$ac_ext <<EOF
565 int main() {return 0;}
567 if ${CC-cc} $LDFLAGS $CFLAGS -o conftest${ac_exeext} -$1 conftest.$ac_ext > conftest.out 2>&1; then
568 if test -s conftest.out; then
569 eval "timidity_cv_ccoption_$ac_ccoption=no"
571 eval "timidity_cv_ccoption_$ac_ccoption=yes"
574 eval "timidity_cv_ccoption_$ac_ccoption=no"
577 if eval "test \"`echo '$timidity_cv_ccoption_'$ac_ccoption`\" = yes"; then
589 dnl MY_SEARCH_LIBS(FUNCTION, LIBRARIES [, ACTION-IF-FOUND
590 dnl [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
591 dnl Search for a library defining FUNC, if it's not already available.
593 AC_DEFUN(MY_SEARCH_LIBS,
594 [AC_CACHE_CHECK([for library containing $1], [timidity_cv_search_$1],
595 [ac_func_search_save_LIBS="$LIBS"
596 timidity_cv_search_$1="no"
598 LIBS="$i $5 $ac_func_search_save_LIBS"
599 AC_TRY_LINK_FUNC([$1], [timidity_cv_search_$1="$i"; break])
601 LIBS="$ac_func_search_save_LIBS"])
602 if test "$timidity_cv_search_$1" != "no"; then
609 # beginning of gtk.m4
610 # Configure paths for GTK+
611 # Owen Taylor 97-11-3
613 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
614 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
616 AC_DEFUN(AM_PATH_GTK,
618 dnl Get the cflags and libraries from the gtk-config script
620 AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
621 gtk_config_prefix="$withval", gtk_config_prefix="")
622 AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
623 gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
624 AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
625 , enable_gtktest=yes)
627 if test x$gtk_config_exec_prefix != x ; then
628 gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
629 if test x${GTK_CONFIG+set} != xset ; then
630 GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
633 if test x$gtk_config_prefix != x ; then
634 gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
635 if test x${GTK_CONFIG+set} != xset ; then
636 GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
640 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
641 min_gtk_version=ifelse([$1], ,0.99.7,$1)
642 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
644 if test "$GTK_CONFIG" = "no" ; then
647 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
648 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
649 gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
650 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
651 gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
652 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
653 gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
654 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
655 if test "x$enable_gtktest" = "xyes" ; then
656 ac_save_CFLAGS="$CFLAGS"
658 CFLAGS="$CFLAGS $GTK_CFLAGS"
659 LIBS="$LIBS $GTK_LIBS"
661 dnl Now check if the installed GTK is sufficiently new. (Also sanity
662 dnl checks the results of gtk-config to some extent
672 int major, minor, micro;
675 system ("touch conf.gtktest");
677 /* HP/UX 9 (%@#!) writes to sscanf strings */
678 tmp_version = g_strdup("$min_gtk_version");
679 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
680 printf("%s, bad version string\n", "$min_gtk_version");
684 if ((gtk_major_version != $gtk_config_major_version) ||
685 (gtk_minor_version != $gtk_config_minor_version) ||
686 (gtk_micro_version != $gtk_config_micro_version))
688 printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
689 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
690 gtk_major_version, gtk_minor_version, gtk_micro_version);
691 printf ("*** was found! If gtk-config was correct, then it is best\n");
692 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
693 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
694 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
695 printf("*** required on your system.\n");
696 printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
697 printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
698 printf("*** before re-running configure\n");
702 if ((gtk_major_version > major) ||
703 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
704 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
710 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
711 gtk_major_version, gtk_minor_version, gtk_micro_version);
712 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
713 major, minor, micro);
714 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
716 printf("*** If you have already installed a sufficiently new version, this error\n");
717 printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
718 printf("*** being found. The easiest way to fix this is to remove the old version\n");
719 printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
720 printf("*** correct copy of gtk-config. (In this case, you will have to\n");
721 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
722 printf("*** so that the correct libraries are found at run-time))\n");
727 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
728 CFLAGS="$ac_save_CFLAGS"
732 if test "x$no_gtk" = x ; then
734 ifelse([$2], , :, [$2])
737 if test "$GTK_CONFIG" = "no" ; then
738 echo "*** The gtk-config script installed by GTK could not be found"
739 echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
740 echo "*** your path, or set the GTK_CONFIG environment variable to the"
741 echo "*** full path to gtk-config."
743 if test -f conf.gtktest ; then
746 echo "*** Could not run GTK test program, checking why..."
747 CFLAGS="$CFLAGS $GTK_CFLAGS"
748 LIBS="$LIBS $GTK_LIBS"
752 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
753 [ echo "*** The test program compiled, but did not run. This usually means"
754 echo "*** that the run-time linker is not finding GTK or finding the wrong"
755 echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
756 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
757 echo "*** to the installed location Also, make sure you have run ldconfig if that"
758 echo "*** is required on your system"
760 echo "*** If you have an old version installed, it is best to remove it, although"
761 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
763 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
764 echo "*** came with the system with the command"
766 echo "*** rpm --erase --nodeps gtk gtk-devel" ],
767 [ echo "*** The test program failed to compile or link. See the file config.log for the"
768 echo "*** exact error that occured. This usually means GTK was incorrectly installed"
769 echo "*** or that you have moved GTK since it was installed. In the latter case, you"
770 echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
771 CFLAGS="$ac_save_CFLAGS"
777 ifelse([$3], , :, [$3])
787 # Configure paths for libogg
788 # Jack Moffitt <jack@icecast.org> 10-21-2000
789 # Shamelessly stolen from Owen Taylor and Manish Singh
791 dnl AM_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
792 dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
794 AC_DEFUN(AM_PATH_OGG,
796 dnl Get the cflags and libraries
798 AC_ARG_WITH(ogg-prefix,[ --with-ogg-prefix=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
799 AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
801 if test "x$ogg_prefix" != "x"; then
802 ogg_args="$ogg_args --prefix=$ogg_prefix"
803 OGG_CFLAGS="-I$ogg_prefix/include"
804 OGG_LIBS="-L$ogg_prefix/lib"
805 elif test "x$prefix" != "xNONE"; then
806 ogg_args="$ogg_args --prefix=$prefix"
807 OGG_CFLAGS="-I$prefix/include"
808 OGG_LIBS="-L$prefix/lib"
811 OGG_LIBS="$OGG_LIBS -logg"
813 AC_MSG_CHECKING(for Ogg)
817 if test "x$enable_oggtest" = "xyes" ; then
818 ac_save_CFLAGS="$CFLAGS"
820 CFLAGS="$CFLAGS $OGG_CFLAGS"
821 LIBS="$LIBS $OGG_LIBS"
823 dnl Now check if the installed Ogg is sufficiently new.
834 system("touch conf.oggtest");
838 ],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
839 CFLAGS="$ac_save_CFLAGS"
843 if test "x$no_ogg" = "x" ; then
845 ifelse([$1], , :, [$1])
848 if test -f conf.oggtest ; then
851 echo "*** Could not run Ogg test program, checking why..."
852 CFLAGS="$CFLAGS $OGG_CFLAGS"
853 LIBS="$LIBS $OGG_LIBS"
858 [ echo "*** The test program compiled, but did not run. This usually means"
859 echo "*** that the run-time linker is not finding Ogg or finding the wrong"
860 echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
861 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
862 echo "*** to the installed location Also, make sure you have run ldconfig if that"
863 echo "*** is required on your system"
865 echo "*** If you have an old version installed, it is best to remove it, although"
866 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
867 [ echo "*** The test program failed to compile or link. See the file config.log for the"
868 echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
869 echo "*** or that you have moved Ogg since it was installed. In the latter case, you"
870 echo "*** may want to edit the ogg-config script: $OGG_CONFIG" ])
871 CFLAGS="$ac_save_CFLAGS"
876 ifelse([$2], , :, [$2])
886 # Configure paths for libvorbis
887 # Jack Moffitt <jack@icecast.org> 10-21-2000
888 # Shamelessly stolen from Owen Taylor and Manish Singh
890 dnl AM_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
891 dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS
893 AC_DEFUN(AM_PATH_VORBIS,
895 dnl Get the cflags and libraries
897 AC_ARG_WITH(vorbis-prefix,[ --with-vorbis-prefix=PFX Prefix where libvorbis is installed (optional)], vorbis_prefix="$withval", vorbis_prefix="")
898 AC_ARG_ENABLE(vorbistest, [ --disable-vorbistest Do not try to compile and run a test Vorbis program],, enable_vorbistest=yes)
900 if test "x$vorbis_prefix" != "x" ; then
901 vorbis_args="$vorbis_args --prefix=$vorbis_prefix"
902 VORBIS_CFLAGS="-I$vorbis_prefix/include"
903 VORBIS_LIBDIR="-L$vorbis_prefix/lib"
904 elif test "x$prefix" != "xNONE"; then
905 vorbis_args="$vorbis_args --prefix=$prefix"
906 VORBIS_CFLAGS="-I$prefix/include"
907 VORBIS_LIBDIR="-L$prefix/lib"
910 VORBIS_LIBS="$VORBIS_LIBDIR -lvorbis -lm"
911 VORBISFILE_LIBS="-lvorbisfile"
912 VORBISENC_LIBS="-lvorbisenc"
914 AC_MSG_CHECKING(for Vorbis)
918 if test "x$enable_vorbistest" = "xyes" ; then
919 ac_save_CFLAGS="$CFLAGS"
921 CFLAGS="$CFLAGS $VORBIS_CFLAGS"
922 LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
924 dnl Now check if the installed Vorbis is sufficiently new.
926 rm -f conf.vorbistest
931 #include <vorbis/codec.h>
935 system("touch conf.vorbistest");
939 ],, no_vorbis=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
940 CFLAGS="$ac_save_CFLAGS"
944 if test "x$no_vorbis" = "x" ; then
946 ifelse([$1], , :, [$1])
949 if test -f conf.vorbistest ; then
952 echo "*** Could not run Vorbis test program, checking why..."
953 CFLAGS="$CFLAGS $VORBIS_CFLAGS"
954 LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
957 #include <vorbis/codec.h>
959 [ echo "*** The test program compiled, but did not run. This usually means"
960 echo "*** that the run-time linker is not finding Vorbis or finding the wrong"
961 echo "*** version of Vorbis. If it is not finding Vorbis, you'll need to set your"
962 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
963 echo "*** to the installed location Also, make sure you have run ldconfig if that"
964 echo "*** is required on your system"
966 echo "*** If you have an old version installed, it is best to remove it, although"
967 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
968 [ echo "*** The test program failed to compile or link. See the file config.log for the"
969 echo "*** exact error that occured. This usually means Vorbis was incorrectly installed"
970 echo "*** or that you have moved Vorbis since it was installed." ])
971 CFLAGS="$ac_save_CFLAGS"
978 ifelse([$2], , :, [$2])
980 AC_SUBST(VORBIS_CFLAGS)
981 AC_SUBST(VORBIS_LIBS)
982 AC_SUBST(VORBISFILE_LIBS)
983 AC_SUBST(VORBISENC_LIBS)
984 rm -f conf.vorbistest
990 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
991 # -------------------------------------
992 # Define a conditional.
994 # FIXME: Once using 2.50, use this:
995 # m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
996 AC_DEFUN([AM_CONDITIONAL],
997 [ifelse([$1], [TRUE],
998 [errprint(__file__:__line__: [$0: invalid condition: $1
1001 ifelse([$1], [FALSE],
1002 [errprint(__file__:__line__: [$0: invalid condition: $1
1006 AC_SUBST([$1_FALSE])
1015 # Do all the work for Automake. This macro actually does too much --
1016 # some checks are only needed if your package does certain things.
1017 # But this isn't really a big deal.
1021 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1022 # written in clear, in which case automake, when reading aclocal.m4,
1023 # will think it sees a *use*, and therefore will trigger all it's
1024 # C support machinery. Also note that it means that autoscan, seeing
1025 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1028 # We require 2.13 because we rely on SHELL being computed by configure.
1031 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1032 # -----------------------------------------------------------
1033 # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
1034 # The purpose of this macro is to provide the user with a means to
1035 # check macros which are provided without letting her know how the
1036 # information is coded.
1037 # If this macro is not defined by Autoconf, define it here.
1038 ifdef([AC_PROVIDE_IFELSE],
1040 [define([AC_PROVIDE_IFELSE],
1041 [ifdef([AC_PROVIDE_$1],
1045 # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
1046 # ----------------------------------------------
1047 AC_DEFUN([AM_INIT_AUTOMAKE],
1048 [AC_REQUIRE([AC_PROG_INSTALL])dnl
1049 # test to see if srcdir already configured
1050 if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
1051 test -f $srcdir/config.status; then
1052 AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
1055 # Define the identity of the package.
1057 AC_SUBST(PACKAGE)dnl
1059 AC_SUBST(VERSION)dnl
1061 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1062 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
1064 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
1065 # the ones we care about.
1066 ifdef([m4_pattern_allow],
1067 [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
1069 # Autoconf 2.50 always computes EXEEXT. However we need to be
1070 # compatible with 2.13, for now. So we always define EXEEXT, but we
1073 # Similar for OBJEXT -- only we only use OBJEXT if the user actually
1074 # requests that it be used. This is a bit dumb.
1078 # Some tools Automake needs.
1079 AC_REQUIRE([AM_SANITY_CHECK])dnl
1080 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1081 AM_MISSING_PROG(ACLOCAL, aclocal)
1082 AM_MISSING_PROG(AUTOCONF, autoconf)
1083 AM_MISSING_PROG(AUTOMAKE, automake)
1084 AM_MISSING_PROG(AUTOHEADER, autoheader)
1085 AM_MISSING_PROG(MAKEINFO, makeinfo)
1086 AM_MISSING_PROG(AMTAR, tar)
1088 AM_PROG_INSTALL_STRIP
1089 # We need awk for the "check" target. The system "awk" is bad on
1091 AC_REQUIRE([AC_PROG_AWK])dnl
1092 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1093 AC_REQUIRE([AM_DEP_TRACK])dnl
1094 AC_REQUIRE([AM_SET_DEPDIR])dnl
1095 AC_PROVIDE_IFELSE([AC_PROG_][CC],
1096 [_AM_DEPENDENCIES(CC)],
1097 [define([AC_PROG_][CC],
1098 defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
1099 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
1100 [_AM_DEPENDENCIES(CXX)],
1101 [define([AC_PROG_][CXX],
1102 defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1106 # Check to make sure that the build environment is sane.
1113 AC_DEFUN([AM_SANITY_CHECK],
1114 [AC_MSG_CHECKING([whether build environment is sane])
1117 echo timestamp > conftest.file
1118 # Do `set' in a subshell so we don't clobber the current shell's
1119 # arguments. Must try -L first in case configure is actually a
1120 # symlink; some systems play weird games with the mod time of symlinks
1121 # (eg FreeBSD returns the mod time of the symlink's containing
1124 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1125 if test "$[*]" = "X"; then
1127 set X `ls -t $srcdir/configure conftest.file`
1130 if test "$[*]" != "X $srcdir/configure conftest.file" \
1131 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1133 # If neither matched, then we have a broken ls. This can happen
1134 # if, for instance, CONFIG_SHELL is bash and it inherits a
1135 # broken ls alias from the environment. This has actually
1136 # happened. Such a system could not be considered "sane".
1137 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1138 alias in your environment])
1141 test "$[2]" = conftest.file
1147 AC_MSG_ERROR([newly created file is older than distributed files!
1148 Check your system clock])
1150 AC_MSG_RESULT(yes)])
1155 # AM_MISSING_PROG(NAME, PROGRAM)
1156 # ------------------------------
1157 AC_DEFUN([AM_MISSING_PROG],
1158 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1159 $1=${$1-"${am_missing_run}$2"}
1163 # AM_MISSING_HAS_RUN
1164 # ------------------
1165 # Define MISSING if not defined so far and test if it supports --run.
1166 # If it does, set am_missing_run to use it, otherwise, to nothing.
1167 AC_DEFUN([AM_MISSING_HAS_RUN],
1168 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1169 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
1170 # Use eval to expand $SHELL
1171 if eval "$MISSING --run true"; then
1172 am_missing_run="$MISSING --run "
1176 AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
1182 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1183 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
1184 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
1186 # Of course, Automake must honor this variable whenever it calls a
1187 # tool from the auxiliary directory. The problem is that $srcdir (and
1188 # therefore $ac_aux_dir as well) can be either absolute or relative,
1189 # depending on how configure is run. This is pretty annoying, since
1190 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
1191 # source directory, any form will work fine, but in subdirectories a
1192 # relative path needs to be adjusted first.
1194 # $ac_aux_dir/missing
1195 # fails when called from a subdirectory if $ac_aux_dir is relative
1196 # $top_srcdir/$ac_aux_dir/missing
1197 # fails if $ac_aux_dir is absolute,
1198 # fails when called from a subdirectory in a VPATH build with
1199 # a relative $ac_aux_dir
1201 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1202 # are both prefixed by $srcdir. In an in-source build this is usually
1203 # harmless because $srcdir is `.', but things will broke when you
1204 # start a VPATH build or use an absolute $srcdir.
1206 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1207 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1208 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1209 # and then we would define $MISSING as
1210 # MISSING="\${SHELL} $am_aux_dir/missing"
1211 # This will work as long as MISSING is not called from configure, because
1212 # unfortunately $(top_srcdir) has no meaning in configure.
1213 # However there are other variables, like CC, which are often used in
1214 # configure, and could therefore not use this "fixed" $ac_aux_dir.
1216 # Another solution, used here, is to always expand $ac_aux_dir to an
1217 # absolute PATH. The drawback is that using absolute paths prevent a
1218 # configured tree to be moved without reconfiguration.
1220 AC_DEFUN([AM_AUX_DIR_EXPAND], [
1221 # expand $ac_aux_dir to an absolute path
1222 am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
1225 # AM_PROG_INSTALL_SH
1226 # ------------------
1227 # Define $install_sh.
1228 AC_DEFUN([AM_PROG_INSTALL_SH],
1229 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1230 install_sh=${install_sh-"$am_aux_dir/install-sh"}
1231 AC_SUBST(install_sh)])
1233 # One issue with vendor `install' (even GNU) is that you can't
1234 # specify the program used to strip binaries. This is especially
1235 # annoying in cross-compiling environments, where the build's strip
1236 # is unlikely to handle the host's binaries.
1237 # Fortunately install-sh will honor a STRIPPROG variable, so we
1238 # always use install-sh in `make install-strip', and initialize
1239 # STRIPPROG with the value of the STRIP variable (set by the user).
1240 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1241 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1242 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
1243 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1245 # serial 4 -*- Autoconf -*-
1249 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1250 # written in clear, in which case automake, when reading aclocal.m4,
1251 # will think it sees a *use*, and therefore will trigger all it's
1252 # C support machinery. Also note that it means that autoscan, seeing
1253 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1257 # _AM_DEPENDENCIES(NAME)
1258 # ---------------------
1259 # See how the compiler implements dependency checking.
1260 # NAME is "CC", "CXX" or "OBJC".
1261 # We try a few techniques and use that to set a single cache variable.
1263 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1264 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1265 # dependency, and given that the user is not expected to run this macro,
1266 # just rely on AC_PROG_CC.
1267 AC_DEFUN([_AM_DEPENDENCIES],
1268 [AC_REQUIRE([AM_SET_DEPDIR])dnl
1269 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1270 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1271 AC_REQUIRE([AM_DEP_TRACK])dnl
1273 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
1274 [$1], CXX, [depcc="$CXX" am_compiler_list=],
1275 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
1276 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1277 [depcc="$$1" am_compiler_list=])
1279 AC_CACHE_CHECK([dependency style of $depcc],
1280 [am_cv_$1_dependencies_compiler_type],
1281 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1282 # We make a subdir and do the tests there. Otherwise we can end up
1283 # making bogus files that we don't know about and never remove. For
1284 # instance it was reported that on HP-UX the gcc test will end up
1285 # making a dummy file named `D' -- because `-MD' means `put the output
1288 # Copy depcomp to subdir because otherwise we won't find it if we're
1289 # using a relative directory.
1290 cp "$am_depcomp" conftest.dir
1293 am_cv_$1_dependencies_compiler_type=none
1294 if test "$am_compiler_list" = ""; then
1295 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1297 for depmode in $am_compiler_list; do
1298 # We need to recreate these files for each test, as the compiler may
1299 # overwrite some of them when testing with obscure command lines.
1300 # This happens at least with the AIX C compiler.
1301 echo '#include "conftest.h"' > conftest.c
1302 echo 'int i;' > conftest.h
1303 echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
1307 # after this tag, mechanisms are not by side-effect, so they'll
1308 # only be used when explicitly requested
1309 if test "x$enable_dependency_tracking" = xyes; then
1317 # We check with `-c' and `-o' for the sake of the "dashmstdout"
1318 # mode. It turns out that the SunPro C++ compiler does not properly
1319 # handle `-M -o', and we need to detect this.
1320 if depmode=$depmode \
1321 source=conftest.c object=conftest.o \
1322 depfile=conftest.Po tmpdepfile=conftest.TPo \
1323 $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
1324 grep conftest.h conftest.Po > /dev/null 2>&1 &&
1325 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1326 am_cv_$1_dependencies_compiler_type=$depmode
1334 am_cv_$1_dependencies_compiler_type=none
1337 $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
1338 AC_SUBST([$1DEPMODE])
1344 # Choose a directory name for dependency files.
1345 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
1346 AC_DEFUN([AM_SET_DEPDIR],
1347 [rm -f .deps 2>/dev/null
1348 mkdir .deps 2>/dev/null
1349 if test -d .deps; then
1352 # MS-DOS does not allow filenames that begin with a dot.
1355 rmdir .deps 2>/dev/null
1362 AC_DEFUN([AM_DEP_TRACK],
1363 [AC_ARG_ENABLE(dependency-tracking,
1364 [ --disable-dependency-tracking Speeds up one-time builds
1365 --enable-dependency-tracking Do not reject slow dependency extractors])
1366 if test "x$enable_dependency_tracking" != xno; then
1367 am_depcomp="$ac_aux_dir/depcomp"
1370 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1371 pushdef([subst], defn([AC_SUBST]))
1372 subst(AMDEPBACKSLASH)
1376 # Generate code to set up dependency tracking.
1377 # This macro should only be invoked once -- use via AC_REQUIRE.
1379 # AM_OUTPUT_DEPENDENCY_COMMANDS
1382 # This code is only required when automatic dependency tracking
1383 # is enabled. FIXME. This creates each `.P' file that we will
1384 # need in order to bootstrap the dependency handling code.
1385 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
1386 AC_OUTPUT_COMMANDS([
1387 test x"$AMDEP_TRUE" != x"" ||
1388 for mf in $CONFIG_FILES; do
1390 Makefile) dirpart=.;;
1391 */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
1394 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
1395 # Extract the definition of DEP_FILES from the Makefile without
1397 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
1398 test -z "$DEPDIR" && continue
1399 # When using ansi2knr, U may be empty or an underscore; expand it
1400 U=`sed -n -e '/^U = / s///p' < "$mf"`
1401 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
1402 # We invoke sed twice because it is the simplest approach to
1403 # changing $(DEPDIR) to its actual value in the expansion.
1404 for file in `sed -n -e '
1405 /^DEP_FILES = .*\\\\$/ {
1414 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
1415 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1416 # Make sure the directory exists.
1417 test -f "$dirpart/$file" && continue
1418 fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
1419 $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
1420 # echo "creating $dirpart/$file"
1421 echo '# dummy' > "$dirpart/$file"
1424 ], [AMDEP_TRUE="$AMDEP_TRUE"
1425 ac_aux_dir="$ac_aux_dir"])])
1429 # Check to see how make treats includes.
1430 AC_DEFUN([AM_MAKE_INCLUDE],
1431 [am_make=${MAKE-make}
1432 cat > confinc << 'END'
1436 # If we don't find an include directive, just comment out the code.
1437 AC_MSG_CHECKING([for style of include used by $am_make])
1441 # First try GNU make style include.
1442 echo "include confinc" > confmf
1443 # We grep out `Entering directory' and `Leaving directory'
1444 # messages which can occur if `w' ends up in MAKEFLAGS.
1445 # In particular we don't look at `^make:' because GNU make might
1446 # be invoked under some other name (usually "gmake"), in which
1447 # case it prints its new name instead of `make'.
1448 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
1453 # Now try BSD make style include.
1454 if test "$am__include" = "#"; then
1455 echo '.include "confinc"' > confmf
1456 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1457 am__include=.include
1462 AC_SUBST(am__include)
1464 AC_MSG_RESULT($_am_result)
1465 rm -f confinc confmf
1468 # Like AC_CONFIG_HEADER, but automatically create stamp file.
1472 # When config.status generates a header, we must update the stamp-h file.
1473 # This file resides in the same directory as the config header
1474 # that is generated. We must strip everything past the first ":",
1475 # and everything past the last "/".
1479 AC_DEFUN([AM_CONFIG_HEADER],
1480 [ifdef([AC_FOREACH],dnl
1481 [dnl init our file count if it isn't already
1482 m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
1483 dnl prepare to store our destination file list for use in config.status
1484 AC_FOREACH([_AM_File], [$1],
1485 [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
1486 m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
1487 dnl and add it to the list of files AC keeps track of, along
1489 AC_CONFIG_HEADERS(_AM_File,
1490 dnl COMMANDS, [, INIT-CMDS]
1491 [# update the timestamp
1492 echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
1493 ][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
1494 m4_popdef([_AM_Dest])])],dnl
1495 [AC_CONFIG_HEADER([$1])
1497 ifelse(patsubst([$1], [[^ ]], []),
1499 [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
1500 patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
1502 for am_file in $1; do
1503 case " \$CONFIG_HEADERS " in
1505 am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
1506 if test -n "\$am_dir"; then
1507 am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
1508 for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
1509 am_tmpdir=\$am_tmpdir\$am_subdir/
1510 if test ! -d \$am_tmpdir; then
1515 echo timestamp > "\$am_dir"stamp-h\$am_indx
1518 am_indx=\`expr \$am_indx + 1\`
1520 ])]) # AM_CONFIG_HEADER
1524 # Like AS_DIRNAME, only do it during macro expansion
1525 AC_DEFUN([_AM_DIRNAME],
1526 [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
1527 m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
1528 m4_if(m4_regexp([$1], [^/.*]), -1,
1530 m4_patsubst([$1], [^\(/\).*], [\1])),
1531 m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
1532 m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
1538 AC_DEFUN([AM_PATH_LISPDIR],
1539 [AC_ARG_WITH(lispdir,
1540 [ --with-lispdir Override the default lisp directory ],
1541 [ lispdir="$withval"
1542 AC_MSG_CHECKING([where .elc files should go])
1543 AC_MSG_RESULT([$lispdir])],
1545 # If set to t, that means we are running in a shell under Emacs.
1546 # If you have an Emacs named "t", then use the full path.
1547 test x"$EMACS" = xt && EMACS=
1548 AC_CHECK_PROGS(EMACS, emacs xemacs, no)
1549 if test $EMACS != "no"; then
1550 if test x${lispdir+set} != xset; then
1551 AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir], [dnl
1552 am_cv_lispdir=`$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' | sed -n -e 's,/$,,' -e '/.*\/lib\/\(x\?emacs\/site-lisp\)$/{s,,${libdir}/\1,;p;q;}' -e '/.*\/share\/\(x\?emacs\/site-lisp\)$/{s,,${datadir}/\1,;p;q;}'`
1553 if test -z "$am_cv_lispdir"; then
1554 am_cv_lispdir='${datadir}/emacs/site-lisp'
1557 lispdir="$am_cv_lispdir"