Annotation of froggix/configure.ac, revision 1.4
1.1 nick 1: # Process this file with autoconf to produce a configure script.
1.4 ! nick 2: # $Id: configure.ac,v 1.3 2009-03-28 04:18:01 nick Exp $
1.2 nick 3: AC_INIT(README)
1.1 nick 4:
1.2 nick 5: # Setup for automake
6: PROJ_NAME=froggix
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
1.1 nick 13:
1.2 nick 14: # Check for tools
1.1 nick 15: AC_PROG_CC
1.2 nick 16: AC_PROG_CXX
1.1 nick 17:
1.2 nick 18: # Check for compiler environment
19: AC_C_CONST
1.1 nick 20:
1.2 nick 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:
1.3 nick 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:
1.4 ! nick 64: # Check for SDL_ttf library
1.3 nick 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:
1.4 ! nick 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:
1.3 nick 76:
77: ### No need for OpenGL right now
1.2 nick 78: # Check for OpenGL
1.3 nick 79: #AC_MSG_CHECKING(for OpenGL support)
80: #HAVE_OPENGL=no
81: #AC_TRY_COMPILE([
1.2 nick 82: #include <GL/gl.h>
1.3 nick 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
1.1 nick 96:
1.2 nick 97: # Check for standard C++ library
98: AC_CHECK_LIB(stdc++, main)
1.1 nick 99:
1.2 nick 100: # Finally create all the generated files
101: AC_OUTPUT(Makefile src/Makefile)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>