diff configure.in @ 2196:7a9bff812ba3

Adding support for lua scripting Until now this is without any functionality.
author Klaus Ethgen <Klaus@Ethgen.de>
date Sat, 27 Jun 2009 22:38:09 +0100
parents 359d910c7ce0
children 839d0e06e552
line wrap: on
line diff
--- a/configure.in	Sat Dec 11 20:09:43 2010 +0100
+++ b/configure.in	Sat Jun 27 22:38:09 2009 +0100
@@ -376,6 +376,33 @@
 AC_SUBST(LIBCHAMPLAIN_GTK_CFLAGS)
 AC_SUBST(LIBCHAMPLAIN_GTK_LIBS)
 
+#  Lua support
+# ----------------------------------------------------------------------
+
+AC_ARG_ENABLE([lua],
+  AC_HELP_STRING([--disable-lua], [disable lua support]),
+    [liblua=$enableval], [liblua=auto])
+
+if test "x${liblua}" != "xno"; then
+  PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1,
+    [
+      HAVE_LUA=yes
+      AC_DEFINE(HAVE_LUA, 1, [define to enable lua support])
+    ],
+    [
+      HAVE_LUA=no
+      AC_MSG_WARN([$LUA_PKG_ERRORS])
+    ])
+else
+  HAVE_LUA=disabled
+fi
+
+AM_CONDITIONAL(HAVE_LUA, [test "x$HAVE_LUA" = xyes])
+AC_SUBST(LUA_CFLAGS)
+AC_SUBST(LUA_LIBS)
+
+# ----------------------------------------------------------------------
+
 AH_TOP([
 /** \file
  * \short autogenerated definition by autoheader.
@@ -449,7 +476,7 @@
   Gtk:           $GTK_CFLAGS
   Glib:          $GLIB_CFLAGS
   Thread:        $GTHREAD_LIBS
-  Others:	 $LCMS_LIBS $EXIV2_LIBS $LIBCHAMPLAIN_LIBS $LIBCHAMPLAIN_GTK_LIBS
+  Others:	 $LCMS_LIBS $EXIV2_LIBS $LIBCHAMPLAIN_LIBS $LIBCHAMPLAIN_GTK_LIBS $LUA_LIBS
 
 Localization:
   NLS support:   $USE_NLS
@@ -467,6 +494,7 @@
   Lirc:          $HAVE_LIRC
   Libchamplain:		$HAVE_LIBCHAMPLAIN
   Libchamplain-gtk:	$HAVE_LIBCHAMPLAIN_GTK
+  Lua:	         $HAVE_LUA
 
 Documentation:
   Doxygen:       $DOXYGEN