Added a configure check for Xext.h
authorSam Lantinga <slouken@libsdl.org>
Sat, 13 Jul 2013 10:41:57 -0700
changeset 7433 8f118396264b
parent 7432 58908b180ebd
child 7434 ef8810ae03ec
Added a configure check for Xext.h
configure
configure.in
--- a/configure	Sat Jul 13 03:13:41 2013 -0700
+++ b/configure	Sat Jul 13 10:41:57 2013 -0700
@@ -19539,6 +19539,23 @@
             CFLAGS="$CFLAGS $X_CFLAGS"
             LDFLAGS="$LDFLAGS $X_LIBS"
 
+            ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xext.h" "ac_cv_header_X11_extensions_Xext_h" "#include <X11/Xlib.h>
+                             #include <X11/Xproto.h>
+
+"
+if test "x$ac_cv_header_X11_extensions_Xext_h" = xyes; then :
+  have_xext_h_hdr=yes
+else
+  have_xext_h_hdr=no
+fi
+
+
+            if test x$have_xext_h_hdr != xyes; then
+               as_fn_error $? "
+*** Missing Xext.h, maybe you need to install the libxext-dev package?
+               " "$LINENO" 5
+            fi
+
 
 $as_echo "#define SDL_VIDEO_DRIVER_X11 1" >>confdefs.h
 
--- a/configure.in	Sat Jul 13 03:13:41 2013 -0700
+++ b/configure.in	Sat Jul 13 10:41:57 2013 -0700
@@ -1157,6 +1157,18 @@
             CFLAGS="$CFLAGS $X_CFLAGS"
             LDFLAGS="$LDFLAGS $X_LIBS"
 
+            AC_CHECK_HEADER(X11/extensions/Xext.h,
+                            have_xext_h_hdr=yes,
+                            have_xext_h_hdr=no,
+                            [#include <X11/Xlib.h>
+                             #include <X11/Xproto.h>
+                            ])
+            if test x$have_xext_h_hdr != xyes; then
+               AC_MSG_ERROR([
+*** Missing Xext.h, maybe you need to install the libxext-dev package?
+               ])
+            fi
+
             AC_DEFINE(SDL_VIDEO_DRIVER_X11, 1, [ ])
             SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
             EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS"