summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in18
1 files changed, 17 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index e49f64d..628a865 100644
--- a/configure.in
+++ b/configure.in
@@ -20,7 +20,22 @@ AC_PROG_CC
AC_PROG_MAKE_SET
# Checks for libraries.
-AC_PYTHON_DEVEL([>= '2.4'])
+AM_PATH_PYTHON
+AC_ARG_VAR([PYTHON_INCLUDE], [Include flags for python, bypassing python-config])
+AC_ARG_VAR([PYTHON_CONFIG], [Path to python-config])
+AS_IF([test -z "$PYTHON_INCLUDE"], [
+ AS_IF([test -z "$PYTHON_CONFIG"], [
+ AC_PATH_PROGS([PYTHON_CONFIG],
+ [python$PYTHON_VERSION-config python-config],
+ [no],
+ [`dirname $PYTHON`])
+ AS_IF([test "$PYTHON_CONFIG" = no], [AC_MSG_ERROR([cannot find python-config for $PYTHON.])])
+ ])
+ AC_MSG_CHECKING([python include flags])
+ PYTHON_INCLUDE=`$PYTHON_CONFIG --includes`
+ AC_MSG_RESULT([$PYTHON_INCLUDE])
+])
+#AC_PYTHON_DEVEL
AM_PATH_GLIB_2_0(2.0.0)
# Checks for header files.
@@ -51,6 +66,7 @@ AC_SUBST([IRSSI_DIST])
IRSSI_PYTHON_INCLUDES="-I${IRSSI_DIST} -I${IRSSI_DIST}/src -I${IRSSI_DIST}/src/fe-common/core \
-I${IRSSI_DIST}/src/core -I${IRSSI_DIST}/src/fe-text -I${IRSSI_DIST}/src/irc \
-I${IRSSI_DIST}/src/irc/core -I${IRSSI_DIST}/src/irc/dcc -I${IRSSI_DIST}/src/irc/notifylist \
+-I${PYTHON_INCLUDE} \
${PYTHON_CPPFLAGS} ${GLIB_CFLAGS}"
AC_SUBST([IRSSI_PYTHON_INCLUDES])