-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.in
93 lines (82 loc) · 2.75 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
dnl This file was synchronized with template ($Revision: 17 $)
dnl
dnl comments are started with dnl
AC_INIT
dnl create supplementary scripts in subdirectory
AC_CONFIG_AUX_DIR(config)
dnl determine system type
AC_CANONICAL_SYSTEM
dnl check for MinGW
AM_CONDITIONAL(MINGW32, [test x"$build_os" = xmingw32])
dnl project name and version
AM_INIT_AUTOMAKE(ostap, 0.2, nodefine)
dnl add custom m4 functions
m4_sinclude(m4/acinclude.m4)
dnl check for install program
AC_PROG_INSTALL
dnl ... for ocaml
AC_PROG_OCAML
dnl ... for supplementary tools
AC_PROG_OCAML_TOOLS
dnl ... for parser
AC_PROG_CAMLP4
AM_CONDITIONAL(CAMLP4, test "$have_camlp4" = "yes")
AC_PROG_CAMLP5
AM_CONDITIONAL(CAMLP5, test "$have_camlp5" = "yes")
dnl ... for ocamlfind
AC_PROG_FINDLIB
dnl set OCAMLFIND_TRUE an OCAMLFIND_FALSE in Makefile
AM_CONDITIONAL(HAVE_OCAMLFIND, test "$have_ocamlfind" = "yes")
dnl ... for ocamldsort
AC_PROG_OCAMLDSORT
dnl add configure option "--with-sitelib"
AC_ARG_OCAML_SITELIB
AC_SUBST(CFLAGS)
dnl check for parser module
dnl usage:
dnl module name, file name to use with "#load",
dnl first dir <space> second dir <space> etc., module homepage.
if test -n "$CAMLP4"; then
AC_CHECK_CAMLP4_MODULE(pa_extend, pa_extend.cmo, +camlp4)
AC_SUBST(PARSER_INCLUDES)
fi
if test -n "$CAMLP5"; then
AC_CHECK_CAMLP5_MODULE(pa_extend, pa_extend.cmo, +camlp5)
AC_CHECK_CAMLP5_MODULE(pa_pprintf, pa_pprintf.cmo, +camlp5)
AC_CHECK_CAMLP5_MODULE(q_MLast, q_MLast.cmo, +camlp5)
AC_CHECK_CAMLP5_MODULE(Pr_o, pr_o.cmo, +camlp5)
AC_CHECK_CAMLP5_MODULE(logger, pa_log.cmo, +camlp5 ../logger/camlp5, http://oops.tepkom.ru/projects/logger) dnl GET: svn co svn://oops.tepkom.ru/svn/logger/trunk
AC_CHECK_CAMLP5_MODULE(checked, pa_checked.cmo, +camlp5 ../checked/camlp5, http://oops.tepkom.ru/projects/checked) dnl GET: svn co svn://oops.tepkom.ru/svn/checked/trunk
AC_SUBST(PARSER_INCLUDES)
fi
dnl check for compiler module
dnl usage:
dnl library name, modules to open,
dnl 1st dir <space> 2nd dir <space> etc., library homepage.
AC_CHECK_OCAML_LIBRARY(typeutil, View, ../typeutil/src, http://oops.tepkom.ru/projects/typeutil) dnl GET: svn co svn://oops.tepkom.ru/svn/typeutil/trunk
dnl more module checks
AC_CHECK_OCAML_LIBRARY(str, Str)
AC_SUBST(MODULE_INCLUDES)
AC_SUBST(EXTRA_CMA)
dnl add configure option "--enable-log"
AC_ARG_ENABLE(log,[ --enable-log turn on log messages], LOG="-LOG")
dnl add configure option "--enable-debug"
AC_ARG_ENABLE(debug,[ --enable-debug turn on debugging], DEBUG="-g")
AC_SUBST(LOG)
AC_SUBST(DEBUG)
AC_SUBST(ac_aux_dir)
dnl produce output files
AC_CONFIG_FILES([
Makefile.automake
doc/Makefile
src/Makefile
camlp4/Makefile
camlp4/regression/Makefile
camlp5/Makefile
camlp5/regression/Makefile
camlparser/Makefile
util/Makefile
regression/Makefile
sample/Makefile
])
AC_OUTPUT