Make the sdl2-config script relocatable

This commit is contained in:
Anonymous Maarten
2022-06-03 23:08:22 +02:00
committed by Sam Lantinga
parent 142a3630d3
commit 799d39a302
4 changed files with 16 additions and 1 deletions

View File

@@ -4694,6 +4694,11 @@ eval pkg_cmakedir=$libdir/cmake/SDL2
cmake_prefix_relpath="$(echo -n "$pkg_cmakedir" | sed -E "s#^$pkg_prefix##" | sed -E "s#[A-Za-z0-9_ .-]+#..#g" )"
AC_SUBST([cmake_prefix_relpath])
dnl Calculate the location of the prefix, relative to bindir
eval pkg_bindir=$bindir
bin_prefix_relpath="$(echo -n "pkg_bindir" | sed -E "s#^$pkg_prefix##" | sed -E "s#[A-Za-z0-9_ .-]+#..#g" )"
AC_SUBST([bin_prefix_relpath])
dnl Expand the cflags and libraries needed by apps using SDL
AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS)