Annotation of talos/configure.ac, revision 1.1

1.1     ! nick        1: # Process this file with autoconf to produce a configure script.
        !             2: # $Id: configure.ac,v 1.4 2009-03-31 02:29:00 nick Exp $
        !             3: AC_INIT(README)
        !             4: 
        !             5: # Setup for automake
        !             6: PROJ_NAME=talos
        !             7: PROJ_VERSION=1.0.0
        !             8: AM_INIT_AUTOMAKE($PROJ_NAME, $PROJ_VERSION)
        !             9: 
        !            10: # Detect the canonical host and target build environment
        !            11: AC_CANONICAL_HOST
        !            12: AC_CANONICAL_TARGET
        !            13: 
        !            14: # Check for tools
        !            15: AC_PROG_CC
        !            16: AC_PROG_CXX
        !            17: 
        !            18: # Check for compiler environment
        !            19: AC_C_CONST
        !            20: 
        !            21: # Figure out which math and OpenGL libraries to use
        !            22: case "$target" in
        !            23:     *-*-cygwin* | *-*-mingw32*)
        !            24:         MATHLIB=""
        !            25:         SYS_GL_LIBS="-lopengl32"
        !            26:         ;;
        !            27:     *-*-beos* | *-*-darwin*)
        !            28:         MATHLIB=""
        !            29:         SYS_GL_LIBS="-lGL"
        !            30:         ;;
        !            31:     *-*-aix*)
        !            32:         if test x$ac_cv_prog_gcc = xyes; then
        !            33:             CFLAGS="-mthreads"
        !            34:         fi
        !            35:         ;;
        !            36:     *)
        !            37:         MATHLIB="-lm"
        !            38:         AC_PATH_X
        !            39:         AC_PATH_XTRA
        !            40:         if test x$have_x = xyes; then
        !            41:             CFLAGS="$CFLAGS $X_CFLAGS"
        !            42:             SYS_GL_LIBS="$X_LIBS -lGL"
        !            43:         else
        !            44:             SYS_GL_LIBS="-lGL"
        !            45:         fi
        !            46:         ;;
        !            47: esac
        !            48: AC_SUBST(MATHLIB)
        !            49: 
        !            50: # Check for SDL
        !            51: SDL_VERSION=1.1.8
        !            52: AM_PATH_SDL($SDL_VERSION, :,
        !            53:             AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]))
        !            54: CFLAGS="$CFLAGS $SDL_CFLAGS"
        !            55: CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
        !            56: LIBS="$LIBS $SDL_LIBS"
        !            57: 
        !            58: # Check for SDL_image library
        !            59: AC_CHECK_LIB(SDL_image, IMG_LoadPNG_RW, , AC_MSG_ERROR([
        !            60: *** Unable to find SDL_image libary with PNG support
        !            61: (http://www.libsdl.org/projects/SDL_image/)
        !            62: ]))
        !            63: 
        !            64: # Check for SDL_ttf library
        !            65: AC_CHECK_LIB(SDL_ttf, TTF_OpenFont, , AC_MSG_ERROR([
        !            66: *** Unable to find SDL_ttf libary 
        !            67: (http://www.libsdl.org/projects/SDL_image/)
        !            68: ]))
        !            69: 
        !            70: # Check for SDL_mixer library
        !            71: AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio, , AC_MSG_ERROR([
        !            72: *** Unable to find SDL_mixer libary 
        !            73: (http://www.libsdl.org/projects/SDL_image/)
        !            74: ]))
        !            75: 
        !            76: 
        !            77: ### No need for OpenGL right now
        !            78: # Check for OpenGL
        !            79: #AC_MSG_CHECKING(for OpenGL support)
        !            80: #HAVE_OPENGL=no
        !            81: #AC_TRY_COMPILE([
        !            82:  #include <GL/gl.h>
        !            83: #],[
        !            84: #],[
        !            85: #HAVE_OPENGL=yes
        !            86: #])
        !            87: #AC_MSG_RESULT($HAVE_OPENGL)
        !            88: #if test x$HAVE_OPENGL = xyes; then
        !            89: #    CFLAGS="$CFLAGS -DHAVE_OPENGL"
        !            90: #    GL_LIBS="$SYS_GL_LIBS"
        !            91: #else
        !            92: #    GL_LIBS=""
        !            93: #fi
        !            94: #AC_SUBST(GL_LIBS)
        !            95: ### End of OpenGL
        !            96: 
        !            97: # Check for standard C++ library
        !            98: AC_CHECK_LIB(stdc++, main)
        !            99: 
        !           100: # Finally create all the generated files
        !           101: AC_OUTPUT(Makefile src/Makefile)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>