examples: build silly joystick seek example only on linux

jsseek depends on linux headers and should therefore only be built
on linux.

Fixes #614764.
This commit is contained in:
Tim-Philipp Müller 2010-04-04 12:13:02 +01:00
parent 45b39fcfc1
commit 7d1c889956
2 changed files with 21 additions and 0 deletions

View file

@ -297,6 +297,23 @@ PKG_CHECK_MODULES(QT, QtGui >= 4.6, [
AM_CONDITIONAL(HAVE_QT, test "x$HAVE_QT" = "xyes")
AM_CONDITIONAL(HAVE_QT_GV, test "x$HAVE_QT_GV" = "xyes")
dnl chck for linux headers needed by the joystick seek example
AC_COMPILE_IFELSE(
[
AC_LANG_PROGRAM([
#include <linux/input.h>
#include <linux/joystick.h>
],[
struct js_event js;
js.type = JS_EVENT_AXIS;
])
], [
HAVE_LINUX_JOYSTICK_HEADERS="yes"
], [
HAVE_LINUX_JOYSTICK_HEADERS="no"
])
AM_CONDITIONAL(HAVE_LINUX_JOYSTICK_HEADERS, test "x$HAVE_LINUX_JOYSTICK_HEADERS" = "xyes")
dnl *** set variables based on configure arguments ***
dnl set license and copyright notice

View file

@ -1,5 +1,9 @@
if HAVE_GTK_X11
if HAVE_LINUX_JOYSTICK_HEADERS
GTK_EXAMPLES=seek scrubby jsseek
else
GTK_EXAMPLES=seek scrubby
endif
endif
examples = $(GTK_EXAMPLES) stepping stepping2