aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHubert Maier2018-01-01 13:24:02 +0100
committerEugene Sandulenko2018-03-12 11:48:51 +0100
commit9d491ddd7e3db2af5956b893c84a14a07f6b70f5 (patch)
tree5ccfa84205ca9fb73cc978aa0a5c78f44af7ab01
parent410abf5b42eca25f1096df01ef9eb0e49f43aa3d (diff)
downloadscummvm-rg350-9d491ddd7e3db2af5956b893c84a14a07f6b70f5.tar.gz
scummvm-rg350-9d491ddd7e3db2af5956b893c84a14a07f6b70f5.tar.bz2
scummvm-rg350-9d491ddd7e3db2af5956b893c84a14a07f6b70f5.zip
CONFIGURE: Add a static builds switch
Configure will still build every target with shared objects by default. Done: - Added a configure switch (--enable-static) for static builds - Right now only tested for SDL targets (checked working on AmigaOS4 with SDL1/2) Missing: - Add the platforms that need the switch for cross-compiling (macOS, iOS, probably more) (I can´t do that myself as i have never cross-compiled and wouldn´t be able to check) @csnover asked on the forums to create a PR for it, so, with my limited (non-existant is more like it) knowledge, i wrapped something up. I *know* that it isn´t enough, as there already is some kind of static builds flag in configure (_engines_built_static). As i don´treally know if this is the same or a different cause (static plugins?), i´m not touching it. But please feel free to add or change what needs to be done.
-rwxr-xr-xconfigure8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure b/configure
index 085e98d55b..caaef90e32 100755
--- a/configure
+++ b/configure
@@ -957,6 +957,7 @@ Game engines:
The values of <engine name> for these options are as follows:
$engines_help
Optional Features:
+ --enable-static build a static binary instead of using shared objects
--enable-c++11 build as C++11 if the compiler allows that
--disable-debug disable building with debugging symbols
--enable-Werror treat warnings as errors
@@ -1100,6 +1101,7 @@ EOF
for ac_option in $@; do
case "$ac_option" in
+ --enable-static) _static_build=yes ;;
--disable-16bit) _16bit=no ;;
--enable-highres) _highres=yes ;;
--disable-highres) _highres=no ;;
@@ -3481,7 +3483,11 @@ case $_backend in
androidsdl | dingux | gph | linuxmoto | maemo | openpandora | samsungtv | sdl)
find_sdlconfig
append_var INCLUDES "`$_sdlconfig --prefix="$_sdlpath" --cflags`"
- append_var LIBS "`$_sdlconfig --prefix="$_sdlpath" --libs`"
+ if test "$_static_build" = yes ; then
+ append_var LIBS "`$_sdlconfig --prefix="$_sdlpath" --static-libs`"
+ else
+ append_var LIBS "`$_sdlconfig --prefix="$_sdlpath" --libs`"
+ fi
append_var DEFINES "-DSDL_BACKEND"
add_line_to_config_mk "SDL_BACKEND = 1"