configure.ac 2.4 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.59])


## ---------------- ##
## Package set up.  ##
## ---------------- ##

AC_INIT([Olena], [1.0], [olena@lrde.epita.fr], [olena])

# Auxiliary files.
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_FILES([build-aux/Makefile])

# Automake.
# 1.9.4 because of changelog vs. ChangeLog on Darwin.
AM_INIT_AUTOMAKE([1.9.4 foreign check-news dist-bzip2 -Wall])


## --------------------- ##
23
## C++ compiler set up.  ##
24
25
## --------------------- ##

Roland Levillain's avatar
Roland Levillain committed
26
27
28
29
30
31
# If the user doesn't provide any CXXFLAGS, prevent Autoconf from
# settings its own default ones (e.g., `-g -O2' for g++).
if test ! ${CXXFLAGS+set}; then
   CXXFLAGS=""
fi

32
33
34
35
36
37
38
39
40
# Look for a C++ compiler.
AC_LANG([C++])
AC_PROG_CXX

# Speed the compilation up.
if test "$GXX" = yes; then
  CXXFLAGS="$CXXFLAGS -pipe"
fi

41
42
43
44
45
46
47
# C++ compiler flags for tests.
AC_ARG_VAR([TESTS_CXXFLAGS])
# We want no optimization for the tests (too slow), and a lot of debugging.
if test "$GXX" = yes && test -z "$TESTS_CXXFLAGS"; then
  TESTS_CXXFLAGS="-O0 -ggdb -Wall -pipe"
fi

48

49
50
51
52
53
54
55
56
## ----------------------------- ##
## Concept C++ compiler set up.  ##
## ----------------------------- ##

AC_ARG_VAR([CONCEPTCXX], [Concept C++ compiler])
AC_CHECK_PROGS([CONCEPTCXX], [conceptg++ conceptc++])


57
58
59
60
## ------- ##
## Tests.  ##
## ------- ##

61
62
63
64
AC_CONFIG_FILES([
  metalic/tests/Makefile
  extended/tests/Makefile
  static/tests/Makefile
65
  olena/tests/Makefile
66
])
67
68
69
70
71
72
73
74
75
76
77
78
79
80


## --------------- ##
## Configuration.  ##
## --------------- ##

# Ask for config.h.
AM_CONFIG_HEADER([config.h])

# Ask for the Makefile creations.
AC_CONFIG_FILES([
  Makefile
    metalic/Makefile
      metalic/mlc/Makefile
81
82
    extended/Makefile
      extended/xtd/Makefile
83
84
    static/Makefile
      static/stc/Makefile
85
86
87
      static/samples/Makefile
      static/samples/mini-oln/Makefile
      static/samples/mini-oln/concept-c++/Makefile
88
    olena/Makefile
89
      olena/oln/Makefile
90
      olena/img/Makefile
Roland Levillain's avatar
Roland Levillain committed
91
    dynamic/Makefile
92
])
93
94
# FIXME: Should be performed through oln.m4 macros.
AC_CONFIG_FILES([
95
  olena/tests/algorithms/Makefile
96
97
  olena/tests/check/Makefile
  olena/tests/check/defs
98
99
100
  olena/tests/core/Makefile
  olena/tests/io/Makefile
  olena/tests/morphers/Makefile
101
  olena/tests/sanity/Makefile
102
  olena/tests/value/Makefile
103
104
105
])
AC_CONFIG_FILES([olena/tests/sanity/check],
		[chmod +x olena/tests/sanity/check])
106
107

AC_OUTPUT