summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-01-09 03:43:06 +0000
committerDana Jansens <danakj@orodu.net>2003-01-09 03:43:06 +0000
commit3814c4fbebb1f3e5e489225a0280d6a1958d1543 (patch)
tree828ad3aa9c6203e2897e4e92b555d7b465f80928 /configure.ac
parent4e6e0b8d9bab442156c5f74bafbea7a63c60a6b6 (diff)
use default prefix.
better python library checks.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac36
1 files changed, 24 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index a0c1cc64..f68796e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,6 +4,8 @@ AM_INIT_AUTOMAKE([openbox], [2.90.0cvs])
AC_PREREQ([2.50])
+test "$prefix" = "NONE" && prefix="$ac_default_prefix"
+
AC_PATH_PROG([regex_cmd], [sed])
test "$regex_cmd" || AC_MSG_ERROR([sed not found])
@@ -121,28 +123,38 @@ else
AC_MSG_RESULT([$PYTHON_CFLAGS])
fi
-# Set the library directory blindly. This probably won't work with older versions
+# Find the python library
+PYTHON_LIBS=""
AC_MSG_CHECKING([for Python library])
-dirs="$PYVERSION/config $PYVERSION/lib python/lib"
+dirs="$PYEPREFIX/lib $PYEPREFIX/lib/$PYVERSION/config \
+ $PYEPREFIX/lib/$PYVERSION/lib $PYEPREFIX/lib/python/lib"
for i in $dirs; do
- if test -d "$PYEPREFIX/lib/$i"; then
- PYLIB="$PYEPREFIX/lib/$i"
- break
+ # look for really old versions
+ if test -r "$i/lib$PYVERSION.so"; then
+ PYLIB="$i"
+ PYTHON_LIBS="-L$PYLIB -l$PYVERSION"
+ break
+ else
+ if test -r "$i/libPython.a"; then
+ PYLIB="$i"
+ PYTHON_LIBS="-L$PYLIB -lModules -lPython -lObjects -lParser"
+ break
+ else
+ if test -r "$i/lib$PYVERSION.a"; then
+ PYLIB="$i"
+ PYTHON_LIBS="-L$PYLIB -l$PYVERSION -lpthread -ldl -lutil -lm"
+ break
+ fi
+ fi
fi
done
+
if ! test "$PYLIB"; then
AC_MSG_ERROR([Not found])
else
AC_MSG_RESULT([$PYLIB])
fi
-# Check for really old versions
-if test -r "$PYLIB/libPython.a"; then
- PYTHON_LIBS="-L$PYLIB -lModules -lPython -lObjects -lParser"
-else
- PYTHON_LIBS="-L$PYLIB -l$PYVERSION"
-fi
-
AC_SUBST([PYTHON_CFLAGS])
AC_SUBST([PYTHON_LIBS])