configure.ac 3.55 KB
Newer Older
1
# Configure template for SPECS Grammar.                   -*-Autoconf-*-
pouill_n's avatar
pouill_n committed
2
#
3
4
# Copyright (C) 2003, 2004 Laboratoire de Recherche et Developpement
# de l'EPITA.
pouill_n's avatar
pouill_n committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# 02111-1307  USA

AC_PREREQ(2.57)

23
AC_INIT([specs-grammar], 0.2a, [transformers@lrde.epita.fr])
pouill_n's avatar
pouill_n committed
24
25
26
27
28

# Auxiliary files
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_FILES(config/Makefile)

29
AM_INIT_AUTOMAKE([1.8.3 dist-bzip2])
pouill_n's avatar
pouill_n committed
30
31
32
33
34
35

# Make sure $prefix is defined.
test "x$prefix" = xNONE && prefix=$ac_default_prefix

USE_XT_PACKAGES

36
37
38
test -f $STRC/bin/strc ||
  AC_MSG_ERROR([cannot find strc.  Use --with-strategoxt.])

39
40
41
42
43
test -f $SDF_TOOLS/bin/sdf-cons ||
  AC_MSG_ERROR([cannot find sdf-cons.  Use --with-strategoxt.])

test -f $PGEN/bin/sdf2table ||
  AC_MSG_ERROR([cannot find sdf2table.  Use --with-sdf.])
pouill_n's avatar
pouill_n committed
44

45
46
47
48

BUNDLE_INIT


pouill_n's avatar
pouill_n committed
49
50
51
52
53
54
AC_ARG_WITH([lrde-sdftools],
  [  --with-lrde-sdftools=DIR Specify location of LRDE_SDF, [PREFIX]],
  [LRDE_SDF=$withval],
  [LRDE_SDF=$prefix]
)
AC_SUBST([LRDE_SDF])
55
56
DEF_BUNDLED_PKG([LRDE_SDF])

pouill_n's avatar
pouill_n committed
57
58
59
60
61
62
63

AC_ARG_WITH([sdf-option],
  [  --with-sdf-option=DIR    Specify location of SDF_OPTION, [LRDE_SDF]],
  [SDF_OPTION=$withval],
  [SDF_OPTION=$LRDE_SDF]
)
AC_SUBST([SDF_OPTION])
64
65
DEF_BUNDLED_PKG([SDF_OPTION])
IF_IN_BUNDLE([sdf-option]) || test -f $SDF_OPTION/bin/sdf-option ||
66
  AC_MSG_ERROR([cannot find sdf-option.  Use --with-sdf-option.])
pouill_n's avatar
pouill_n committed
67
68
69
70
71
72
73
74


AC_ARG_WITH([boxedsdf],
  [  --with-boxedsdf=DIR      Specify location of BOXEDSDF, [LRDE_SDF]],
  [BOXEDSDF=$withval],
  [BOXEDSDF=$LRDE_SDF]
)
AC_SUBST([BOXEDSDF])
75
76
77
DEF_BUNDLED_PKG([BOXEDSDF])
IF_IN_BUNDLE([boxedsdf]) || test -f $BOXEDSDF/bin/boxed2pp-table ||
  AC_MSG_ERROR([cannot find boxed2sdf.  Use --with-boxedsdf.])
pouill_n's avatar
pouill_n committed
78
79


80
81
82
83
84
85
AC_ARG_WITH([esdf],
  [  --with-esdf=DIR    Specify location of ESDF, [LRDE_SDF]],
  [ESDF=$withval],
  [ESDF=$LRDE_SDF]
)
AC_SUBST([ESDF])
86
87
DEF_BUNDLED_PKG([ESDF])
IF_IN_BUNDLE([esdf]) || test -f $ESDF/bin/pack-esdf ||
88
89
  AC_MSG_ERROR([cannot find esdf.  Use --with-esdf.])

pouill_n's avatar
pouill_n committed
90

91
92
93
94
95
96
97
98
99
100
101
AC_ARG_WITH([sdf-astgen],
  [  --with-sdf-astgen=DIR    Specify location of ASTGEN, [LRDE_SDF]],
  [ASTGEN=$withval],
  [ASTGEN=$LRDE_SDF]
)
AC_SUBST([ASTGEN])
DEF_BUNDLED_PKG([ASTGEN])
IF_IN_BUNDLE([sdf-astgen]) || test -f $ASTGEN/bin/sdf-astgen ||
  AC_MSG_ERROR([cannot find sdf-astgen.  Use --with-sdf-astgen.])


102
103
104
105
106
107
AC_ARG_WITH(cxx-grammar,
  [  --with-cxx-grammar=DIR              Specify location of the cxx-grammar, [XT_PATH]],
  CXX_GRAMMAR="$withval",
  CXX_GRAMMAR="/usr/local"
)
AC_SUBST(CXX_GRAMMAR)
108
109
test -f $CXX_GRAMMAR/share/cxx-grammar/StrategoCxx.def ||
  AC_MSG_ERROR([cannot find StrategoCxx grammar.  Use --with-cxx-grammar.])
pouill_n's avatar
pouill_n committed
110
111
112
113
114
115
116
117

# Loook for common programs
AC_LANG_C
AC_PROG_CC
AC_PROG_INSTALL

# Output Files
AC_CONFIG_FILES([Makefile
118
                 lib/Makefile
pouill_n's avatar
pouill_n committed
119
120
121
122
123
124
125
                 src/Makefile
                 src/syn/Makefile
                 src/sig/Makefile
		 src/parser/Makefile
		 src/pp/Makefile
		 src/sdf/Makefile
		 src/specs-renamed/Makefile
126
127
		 src/strategospecs/Makefile
		 src/specs-to-cxx/Makefile])
pouill_n's avatar
pouill_n committed
128
AC_OUTPUT