-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
69 lines (50 loc) · 1.42 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
AC_INIT(pyfribidi.c)
AM_INIT_AUTOMAKE(pyfribidi, 0.6.0)
AC_ISC_POSIX
AC_PROG_CC
AC_PROG_INSTALL
AC_C_CONST
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
dnl FriBdi
dnl ======
PKG_CHECK_MODULES(fribidi, fribidi)
PY_CFLAGS="$PY_CFLAGS $fribidi_CFLAGS"
PY_LIBS="$PY_LIBS $fribidi_LIBS"
dnl Python
dnl ======
AC_CHECK_PROG(have_python, "python", yes, no)
if test "x$have_python" = "xyes"; then
PY_PREFIX=`python -c 'import sys ; print sys.prefix'`
PY_VERSION=`python -c 'import sys ; print sys.version[[0:3]]'`
PY_CFLAGS="$PY_LIBS $PY_CFLAGS -I$PY_PREFIX/include/python$PY_VERSION"
PY_MODULES_PATH="$PY_PREFIX/lib/python$PY_VERSION/site-packages"
AC_SUBST([PY_CFLAGS])
AC_SUBST([PY_MODULES_PATH])
AC_MSG_CHECKING(for $PY_PREFIX/include/python$PY_VERSION/Python.h)
if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h; then
AC_MSG_RESULT(yes)
have_python=yes
else
AC_MSG_RESULT(no)
have_python=no
fi
fi
AC_OUTPUT([
Makefile
])
dnl ERROR
dnl =====
if test "x$have_python" = "xno"; then
echo
echo "ERROR: You do not have python-devel on your system"
echo "Check for package name like python-dev for your system"
echo
else
echo
echo "PyFribidi version is $VERSION"
echo
echo "Python version is $PY_VERSION"
echo "Python modules path is $PY_MODULES_PATH"
echo "Type make to buils pyfribidi"
echo
fi