# Process this file with autoconf to produce a configure script. AC_INIT(src/bomns.cpp) AC_CANONICAL_HOST AC_CANONICAL_TARGET AM_INIT_AUTOMAKE(bomns,0.99.1) AM_CONFIG_HEADER(config.h) AC_PREFIX_DEFAULT(/usr/local) # Checks for programs. AC_PROG_CC AM_PROG_CC_STDC AC_HEADER_STDC AC_PROG_CPP AC_PROG_INSTALL AC_PROG_CXX # Allow for --disable'ing the launcher AC_ARG_ENABLE(launcher1, [ --enable-launcher1 Build the GTK+ 1.2.x launcher (default = no)], build_launcher1="$enableval", build_launcher1="no") AC_ARG_ENABLE(launcher2, [ --disable-launcher2 Skip building the GTK2 launcher], build_launcher2="$enableval", build_launcher2="yes") AC_ARG_ENABLE(editor, [ --disable-editor Don't build the (awesome) bomns level editor], build_editor="$enableval", build_editor="yes") # Check for SDL AM_PATH_SDL(1.2.0,,AC_MSG_ERROR(*** SDL >= 1.2.0 is required)) CFLAGS="$CFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" # Check for SDL_mixer have_SDLmixer=no AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio, have_SDLmixer=yes) if test x$have_SDLmixer != xyes then AC_MSG_ERROR([*** Can't find the SDL_mixer library Try: http://www.libsdl.org/projects/SDL_mixer/ ]) fi # Check for GTK+ 1.2.x (if the launcher will be built) if test "x$build_launcher1" = xyes; then AM_PATH_GTK(1.2.0, [LIBS="$LIBS $GTK_LIBS" CFLAGS="$GTK_CFLAGS $CFLAGS"], AC_MSG_WARN(*** Unable to find Gtk+ with a version >= 1.2.0, not building launcher) ; build_launcher1=no) fi # Check for GTK2 if test "x$build_launcher2" = xyes; then pkg_modules="gtk+-2.0 >= 2.0.0" PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) AC_SUBST(PACKAGE_CFLAGS) AC_SUBST(PACKAGE_LIBS) fi # Set the right ${prefix} if test "$prefix" = "NONE" then prefix="/usr/local" fi AC_DEFINE_UNQUOTED(DATA_PATH, "${prefix}/share/bomns") # Do substitutions AM_CONDITIONAL(BUILD_LAUNCHER1, test "x$build_launcher1" = xyes) AM_CONDITIONAL(BUILD_LAUNCHER2, test "x$build_launcher2" = xyes) AM_CONDITIONAL(BUILD_EDITOR, test "x$build_editor" = xyes) AC_OUTPUT( Makefile \ src/Makefile \ src/editor/Makefile \ src/launcher/Makefile \ src/launcher2/Makefile \ graphics/Makefile \ sounds/Makefile \ m4/Makefile \ levels/Makefile ) # do this better later, don't feel like screwing with it now echo if test "x$build_launcher1" = xyes; then echo "Building GTK+ 1.2.x launcher : yes" else echo "Building GTK+ 1.2.x launcher : no" fi if test "x$build_launcher2" = xyes; then echo "Building GTK2 launcher : yes" else echo "Building GTK2 launcher : no" fi if test "x$build_editor" = xyes; then echo "Building level editor : yes" else echo "Building level editor : no" fi echo echo "Now type \"make\" to compile Bomns for Linux, then \"make install\"" echo "(as root) to install it. Then play, dammit!" echo