2 # Process this file with autoconf to produce a configure script.
6 AC_INIT([libquvi-scripts], m4_esyscmd([./gen-ver.sh -c | tr -d '\n']),
7 [http://quvi.sf.net/bugs/],[],[http://quvi.sf.net/])
9 AC_CONFIG_SRCDIR([tests/lib/env.c])
10 AC_CONFIG_HEADERS([config.h])
11 AC_CONFIG_AUX_DIR([config.aux])
12 AC_CONFIG_MACRO_DIR([m4])
14 AM_INIT_AUTOMAKE([1.11.1 -Wall -Werror dist-xz no-dist-gzip tar-ustar])
15 AM_SILENT_RULES([yes])
18 LT_INIT([disable-static])
21 # Checks for programs.
26 AC_PATH_PROG([A2X], [a2x], [no])
27 AM_CONDITIONAL([HAVE_A2X], [test x"$A2X" != "xno"])
30 # Check for the Lua modules.
34 AC_PATH_PROG([LUA], [lua], [no])
35 AS_IF([test x"$LUA" != "xno"], [
37 AC_MSG_CHECKING([for module LuaSocket $v or later])
38 o=`$LUA $srcdir/chk_mod.lua socket $v`
39 AS_IF([test "$?" -eq 0],
41 AC_MSG_RESULT([yes])],
42 [AC_MSG_ERROR([module not found])])
44 AC_MSG_CHECKING([for module LuaExpat $v or later])
45 o=`$LUA $srcdir/chk_mod.lua lxp $v`
46 AS_IF([test "$?" -eq 0],
48 AC_MSG_RESULT([yes])],
49 [AC_MSG_ERROR([module not found])])
51 ], [AC_MSG_WARN([Could not find the the lua(1) command])
52 AC_MSG_WARN([Will NOT check for the *required* Lua modules])
53 AC_MSG_WARN([See README file for the prerequisites])
57 pkg_libquvi=libquvi-0.9
59 [AS_HELP_STRING([--with-tests],
60 [Enable tests for scripts @<:@default=no@:>@])],
61 [PKG_CHECK_MODULES([libquvi], ["$pkg_libquvi" >= 0.9],
62 [libquvi_modver=`$PKG_CONFIG --modversion $pkg_libquvi 2>/dev/null`
63 PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.24],
64 [PKG_CHECK_MODULES([libcurl], [libcurl >= 7.21], [with_tests=yes])])
67 AM_CONDITIONAL([WITH_TESTS], [test x"$with_tests" = "xyes"])
71 [AS_HELP_STRING([--with-nsfw],
72 [Install scripts marked as "NSFW" @<:@default=no@:>@])],
74 AM_CONDITIONAL([WITH_NSFW], [test x"$with_nsfw" != "xno"])
78 [AS_HELP_STRING([--with-fixme],
79 [Install scripts marked as "FIXME" @<:@default=no@:>@])],
81 AM_CONDITIONAL([WITH_FIXME], [test x"$with_fixme" != "xno"])
84 AC_ARG_WITH([geoblocked],
85 [AS_HELP_STRING([--with-geoblocked],
86 [Install scripts marked as "geoblocked" @<:@default=yes@:>@])],
87 [], [with_geoblocked=yes])
88 AM_CONDITIONAL([WITH_GEOBLOCKED], [test x"$with_geoblocked" = "xyes"])
92 [AS_HELP_STRING([--with-manual],
93 [Install manual page(s) @<:@default=yes@:>@])],
94 [], [with_manual=yes])
95 AM_CONDITIONAL([WITH_MANUAL], [test x"$with_manual" != "xno"])
97 # Version: Major/minor -pair, used to symlink
99 # $prefix/share/libquvi-scripts/$version/
101 # $prefix/share/libquvi-scripts/$major.$minor/
102 VERSION_MM=`$srcdir/gen-ver.sh -c -m`
103 AC_SUBST([VERSION_MM])
105 VN_C=`$srcdir/gen-ver.sh -c` # Use this value in the .pc file
115 libquvi-scripts-0.9.pc])
125 luasocket ${have_sct}
129 - tests ${with_tests}
130 - libquvi .pc modversion ${libquvi_modver}
133 - geoblocked ${with_geoblocked}
134 - fixme ${with_fixme}
135 - nsfw ${with_nsfw}])