1dnl configure script for concentration 2AC_INIT(src/hangman.c) 3AC_CANONICAL_TARGET 4AM_INIT_AUTOMAKE(hangman, 0.9.2) 5 6AC_PROG_CC 7AC_CHECK_FUNCS([atexit]) 8AC_C_CONST 9AC_FUNC_MALLOC 10 11dnl Check for SDL 1.2.4+ 12SDL_VERSION=1.2.4 13AM_PATH_SDL($SDL_VERSION,:,AC_MSG_ERROR([*** SDL >= $SDL_VERSION not found!])) 14 15 16AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio, 17 [AC_CHECK_HEADER(SDL/SDL_mixer.h, , 18 AC_MSG_ERROR(*** Cannot find the SDL/SDL_mixer.h header 19 goto http://www.libsdl.org to download or 20 check with your distibution. 21 ); exit)], 22 AC_MSG_ERROR(*** Cannot find the SDL_mixer library 23 goto http://www.libsdl.org to download or 24 check with your distibution. 25 ); exit) 26 27AC_CHECK_LIB(SDL_ttf, TTF_Quit, 28 [AC_CHECK_HEADER(SDL/SDL_ttf.h, , 29 AC_MSG_ERROR(*** Cannot find the SDL/SDL_ttf.h header 30 goto http://www.libsdl.org to download or 31 check with your distibution. 32 ); exit)], 33 AC_MSG_ERROR( 34 *** Cannot find the SDL_ttf library 35 goto http://www.libsdl.org to download or 36 check with your distibution. 37 ); exit) 38 39AC_CHECK_LIB(SDL_image, IMG_Load, 40 [AC_CHECK_HEADER(SDL/SDL_image.h, , 41 AC_MSG_ERROR(*** Cannot find the SDL/SDL_image.h header 42 goto http://www.libsdl.org to download or 43 check you with your distibution. 44 45 ); exit)], 46 AC_MSG_ERROR(*** Cannot find the SDL_image library 47 goto http://www.libsdl.org to download or 48 check with your distibution. 49 ); exit) 50 51dnl Get compile and linking flags 52CFLAGS="$CFLAGS $SDL_CFLAGS -W -pedantic -std=gnu99 -Dsg_data_path=\\\"$datadir/$PACKAGE/\\\"" 53LIBS="$LIBS $SDL_LIBS -lSDL_mixer -lSDL_image -lSDL_ttf" 54 55dnl Generate Makefile 56AC_OUTPUT([Makefile 57src/Makefile 58fonts/Makefile 59sounds/Makefile 60pics/Makefile]) 61