configure.ac 2.8 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
61
62
63
64
65
66
## -------------- ##
## Dependencies.  ##
## -------------- ##

# FreeImage library.
AC_CHECK_HEADERS([FreeImagePlus.h],
  [AM_CONDITIONAL([FREE_IMAGE_PLUS], [true])])
AC_CHECK_LIB([freeimageplus], [main])


67
68
69
70
## ------- ##
## Tests.  ##
## ------- ##

71
72
73
74
AC_CONFIG_FILES([
  metalic/tests/Makefile
  extended/tests/Makefile
  static/tests/Makefile
75
  olena/tests/Makefile
76
])
77
78
79
80
81
82
83
84
85
86
87
88
89
90


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

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

# Ask for the Makefile creations.
AC_CONFIG_FILES([
  Makefile
    metalic/Makefile
      metalic/mlc/Makefile
91
92
    extended/Makefile
      extended/xtd/Makefile
93
94
    static/Makefile
      static/stc/Makefile
95
96
      static/samples/Makefile
      static/samples/mini-oln/Makefile
Roland Levillain's avatar
Roland Levillain committed
97
98
99
100
        static/samples/mini-oln/concept-c++/Makefile
      static/samples/mini-std/Makefile
        static/samples/mini-std/cpp/Makefile
        static/samples/mini-std/cpp2/Makefile
101
102
    milena/Makefile
      milena/doc/Makefile
103
    olena/Makefile
104
      olena/oln/Makefile
105
      olena/img/Makefile
Roland Levillain's avatar
Roland Levillain committed
106
    dynamic/Makefile
107
])
108
109
# FIXME: Should be performed through oln.m4 macros.
AC_CONFIG_FILES([
110
  milena/tests/Makefile
111
  olena/tests/algorithms/Makefile
112
113
  olena/tests/check/Makefile
  olena/tests/check/defs
114
115
116
  olena/tests/core/Makefile
  olena/tests/io/Makefile
  olena/tests/morphers/Makefile
117
  olena/tests/sanity/Makefile
118
  olena/tests/value/Makefile
119
120
121
])
AC_CONFIG_FILES([olena/tests/sanity/check],
		[chmod +x olena/tests/sanity/check])
122
123

AC_OUTPUT