autotools: properly enable the version static assertions

SDL doesn't use automake, therefore instead of AC_DEFINE_UNQUOTED
manually add the defines to EXTRA_CFLAGS.
This commit is contained in:
Ozkan Sezer 2022-06-24 20:37:20 +03:00
parent 76f40e2b3b
commit 787dc260a8
2 changed files with 3 additions and 12 deletions

10
configure vendored
View File

@ -18394,15 +18394,7 @@ printf "%s\n" "#define SDL_DEFAULT_ASSERT_LEVEL 3" >>confdefs.h
;; ;;
esac esac
EXTRA_CFLAGS="$EXTRA_CFLAGS -DSDL_BUILD_MAJOR_VERSION=$SDL_MAJOR_VERSION -DSDL_BUILD_MINOR_VERSION=$SDL_MINOR_VERSION -DSDL_BUILD_MICRO_VERSION=$SDL_MICRO_VERSION"
printf "%s\n" "#define SDL_BUILD_MAJOR_VERSION $SDL_MAJOR_VERSION" >>confdefs.h
printf "%s\n" "#define SDL_BUILD_MINOR_VERSION $SDL_MINOR_VERSION" >>confdefs.h
printf "%s\n" "#define SDL_BUILD_MICRO_VERSION $SDL_MICRO_VERSION" >>confdefs.h
# Check whether --enable-dependency-tracking was given. # Check whether --enable-dependency-tracking was given.
if test ${enable_dependency_tracking+y} if test ${enable_dependency_tracking+y}

View File

@ -227,9 +227,8 @@ case "$enable_assertions" in
;; ;;
esac esac
AC_DEFINE_UNQUOTED([SDL_BUILD_MAJOR_VERSION], $SDL_MAJOR_VERSION, [ ]) dnl For use in static assertions
AC_DEFINE_UNQUOTED([SDL_BUILD_MINOR_VERSION], $SDL_MINOR_VERSION, [ ]) EXTRA_CFLAGS="$EXTRA_CFLAGS -DSDL_BUILD_MAJOR_VERSION=$SDL_MAJOR_VERSION -DSDL_BUILD_MINOR_VERSION=$SDL_MINOR_VERSION -DSDL_BUILD_MICRO_VERSION=$SDL_MICRO_VERSION"
AC_DEFINE_UNQUOTED([SDL_BUILD_MICRO_VERSION], $SDL_MICRO_VERSION, [ ])
dnl See whether we can use gcc style dependency tracking dnl See whether we can use gcc style dependency tracking
AC_ARG_ENABLE(dependency-tracking, AC_ARG_ENABLE(dependency-tracking,