+int main() {
+ int major, minor, micro;
+
+ if ( PLIB_VERSION < MIN_PLIB_VERSION ) {
+ return -1;
+ }
+
+ return 0;
+}
+
+],
+ AC_MSG_RESULT(yes),
+ [AC_MSG_RESULT(wrong version);
+ AC_MSG_ERROR([Install plib 1.6.0 or later first...])],
+ AC_MSG_RESULT(yes)
+)
+
+dnl If we get here then plib is available, so force use of plib
+dnl joystick lib
+AC_DEFINE([ENABLE_PLIB_JOYSTICK], 1, [Define to enable plib joystick support])
+
+
+dnl Checking for PSL in plib
+dnl version of plib, so check for it.
+AC_MSG_CHECKING([for plib PSL scripting support])
+AC_COMPILE_IFELSE([
+#include <plib/psl.h>
+
+int main() {
+ // not for running...
+ pslProgram program((pslExtension *)0);
+ program.compile("int main () {}", "");
+ return 0;
+}
+],
+ [AC_MSG_RESULT(yes);
+ have_plib_psl=yes],
+ AC_MSG_RESULT(no)
+)
+AM_CONDITIONAL(HAVE_PLIB_PSL, test "x$have_plib_psl" = "xyes")
+
+dnl Check for MetaKit
+AC_CHECK_HEADER(mk4.h)
+if test "x$ac_cv_header_mk4_h" != "xyes"; then
+ echo
+ echo "MetaKit library not found."
+ echo
+ echo "If your OS does not provide an installable package for MetaKit"
+ echo "you will have to compile and install it first yourself. A copy"
+ echo "of metakit-$(VERSION).tar.gz is included with SimGear. You will"
+ echo "have to untar this source code, and follow it's included instructions"
+ echo "to compile and install on your system."