Added a configure check for Xext.h
authorSam Lantinga <slouken@libsdl.org>
Sat, 13 Jul 2013 10:41:57 -0700
changeset 74338f118396264b
parent 7432 58908b180ebd
child 7434 ef8810ae03ec
Added a configure check for Xext.h
configure
configure.in
     1.1 --- a/configure	Sat Jul 13 03:13:41 2013 -0700
     1.2 +++ b/configure	Sat Jul 13 10:41:57 2013 -0700
     1.3 @@ -19539,6 +19539,23 @@
     1.4              CFLAGS="$CFLAGS $X_CFLAGS"
     1.5              LDFLAGS="$LDFLAGS $X_LIBS"
     1.6  
     1.7 +            ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xext.h" "ac_cv_header_X11_extensions_Xext_h" "#include <X11/Xlib.h>
     1.8 +                             #include <X11/Xproto.h>
     1.9 +
    1.10 +"
    1.11 +if test "x$ac_cv_header_X11_extensions_Xext_h" = xyes; then :
    1.12 +  have_xext_h_hdr=yes
    1.13 +else
    1.14 +  have_xext_h_hdr=no
    1.15 +fi
    1.16 +
    1.17 +
    1.18 +            if test x$have_xext_h_hdr != xyes; then
    1.19 +               as_fn_error $? "
    1.20 +*** Missing Xext.h, maybe you need to install the libxext-dev package?
    1.21 +               " "$LINENO" 5
    1.22 +            fi
    1.23 +
    1.24  
    1.25  $as_echo "#define SDL_VIDEO_DRIVER_X11 1" >>confdefs.h
    1.26  
     2.1 --- a/configure.in	Sat Jul 13 03:13:41 2013 -0700
     2.2 +++ b/configure.in	Sat Jul 13 10:41:57 2013 -0700
     2.3 @@ -1157,6 +1157,18 @@
     2.4              CFLAGS="$CFLAGS $X_CFLAGS"
     2.5              LDFLAGS="$LDFLAGS $X_LIBS"
     2.6  
     2.7 +            AC_CHECK_HEADER(X11/extensions/Xext.h,
     2.8 +                            have_xext_h_hdr=yes,
     2.9 +                            have_xext_h_hdr=no,
    2.10 +                            [#include <X11/Xlib.h>
    2.11 +                             #include <X11/Xproto.h>
    2.12 +                            ])
    2.13 +            if test x$have_xext_h_hdr != xyes; then
    2.14 +               AC_MSG_ERROR([
    2.15 +*** Missing Xext.h, maybe you need to install the libxext-dev package?
    2.16 +               ])
    2.17 +            fi
    2.18 +
    2.19              AC_DEFINE(SDL_VIDEO_DRIVER_X11, 1, [ ])
    2.20              SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
    2.21              EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS"