]> Dogcows Code - chaz/openbox/blobdiff - configure.ac
add defaults.py
[chaz/openbox] / configure.ac
index 60bae0fd252e0550d66494342e11182c1a357579..f68796e8440a4030bdb09f8daf63d44b134720cc 100644 (file)
@@ -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])
 
@@ -77,7 +79,7 @@ CXXFLAGS="$CXXFLAGS $DEBUG"
 
 # Check for Python
 AC_ARG_WITH([python],
-       [  --with-python=path       Set location of Python executable],
+       [  --with-python=path      Set location of Python executable],
        [PYTHON="$withval"],
        [PYTHON=])
 
@@ -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])
 
@@ -258,6 +270,38 @@ CXXFLAGS=$OLDCXXFLAGS
 AC_SUBST([XFT_CFLAGS])
 AC_SUBST([XFT_LIBS])
 
+# Check for XKB extension support
+AC_CHECK_LIB([X11], [XkbBell],
+  AC_MSG_CHECKING([for X11/XKBlib.h])
+  AC_TRY_LINK(
+    [
+      #include <X11/Xlib.h>
+      #include <X11/Xutil.h>
+      #include <X11/XKBlib.h>
+    ],
+    [
+      Display *d;
+      Window w;
+      XkbBell(d, w, 0, 0);
+    ],
+    [
+      AC_MSG_RESULT([yes])
+      XKB="yes"
+      AC_DEFINE([XKB], [1], [Found the XKB extension])
+    ],
+    [ 
+      AC_MSG_RESULT([no])
+      XKB="no"
+    ]
+  )
+)
+AC_MSG_CHECKING([for the XKB extension])
+if test "$XKB" = "yes"; then
+  AC_MSG_RESULT([yes])
+else
+  AC_MSG_RESULT([no])
+fi
+
 # Check for XShape extension support
 AC_CHECK_LIB([Xext], [XShapeCombineShape],
   AC_MSG_CHECKING([for X11/extensions/shape.h])
@@ -343,6 +387,7 @@ AC_CONFIG_FILES([Makefile po/Makefile.in
                doc/Makefile
                doc/doxygen/Makefile
                data/Makefile
+               data/buttons/Makefile
                data/styles/Makefile
                version.h
                ])
This page took 0.025293 seconds and 4 git commands to generate.