Permalink
Newer
Older
100644 70 lines (57 sloc) 1.86 KB
1
AC_INIT([Functional Developer], [2.1 alpha 4])
2
AC_PREREQ(2.50)
3
4
AC_DEFUN(FD_PLATFORM,[
5
case $1 in
6
i*86-pc-linux-gnu*) $2=x86-linux ;;
7
i*86-*-freebsd*) $2=x86-bsd ;;
8
powerpc-*-linux-gnu*) $2=ppc-linux ;;
9
powerpc-apple-darwin*) $2=ppc-darwin ;;
10
*) AC_MSG_ERROR([The $1 platform is not supported.]) ;;
11
esac])
12
13
AC_CANONICAL_BUILD
14
FD_PLATFORM($build,fd_build)
15
AC_SUBST(fd_build)
16
17
AC_CANONICAL_HOST
18
FD_PLATFORM($host,fd_host)
19
AC_SUBST(fd_host)
20
21
AC_CANONICAL_TARGET
22
FD_PLATFORM($target,fd_target)
23
AC_SUBST(fd_target)
24
25
AC_PROG_INSTALL
26
AC_PROG_LN_S
27
28
AC_PATH_PROG(PERL, perl, no)
29
test "$PERL" = no && AC_MSG_ERROR([
30
perl is required to build Functional Developer])
31
AC_SUBST(PERL)
32
33
PERL_MODULES="File::Spec Getopt::Long XML::Parser"
34
for module in $PERL_MODULES; do
35
AC_MSG_CHECKING(for Perl module $module)
36
$PERL -M$module -e 'exit 0' || AC_MSG_ERROR([
37
$module is required to build Functional Developer])
38
AC_MSG_RESULT(yes)
39
done
40
41
AC_PATH_PROG(FDCOMPILE, fdcompile, no)
42
test "$FDCOMPILE" = no && AC_MSG_ERROR([
43
fdcompile is required to bootstrap Functional Devleloper])
44
AC_SUBST(FDCOMPILE)
45
46
# TODO: figure out the bootstrap type given the fdcompile version
47
bootstrap_target=3-stage-bootstrap
48
AC_SUBST(bootstrap_target)
49
50
AC_MSG_CHECKING(for Library Packs to include)
51
LIBRARY_PACKS=Core
52
AC_ARG_ENABLE(network,
53
AC_HELP_STRING([--disable-network],
54
[Do not build the basic networking library]),
55
,LIBRARY_PACKS="$LIBRARY_PACKS Network")
56
AC_ARG_ENABLE(testworks,
57
AC_HELP_STRING([--enable-testworks],
58
[Build the unit test framework library]),
59
LIBRARY_PACKS="$LIBRARY_PACKS TestWorks")
60
AC_ARG_ENABLE(dood,
61
AC_HELP_STRING([--enable-dood],
62
[Build the DOOD persistent storage library]),
63
LIBRARY_PACKS="$LIBRARY_PACKS DOOD")
64
AC_MSG_RESULT($LIBRARY_PACKS)
65
AC_SUBST(LIBRARY_PACKS)
66
67
AC_CONFIG_FILES([Makefile])
68
69
AC_OUTPUT