File: 11_fix_cross_build.patch

package info (click to toggle)
warmux 1%3A11.04.1%2Brepack2-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 126,388 kB
  • sloc: cpp: 186,040; xml: 8,909; sh: 3,358; makefile: 1,052; ansic: 713
file content (32 lines) | stat: -rw-r--r-- 1,084 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--- a/configure.ac
+++ b/configure.ac
@@ -281,22 +281,14 @@
 AC_CHECK_HEADER(SDL_rotozoom.h,,AC_MSG_ERROR(Please install SDL_gfx))
 AC_CHECK_LIB(SDL_gfx, rotozoomSurfaceXY,, AC_MSG_ERROR(Please install SDL_gfx))
 AC_MSG_CHECKING([whether SDL_gfx - version >= 2.0.22 ])
-AC_RUN_IFELSE([
-#include <stdio.h>
+AC_COMPILE_IFELSE([
 #include <SDL_gfxPrimitives.h>
-#undef main
-int main(void)
-{
-  FILE *f = fopen("conftest.out", "wt+");
-  fprintf(f, "%i.%i.%i\n",
-         SDL_GFXPRIMITIVES_MAJOR, SDL_GFXPRIMITIVES_MINOR, SDL_GFXPRIMITIVES_MICRO);
-  fclose(f);
-  int ver = SDL_GFXPRIMITIVES_MAJOR*1000+SDL_GFXPRIMITIVES_MINOR*100+SDL_GFXPRIMITIVES_MICRO;
-  return ver < 2022;
-}],
-  [echo "`cat conftest.out`, OK"],
-  [cat conftest.out
-   AC_MSG_ERROR(Please upgrade SDL_gfx)])
+#if SDL_GFXPRIMITIVES_MAJOR < 2 || (SDL_GFXPRIMITIVES_MAJOR == 2 && SDL_GFXPRIMITIVES_MINOR == 0 && SDL_GFXPRIMITIVES_MICRO < 22)
+#error too old
+#endif
+],
+  [echo "OK"],
+  [AC_MSG_ERROR(Please upgrade SDL_gfx)])
 
 dnl === Check for curl =====================================================