configure.ac 1.61 KB
Newer Older
1
##
Roland Levillain's avatar
Roland Levillain committed
2
## Configure Nolimips: a MIPS emulator with unlimited registers.
3
##
4
 AC_PREREQ([2.64])
5

6
7

## Project -----------------------------
Etienne Renault's avatar
Etienne Renault committed
8
AC_INIT([Nolimips], [0.11], [projects@lrde.epita.fr])
9
10


Roland Levillain's avatar
Roland Levillain committed
11
## Setup Autotools ---------------------
12
# Auxiliary files.
13
AC_CONFIG_AUX_DIR([build-aux])
14
15

# Initialize automake.
16
AM_INIT_AUTOMAKE([foreign 1.11 silent-rules dist-bzip2])
Akim Demaille's avatar
Akim Demaille committed
17
AM_SILENT_RULES([yes])
18
19
20
21

## Development tools -------------------
# Look for a lex-like program.
AC_PROG_LEX
22
# Look for bison.
Roland Levillain's avatar
Roland Levillain committed
23
AC_CHECK_PROGS([BISON], [bison])
24
25

# Look for a C++ compiler.
Roland Levillain's avatar
Roland Levillain committed
26
AC_LANG([C++])
27
28
AC_PROG_CXX

Roland Levillain's avatar
Roland Levillain committed
29
# Enable Libtool.
Roland Levillain's avatar
Roland Levillain committed
30
LT_INIT
31

Benoit Perrot's avatar
Benoit Perrot committed
32
33
# Look for readline library.
AC_CHECK_READLINE
34

Roland Levillain's avatar
Roland Levillain committed
35
36
# Check presence of `isblank'.
AC_CHECK_FUNCS([isblank])
Benoit Perrot's avatar
Benoit Perrot committed
37
38


39
## Development environment -------------
40

Benoit Perrot's avatar
Benoit Perrot committed
41
CXXFLAGS="${CXXFLAGS} -ansi -Wall -W -D__STDC_LIMIT_MACROS"
Roland Levillain's avatar
Roland Levillain committed
42
# Speed the compilation up.
43
44
45
if test "$GXX" = yes; then
  CXXFLAGS="$CXXFLAGS -pipe"
fi
Benoit Perrot's avatar
Benoit Perrot committed
46

Roland Levillain's avatar
Roland Levillain committed
47
# Gnulib modules.
Benoit Perrot's avatar
Benoit Perrot committed
48
nolimips_GNULIB
49

50

51
## Epilogue ----------------------------
Akim Demaille's avatar
Akim Demaille committed
52
AC_CONFIG_FILES([build-aux/bin/bison++], [chmod +x build-aux/bin/bison++])
53
54
55
56

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

57
58
59
# Ask for the Makefile creations.
AC_CONFIG_FILES([
  Makefile
60
    build-aux/Makefile
Benoit Perrot's avatar
Benoit Perrot committed
61
    lib/Makefile
62
63
64
65
66
    src/Makefile
    src/misc/Makefile
    src/inst/Makefile
    src/parse/Makefile
    src/vm/Makefile
67
    src/shell/Makefile
68
    src/task/Makefile
Benoit Perrot's avatar
Benoit Perrot committed
69
    doc/Makefile
Benoit Perrot's avatar
Benoit Perrot committed
70
71
72
73
74
75
76
    tests/Makefile
    tests/lexical/Makefile
    tests/syntax/Makefile
    tests/solve/Makefile
    tests/runtime/Makefile
    tests/unlimited/Makefile
    tests/good/Makefile
Benoit Perrot's avatar
Benoit Perrot committed
77
78
    distrib/Makefile
    distrib/debian/Makefile
79
80
81
82
])

# Instantiate the output files.
AC_OUTPUT