diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-06-23 09:36:07 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-06-23 09:36:07 +0000 |
commit | 1ed489e3febf1033cfde659287f60f3e67a94e93 (patch) | |
tree | ed0eae5c9954ae37d6daf69066741d9dd3476b52 /Build/source/texk/xdvik/m4 | |
parent | e31eb756dfde607d76f8ad421fa7b85701393b7c (diff) |
xdvik: Use link instead of compile check for XInput 2.1
Do not include c-auto.h from headers
git-svn-id: svn://tug.org/texlive/trunk@34354 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/xdvik/m4')
-rw-r--r-- | Build/source/texk/xdvik/m4/xdvi-xinput-2-1.m4 | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/Build/source/texk/xdvik/m4/xdvi-xinput-2-1.m4 b/Build/source/texk/xdvik/m4/xdvi-xinput-2-1.m4 index 7cb9b6d45f0..d7fbe009a96 100644 --- a/Build/source/texk/xdvik/m4/xdvi-xinput-2-1.m4 +++ b/Build/source/texk/xdvik/m4/xdvi-xinput-2-1.m4 @@ -22,13 +22,24 @@ AS_CASE([$enable_xi2_scrolling], [enable_xi2_scrolling=yes])]) if test "x$enable_xi2_scrolling" = xyes; then AC_CACHE_CHECK([for XInput version 2.1 or higher], -xdvi_cv_xinput_2_1, -[AC_TRY_COMPILE( -[#include <X11/extensions/XI2.h> -], [#if (XI_2_Major < 2 || (XI_2_Major == 2 && XI_2_Minor < 1)) -choke me "XInput version is < 2.1" -#endif -], xdvi_cv_xinput_2_1=yes, xdvi_cv_xinput_2_1=no)]) + [xdvi_cv_xinput_2_1], [dnl +xdvi_xi2_save_LIBS=$LIBS +xdvi_xi2_save_CFLAGS=$CFLAGS +xdvi_xi2_save_CPPFLAGS=$CPPFLAGS +xdvi_xi2_save_LDFLAGS=$LDFLAGS +LIBS="$X_PRE_LIBS -lXi $X_EXTRA_LIBS $LIBS" +CFLAGS="$X_CFLAGS $CFLAGS" +CPPFLAGS="$X_CFLAGS $CPPFLAGS" +LDFLAGS="$X_LIBS $LDFLAGS" +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <X11/extensions/XInput2.h>]], + [[Display *DISP; int ndevices; +XIDeviceInfo *info = XIQueryDevice(DISP, XIAllDevices, &ndevices);]])], + [xdvi_cv_xinput_2_1=yes], + [xdvi_cv_xinput_2_1=no]) +LIBS=$xdvi_xi2_save_LIBS +CFLAGS=$xdvi_xi2_save_CFLAGS +CPPFLAGS=$xdvi_xi2_save_CPPFLAGS +LDFLAGS=$xdvi_xi2_save_LDFLAGS]) if test "x$xdvi_cv_xinput_2_1" = xyes; then AC_DEFINE([HAVE_XI21], 1, [Define if your system has XInput version 2.1 or higher.]) |