# This first line initializes autoconf and gives it a file that it can # look for to make sure the source distribution is complete. AC_INIT(README) AM_PROG_LEX # The AM_INIT_AUTOMAKE macro tells automake the name and version number # of the software package so it can generate rules for building a source # archive. AM_INIT_AUTOMAKE(pipenightdreams, 0.9.0) AC_PREFIX_DEFAULT(/usr/local) AM_CONFIG_HEADER(src/config.h) CXXFLAGS="-O2" # We now have a list of macros which tell autoconf what tools we need to # build our software, in this case "make", a C++ compiler, and "install". # If we were creating a C program, we would use AC_PROC_CC instead of CXX. AC_PROG_MAKE_SET AC_PROG_CXX AC_PROG_INSTALL # This is a trick I learned at Loki - the current compiler for the alpha # architecture doesn't produce code that works on all versions of the # alpha processor. This bit detects the current compile architecture # and sets the compiler flags to produce portable binary code. #AC_CANONICAL_HOST AC_CANONICAL_TARGET case "$target" in alpha*-*-linux*) CXXFLAGS="$CXXFLAGS -mcpu=ev4 -Wa,-mall" ;; esac # Use the macro SDL provides to check the installed version of the SDL # development environment. Abort the configuration process if the # minimum version we require isn't available. SDL_VERSION=1.1.5 AM_PATH_SDL($SDL_VERSION, :, AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) ) # Add the SDL preprocessor flags and libraries to the build process CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" AC_CHECK_LIB(SDL_image, IMG_Load) LIBTOOL=../libtool AC_SUBST(LIBTOOL) #Thanks to Ingo Ruhnke MY_EXPAND_DIR(game_datadir, "$datadir/games/$PACKAGE") AC_DEFINE_UNQUOTED(GAME_DATADIR, "$game_datadir") # Finally create all the generated files # The configure script takes "file.in" and substitutes variables to produce # "file". In this case we are just generating the Makefiles, but this could # be used to generate any number of automatically generated files. AC_OUTPUT([ Makefile src/Makefile levels/Makefile images/Makefile images/arrows_yellow/Makefile images/flow_green/Makefile images/pipes_toys/Makefile images/default/Makefile images/flow_light/Makefile images/pipes_cables/Makefile images/pipes_wire/Makefile images/pipes_metal/Makefile images/arrows_grey/Makefile images/flow_blue/Makefile images/pipes_space/Makefile images/pipes_space/back01/Makefile images/pipes_space/back02/Makefile images/pipes_space/back03/Makefile images/pipes_space/back04/Makefile images/pipes_space/back05/Makefile man/Makefile ])