Switch from GtkGLExt to internal OpenGL handling
[grits] / configure.ac
1 m4_define([grits_release], [0.4.2])
2 m4_define([grits_version], [0:0:0])
3 m4_define([grits_subdir],  [grits0])
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 # Test for Windows vs. Unix
32 case "${host}" in
33         *mingw32*) WIN32="yes" ;;
34         *cygwin*)  WIN32="yes" ;;
35         *)         WIN32="no"  ;;
36 esac
37 if test "$WIN32" = yes; then
38         ac_default_prefix="/"
39 fi
40 AM_CONDITIONAL([WIN32],    test "$WIN32" = "yes")
41 AM_CONDITIONAL([NOTWIN32], test "$WIN32" = "no")
42
43 # Configure GL flags
44 if test "$WIN32" = yes; then
45         GL_CFLAGS=""
46         GL_LIBS="-lglu32 -lopengl32"
47 else
48         GL_CFLAGS=""
49         GL_LIBS="-lGL -lGLU"
50 fi
51 AC_SUBST([GL_CFLAGS])
52 AC_SUBST([GL_LIBS])
53
54 # Output 
55 AC_CONFIG_FILES([
56         Makefile
57         src/Makefile
58         src/data/Makefile
59         src/objects/Makefile
60         src/plugins/Makefile
61         src/grits.pc
62         docs/Makefile
63         docs/api/Makefile
64 ])
65 AC_OUTPUT