# $Id: configure.in,v 1.7 2002/03/31 21:57:19 sarrazip Exp $ # configure.in for the gengameng library AC_INIT(src/gengameng/GameEngine.h) INTERFACE_NO=4 RELEASE_NO=1 INTERFACE_AGE=0 AC_SUBST(INTERFACE_NO) AC_SUBST(RELEASE_NO) AC_SUBST(INTERFACE_AGE) # 3.1: Full screen capability with GENGAMENG_FULL_SCREEN environment variable # 4.0: Ability to specify other SDL_Surface objects in which to draw; # support for side scrolling; must now #include . # 4.1: gengameng.m4 removes -rpath directive from $SDL_LIBS AC_CANONICAL_TARGET # This line added before AM_INIT_AUTOMAKE to avoid this warning: # AC_ARG_PROGRAM was called before AC_CANONICAL_TARGET # @sarrazip 20020330 AM_INIT_AUTOMAKE(gengameng, $INTERFACE_NO.$RELEASE_NO) # Checks for programs. AC_PROG_CXX AC_LANG_CPLUSPLUS AC_DISABLE_STATIC # This macro changes the default behavior of AC_PROG_LIBTOOL so # that static libraries will not be built by default. # This avoids compiling every file twice. # The user can still override this new default by using `--enable-static'. AM_PROG_LIBTOOL # This must come after AC_DISABLE_STATIC. # Checks for libraries. # Use C mode for SDL tests: AC_LANG_C AM_PATH_SDL(1.2.0) # typically found in /usr/share/aclocal/sdl.m4 # Remove any -rpath option from SDL_LIBS, so as not to hardcode # the library path into the executable file: # SDL_LIBS=`echo $SDL_LIBS | sed ['s:-Wl,-rpath,[^ ]*: :g]'` # AM_PATH_SDL does not stop if SDL is not found; therefore: if test "_$SDL_LIBS" = _; then AC_MSG_ERROR([SDL not found]) fi # We also need the SDL_image library: AM_TRY_LINK_SDL_IMAGE # Back to C++ mode after SDL tests. AC_LANG_CPLUSPLUS GENGAMENG_CFLAGS="" GENGAMENG_LIBS="-lgengameng" if test "$prefix" = NONE; then GENGAMENG_CFLAGS="-I/usr/local/include" GENGAMENG_LIBS="-L/usr/local/lib $GENGAMENG_LIBS" else GENGAMENG_CFLAGS="-I$prefix/include" GENGAMENG_LIBS="-L$prefix/lib $GENGAMENG_LIBS" fi AC_SUBST(GENGAMENG_CFLAGS) AC_SUBST(GENGAMENG_LIBS) pkgincludedir=$includedir/$package AC_SUBST(pkgincludedir) AC_OUTPUT([ Makefile gengameng.spec gengameng-config macros/Makefile src/Makefile src/gengameng/Makefile src/images/Makefile examples/Makefile ]) chmod 755 gengameng-config