1# This first line initializes autoconf and gives it a file that it can 2# look for to make sure the source distribution is complete. 3 4AC_INIT(README) 5AM_PROG_LEX 6 7# The AM_INIT_AUTOMAKE macro tells automake the name and version number 8# of the software package so it can generate rules for building a source 9# archive. 10 11AM_INIT_AUTOMAKE(pipenightdreams, 0.10.0) 12AC_PREFIX_DEFAULT(/usr/local) 13AM_CONFIG_HEADER(src/config.h) 14CXXFLAGS="-O2" 15 16# We now have a list of macros which tell autoconf what tools we need to 17# build our software, in this case "make", a C++ compiler, and "install". 18# If we were creating a C program, we would use AC_PROC_CC instead of CXX. 19 20AC_PROG_MAKE_SET 21AC_PROG_CXX 22AC_PROG_INSTALL 23 24# This is a trick I learned at Loki - the current compiler for the alpha 25# architecture doesn't produce code that works on all versions of the 26# alpha processor. This bit detects the current compile architecture 27# and sets the compiler flags to produce portable binary code. 28 29#AC_CANONICAL_HOST 30AC_CANONICAL_TARGET 31case "$target" in 32alpha*-*-linux*) 33CXXFLAGS="$CXXFLAGS -mcpu=ev4 -Wa,-mall" 34;; 35esac 36 37# Use the macro SDL provides to check the installed version of the SDL 38# development environment. Abort the configuration process if the 39# minimum version we require isn't available. 40SDL_VERSION=1.1.5 41AM_PATH_SDL($SDL_VERSION, 42:, 43 AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) 44) 45# Add the SDL preprocessor flags and libraries to the build process 46CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" 47LIBS="$LIBS $SDL_LIBS" 48 49AC_CHECK_LIB(SDL_image, IMG_Load) 50 51LIBTOOL=../libtool 52AC_SUBST(LIBTOOL) 53 54#Thanks to Ingo Ruhnke <grumbel@gmx.de> 55MY_EXPAND_DIR(game_datadir, "$datadir/games/$PACKAGE") 56AC_DEFINE_UNQUOTED(GAME_DATADIR, "$game_datadir") 57 58# Finally create all the generated files 59# The configure script takes "file.in" and substitutes variables to produce 60# "file". In this case we are just generating the Makefiles, but this could 61# be used to generate any number of automatically generated files. 62AC_OUTPUT([ 63Makefile 64src/Makefile 65levels/Makefile 66images/Makefile 67images/arrows_yellow/Makefile 68images/flow_green/Makefile 69images/pipes_toys/Makefile 70images/default/Makefile 71images/flow_light/Makefile 72images/pipes_cables/Makefile 73images/pipes_wire/Makefile 74images/pipes_metal/Makefile 75images/arrows_grey/Makefile 76images/flow_blue/Makefile 77images/pipes_space/Makefile 78images/pipes_space/back01/Makefile 79images/pipes_space/back02/Makefile 80images/pipes_space/back03/Makefile 81images/pipes_space/back04/Makefile 82images/pipes_space/back05/Makefile 83man/Makefile 84]) 85