-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
58 lines (48 loc) · 1.33 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
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.72])
AC_INIT([ParselTongue],[3.0.1],[[email protected]])
AM_INIT_AUTOMAKE(1.6)
AC_CONFIG_SRCDIR(python/ParselTongue.py)
## --------- ##
## Scripts. ##
## --------- ##
AC_CONFIG_FILES(bin/Makefile)
## -------- ##
## Python. ##
## -------- ##
AM_PATH_PYTHON(2.6)
AC_CONFIG_FILES([python/Makefile python/Proxy/Makefile
python/Wizardry/Makefile test/Makefile])
## ------ ##
## Obit. ##
## ------ ##
OBIT_PYTHONPATH=
AC_ARG_WITH(obit,
AS_HELP_STRING([--with-obit=DIR],[search for Obit in DIR]),
[if test -f "$withval/python3/ObitInit.py"; then
OBIT_PYTHONPATH="$withval/python3"; export ac_obit_pythonpath
elif test -f "$withval/python/ObitInit.py"; then
OBIT_PYTHONPATH="$withval/python"; export ac_obit_pythonpath
fi[]])
AC_CACHE_CHECK([for Obit], [ac_cv_obit],
[
cat <<_ACEOF >conftest.py
try:
import OSystem, OErr
except:
print("missing")
else:
print("found")
_ACEOF
PYTHONPATH=$PYTHONPATH:$OBIT_PYTHONPATH; export PYTHONPATH
ac_cv_obit=`$PYTHON conftest.py 2>/dev/null`
])
if test "$ac_cv_obit" != found; then
AC_MSG_ERROR([Obit is not available])
fi
AC_SUBST(OBIT_PYTHONPATH)
## ------------ ##
## Conclusion. ##
## ------------ ##
AC_CONFIG_FILES([Makefile doc/Makefile])
AC_OUTPUT