|
@@ -16,14 +16,18 @@ AC_GNU_SOURCE
|
16
|
16
|
# Checks for programs.
|
17
|
17
|
AC_PROG_CC
|
18
|
18
|
AC_PROG_RANLIB
|
19
|
|
-AC_CHECK_PROG(PYTHON_CONFIG, [python3-config], [yes])
|
20
|
|
-if test x"${PYTHON_CONFIG}" == x"yes"; then
|
21
|
|
- PYTHON_CFLAGS=`python3-config --includes`
|
22
|
|
- PYTHON_LDFLAGS=`python3-config --libs`
|
|
19
|
+
|
|
20
|
+AC_ARG_VAR(PYTHON_CONFIG_PATH, [python3-config path])
|
|
21
|
+AC_PATH_PROG(PYTHON_CONFIG_PATH, [python3-config], [no])
|
|
22
|
+echo "PYTHON CONFIG == ${PYTHON_CONFIG_PATH}"
|
|
23
|
+if test x"${PYTHON_CONFIG_PATH}" != x"no"; then
|
|
24
|
+ AC_SUBST([PYTHON_CONFIG_PATH])
|
|
25
|
+ PYTHON_CFLAGS=`${PYTHON_CONFIG_PATH} --includes`
|
|
26
|
+ PYTHON_LDFLAGS=`${PYTHON_CONFIG_PATH} --libs`
|
23
|
27
|
AC_SUBST([PYTHON_CFLAGS])
|
24
|
28
|
AC_SUBST([PYTHON_LDFLAGS])
|
25
|
|
- PYTHON_SO_CFLAGS=`python3-config --cflags`
|
26
|
|
- PYTHON_SO_LDFLAGS=`python3-config --cflags`
|
|
29
|
+ PYTHON_SO_CFLAGS=`${PYTHON_CONFIG_PATH} --cflags`
|
|
30
|
+ PYTHON_SO_LDFLAGS=`${PYTHON_CONFIG_PATH} --cflags`
|
27
|
31
|
AC_SUBST([PYTHON_SO_CFLAGS])
|
28
|
32
|
AC_SUBST([PYTHON_SO_LDFLAGS])
|
29
|
33
|
else
|
|
@@ -66,5 +70,5 @@ AM_INIT_AUTOMAKE
|
66
|
70
|
AC_CONFIG_FILES([Makefile
|
67
|
71
|
src/Makefile
|
68
|
72
|
tests/Makefile
|
69
|
|
- lib/Makefile])
|
|
73
|
+])
|
70
|
74
|
AC_OUTPUT
|