My project contains SDL and SDL_ttf as submodules. The build process is supposed to create a static build of SDL2, then do the same for SDL_ttf, linking to the libSDL2.a file I just created. I’m using autotools for each (./configure --enable-static --disable-shared then make), though my own program just uses a single makefile.
The SDL2 build works great, but SDL2_ttf’s build system appears to assume that SDL2 has been installed (i.e. with make install), not just built. I specifically do not want to install SDL2 as part of this build process. I hoped I could resolve this with the –-with-sdl-prefix flag:
./configure --disable-shared --enable-static --with-sdl-prefix=$(PWD)/SDL --disable-sdltest
But unfortunately it’s insufficient because:
- the SDL2_ttf compilation commands were attempting to include files in
SDL/include/SDL2, but the files live inSDL/include - it looks for
SDL/lib/libSDL2.a, but the library file is atSDL/build/.libs/libSDL2.a *** Warning: Linking the shared library libSDL2_ttf.la against the
*** static library /Users/firstnamelastname/Documents/c/appname/SDL/lib/libSDL2.a is not portable!
===> This appears all over the SDL_ttf compilations, despite the fact that I passed–disable-sharedand–enable-staticto./configurewhen building SDL_ttf
I could try to finagle the build system to fix all of these things individually and anything else that crops up after doing so, but I can’t tell if I’m near the end of the tunnel or if I’d be stuck in it for many more hours.
Is there a sensible way to do what I’m trying to do?