- AC_MSG_CHECKING([for X11/extensions/shape.h])
- AC_TRY_COMPILE([
- #include <X11/Xlib.h>
- #include <X11/extensions/shape.h>
- ],
- [
- int dummy1, dummy2;
- XShapeQueryExtension((Display*)NULL,
- (int*)NULL, (int*)NULL);
- ],
- [
- AC_DEFINE(HAVE_XSHAPE)
- AC_MSG_RESULT([found])
- ],
- [
- AC_MSG_RESULT([not found])
- ])
- CFLAGS="$save_CFLAGS"
+ AC_CACHE_CHECK([for X11/xpm.h],
+ wx_cv_x11_xpm_h,
+ [
+ save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
+
+ AC_TRY_COMPILE(
+ [
+ #include <X11/xpm.h>
+ ],
+ [
+ int version;
+ version = XpmLibraryVersion();
+ ],
+ wx_cv_x11_xpm_h=yes,
+ wx_cv_x11_xpm_h=no
+ )
+
+ CFLAGS=$save_CFLAGS
+ ]
+ )
+
+ if test $wx_cv_x11_xpm_h = "yes"; then
+ GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXpm"
+ AC_DEFINE(wxHAVE_LIB_XPM)
+ else
+ AC_MSG_WARN([built-in less efficient XPM decoder will be used])
+ fi
+ fi
+
+ fi
+
+ dnl XShapeQueryExtension checks: first the library, then prototype
+ AC_CHECK_LIB([Xext], [XShapeQueryExtension],
+ [
+ GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXext"
+ wxHAVE_XEXT_LIB=1
+ ],
+ [], [$GUI_TK_LIBRARY -lX11])
+
+ if test "$wxHAVE_XEXT_LIB" = 1; then
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
+
+ AC_MSG_CHECKING([for X11/extensions/shape.h])
+ AC_TRY_COMPILE([
+ #include <X11/Xlib.h>
+ #include <X11/extensions/shape.h>
+ ],
+ [
+ int dummy1, dummy2;
+ XShapeQueryExtension((Display*)NULL,
+ (int*)NULL, (int*)NULL);
+ ],
+ [
+ AC_DEFINE(HAVE_XSHAPE)
+ AC_MSG_RESULT([found])
+ ],
+ [
+ AC_MSG_RESULT([not found])
+ ])
+ CFLAGS="$save_CFLAGS"
+
+ fi