Annotation of thwomper-c/configure.ac, revision 1.1.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=thwomper
                      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: CFLAGS="$CFLAGS $SDL_CFLAGS"
                     51: CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
                     52: LIBS="$LIBS $SDL_LIBS"
                     53: 
                     54: ### No need for OpenGL right now
                     55: # Check for OpenGL
                     56: AC_MSG_CHECKING(for OpenGL support)
                     57: HAVE_OPENGL=no
                     58: AC_TRY_COMPILE([
                     59: include <GL/gl.h>
                     60: ],[
                     61: ],[
                     62: HAVE_OPENGL=yes
                     63: ])
                     64: AC_MSG_RESULT($HAVE_OPENGL)
                     65: if test x$HAVE_OPENGL = xyes; then
                     66:     CFLAGS="$CFLAGS -DHAVE_OPENGL"
                     67:     GL_LIBS="$SYS_GL_LIBS"
                     68: else
                     69:     GL_LIBS=""
                     70: fi
                     71: AC_SUBST(GL_LIBS)
                     72: ### End of OpenGL
                     73: 
                     74: # Check for standard C++ library
                     75: AC_CHECK_LIB(stdc++, main)
                     76: 
                     77: # Finally create all the generated files
                     78: AC_OUTPUT(Makefile src/Makefile)

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