X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/87bfe5dfced0fb7a4e9839fdafa898261a39c86c..88078e7ac2ee289a0dfc321d71c7494657c4457c:/acinclude.m4 diff --git a/acinclude.m4 b/acinclude.m4 index 0dcafdec..d1a5a04d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,5 +1,4 @@ AC_DEFUN(TUXBOX_APPS,[ -AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE INSTALL="$INSTALL -p" @@ -131,7 +130,7 @@ TUXBOX_APPS_DIRECTORY_ONE(libdir,LIBDIR,libdir,/lib,, TUXBOX_APPS_DIRECTORY_ONE(plugindir,PLUGINDIR,libdir,/lib,/tuxbox/plugins, [--with-plugindir=PATH ],[where to find the plugins]) -TUXBOX_APPS_DIRECTORY_ONE(tuxboxdatadir,TUXBOXDATADIR,datadir,/share,/tuxbox, +TUXBOX_APPS_DIRECTORY_ONE(tuxboxdatadir,TUXBOXDATADIR,datadir,/share,, [--with-tuxboxdatadir=PATH],[where to find tuxbox data]) TUXBOX_APPS_DIRECTORY_ONE(zoneinfodir,ZONEINFODIR,datadir,/share,/zoneinfo, @@ -247,6 +246,18 @@ AC_SUBST($1_CFLAGS) AC_SUBST($1_LIBS) ]) +AC_DEFUN(_TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL,[ +PKG_CHECK_MODULES($1,$2,$3="yes",$3="no") +if test "$$3" = "yes"; then + AC_DEFINE($3, 1, [$2 available]) +else + $1_CFLAGS="" + $1_LIBS="" +fi +AC_SUBST($1_CFLAGS) +AC_SUBST($1_LIBS) +]) + AC_DEFUN(TUXBOX_APPS_LIB_PKGCONFIG,[ _TUXBOX_APPS_LIB_PKGCONFIG($1,$2) if test -z "$$1_CFLAGS" ; then @@ -391,3 +402,44 @@ AC_DEFUN([AC_PROG_EGREP], AC_SUBST([EGREP]) ]) +AC_DEFUN([AC_PYTHON_DEVEL],[ + # + # should allow for checking of python version here... + # + AC_REQUIRE([AM_PATH_PYTHON]) + + # Check for Python include path + AC_MSG_CHECKING([for Python include path]) + python_path=`echo $PYTHON | sed "s,/bin.*$,,"` + for i in "$python_path/include/python$PYTHON_VERSION/" "$python_path/include/python/" "$python_path/" ; do + python_path=`find $i -type f -name Python.h -print | sed "1q"` + if test -n "$python_path" ; then + break + fi + done + python_path=`echo $python_path | sed "s,/Python.h$,,"` + AC_MSG_RESULT([$python_path]) + if test -z "$python_path" ; then + AC_MSG_ERROR([cannot find Python include path]) + fi + AC_SUBST([PYTHON_CPPFLAGS],[-I$python_path]) + + # Check for Python library path + AC_MSG_CHECKING([for Python library path]) + python_path=`echo $PYTHON | sed "s,/bin.*$,,"` + for i in "$python_path/lib/python$PYTHON_VERSION/config/" "$python_path/lib/python$PYTHON_VERSION/" "$python_path/lib/python/config/" "$python_path/lib/python/" "$python_path/" ; do + python_path=`find $i -type f -name libpython$PYTHON_VERSION.* -print | sed "1q"` + if test -n "$python_path" ; then + break + fi + done + python_path=`echo $python_path | sed "s,/libpython.*$,,"` + AC_MSG_RESULT([$python_path]) + if test -z "$python_path" ; then + AC_MSG_ERROR([cannot find Python library path]) + fi + AC_SUBST([PYTHON_LDFLAGS],["-L$python_path -lpython$PYTHON_VERSION"]) + # + python_site=`echo $python_path | sed "s/config/site-packages/"` + AC_SUBST([PYTHON_SITE_PKG],[$python_site]) +])