Thread: [Super-tux-commit] supertux Jamfile,NONE,1.1 Jamrules,NONE,1.1 autogen.sh,1.10,1.11 configure.ac,1.3
Brought to you by:
wkendrick
From: Matze B. <mat...@us...> - 2004-11-23 16:48:02
|
Update of /cvsroot/super-tux/supertux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29597 Modified Files: autogen.sh configure.ac Added Files: Jamfile Jamrules Log Message: added jam build system, please try it out - the advantage would be that it already supports all the stuff we need Index: configure.ac =================================================================== RCS file: /cvsroot/super-tux/supertux/configure.ac,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- configure.ac 20 Nov 2004 22:14:18 -0000 1.36 +++ configure.ac 23 Nov 2004 16:47:22 -0000 1.37 @@ -11,7 +11,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ([2.54]) -AC_INIT(SuperTux, 0.2-cvs) +AC_INIT(supertux, 0.2-cvs) AC_CONFIG_HEADERS(config.h) AC_CONFIG_SRCDIR([src/supertux.cpp]) AC_CANONICAL_TARGET @@ -39,12 +39,14 @@ dnl =========================================================================== dnl Give advanced users some options to play with +VARIANT=optimize AC_MSG_CHECKING(for gprof mode) AC_ARG_ENABLE(gprof, AC_HELP_STRING([--enable-gprof], [enable GNU profiling support]), [enable_gprof=$enableval], [enable_gprof=no]) if test "$enable_gprof" = "yes"; then - CXXFLAGS="$CXXFLAGS -pg" + #CXXFLAGS="$CXXFLAGS -pg" + VARIANT=profile AC_MSG_RESULT([enabled]) else AC_MSG_RESULT([disabled]) @@ -56,12 +58,15 @@ [enable_debug=$enableval], [enable_debug=no]) if test "$enable_debug" = "yes"; then AC_DEFINE([DEBUG], 1, [define to compile in debug checks]) - CXXFLAGS="$CXXFLAGS -Wall -Werror -O0 -g3" + #CXXFLAGS="$CXXFLAGS -Wall -Werror -O0 -g3" + VARIANT=debug AC_MSG_RESULT([enabled]) else - CXXFLAGS="$CXXFLAGS -O2 -g" + #CXXFLAGS="$CXXFLAGS -O2 -g" + VARIANT=optimize AC_MSG_RESULT([disabled]) fi +AC_SUBST([VARIANT]) AC_MSG_CHECKING(wether OpenGL should be used) AC_ARG_ENABLE(opengl, @@ -81,37 +86,47 @@ AM_PATH_SDL($SDL_VERSION, :, AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])) -CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" -CFLAGS="$CFLAGS $SDL_CFLAGS" -LIBS="$LIBS $SDL_LIBS" -GL_LIBS="-lGL" -dnl Checks for additional libraries. -AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio,, - AC_MSG_ERROR([SDL_mixer library required])) +NP_FINDLIB([SDLMIXER], [SDL_mixer], [SDL_mixer >= 1.2], + NP_LANG_PROGRAM([#include <SDL_mixer.h> +#if MIX_MAJOR_VERSION < 1 +# error SDLMix too old +#else +# if MIX_MAJOR_VERSION == 1 +# if MIX_MINOR_VERSION < 2 +# error SDLMix too old +# endif +# endif +#endif], [Mix_OpenAudio(0, 0, 0, 0);]), + [], [-lSDL_mixer], + [], + [AC_MSG_ERROR([Please install SDLMixer >=1.2.2])], + [$SDL_CFLAGS], [$SDL_LIBS]) -AC_CHECK_LIB(SDL_image, IMG_Load,, - AC_MSG_ERROR([SDL_image library required])) +NP_FINDLIB([SDLIMAGE], [SDL_image], [SDL_image >= 1.2], + NP_LANG_PROGRAM([#include <SDL_image.h>], [IMG_Load("");]), + [], [-lSDL_image], + [], + [AC_MSG_ERROR([Please install SDLImage >= 1.2.1])], + [$SDL_CFLAGS], [$SDL_LIBS]) if test "$enable_opengl" = "yes"; then AX_CHECK_GL fi if test "$no_gl" = "yes" -o "$enable_opengl" = "no"; then - CXXFLAGS="$CXXFLAGS -DNOOPENGL" - enable_opengl=no + GL_AVAILABLE="no" + AC_DEFINE([NOOPENGL],, [Define if opengl should not be used]) else - CFLAGS="$CFLAGS $GL_CFLAGS" - CXXFLAGS="$CXXFLAGS $GL_CFLAGS" - LIBS="$LIBS $GL_LIBS" + GL_AVAILABLE="yes" fi - -AC_CHECK_LIB(z, gzopen,, AC_MSG_ERROR([*** zlib is missing])) - -CXXFLAGS="$CXXFLAGS -DDATA_PREFIX='\"$datadir/supertux\"'" +AC_SUBST([GL_AVAILABLE]) dnl Checks for library functions. AC_CHECK_FUNCS(mkdir strdup strstr) +AC_INIT_JAM +AC_CONFIG_FILES([Jamconfig]) + AC_OUTPUT(Makefile m4/Makefile intl/Makefile src/Makefile data/Makefile @@ -125,5 +140,3 @@ echo " Debug Mode: $enable_debug" echo " OpenGL Support: $enable_opengl" echo "" - -# EOF # --- NEW FILE: Jamrules --- if ! $(top_builddir) { top_builddir = $(TOP) ; } top_srcdir = $(TOP) ; JAMCONFIG ?= $(top_builddir)/Jamconfig ; include $(JAMCONFIG) ; if ! $(JAMCONFIG_READ) { EXIT "Couldn't find config. Please run 'configure' first." ; } if $(USE_STLPORT_DEBUG) { CPPFLAGS += -I/usr/include/stlport ; CPPFLAGS += -D_STLP_DEBUG=1 -D_STLP_DEBUG_UNINITIALIZED=1 ; CPPFLAGS += -D_STLP_SHRED_BYTE=0xA3 ; LIBS += -lstlport_gcc_debug ; } COMPILER_CFLAGS += -Wall -W ; COMPILER_CFLAGS_optimize += -O3 -g3 ; COMPILER_C++FLAGS_optimize += -O3 -g3 ; COMPILER_LFLAGS_optimize += -O3 -g3 ; COMPILER_CFLAGS_debug += -DDEBUG -Werror -g3 ; COMPILER_CXXFLAGS_debug += -DDEBUG -Werror -g3 ; COMPILER_LFLAGS_debug += -g3 ; COMPILER_CFLAGS_profile += -O2 -g3 -pg ; COMPILER_CXXFLAGS_profile += -O2 -g3 -pg ; COMPILER_LFLAGS_profile += -g3 -pg ; LINK = $(CXX) ; # Include build rules include $(TOP)/mk/jam/build.jam ; # Include Dirs IncludeDir $(top_builddir) ; # for config.h IncludeDir lib src ; Index: autogen.sh =================================================================== RCS file: /cvsroot/super-tux/supertux/autogen.sh,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- autogen.sh 18 Nov 2004 23:52:49 -0000 1.10 +++ autogen.sh 23 Nov 2004 16:47:22 -0000 1.11 @@ -1,5 +1,19 @@ #!/bin/sh +# Correct working directory? +if test ! -f configure.ac ; then + echo "*** Please invoke this script from directory containing configure.ac." + exit 1 +fi + +# generate Jamconfig.in +autoconf --trace=AC_SUBST \ + | sed -e 's/configure.ac:[0-9]*:AC_SUBST:\([^:]*\).*/\1 ?= "@\1@" ;/g' \ + > Jamconfig.in +sed -e 's/.*BACKSLASH.*//' -i Jamconfig.in +echo 'INSTALL ?= "@INSTALL@" ;' >> Jamconfig.in +echo 'JAMCONFIG_READ = yes ;' >> Jamconfig.in + # we need a minimum of automake 1.6 and automake 1.8 seems to be buggy # this doesn't seem to work well # see AUTOMAKE_OPTIONS in Makefile.am @@ -7,7 +21,7 @@ autoheader libtoolize --force -aclocal -I m4 +aclocal -I mk/autoconf automake --copy --add-missing autoconf --- NEW FILE: Jamfile --- SubDir TOP ; # Decend into subdirs SubInclude TOP lib ; SubInclude TOP src ; SubInclude TOP data ; |