configure.ac 1.62 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
26
27
28
29
30
31
32
33
34
## --------------------- ##

# Look for a C++ compiler.
AC_LANG([C++])
AC_PROG_CXX

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

35
36
37
38
39
40
41
# 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

42
43
44
45
46
47
48

## ------- ##
## Tests.  ##
## ------- ##

# Students should create their test suite in tests/.  Add the needed
# configure options here.
49
50
51
52
AC_CONFIG_FILES([
  metalic/tests/Makefile
  extended/tests/Makefile
  static/tests/Makefile
53
  olena/tests/Makefile
54
])
55
56
57
58
59
60
61
62
63
64
65
66
67
68


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

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

# Ask for the Makefile creations.
AC_CONFIG_FILES([
  Makefile
    metalic/Makefile
      metalic/mlc/Makefile
69
70
    extended/Makefile
      extended/xtd/Makefile
71
72
    static/Makefile
      static/stc/Makefile
73
    olena/Makefile
74
      olena/oln/Makefile
Roland Levillain's avatar
Roland Levillain committed
75
    dynamic/Makefile
76
77
78
79
])

# Checks for library functions.
AC_OUTPUT