1# $Id: configure.ac,v 1.21 2019/11/12 02:23:34 sarrazip Exp $ 2# configure.ac for the FlatZebra library 3 4AC_PREREQ(2.54) 5 6AC_INIT(flatzebra, 0.1.7) 7AC_CONFIG_SRCDIR(src/flatzebra/GameEngine.h) 8AM_INIT_AUTOMAKE 9API=`echo $VERSION | cut -d . -f -2`; AC_SUBST(API) 10RELEASE=`echo $VERSION | cut -d . -f 3`; AC_SUBST(RELEASE) 11 12PACKAGE_FULL_NAME="FlatZebra" 13PACKAGE_SUMMARY_EN="Small Engine for 2D video games like BurgerSpace" 14PACKAGE_SUMMARY_FR="Petit moteur pour jeux vidéo 2D comme BurgerSpace" 15AC_SUBST(PACKAGE_FULL_NAME) 16AC_SUBST(PACKAGE_SUMMARY_EN) 17AC_SUBST(PACKAGE_SUMMARY_FR) 18 19 20MINVER_SDL=1.2.4; AC_SUBST(MINVER_SDL) 21MINVER_SDL_IMAGE=1.2.2; AC_SUBST(MINVER_SDL_IMAGE) 22MINVER_SDL_MIXER=1.2.4; AC_SUBST(MINVER_SDL_MIXER) 23 24 25# Checks for programs. 26 27AC_PROG_CXX 28AC_COMPILE_WARNINGS 29AC_LANG_CPLUSPLUS 30 31AC_DISABLE_STATIC 32# This macro changes the default behavior of AC_PROG_LIBTOOL so 33# that static libraries will not be built by default. 34# This avoids compiling every file twice. 35# The user can still override this new default by using `--enable-static'. 36 37AM_PROG_LIBTOOL 38# This must come after AC_DISABLE_STATIC. 39 40 41# Checks for libraries. 42 43# Use C mode for SDL tests: 44AC_LANG_C 45 46AM_PATH_SDL(1.2.4) 47 48# Remove any -rpath option from SDL_LIBS, so as not to hardcode 49# the library path into the executable file: 50# 51 52SDL_LIBS=`echo $SDL_LIBS | sed ['s:-Wl,-rpath,[^ ]*: :g]'` 53 54# AM_PATH_SDL does not stop if SDL is not found; therefore: 55if test "_$SDL_LIBS" = _; then 56 AC_MSG_ERROR([SDL not found]) 57fi 58 59# We also need the SDL_image and SDL_mixer libraries: 60AM_TRY_LINK_SDL_IMAGE 61TRY_LINK_SDL_MIXER 62 63# This will insert SDL_image and SDL_mixer in the dependency_libs field 64# of the installed .la file. The flatzebra shared library will also 65# specify SDL_image and SDL_mixer as being needed. 66# 67SDL_LIBS="$SDL_LIBS -lSDL_image -lSDL_mixer" 68 69# Back to C++ mode after SDL tests. 70AC_LANG_CPLUSPLUS 71 72 73AC_CONFIG_FILES([ 74 Makefile 75 flatzebra.spec 76 flatzebra-0.1.pc 77 src/Makefile 78 src/flatzebra/Makefile 79]) 80AC_OUTPUT 81