- 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"
+ save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
+
+ AC_TRY_COMPILE(
+ [
+ #include <X11/xpm.h>
+ ],
+ [
+ int version;
+ version = XpmLibraryVersion();
+ ],
+ [
+ xpm_link=" -lXpm"
+ AC_DEFINE(wxHAVE_LIB_XPM)
+ AC_MSG_RESULT(found in default search path)
+ COMPILED_X_PROGRAM=0
+ ],
+ [
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN(built-in less efficient XPM decoder will be used)
+ ]
+ )
+
+ CFLAGS=$save_CFLAGS
+ 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