Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Added a configure check for Xext.h
  • Loading branch information
slouken committed Jul 13, 2013
1 parent 1f09208 commit d708b3a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
17 changes: 17 additions & 0 deletions configure
Expand Up @@ -19539,6 +19539,23 @@ fi
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

Expand Down
12 changes: 12 additions & 0 deletions configure.in
Expand Up @@ -1157,6 +1157,18 @@ AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=ma
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"
Expand Down

0 comments on commit d708b3a

Please sign in to comment.