Author: cazfi
Date: Thu Feb 11 08:32:24 2016
New Revision: 31869

URL: http://svn.gna.org/viewcvs/freeciv?rev=31869&view=rev
Log:
Configure checks for sdl2 can now determine that SDL2 headers must be included 
without any path included.
This information is used when building audio support for any client, not yet in 
build of the sdl2-client.

See patch #6931

Modified:
    trunk/client/audio_sdl.c
    trunk/m4/sdl2-client.m4
    trunk/m4/sound.m4

Modified: trunk/client/audio_sdl.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/audio_sdl.c?rev=31869&r1=31868&r2=31869&view=diff
==============================================================================
--- trunk/client/audio_sdl.c    (original)
+++ trunk/client/audio_sdl.c    Thu Feb 11 08:32:24 2016
@@ -17,7 +17,10 @@
 
 #include <string.h>
 
-#ifdef AUDIO_SDL1_2
+#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>

Modified: trunk/m4/sdl2-client.m4
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/m4/sdl2-client.m4?rev=31869&r1=31868&r2=31869&view=diff
==============================================================================
--- trunk/m4/sdl2-client.m4     (original)
+++ trunk/m4/sdl2-client.m4     Thu Feb 11 08:32:24 2016
@@ -87,9 +87,20 @@
                [sdl2_lib_found="yes"], [sdl2_lib_found="no"
 sdl2_h_found="no"])
   if test "x$sdl2_lib_found" = "xyes" ; then
-    AC_CHECK_HEADER([SDL2/$3],
-                    [sdl2_h_found="yes"
-gui_sdl2_libs="${gui_sdl2_libs} -l$1"], [sdl2_h_found="no"])
+    sdl2_h_found="no"
+    if test x$sdl_headers_without_path != xyes ; then
+      AC_CHECK_HEADER([SDL2/$3],
+                      [sdl2_h_found="yes"
+gui_sdl2_libs="${gui_sdl2_libs} -l$1"], [])
+    fi
+    if test x$sdl2_h_found = xno ; then
+      AC_CHECK_HEADER([$3], [sdl2_h_found="yes"
+gui_sdl2_libs="${gui_sdl2_libs} -l$1"
+if test x$sdl_headers_without_path != xyes ; then
+  AC_DEFINE([SDL2_PLAIN_INCLUDE], [1], [sdl2 headers must be included without 
path])
+  sdl_headers_without_path=yes
+fi], [])
+    fi
   fi
   CPPFLAGS="$ac_save_CPPFLAGS"
   CFLAGS="$ac_save_CFLAGS"

Modified: trunk/m4/sound.m4
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/m4/sound.m4?rev=31869&r1=31868&r2=31869&view=diff
==============================================================================
--- trunk/m4/sound.m4   (original)
+++ trunk/m4/sound.m4   Thu Feb 11 08:32:24 2016
@@ -21,6 +21,11 @@
     AC_DEFINE([AUDIO_SDL2], [1], [SDL-2 Mixer in use])
     SDL_mixer=sdl2
     SOUND_SDL_OK=true
+    if test x$sdl_headers_without_path != xyes ; then
+      AC_CHECK_HEADER([SDL2/SDL_mixer.h], [], [
+AC_DEFINE([SDL2_PLAIN_INCLUDE], [1], [sdl2 headers must be included without 
path])
+sdl_headers_without_path=yes])
+    fi
 ], [
     ac_save_CPPFLAGS="$CPPFLAGS"
     ac_save_CFLAGS="$CFLAGS"


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to