Top 10k strings from audiofile.m4 in <root> / bin / pc / Emulators / fuse-hc2000-hacks.7z / src / libspectrum / m4 /
Back to the directory listing
2 #include <stdio.h>
2 #include <audiofile.h>
2 if test x${AUDIOFILE_CONFIG+set} != xset ; then
1 my_strdup (char *str)
1 int main ()
1 dnl Test for Audio File Library, and define AUDIOFILE_CFLAGS and AUDIOFILE_LIBS.
1 dnl Now check if the installed Audio File Library is sufficiently new.
1 dnl Get compiler flags and libraries from the audiofile-config script.
1 dnl AM_PATH_AUDIOFILE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
1 dnl (Also checks the sanity of the results of audiofile-config to some extent.)
1 ],, no_audiofile=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1 ], [ return 0; ],
1 AC_DEFUN([AM_PATH_AUDIOFILE],
1 AC_ARG_WITH(audiofile-prefix,[ --with-audiofile-prefix=PFX Prefix where Audio File Library is installed (optional)],
1 AC_ARG_WITH(audiofile-exec-prefix,[ --with-audiofile-exec-prefix=PFX Exec prefix where Audio File Library is installed (optional)],
1 AC_ARG_ENABLE(audiofiletest, [ --disable-audiofiletest Do not try to compile and run a test Audio File Library program], , enable_audiofiletest=yes)
1 *** you may also be able to get things to work by modifying
1 *** wrong version of Audio File Library.
1 *** to the installed location. Also, make sure you have run ldconfig if
1 *** the run-time linker is not finding Audio File Library or finding the
1 *** that is required on your system.
1 *** sure PREFIX/bin is in your path, or set the AUDIOFILE_CONFIG
1 *** not be found. If the Audio File Library was installed in PREFIX, make
1 *** environment variable to the full path to audiofile-config.
1 *** The test program compiled, but did not run. This usually means that
1 *** The audiofile-config script installed by the Audio File Library could
1 *** LD_LIBRARY_PATH.
1 *** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point
1 *** If you have an old version installed, it is best to remove it, although
1 *** If it is not finding Audio File Library, you'll need to set your
1 #include <string.h>
1 #include <stdlib.h>
1 # stolen from esd.m4 in esound :
1 # stolen from Manish Singh
1 # stolen back from Frank Belew
1 # Shamelessly stolen from Owen Taylor
1 # Manish Singh 98-9-30
1 # Configure paths for the Audio File Library
1 # Bertrand Guiheneuf 98-10-21
1 tmp_version = my_strdup("$min_audiofile_version");
1 system ("touch conf.audiofiletest");
1 rm -f conf.audiofiletest
1 return new_str;
1 no_audiofile=""
1 min_audiofile_version=ifelse([$1], ,0.2.5,$1)
1 int major, minor, micro;
1 if test x$audiofile_prefix != x ; then
1 if test x$audiofile_exec_prefix != x ; then
1 if test "x$no_audiofile" = x ; then
1 if test "$AUDIOFILE_CONFIG" = "no" ; then
1 if (str)
1 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
1 char *tmp_version;
1 char *new_str;
1 AC_SUBST(AUDIOFILE_LIBS)
1 AC_SUBST(AUDIOFILE_CFLAGS)
1 AC_PATH_PROG(AUDIOFILE_CONFIG, audiofile-config, no)
1 AC_MSG_CHECKING(for Audio File Library - version >= $min_audiofile_version)
1 /* HP/UX 9 (%@#!) writes to sscanf strings */
1 if (($audiofile_major_version > major) ||
1 no_audiofile=yes
1 new_str = NULL;
1 if test "x$enable_audiofiletest" = "xyes" ; then
1 audiofile_minor_version=`$AUDIOFILE_CONFIG $audiofile_args --version | \
1 audiofile_micro_version=`$AUDIOFILE_CONFIG $audiofile_config_args --version | \
1 audiofile_major_version=`$AUDIOFILE_CONFIG $audiofile_args --version | \
1 AUDIOFILE_LIBS=`$AUDIOFILE_CONFIG $audiofileconf_args --libs`
1 AUDIOFILE_CFLAGS=`$AUDIOFILE_CONFIG $audiofileconf_args --cflags`
1 printf("%s, bad version string\n", "$min_audiofile_version");
1 ifelse([$3], , :, [$3])
1 ifelse([$2], , :, [$2])
1 if test "$AUDIOFILE_CONFIG" = "no" ; then
1 exit(1);
1 audiofile_args="$audiofile_args --prefix=$audiofile_prefix"
1 audiofile_args="$audiofile_args --exec-prefix=$audiofile_exec_prefix"
1 AUDIOFILE_LIBS=""
1 AUDIOFILE_CFLAGS=""
1 AC_MSG_RESULT(yes)
1 AC_MSG_RESULT(no)
1 strcpy (new_str, str);
1 rm -f conf.audiofiletest
1 return 1;
1 return 0;
1 printf("\n*** 'audiofile-config --version' returned %d.%d.%d, but the minimum version\n", $audiofile_major_version, $audiofile_minor_version, $audiofile_micro_version);
1 printf("*** to point to the correct copy of audiofile-config, and remove the file\n");
1 printf("*** of the Audio File Library required is %d.%d.%d. If audiofile-config is correct, then it is\n", major, minor, micro);
1 printf("*** config.cache before re-running configure\n");
1 printf("*** best to upgrade to the required version.\n");
1 printf("*** If audiofile-config was wrong, set the environment variable AUDIOFILE_CONFIG\n");
1 new_str = malloc ((strlen (str) + 1) * sizeof(char));
1 ac_save_LIBS="$LIBS"
1 ac_save_CFLAGS="$CFLAGS"
1 LIBS="$LIBS $AUDIOFILE_LIBS"
1 CFLAGS="$CFLAGS $AUDIOFILE_CFLAGS"
1 AC_TRY_RUN([
1 AC_LANG_SAVE
1 AC_LANG_C
1 (($audiofile_major_version == major) && ($audiofile_minor_version > minor)) ||
1 (($audiofile_major_version == major) && ($audiofile_minor_version == minor) && ($audiofile_micro_version >= micro)))
1 if test -f conf.audiofiletest ; then
1 else
1 cat <<END
1 LIBS="$ac_save_LIBS"
1 CFLAGS="$ac_save_CFLAGS"
1 AC_LANG_RESTORE
1 ],
1 [ echo "*** The test program failed to compile or link. See the file config.log"
1 [ cat <<END
1 AUDIOFILE_CONFIG=$audiofile_prefix/bin/audiofile-config
1 AUDIOFILE_CONFIG=$audiofile_exec_prefix/bin/audiofile-config
1 echo "*** to edit the audiofile-config script: $AUDIOFILE_CONFIG" ])
1 echo "*** for the exact error that occured. This usually means the Audio File"
1 echo "*** Library was incorrectly installed or that you have moved the Audio"
1 echo "*** File Library since it was installed. In the latter case, you may want"
1 echo "*** Could not run Audio File Library test program; checking why..."
1 LIBS="$ac_save_LIBS"
1 LIBS="$LIBS $AUDIOFILE_LIBS"
1 CFLAGS="$ac_save_CFLAGS"
1 CFLAGS="$CFLAGS $AUDIOFILE_CFLAGS"
1 AC_TRY_LINK([
1 AC_LANG_SAVE
1 AC_LANG_RESTORE
1 AC_LANG_C
1 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1 audiofile_prefix="$withval", audiofile_prefix="")
1 audiofile_exec_prefix="$withval", audiofile_exec_prefix="")