summaryrefslogtreecommitdiffstats
path: root/configure.ac
blob: 8c6f21dbfbdb30e4035650e8bed173d2448cb565 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
dnl Copyright (C) 2009-2010 Tavian Barnes <tavianator@gmail.com>
dnl
dnl This file is part of The Dimension Build Suite.
dnl
dnl The Dimension Build Suite is free software; you can redistribute it
dnl and/or modify it under the terms of the GNU General Public License as
dnl published by the Free Software Foundation; either version 3 of the
dnl License, or (at your option) any later version.
dnl
dnl The Dimension Build Suite is distributed in the hope that it will be
dnl useful, but WITHOUT ANY WARRANTY; without even the implied warranty
dnl of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
dnl General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.

AC_PREREQ(2.65)
AC_INIT(Dimension, 0.0.0, tavianator@gmail.com, dimension,
        [http://dmnsn.googlecode.com])
AM_INIT_AUTOMAKE([parallel-tests])

dnl Use C99 mode with GNU extensions
CFLAGS="-std=gnu99 $CFLAGS"

dnl Programs
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CXX
AM_PROG_LEX
AC_PROG_YACC
AM_PROG_AS
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL

dnl PNG canvas export
AC_ARG_ENABLE([png],
              [AS_HELP_STRING([--enable-png],
                              [Enable PNG canvas export [default=yes]])],
              [],
              [enable_png=yes])
AM_CONDITIONAL([PNG], [test "$enable_png" != "no"])

dnl OpenGL canvas export
AC_ARG_ENABLE([gl],
              [AS_HELP_STRING([--enable-gl],
                              [Enable OpenGL canvas export [default=yes]])],
              [],
              [enable_gl=yes])
AM_CONDITIONAL([GL], [test "$enable_gl" != "no"])

dnl Profile-guided optimization (default disabled)
AC_ARG_ENABLE([pgo],
              [AS_HELP_STRING([--enable-pgo],
                              [Enable profile-guided optimization [default=no]])],
              [],
              [enable_pgo=no])
AM_CONDITIONAL([PGO], [test "$enable_pgo" != "no"])

dnl Timing library for benchmarks
PKG_CHECK_MODULES([libsandglass], [libsandglass >= 0.2],
                  [],
                  [AC_MSG_WARN([libsandglass not found - benchmarking suite will not work])])
AC_SUBST(libsandglass_CFLAGS)
AC_SUBST(libsandglass_LIBS)

dnl Ensure compilation in C99 mode
AC_DEFINE([_XOPEN_SOURCE], [600])

dnl Generate Makefiles
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_FILES([Makefile
                 libdimension/Makefile
                 dimension/Makefile
                 tests/Makefile
                 tests/libdimension/Makefile
                 tests/dimension/Makefile
                 bench/Makefile
                 bench/libdimension/Makefile
                 doc/Makefile])
AC_OUTPUT