]> git.sur5r.net Git - bacula/bacula/commitdiff
Rebuild configure
authorKern Sibbald <kern@sibbald.com>
Fri, 10 Jul 2009 14:12:39 +0000 (14:12 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 10 Jul 2009 14:12:39 +0000 (14:12 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8975 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/configure

index 94645ad240fd49d806c58ae25d52d8617d2abe07..4caae70a98bf7936c4d62497134544c84990d3fb 100755 (executable)
@@ -26243,38 +26243,46 @@ if test "${with_python+set}" = set; then
        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"
-                  fi
-               else
-                  { echo "$as_me:$LINENO: result: no" >&5
+                     { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
-                  { { echo "$as_me:$LINENO: error: Unable to find Python.h in standard locations" >&5
+                     { { echo "$as_me:$LINENO: error: Unable to find Python.h in standard locations" >&5
 echo "$as_me: error: Unable to find Python.h in standard locations" >&2;}
    { (exit 1); exit 1; }; }
+                  fi
                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