]> Dogcows Code - chaz/openbox/commitdiff
my newer better autoconf functions. woowoo
authorDana Jansens <danakj@orodu.net>
Sat, 11 Jan 2003 04:10:35 +0000 (04:10 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 11 Jan 2003 04:10:35 +0000 (04:10 +0000)
m4/openbox.m4
m4/python.m4
m4/x11.m4

index cd76bb634ab51ad4c74b73af80f823c57e69ffa6..3c6cd1f041880c3128b54e252ad2a455a6097282 100644 (file)
@@ -61,5 +61,3 @@ AC_DEFUN([OB_COMPILER_FLAGS],
   AC_MSG_RESULT([$FLAGS])
   CXXFLAGS="$CXXFLAGS $FLAGS"
 ])
-
-
index 94a0a4de819411f890c0cf2471c47e87d0a32af7..e9f9c6ac5e16e3b6b9eae8e5d6be7b835126fcb8 100644 (file)
@@ -10,7 +10,7 @@ AC_DEFUN([PYTHON_DEVEL],
   python_prefix=${PYTHON%/bin*}
 
   # Check for Python include path
-  AC_MSG_CHECKING([for Python include path])
+  AC_MSG_CHECKING([for python include path])
   for i in "$python_prefix/include/python$PYTHON_VERSION/" \
            "$python_prefix/include/python/" "$python_prefix/"
   do
@@ -26,12 +26,12 @@ AC_DEFUN([PYTHON_DEVEL],
   then
     AC_MSG_RESULT([$python_path])
   else
-    AC_MSG_ERROR([cannot find Python include path])
+    AC_MSG_ERROR([cannot find python include path])
   fi
   AC_SUBST([PYTHON_CFLAGS], [-I$python_path])
 
   # Check for a Python library
-  AC_MSG_CHECKING([for Python library])
+  AC_MSG_CHECKING([for python library])
   PYLIB=""
   for i in "$python_prefix/lib" \
            "$python_prefix/lib/python$PYTHON_VERSION/config" \
@@ -61,7 +61,7 @@ AC_DEFUN([PYTHON_DEVEL],
   then
     AC_MSG_RESULT([$PYLIB])
   else
-    AC_MSG_ERROR([cannot find Python library])
+    AC_MSG_ERROR([cannot find python library])
   fi
   AC_SUBST([PYTHON_LIBS])
 ])
index f070b121d43b5ea239671bc64056d801c542bf4e..135bf2ef57b52efbfcfbe11d2966388ca419f556 100644 (file)
--- a/m4/x11.m4
+++ b/m4/x11.m4
@@ -43,13 +43,14 @@ AC_DEFUN([XFT_ERROR],
 AC_DEFUN([XFT_DEVEL],
 [
   AC_REQUIRE([X11_DEVEL])
-
+  
   if test "$1"; then
-    XFT_MIN=$1
+    XFT_MIN="$1"
     XFT_MIN_MAJOR=${XFT_MIN%.*.*}
     XFT_MIN_MINOR=${XFT_MIN%.*}
     XFT_MIN_MINOR=${XFT_MIN_MINOR#*.}
     XFT_MIN_REVISION=${XFT_MIN#*.*.}
+    XFT_MIN="$XFT_MIN_MAJOR.$XFT_MIN_MINOR.$XFT_MIN_REVISION"
   else
     XFT_MIN=""
   fi
@@ -166,3 +167,123 @@ AC_DEFUN([XFT_DEVEL],
   AC_SUBST([XFT_CFLAGS])
   AC_SUBST([XFT_LIBS])
 ])
+
+
+# X11_EXT_XKB()
+#
+# Check for the presence of the "Xkb" X Window System extension.
+# Defines "XKB" and sets the $(XKB) variable to "yes" if the extension is
+# present.
+AC_DEFUN([X11_EXT_XKB],
+[
+  AC_REQUIRE([X11_DEVEL])
+
+  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
+])
+
+# X11_EXT_SHAPE()
+#
+# Check for the presence of the "Shape" X Window System extension.
+# Defines "SHAPE", sets the $(SHAPE) variable to "yes", and sets the $(LIBS)
+# appropriately if the extension is present.
+AC_DEFUN([X11_EXT_SHAPE],
+[
+  AC_REQUIRE([X11_DEVEL])
+
+  AC_CHECK_LIB([Xext], [XShapeCombineShape],
+    AC_MSG_CHECKING([for X11/extensions/shape.h])
+    AC_TRY_LINK(
+    [
+      #include <X11/Xlib.h>
+      #include <X11/Xutil.h>
+      #include <X11/extensions/shape.h>
+    ],
+    [
+      long foo = ShapeSet;
+    ],
+    [
+      AC_MSG_RESULT([yes])
+      SHAPE="yes"
+      AC_DEFINE([SHAPE], [1], [Found the XShape extension])
+      LIBS="$LIBS -lXext"
+    ],
+    [ 
+      AC_MSG_RESULT([no])
+      SHAPE="no"
+    ])
+  )
+  AC_MSG_CHECKING([for the Shape extension])
+  if test "$SHAPE" = "yes"; then
+    AC_MSG_RESULT([yes])
+  else
+    AC_MSG_RESULT([no])
+  fi
+])
+
+
+# X11_EXT_XINERAMA()
+#
+# Check for the presence of the "Xinerama" X Window System extension.
+# Defines "XINERAMA", sets the $(XINERAMA) variable to "yes", and sets the
+# $(LIBS) appropriately if the extension is present.
+AC_DEFUN([X11_EXT_XINERAMA],
+[
+  AC_REQUIRE([X11_DEVEL])
+
+  AC_CHECK_LIB([Xinerama], [XineramaQueryExtension],
+  [
+    AC_MSG_CHECKING([for X11/extensions/Xinerama.h])
+    AC_TRY_LINK(
+    [
+      #include <X11/Xlib.h>
+      #include <X11/extensions/Xinerama.h>
+    ],
+    [
+      XineramaScreenInfo foo;
+    ],
+    [
+      AC_MSG_RESULT([yes])
+      XINERAMA="yes"
+      AC_DEFINE([XINERAMA], [1], [Enable support of the Xinerama extension])
+      LIBS="$LIBS -lXinerama"
+    ],
+    [
+      AC_MSG_RESULT([no])
+      XINERAMA="no"
+    ])
+  ])
+  AC_MSG_CHECKING([for the Xinerama extension])
+  if test "$XINERAMA" = "yes"; then
+    AC_MSG_RESULT([yes])
+  else
+    AC_MSG_RESULT([no])
+  fi
+])
This page took 0.026438 seconds and 4 git commands to generate.