summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2007-08-31 15:22:26 +0200
committerJaroslav Kysela <perex@perex.cz>2007-08-31 15:22:26 +0200
commitdcdf8c2a00b06139960e59fb85b444e8d7f556f9 (patch)
tree8c6c1ef2dd2b9fe914dac299959168b564ed7cf2
parent77603ff798e8683334cd7772689591137c798802 (diff)
downloadalsa-lib-dcdf8c2a00b06139960e59fb85b444e8d7f556f9.tar.gz
improved python detection and added --with-pythonincdir for configure.in
-rw-r--r--configure.in13
-rw-r--r--modules/mixer/simple/Makefile.am2
-rw-r--r--modules/mixer/simple/python.c2
3 files changed, 13 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index 04af93d8..54f000f1 100644
--- a/configure.in
+++ b/configure.in
@@ -340,21 +340,28 @@ AC_ARG_ENABLE(python,
AS_HELP_STRING([--disable-python], [disable the python components]),
[build_python="$enableval"], [build_python="yes"])
PYTHON_LIBS=""
+PYTHON_INCDIR=""
if test "$build_python" = "yes"; then
AC_ARG_WITH(pythonlibs,
AS_HELP_STRING([--with-pythonlibs=ldflags],
[specify python libraries (-lpthread -lm -ldl -lpython2.4)]),
pythonlibs="$withval", pythonlibs=`python-config --libs`)
- if test -z "$pythonlibs" ; then
+ AC_ARG_WITH(pythonincludes,
+ AS_HELP_STRING([--with-pythonincdir=dir],
+ [specify python C header files (-I/usr/include/python)]),
+ pythonincdir="$withval", pythonincdir=`python-config --includes`)
+ if test -z "$pythonlibs" -o -z "$pythonincdir"; then
echo "Unable to determine python libraries! Probably python-config is not"
- echo "available on this system. Please, use --with-pythonlibs options."
- echo "Python components are disabled in this build."
+ echo "available on this system. Please, use --with-pythonlibs and"
+ echo "--with-pythonincdir options. Python components are disabled in this build."
build_python="no"
else
PYTHON_LIBS="$pythonlibs"
+ PYTHON_INCDIR="$pythonincdir"
fi
fi
AC_SUBST(PYTHON_LIBS)
+AC_SUBST(PYTHON_INCDIR)
if test "$build_seq" != "yes"; then
build_instr="no"
diff --git a/modules/mixer/simple/Makefile.am b/modules/mixer/simple/Makefile.am
index d287c7e5..38f106c0 100644
--- a/modules/mixer/simple/Makefile.am
+++ b/modules/mixer/simple/Makefile.am
@@ -1,5 +1,6 @@
pkglibdir = @ALSA_PLUGIN_DIR@/smixer
pythonlibs = @PYTHON_LIBS@
+pythonincdir = @PYTHON_INCDIR@
AM_CFLAGS = -g -O2 -W -Wall
@@ -30,5 +31,6 @@ smixer_hda_la_LIBADD = ../../../src/libasound.la
if BUILD_PYTHON
smixer_python_la_SOURCES = python.c
smixer_python_la_LDFLAGS = -module -avoid-version $(pythonlibs)
+smixer_python_la_CFLAGS = -I$(pythonincdir)
smixer_python_la_LIBADD = ../../../src/libasound.la
endif
diff --git a/modules/mixer/simple/python.c b/modules/mixer/simple/python.c
index ce9c8fd4..6bfe7386 100644
--- a/modules/mixer/simple/python.c
+++ b/modules/mixer/simple/python.c
@@ -19,11 +19,11 @@
*
*/
+#include "Python.h"
#include <stddef.h>
#include "config.h"
#include "asoundlib.h"
#include "mixer_abst.h"
-#include <python/Python.h>
struct python_priv {
int py_initialized;