Basic support for static compiling
This commit is contained in:
parent
892294873a
commit
22a046efa2
4 changed files with 46 additions and 21 deletions
35
configure
vendored
35
configure
vendored
|
@ -1,5 +1,5 @@
|
|||
#! /bin/sh
|
||||
# From configure.ac Revision: 1.27 .
|
||||
# From configure.ac Revision: 1.28 .
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.59 for Battle for Wesnoth 0.7.3-CVS.
|
||||
#
|
||||
|
@ -312,7 +312,7 @@ ac_includes_default="\
|
|||
# include <unistd.h>
|
||||
#endif"
|
||||
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SDL_CONFIG GNOME_CONFIG GNOME1_DESKTOP KDE_CONFIG KDE_DESKTOP KDE_ICON SDL_LIBS SDL_IMAGE_LIBS SDL_MIXER_LIBS SDL_NET_LIBS SDL_TTF_LIBS CPP EGREP SDL_CFLAGS LIBOBJS DATADIR SERVER_TRUE SERVER_FALSE EDITOR_TRUE EDITOR_FALSE TOOLS_TRUE TOOLS_FALSE KDE_TRUE KDE_FALSE GNOME1_TRUE GNOME1_FALSE GNOME2_TRUE GNOME2_FALSE MANUAL_FILES DATA_FILES FONT_FILES IMAGE_FILES MUSIC_FILES SOUND_FILES UTIL_FILES LTLIBOBJS'
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SDL_CONFIG GNOME_CONFIG GNOME1_DESKTOP KDE_CONFIG KDE_DESKTOP KDE_ICON SDL_LIBS SDL_IMAGE_LIBS SDL_MIXER_LIBS SDL_NET_LIBS SDL_TTF_LIBS CPP EGREP SDL_CFLAGS LIBOBJS DATADIR STATIC_TRUE STATIC_FALSE SERVER_TRUE SERVER_FALSE EDITOR_TRUE EDITOR_FALSE TOOLS_TRUE TOOLS_FALSE KDE_TRUE KDE_FALSE GNOME1_TRUE GNOME1_FALSE GNOME2_TRUE GNOME2_FALSE MANUAL_FILES DATA_FILES FONT_FILES IMAGE_FILES MUSIC_FILES SOUND_FILES UTIL_FILES LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
|
@ -861,7 +861,7 @@ Optional Features:
|
|||
--disable-dependency-tracking Speeds up one-time builds
|
||||
--enable-dependency-tracking Do not reject slow dependency extractors
|
||||
--enable-debug Enable debug in wesnoth
|
||||
--enable-static Enable static building of wesnoth (doesn't work yet)
|
||||
--enable-static Enable static building of wesnoth
|
||||
--datadir-name[=dir] Change name of data directory. Default with this option: wesnoth-data
|
||||
--enable-server Enable compilation of server
|
||||
--enable-editor Enable compilation editor
|
||||
|
@ -6725,8 +6725,9 @@ fi;
|
|||
# Check whether --enable-static or --disable-static was given.
|
||||
if test "${enable_static+set}" = set; then
|
||||
enableval="$enable_static"
|
||||
CXXFLAGS="$CXXFLAGS -static"
|
||||
LIBS="$LIBS -static"
|
||||
static=$enableval
|
||||
else
|
||||
static=no
|
||||
fi;
|
||||
|
||||
DATADIR=$PACKAGE
|
||||
|
@ -6747,11 +6748,6 @@ fi;
|
|||
|
||||
|
||||
|
||||
# Default behaviour
|
||||
server=no
|
||||
editor=no
|
||||
tools=no
|
||||
|
||||
# Check whether --enable-server or --disable-server was given.
|
||||
if test "${enable_server+set}" = set; then
|
||||
enableval="$enable_server"
|
||||
|
@ -6794,6 +6790,16 @@ fi;
|
|||
|
||||
|
||||
|
||||
if test x$static = xyes; then
|
||||
STATIC_TRUE=
|
||||
STATIC_FALSE='#'
|
||||
else
|
||||
STATIC_TRUE='#'
|
||||
STATIC_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test x$server = xyes; then
|
||||
SERVER_TRUE=
|
||||
SERVER_FALSE='#'
|
||||
|
@ -6996,6 +7002,13 @@ echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
|
|||
Usually this means the macro was only invoked conditionally." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
if test -z "${STATIC_TRUE}" && test -z "${STATIC_FALSE}"; then
|
||||
{ { echo "$as_me:$LINENO: error: conditional \"STATIC\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." >&5
|
||||
echo "$as_me: error: conditional \"STATIC\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
if test -z "${SERVER_TRUE}" && test -z "${SERVER_FALSE}"; then
|
||||
{ { echo "$as_me:$LINENO: error: conditional \"SERVER\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." >&5
|
||||
|
@ -7631,6 +7644,8 @@ s,@EGREP@,$EGREP,;t t
|
|||
s,@SDL_CFLAGS@,$SDL_CFLAGS,;t t
|
||||
s,@LIBOBJS@,$LIBOBJS,;t t
|
||||
s,@DATADIR@,$DATADIR,;t t
|
||||
s,@STATIC_TRUE@,$STATIC_TRUE,;t t
|
||||
s,@STATIC_FALSE@,$STATIC_FALSE,;t t
|
||||
s,@SERVER_TRUE@,$SERVER_TRUE,;t t
|
||||
s,@SERVER_FALSE@,$SERVER_FALSE,;t t
|
||||
s,@EDITOR_TRUE@,$EDITOR_TRUE,;t t
|
||||
|
|
12
configure.ac
12
configure.ac
|
@ -264,9 +264,9 @@ AC_ARG_ENABLE([debug],
|
|||
[CXXFLAGS="$CXXFLAGS -DDEBUG -ggdb3"])
|
||||
|
||||
AC_ARG_ENABLE([static],
|
||||
[ --enable-static Enable static building of wesnoth (doesn't work yet)],
|
||||
[CXXFLAGS="$CXXFLAGS -static"]
|
||||
[LIBS="$LIBS -static"])
|
||||
[ --enable-static Enable static building of wesnoth],
|
||||
[static=$enableval],
|
||||
[static=no])
|
||||
|
||||
DATADIR=$PACKAGE
|
||||
AC_ARG_ENABLE([datadir-name],
|
||||
|
@ -284,11 +284,6 @@ AC_ARG_ENABLE([datadir-name],
|
|||
|
||||
AC_SUBST([DATADIR])
|
||||
|
||||
# Default behaviour
|
||||
server=no
|
||||
editor=no
|
||||
tools=no
|
||||
|
||||
AC_ARG_ENABLE([server],
|
||||
[ --enable-server Enable compilation of server],
|
||||
[server=$enableval],
|
||||
|
@ -314,6 +309,7 @@ AC_ARG_ENABLE([gnome],
|
|||
[gnome=$enableval],
|
||||
[gnome=no])
|
||||
|
||||
AM_CONDITIONAL([STATIC], [test x$static = xyes])
|
||||
AM_CONDITIONAL([SERVER], [test x$server = xyes])
|
||||
AM_CONDITIONAL([EDITOR], [test x$editor = xyes])
|
||||
AM_CONDITIONAL([TOOLS], [test x$tools = xyes])
|
||||
|
|
|
@ -249,4 +249,11 @@ wesnoth_editor_SOURCES = editor/editor.cpp \
|
|||
|
||||
AM_CXXFLAGS = @SDL_CFLAGS@ -DWESNOTH_PATH=\"$(pkgdatadir)\"
|
||||
AM_LDFLAGS = @SDL_LIBS@ @SDL_IMAGE_LIBS@ @SDL_MIXER_LIBS@ @SDL_NET_LIBS@ \
|
||||
@SDL_TTF_LIBS@
|
||||
@SDL_TTF_LIBS@
|
||||
|
||||
if STATIC
|
||||
LIBS += -static -L/usr/lib -Wl,-rpath,/usr/lib -L/usr/X11R6/lib -lSDL_image \
|
||||
-lSDL_mixer -lSDL_net -lSDL_ttf -lSDL -lpthread -ldl -laudio -lXt -lX11 -lXext \
|
||||
-lSDL_image -lSDL_mixer -lSDL_net -lSDL_ttf -lstdc++ -lm -lSM -lICE -ljpeg \
|
||||
-lpng -lz -lvorbisfile -lvorbis -logg -lsmpeg -lfreetype
|
||||
endif
|
||||
|
|
|
@ -37,6 +37,11 @@ POST_UNINSTALL = :
|
|||
@SERVER_TRUE@am__append_1 = server
|
||||
@TOOLS_TRUE@am__append_2 = tools
|
||||
@EDITOR_TRUE@am__append_3 = wesnoth_editor
|
||||
@STATIC_TRUE@am__append_4 = -static -L/usr/lib -Wl,-rpath,/usr/lib -L/usr/X11R6/lib -lSDL_image \
|
||||
@STATIC_TRUE@-lSDL_mixer -lSDL_net -lSDL_ttf -lSDL -lpthread -ldl -laudio -lXt -lX11 -lXext \
|
||||
@STATIC_TRUE@-lSDL_image -lSDL_mixer -lSDL_net -lSDL_ttf -lstdc++ -lm -lSM -lICE -ljpeg \
|
||||
@STATIC_TRUE@-lpng -lz -lvorbisfile -lvorbis -logg -lsmpeg -lfreetype
|
||||
|
||||
|
||||
pkgdatadir = $(datadir)/@DATADIR@
|
||||
ACLOCAL = @ACLOCAL@
|
||||
|
@ -86,7 +91,7 @@ KDE_ICON = @KDE_ICON@
|
|||
KDE_TRUE = @KDE_TRUE@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBS = @LIBS@ $(am__append_4)
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANUAL_FILES = @MANUAL_FILES@
|
||||
|
@ -111,6 +116,8 @@ SERVER_TRUE = @SERVER_TRUE@
|
|||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SOUND_FILES = @SOUND_FILES@
|
||||
STATIC_FALSE = @STATIC_FALSE@
|
||||
STATIC_TRUE = @STATIC_TRUE@
|
||||
STRIP = @STRIP@
|
||||
TOOLS_FALSE = @TOOLS_FALSE@
|
||||
TOOLS_TRUE = @TOOLS_TRUE@
|
||||
|
@ -384,7 +391,7 @@ wesnoth_editor_SOURCES = editor/editor.cpp \
|
|||
|
||||
AM_CXXFLAGS = @SDL_CFLAGS@ -DWESNOTH_PATH=\"$(pkgdatadir)\"
|
||||
AM_LDFLAGS = @SDL_LIBS@ @SDL_IMAGE_LIBS@ @SDL_MIXER_LIBS@ @SDL_NET_LIBS@ \
|
||||
@SDL_TTF_LIBS@
|
||||
@SDL_TTF_LIBS@
|
||||
|
||||
subdir = src
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
|
|
Loading…
Add table
Reference in a new issue