diff --git a/configure.ac b/configure.ac index b315bed940..911acade59 100644 --- a/configure.ac +++ b/configure.ac @@ -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 + #include + ],[ + 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 diff --git a/tests/examples/seek/Makefile.am b/tests/examples/seek/Makefile.am index c4176cb89f..ae347802bd 100644 --- a/tests/examples/seek/Makefile.am +++ b/tests/examples/seek/Makefile.am @@ -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