-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure.ac
90 lines (75 loc) · 2.48 KB
/
configure.ac
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
# Process this file with autoconf to produce a configure script.
# These variables are also in setup.py
AC_INIT("cerebrum", "0.1", "cerebrum-developers@usit.uio.no")
# Checks for programs.
AC_PROG_MAKE_SET
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
AC_PROG_INSTALL
AC_ARG_WITH(python,
[ --with-python=NAME which Python binary to use [[python]]],
[python="$withval"], [python="python"])
# Which python binary should we use?
AC_PATH_PROG([PYTHON], [$python], [], [$PATH])
if test -z "$PYTHON" ; then
AC_ERROR(no Python binary found. It is required to run Cerebrum.)
fi
# What about cheetah compiler?
AC_ARG_WITH(cheetah,
[ --with-cheetah=NAME which Cheetah binary to use [[cheetah]]],
[cheetah="$withval"], [cheetah="cheetah"])
# Which cheetah binary should we use?
AC_PATH_PROG([CHEETAH], [$cheetah], [], [$PATH])
if test -z "$CHEETAH" ; then
AC_MSG_WARN(no Cheetah binary found. Skipping web interface.)
fi
# where to put webpages?
AC_ARG_WITH(webroot,
[ --with-webroot=NAME where to place webpages [[PREFIX/var/www/htdocs]]],
[webroot="$withval"], [webroot="$prefix/var/www/htdocs"])
AC_SUBST(webroot)
# should we make bofhd and jbofh?
AC_ARG_ENABLE(bofh,
[ --disable-bofh Disable make and install of jbofh and bofhd (enabled by default)],
[if test "x$enableval" == "xno"; then
bofh_enabled="no"
else
bofh_enabled="yes"
fi],
[bofh_enabled="yes"]
)
AC_SUBST(bofh_enabled)
# Top directory where python library is installed. TBD: Should this
# rather be based on $exec_prefix?
AC_MSG_CHECKING([where to install Python modules])
PYTHONDIR="`prefix=\"$prefix\" $PYTHON -c '
from distutils import sysconfig
import os
pfx = os.getenv(\"prefix\")
if (not pfx) or pfx == \"NONE\":
path = sysconfig.get_python_lib()
else:
path = sysconfig.get_python_lib(prefix=pfx)
print path'`"
if test -z "$PYTHONDIR" ; then
AC_ERROR(unable to calculate Python module installation prefix.)
fi
AC_MSG_RESULT([$PYTHONDIR])
AC_SUBST(PYTHONDIR)
CONFDIR=`eval "echo $sysconfdir/cerebrum"`
AC_SUBST(CONFDIR)
AC_CONFIG_FILES([
Makefile
testsuite/Makefile
clients/ceresync/Makefile
clients/ceresync/config.py
clients/cereweb/Makefile
clients/cereweb/htdocs/Makefile
clients/cereweb/htdocs/css/Makefile
clients/cereweb/lib/Makefile
clients/cereweb/lib/templates/Makefile
servers/cerews/Makefile
])
AC_OUTPUT
m4_if(dnl Do not change this comment
arch-tag: ee0d0ca0-48a5-4d8e-b645-134b4e0f9e07
)dnl