Author: cazfi Date: Mon Jan 2 00:14:45 2017 New Revision: 34767 URL: http://svn.gna.org/viewcvs/freeciv?rev=34767&view=rev Log: Dropped sdl1.2-mixer support.
See patch #6246 Removed: trunk/m4/sdl.m4 Modified: trunk/Makefile.am trunk/client/audio_sdl.c trunk/client/gui-gtk-3.0/gui_main.c trunk/client/gui-gtk-3.22/gui_main.c trunk/client/gui-qt/gui_main.cpp trunk/doc/README.packaging trunk/m4/sound.m4 Modified: trunk/Makefile.am URL: http://svn.gna.org/viewcvs/freeciv/trunk/Makefile.am?rev=34767&r1=34766&r2=34767&view=diff ============================================================================== --- trunk/Makefile.am (original) +++ trunk/Makefile.am Mon Jan 2 00:14:45 2017 @@ -69,7 +69,6 @@ m4/qt5-darwin.m4 \ m4/qt-client.m4 \ m4/readline.m4 \ - m4/sdl.m4 \ m4/sdl2-client.m4 \ m4/sdl2.m4 \ m4/sqlite3.m4 \ Modified: trunk/client/audio_sdl.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/audio_sdl.c?rev=34767&r1=34766&r2=34767&view=diff ============================================================================== --- trunk/client/audio_sdl.c (original) +++ trunk/client/audio_sdl.c Mon Jan 2 00:14:45 2017 @@ -20,15 +20,10 @@ #ifdef SDL2_PLAIN_INCLUDE #include <SDL.h> #include <SDL_mixer.h> -#elif AUDIO_SDL1_2 -/* SDL */ -#include <SDL/SDL.h> -#include <SDL/SDL_mixer.h> -#else /* AUDIO_SDL1_2 */ -/* SDL2 */ +#else /* SDL2_PLAIN_INCLUDE */ #include <SDL2/SDL.h> #include <SDL2/SDL_mixer.h> -#endif /* AUDIO_SDL1_2 */ +#endif /* SDL2_PLAIN_INCLUDE */ /* utility */ #include "log.h" Modified: trunk/client/gui-gtk-3.0/gui_main.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/gui_main.c?rev=34767&r1=34766&r2=34767&view=diff ============================================================================== --- trunk/client/gui-gtk-3.0/gui_main.c (original) +++ trunk/client/gui-gtk-3.0/gui_main.c Mon Jan 2 00:14:45 2017 @@ -23,14 +23,10 @@ #ifdef SDL2_PLAIN_INCLUDE #include <SDL.h> #include <SDL_mixer.h> -#elif AUDIO_SDL1_2 -/* SDL */ -#include <SDL/SDL.h> -#else /* AUDIO_SDL1_2 */ -/* SDL2 */ +#else /* PLAIN_INCLUDE */ #include <SDL2/SDL.h> -#endif /* AUDIO_SDL1_2 */ -#endif +#endif /* PLAIN_INCLUDE */ +#endif /* AUDIO_SDL */ #ifdef HAVE_LOCALE_H #include <locale.h> Modified: trunk/client/gui-gtk-3.22/gui_main.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.22/gui_main.c?rev=34767&r1=34766&r2=34767&view=diff ============================================================================== --- trunk/client/gui-gtk-3.22/gui_main.c (original) +++ trunk/client/gui-gtk-3.22/gui_main.c Mon Jan 2 00:14:45 2017 @@ -23,14 +23,10 @@ #ifdef SDL2_PLAIN_INCLUDE #include <SDL.h> #include <SDL_mixer.h> -#elif AUDIO_SDL1_2 -/* SDL */ -#include <SDL/SDL.h> -#else /* AUDIO_SDL1_2 */ -/* SDL2 */ +#else /* PLAIN_INCLUDE */ #include <SDL2/SDL.h> -#endif /* AUDIO_SDL1_2 */ -#endif +#endif /* PLAIN_INCLUDE */ +#endif /* AUDIO_SDL */ #ifdef HAVE_LOCALE_H #include <locale.h> Modified: trunk/client/gui-qt/gui_main.cpp URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/gui_main.cpp?rev=34767&r1=34766&r2=34767&view=diff ============================================================================== --- trunk/client/gui-qt/gui_main.cpp (original) +++ trunk/client/gui-qt/gui_main.cpp Mon Jan 2 00:14:45 2017 @@ -23,14 +23,10 @@ #ifdef SDL2_PLAIN_INCLUDE #include <SDL.h> #include <SDL_mixer.h> -#elif AUDIO_SDL1_2 -/* SDL */ -#include <SDL/SDL.h> -#else /* AUDIO_SDL1_2 */ -/* SDL2 */ +#else /* PLAIN_INCLUDE */ #include <SDL2/SDL.h> -#endif /* AUDIO_SDL1_2 */ -#endif +#endif /* PLAIN_INCLUDE */ +#endif /* AUDIO_SDL */ #include <stdio.h> Modified: trunk/doc/README.packaging URL: http://svn.gna.org/viewcvs/freeciv/trunk/doc/README.packaging?rev=34767&r1=34766&r2=34767&view=diff ============================================================================== --- trunk/doc/README.packaging (original) +++ trunk/doc/README.packaging Mon Jan 2 00:14:45 2017 @@ -18,6 +18,7 @@ ~/.freeciv-client-rc-2.6 generated by Freeciv 2.6, or ~/.civclientrc generated by Freeciv version <= 2.1). * Gtk2-client has been dropped completely +* Sdl1.2 Mixer support has been dropped ---------------------------------------------------------------------- Compatibility of modified versions Removed: trunk/m4/sdl.m4 URL: http://svn.gna.org/viewcvs/freeciv/trunk/m4/sdl.m4?rev=34766&view=auto ============================================================================== --- trunk/m4/sdl.m4 (original) +++ trunk/m4/sdl.m4 (removed) @@ -1,185 +0,0 @@ -# Configure paths for SDL -# Sam Lantinga 9/21/99 -# stolen from Manish Singh -# stolen back from Frank Belew -# stolen from Manish Singh -# Shamelessly stolen from Owen Taylor -# Taken to Freeciv from SDL release 1.2.12 - -dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS -dnl -AC_DEFUN([AM_PATH_SDL], -[dnl -dnl Get the cflags and libraries from the sdl-config script -dnl -AC_ARG_WITH([sdl-prefix], - AS_HELP_STRING([--with-sdl-prefix=PFX], [Prefix where SDL is installed (optional)]), -[sdl_prefix="$withval"], [sdl_prefix=""]) - -AC_ARG_WITH([sdl-exec-prefix], - AS_HELP_STRING([--with-sdl-exec-prefix=PFX], [Exec prefix where SDL is installed (optional)]), -[sdl_exec_prefix="$withval"], [sdl_exec_prefix=""]) - -AC_ARG_ENABLE([sdltest], - AS_HELP_STRING([--disable-sdltest], [Do not try to compile and run a test SDL program]), [], -[enable_sdltest=yes]) - - if test x$sdl_exec_prefix != x ; then - sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix" - if test x${SDL_CONFIG+set} != xset ; then - SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config - fi - fi - if test x$sdl_prefix != x ; then - sdl_args="$sdl_args --prefix=$sdl_prefix" - if test x${SDL_CONFIG+set} != xset ; then - SDL_CONFIG=$sdl_prefix/bin/sdl-config - fi - fi - - if test "x$prefix" != xNONE; then - PATH="$prefix/bin:$prefix/usr/bin:$PATH" - fi - AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) - min_sdl_version=ifelse([$1], ,0.11.0,$1) - AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) - no_sdl="" - if test "$SDL_CONFIG" = "no" ; then - no_sdl=yes - else - SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags` - SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs` - - sdl_major_version=`$SDL_CONFIG $sdl_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_sdltest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_CXXFLAGS="$CXXFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $SDL_CFLAGS" - CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" - LIBS="$LIBS $SDL_LIBS" -dnl -dnl Now check if the installed SDL is sufficiently new. (Also sanity -dnl checks the results of sdl-config to some extent -dnl - rm -f conf.sdltest - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include "SDL.h" - -char* -my_strdup (char *str) -{ - char *new_str; - - if (str) - { - new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); - strcpy (new_str, str); - } - else - new_str = NULL; - - return new_str; -} - -int main (int argc, char *argv[]) -{ - int major, minor, micro; - char *tmp_version; - - /* This hangs on some systems (?) - system ("touch conf.sdltest"); - */ - { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = my_strdup("$min_sdl_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_sdl_version"); - exit(1); - } - - if (($sdl_major_version > major) || - (($sdl_major_version == major) && ($sdl_minor_version > minor)) || - (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); - printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); - printf("*** best to upgrade to the required version.\n"); - printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); - printf("*** to point to the correct copy of sdl-config, and remove the file\n"); - printf("*** config.cache before re-running configure\n"); - return 1; - } -} - -]])],[],[no_sdl=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_sdl" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$SDL_CONFIG" = "no" ; then - echo "*** The sdl-config script installed by SDL could not be found" - echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the SDL_CONFIG environment variable to the" - echo "*** full path to sdl-config." - else - if test -f conf.sdltest ; then - : - else - echo "*** Could not run SDL test program, checking why..." - CFLAGS="$CFLAGS $SDL_CFLAGS" - CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" - LIBS="$LIBS $SDL_LIBS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -#include <stdio.h> -#include "SDL.h" - -int main(int argc, char *argv[]) -{ return 0; } -#undef main -#define main K_and_R_C_main -]], [[ return 0; ]])],[ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding SDL or finding the wrong" - echo "*** version of SDL. If it is not finding SDL, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],[ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occurred. This usually means SDL was incorrectly installed" - echo "*** or that you have moved SDL since it was installed. In the latter case, you" - echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) - CFLAGS="$ac_save_CFLAGS" - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - SDL_CFLAGS="" - SDL_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(SDL_CFLAGS) - AC_SUBST(SDL_LIBS) - rm -f conf.sdltest -]) Modified: trunk/m4/sound.m4 URL: http://svn.gna.org/viewcvs/freeciv/trunk/m4/sound.m4?rev=34767&r1=34766&r2=34767&view=diff ============================================================================== --- trunk/m4/sound.m4 (original) +++ trunk/m4/sound.m4 Mon Jan 2 00:14:45 2017 @@ -2,13 +2,12 @@ AC_ARG_ENABLE([sdl-mixer], AS_HELP_STRING([--enable-sdl-mixer], [use the SDL mixer [sdl2]]), [case "${enableval}" in - sdl|sdl1.2) USE_SOUND_SDL=sdl ;; no) USE_SOUND_SDL=no ;; - yes|sdl2) USE_SOUND_SDL=sdl2 ;; + yes|sdl|sdl2) USE_SOUND_SDL=sdl2 ;; *) AC_MSG_ERROR([bad value ${enableval} for --enable-sdl-mixer]) ;; esac], [USE_SOUND_SDL=maybe]) -if test "x$USE_SOUND_SDL" != "xno" && test "x$USE_SOUND_SDL" != "xsdl" ; then +if test "x$USE_SOUND_SDL" != "xno" ; then dnl Add SDL2-mixer support to client SDL2_VERSION=2.0.0 AM_PATH_SDL2($SDL2_VERSION, SDL2=yes, SDL2=no) @@ -57,50 +56,7 @@ fi fi -if test "x$USE_SOUND_SDL" != "xsdl2" && test "x$USE_SOUND_SDL" != "xno" && test "x$SOUND_SDL_OK" != "xtrue" ; then - dnl Add SDL-mixer support to client - SDL_VERSION=1.0.0 - AM_PATH_SDL($SDL_VERSION, SDL=yes, SDL=no) - if test "x$SDL" != "xno"; then - PKG_CHECK_MODULES([SDLMIXER], [SDL_mixer], -[ - SOUND_CFLAGS="$SOUND_CFLAGS $SDLMIXER_CFLAGS" - SOUND_LIBS="$SOUND_LIBS $SDLMIXER_LIBS" - AC_DEFINE([AUDIO_SDL], [1], [SDL_Mixer support]) - AC_DEFINE([AUDIO_SDL1_2], [1], [SDL-1.2 Mixer in use]) - SDL_mixer=sdl - SOUND_SDL_OK=true -], [ - ac_save_CPPFLAGS="$CPPFLAGS" - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CPPFLAGS="$CPPFLAGS $SDL_CFLAGS" - CFLAGS="$CFLAGS $SDL_CFLAGS" - LIBS="$LIBS $SDL_LIBS" - AC_CHECK_HEADER([SDL_mixer.h], [SDL_mixer_h=1], [SDL_mixer_h=0]) - AC_CHECK_LIB([SDL_mixer], [Mix_OpenAudio], [SDL_mixer=sdl]) - CPPFLAGS="$ac_save_CPPFLAGS" - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - - AC_MSG_CHECKING([building SDL_mixer support]) - if test "x$SDL_mixer_h" = "x1"; then - if test "x$SDL_mixer" = "xsdl"; then - SOUND_CFLAGS="$SOUND_CFLAGS $SDL_CFLAGS" - SOUND_LIBS="$SOUND_LIBS -lSDL_mixer $SDL_LIBS" - AC_DEFINE([AUDIO_SDL], [1], [SDL_Mixer support]) - AC_DEFINE([AUDIO_SDL1_2], [1], [SDL-1.2 Mixer in use]) - AC_MSG_RESULT([yes]) - SOUND_SDL_OK=true - else - AC_MSG_RESULT([no SDL_mixer library found, install from http://www.libsdl.org/projects/SDL_mixer/index.html ]) - fi - else - AC_MSG_RESULT([no SDL_mixer headers found, install from http://www.libsdl.org/projects/SDL_mixer/index.html]) - fi ]) - fi -fi -if test "x$USE_SOUND_SDL" = "xsdl" || test "x$USE_SOUND_SDL" = "xsdl2" ;then +if test "x$USE_SOUND_SDL" = "xsdl2" ;then if test "x$SOUND_SDL_OK" != "xtrue" ; then AC_MSG_ERROR([SDL mixer support requested, but cannot be compiled in]) fi _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits