Version bump for 0.6
[grits] / configure.ac
1 m4_define([grits_release], [0.6])
2 m4_define([grits_version], [2:0:0])
3 m4_define([grits_subdir],  [grits2])
4
5 # Init and options
6 AC_INIT([grits], [grits_release], [andy753421@gmail.com])
7 AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability foreign])
8 AC_CONFIG_HEADERS([config.h])
9 AC_CONFIG_MACRO_DIR([m4])
10 #AM_SILENT_RULES([yes])
11
12 # For library versioning
13 LIB_VERSION=grits_version
14 GRITS_SUBDIR=grits_subdir
15 AC_SUBST(LIB_VERSION)
16 AC_SUBST(GRITS_SUBDIR)
17
18 # Check for required programs
19 AC_PROG_CC
20 AC_PROG_LIBTOOL
21 DOLT
22 PKG_PROG_PKG_CONFIG
23 GTK_DOC_CHECK(1.9)
24
25 # Check for required packages
26 PKG_CHECK_MODULES(GLIB,  glib-2.0 >= 2.14 gobject-2.0 gthread-2.0)
27 PKG_CHECK_MODULES(CAIRO, cairo)
28 PKG_CHECK_MODULES(GTK,   gtk+-2.0 >= 2.16)
29 PKG_CHECK_MODULES(SOUP,  libsoup-2.4 >= 2.26)
30
31 # Check for glut for example plugin
32 AC_CHECK_LIB(glut, glutSolidTeapot, GLUT_LIBS="-lglut")
33 AM_CONDITIONAL(HAVE_GLUT, test "$GLUT_LIBS" != "")
34 AC_SUBST(GLUT_LIBS)
35
36 # Test for Windows vs. Unix
37 case "${host}" in
38         *mingw32*) WIN32="yes" ;;
39         *cygwin*)  WIN32="yes" ;;
40         *)         WIN32="no"  ;;
41 esac
42 if test "$WIN32" = yes; then
43         ac_default_prefix="/"
44 fi
45 AM_CONDITIONAL([WIN32],    test "$WIN32" = "yes")
46 AM_CONDITIONAL([NOTWIN32], test "$WIN32" = "no")
47
48 # Configure GL flags
49 if test "$WIN32" = yes; then
50         GL_CFLAGS=""
51         GL_LIBS="-lglu32 -lopengl32"
52 else
53         GL_CFLAGS=""
54         GL_LIBS="-lGL -lGLU"
55 fi
56 AC_SUBST([GL_CFLAGS])
57 AC_SUBST([GL_LIBS])
58
59 # Output 
60 AC_CONFIG_FILES([
61         Makefile
62         src/Makefile
63         src/data/Makefile
64         src/objects/Makefile
65         src/plugins/Makefile
66         src/grits.pc
67         docs/Makefile
68         docs/api/Makefile
69 ])
70 AC_OUTPUT