adamc@1132
|
1 AC_INIT([urweb], [1.0])
|
adamc@1149
|
2 AC_USE_SYSTEM_EXTENSIONS
|
adamc@1148
|
3 AM_INIT_AUTOMAKE([-Wall -Werror foreign no-define])
|
adamc@1132
|
4 AC_PROG_CC()
|
adamc@1132
|
5 AC_PROG_LIBTOOL()
|
adamc@1141
|
6 AC_CONFIG_MACRO_DIR([m4])
|
adamc@1263
|
7 AC_CONFIG_HEADERS([config.h])
|
adamc@378
|
8
|
adam@1317
|
9 dnl Setting the search directory for mhash.
|
adam@1317
|
10 AC_ARG_WITH(mhash-dir, AS_HELP_STRING([--with-mhash-dir=DIR], [mhash directory; default = /usr]),
|
adam@1317
|
11 with_mhash_dir="$withval", with_mhash_dir="/usr")
|
adam@1317
|
12
|
adam@1317
|
13 dnl Check for libmhash
|
adam@1317
|
14 LIBS_save="$LIBS"
|
adam@1317
|
15 LIBS="-L${with_mhash_dir}/lib/ -lmhash"
|
adam@1317
|
16 AC_CHECK_LIB(mhash, mhash_get_block_size,
|
adam@1317
|
17 [MHASH_LIB_DIR="${with_mhash_dir}/lib"], [echo "You must install libmhash."; exit 1])
|
adam@1317
|
18 LIBS="${LIBS_save}"
|
adam@1317
|
19
|
adam@1317
|
20 dnl Check for mhash.h
|
adam@1317
|
21 AC_CHECK_HEADER(["${with_mhash_dir}/include/mhash.h"],
|
adam@1317
|
22 [CPPFLAGS="${CPPFLAGS} -I${with_mhash_dir}/include"], [echo "You must install libmhash dev files."; exit 1])
|
adamc@1165
|
23
|
adamc@1165
|
24 AC_CHECK_PROG(MLTON, mlton, yes, [])
|
adamc@1165
|
25
|
adamc@1165
|
26 if test [-z $MLTON]; then
|
adamc@1165
|
27 echo "You must install MLton."
|
adamc@1165
|
28 exit 1
|
adamc@1165
|
29 fi
|
adamc@1165
|
30
|
adamc@1165
|
31 AC_CHECK_PROG(MLLEX, mllex, yes, [])
|
adamc@1165
|
32
|
adamc@1165
|
33 if test [-z $MLLEX]; then
|
adamc@1165
|
34 echo "You must install MLton (to get mllex)."
|
adamc@1165
|
35 exit 1
|
adamc@1165
|
36 fi
|
adamc@1165
|
37
|
adamc@1165
|
38 AC_CHECK_PROG(MLYACC, mlyacc, yes, [])
|
adamc@1165
|
39
|
adamc@1165
|
40 if test [-z $MLYACC]; then
|
adamc@1165
|
41 echo "You must install MLton (to get mlyacc)."
|
adamc@1165
|
42 exit 1
|
adamc@1165
|
43 fi
|
adamc@1165
|
44
|
adamc@429
|
45 if test [$prefix = "NONE"]; then
|
adamc@429
|
46 prefix=/usr/local
|
adamc@429
|
47 fi
|
adamc@429
|
48
|
adamc@378
|
49 if test [-z $BIN]; then
|
adamc@429
|
50 BIN=$prefix/bin
|
adamc@378
|
51 fi
|
adamc@378
|
52
|
adamc@378
|
53 if test [-z $LIB]; then
|
adamc@429
|
54 LIB=$prefix/lib/urweb
|
adamc@378
|
55 fi
|
adamc@378
|
56
|
adamc@378
|
57 if test [-z $INCLUDE]; then
|
adamc@429
|
58 INCLUDE=$prefix/include/urweb
|
adamc@378
|
59 fi
|
adamc@378
|
60
|
adamc@378
|
61 if test [-z $SITELISP]; then
|
adamc@429
|
62 SITELISP=$prefix/share/emacs/site-lisp/urweb-mode
|
adamc@378
|
63 fi
|
adamc@378
|
64
|
adamc@378
|
65 AC_SUBST(BIN)
|
adamc@378
|
66 AC_SUBST(LIB)
|
adamc@378
|
67 AC_SUBST(INCLUDE)
|
adamc@378
|
68 AC_SUBST(SITELISP)
|
adamc@435
|
69 AC_SUBST(GCCARGS)
|
adam@1317
|
70 AC_SUBST(MHASH_LIB_DIR)
|
adamc@378
|
71
|
adamc@1132
|
72 AC_CONFIG_FILES([
|
adamc@1132
|
73 Makefile
|
adamc@1132
|
74 src/c/Makefile
|
adamc@1132
|
75 src/config.sml
|
adamc@1132
|
76 ])
|
adamc@378
|
77
|
adamc@378
|
78 AC_OUTPUT()
|
adamc@378
|
79
|
adamc@378
|
80 cat <<EOF
|
adamc@378
|
81
|
adamc@378
|
82 Ur/Web configuration:
|
adam@1317
|
83 bin directory: BIN $BIN
|
adam@1317
|
84 lib directory: LIB $LIB
|
adam@1317
|
85 include directory: INCLUDE $INCLUDE
|
adam@1317
|
86 site-lisp directory: SITELISP $SITELISP
|
adam@1317
|
87 mhash lib directory: MHASH_LIB_DIR $MHASH_LIB_DIR
|
adam@1317
|
88 Extra GCC args: GCCARGS $GCCARGS
|
adamc@378
|
89 EOF
|