? m4/sound.m4 Index: configure.ac =================================================================== RCS file: /home/freeciv/CVS/freeciv/configure.ac,v retrieving revision 1.9 diff -u -r1.9 configure.ac --- configure.ac 2002/06/09 17:54:25 1.9 +++ configure.ac 2002/06/11 09:52:12 @@ -489,45 +489,9 @@ AC_MSG_ERROR(could not guess which client to compile) fi - dnl Add esound support to client - ESD_VERSION=0.0.20 - AM_PATH_ESD($ESD_VERSION, :, ESD=no) - if test "x$ESD" != "xno"; then - SOUND_CFLAGS="$SOUND_CFLAGS $ESD_CFLAGS" - SOUND_LIBS="$SOUND_LIBS $ESD_LIBS" - AC_DEFINE(ESD, 1, [Esound support]) - AC_MSG_CHECKING(building ESOUND support) - AC_MSG_RESULT(yes) - fi + dnl Check for sound support, sets SOUND_CFLAGS, SOUND_LIBS, ESD, SDL & WINMM + FC_CHECK_SOUND() - dnl Add SDL support to client - SDL_VERSION=1.0.0 - AM_PATH_SDL($SDL_VERSION, :, SDL = no) - if test "x$SDL" != "xno"; then - AC_CHECK_HEADER(SDL/SDL_mixer.h, SDL_mixer_h=1, SDL_mixer_h=0) - AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio, SDL_mixer=yes) - AC_MSG_CHECKING(building SDL_mixer support) - if test "x$SDL_mixer_h" = "x1"; then - if test "x$SDL_mixer" = "xyes"; then - SOUND_CFLAGS="$SOUND_CFLAGS $SDL_CFLAGS" - SOUND_LIBS="$SOUND_LIBS $SDL_LIBS -lSDL_mixer" - AC_DEFINE(SDL, 1, [SDL_Mixer support]) - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT([no, found header but not library!]) - fi - else - AC_MSG_RESULT([no, install SDL_mixer first: http://www.libsdl.org/projects/SDL_mixer/index.html]) - fi - fi - - dnl Add WinMM sound support to client - if test x"$MINGW32" = "xyes"; then - SOUND_LIBS="$SOUND_LIBS -lwinmm" - AC_DEFINE(WINMM, 1, [Windows MultiMedia sound support]) - WINMM="yes" - fi - gui_sources="gui-$client" fi AC_SUBST(gui_sources) @@ -535,9 +499,9 @@ AC_SUBST(CLIENT_LIBS) AC_SUBST(SOUND_CFLAGS) AC_SUBST(SOUND_LIBS) -AM_CONDITIONAL(ESD, test "$ESD" != "no") -AM_CONDITIONAL(SDL, test "$SDL_mixer" = "yes") -AM_CONDITIONAL(WINMM, test "$WINMM" = "yes") +AM_CONDITIONAL(ESD, test "x$ESD" = "xyes") +AM_CONDITIONAL(SDL, test "x$SDL_mixer" = "xyes") +AM_CONDITIONAL(WINMM, test "x$WINMM" = "xyes") AM_CONDITIONAL(CLIENT_GUI_GTK, test "$gui_sources" = "gui-gtk") AM_CONDITIONAL(CLIENT_GUI_GTK_2_0, test "$gui_sources" = "gui-gtk-2.0") AM_CONDITIONAL(CLIENT_GUI_XAW, test "$gui_sources" = "gui-xaw") Index: configure.in =================================================================== RCS file: /home/freeciv/CVS/freeciv/configure.in,v retrieving revision 1.187 diff -u -r1.187 configure.in --- configure.in 2002/06/09 17:54:25 1.187 +++ configure.in 2002/06/11 09:52:12 @@ -483,45 +483,9 @@ AC_MSG_ERROR(could not guess which client to compile) fi - dnl Add esound support to client - ESD_VERSION=0.0.20 - AM_PATH_ESD($ESD_VERSION, :, ESD=no) - if test "x$ESD" != "xno"; then - SOUND_CFLAGS="$SOUND_CFLAGS $ESD_CFLAGS" - SOUND_LIBS="$SOUND_LIBS $ESD_LIBS" - AC_DEFINE(ESD) - AC_MSG_CHECKING(building ESOUND support) - AC_MSG_RESULT(yes) - fi + dnl Check for sound support, sets SOUND_CFLAGS, SOUND_LIBS, ESD, SDL & WINMM + FC_CHECK_SOUND() - dnl Add SDL support to client - SDL_VERSION=1.0.0 - AM_PATH_SDL($SDL_VERSION, :, SDL = no) - if test "x$SDL" != "xno"; then - AC_CHECK_HEADER(SDL/SDL_mixer.h, SDL_mixer_h=1, SDL_mixer_h=0) - AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio, SDL_mixer=yes) - AC_MSG_CHECKING(building SDL_mixer support) - if test "x$SDL_mixer_h" = "x1"; then - if test "x$SDL_mixer" = "xyes"; then - SOUND_CFLAGS="$SOUND_CFLAGS $SDL_CFLAGS" - SOUND_LIBS="$SOUND_LIBS $SDL_LIBS -lSDL_mixer" - AC_DEFINE(SDL) - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT([no, found header but not library!]) - fi - else - AC_MSG_RESULT([no, install SDL_mixer first: http://www.libsdl.org/projects/SDL_mixer/index.html]) - fi - fi - - dnl Add WinMM sound support to client - if test x"$MINGW32" = "xyes"; then - SOUND_LIBS="$SOUND_LIBS -lwinmm" - AC_DEFINE(WINMM) - WINMM="yes" - fi - gui_sources="gui-$client" fi AC_SUBST(gui_sources) @@ -529,9 +493,9 @@ AC_SUBST(CLIENT_LIBS) AC_SUBST(SOUND_CFLAGS) AC_SUBST(SOUND_LIBS) -AM_CONDITIONAL(ESD, test "$ESD" != "no") -AM_CONDITIONAL(SDL, test "$SDL_mixer" = "yes") -AM_CONDITIONAL(WINMM, test "$WINMM" = "yes") +AM_CONDITIONAL(ESD, test x"$ESD" = "xyes") +AM_CONDITIONAL(SDL, test x"$SDL_mixer" = "xyes") +AM_CONDITIONAL(WINMM, test x"$WINMM" = "xyes") AM_CONDITIONAL(CLIENT_GUI_GTK, test "$gui_sources" = "gui-gtk") AM_CONDITIONAL(CLIENT_GUI_GTK_2_0, test "$gui_sources" = "gui-gtk-2.0") AM_CONDITIONAL(CLIENT_GUI_XAW, test "$gui_sources" = "gui-xaw") Index: client/audio.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/audio.c,v retrieving revision 1.7 diff -u -r1.7 audio.c --- client/audio.c 2002/05/24 07:59:05 1.7 +++ client/audio.c 2002/06/11 09:52:14 @@ -80,19 +80,19 @@ } if (!found) { - freelog(LOG_ERROR, + freelog(LOG_VERBOSE, _("Plugin '%s' isn't available. Available are %s"), name, audio_get_all_plugin_names()); return FALSE; } if (!plugins[i].init()) { - freelog(LOG_ERROR, _("Plugin found but can't be initialized.")); + freelog(LOG_VERBOSE, _("Plugin %s found but can't be initialized."), name); return FALSE; } selected_plugin = i; - freelog(LOG_NORMAL, _("Plugin '%s' is now selected"), + freelog(LOG_VERBOSE, _("Sound plugin '%s' is now selected"), plugins[selected_plugin].name); return TRUE; } @@ -127,6 +127,11 @@ char *filename, *file_capstr; char us_capstr[] = "+soundspec"; + if (num_plugins_used == 1) { + /* We only have the dummy plugin, so silenty skip the below */ + tagfile = NULL; + return; + } if (!spec_name) { freelog(LOG_FATAL, _("No audio ruleset given!")); exit(EXIT_FAILURE);