dnl Process this file with autoconf to produce a configure script. AC_INIT(README.txt) dnl Setup for automake AM_INIT_AUTOMAKE(circuslinux,1.0.2) dnl Detect host info AC_CANONICAL_HOST AC_CANONICAL_TARGET dnl The alpha architecture needs special flags for binary portability case "$target" in alpha*-*-linux*) CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall" ;; esac dnl Check for tools AC_PROG_MAKE_SET AC_PROG_CC AC_PROG_INSTALL dnl Use the macro SDL provides to check the installed version of the SDL dnl development environment. Abort the configuration process if the dnl minimum version we require isn't available. SDL_VERSION=1.0.8 AM_PATH_SDL($SDL_VERSION, :, AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) ) dnl Add the SDL preprocessor flags and libraries to the build process CFLAGS="$CFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" AC_SUBST(CFLAGS) AC_SUBST(LIBS) dnl Checks for libraries. dnl Replace `main' with a function in -lSDL_image: AC_CHECK_LIB(SDL_image, main, LIBS="$LIBS -lSDL_image", AC_MSG_ERROR([*** SDL_image library not found!]) ) dnl Replace `main' with a function in -lSDL_mixer: use_mixer=yes AC_CHECK_LIB(SDL_mixer, main, LIBS="$LIBS -lSDL_mixer", use_mixer=no ) if test x$use_mixer = xyes; then CFLAGS="$CFLAGS -D__SOUND" else CFLAGS="$CFLAGS -DNOSOUND" fi dnl Joystick option JOY=NO AC_ARG_ENABLE(joystick, [ --enable-joystick Have joystick enabled SDL [default=no]], JOY=YES) AC_SUBST(JOY) dnl Target case "$target" in *-*-linux*) TARGET_DEF=LINUX ;; *-*-cygwin* | *-*-mingw32*) TARGET_DEF=WIN32 ;; esac AC_SUBST(TARGET_DEF) AC_OUTPUT([ Makefile data/Makefile ])