From: Kern Sibbald Date: Fri, 10 Jul 2009 14:12:10 +0000 (+0000) Subject: Apply python detect patch from Bastian Friedrich X-Git-Tag: Release-7.0.0~2895 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b468f01bbf3e373618c2cdcd251d7d79936dec21;p=bacula%2Fbacula Apply python detect patch from Bastian Friedrich git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8974 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index e8c1e2b952..886f4088b8 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -922,35 +922,43 @@ AC_ARG_WITH(python, PYTHON_LIBS= if test "$withval" != "no"; then if test "$withval" = "yes"; then - for python_root in /usr /usr/local /usr/sfw; do - for ver in python2.2 python2.3 python2.4 python2.5 python2.6 python3; do - if test -f $python_root/include/${ver}/Python.h; then - PYTHON_INCDIR=-I$python_root/include/${ver} - if test -d $python_root/lib64/${ver}/config; then - PYTHON_LIBS="-L$python_root/lib64/${ver}/config -l${ver}" - else - PYTHON_LIBS="-L$python_root/lib/${ver}/config -l${ver}" + if test -e /usr/bin/python-config ; then + PYTHON_INCDIR=`/usr/bin/python-config --includes` + PYTHON_LIBS=`/usr/bin/python-config --libs` + else + for python_root in /usr /usr/local /usr/sfw; do + for ver in python2.2 python2.3 python2.4 python2.5 python2.6 python3; do + if test -f $python_root/include/${ver}/Python.h; then + PYTHON_INCDIR=-I$python_root/include/${ver} + if test -d $python_root/lib64/${ver}/config; then + PYTHON_LIBS="-L$python_root/lib64/${ver}/config -l${ver}" + else + PYTHON_LIBS="-L$python_root/lib/${ver}/config -l${ver}" + fi + break fi - break - fi + done done - done - if test x$PYTHON_INCDIR = x; then - if test -f $prefix/include/Python.h; then - PYTHON_INCDIR=-I$prefix/include - if test -d $prefix/lib64/config; then - PYTHON_LIBS="-L$prefix/lib64/config -lpython" + if test x$PYTHON_INCDIR = x; then + if test -f $prefix/include/Python.h; then + PYTHON_INCDIR=-I$prefix/include + if test -d $prefix/lib64/config; then + PYTHON_LIBS="-L$prefix/lib64/config -lpython" + else + PYTHON_LIBS="-L$prefix/lib/config -lpython" + fi else - PYTHON_LIBS="-L$prefix/lib/config -lpython" + AC_MSG_RESULT(no) + AC_MSG_ERROR(Unable to find Python.h in standard locations) fi - else - AC_MSG_RESULT(no) - AC_MSG_ERROR(Unable to find Python.h in standard locations) fi fi else - if test -f $withval/Python.h; then + if test -e $withval/bin/python-config ; then + PYTHON_INCDIR=`$withval/bin/python-config --includes` + PYTHON_LIBS=`$withval/bin/python-config --libs` + elif test -f $withval/Python.h; then PYTHON_INCDIR=-I$withval PYTHON_LIBS="-L$withval/config -lpython" elif test -f $withval/include/Python.h; then diff --git a/bacula/technotes b/bacula/technotes index df5f8965c7..16a01a282d 100644 --- a/bacula/technotes +++ b/bacula/technotes @@ -2,6 +2,8 @@ General: +10Jul09 +kes Apply python detect patch from Bastian Friedrich 09Jul09 kes Add --with-hostname to ./configure mvw Changed ACL_OTHER into ACL_OTHER_OBJ as IRIX doesn't seem to have