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 # Check for the Lua modules.
30 AC_PATH_PROG([LUA], [lua], [no])
31 AS_IF([test x"$LUA" != "xno"], [
33 AC_MSG_CHECKING([for module LuaSocket $v or later])
34 o=`$LUA $srcdir/chk_mod.lua socket $v`
35 AS_IF([test "$?" -eq 0],
37 AC_MSG_RESULT([yes])],
38 [AC_MSG_ERROR([module not found])])
40 AC_MSG_CHECKING([for module LuaExpat $v or later])
41 o=`$LUA $srcdir/chk_mod.lua lxp $v`
42 AS_IF([test "$?" -eq 0],
44 AC_MSG_RESULT([yes])],
45 [AC_MSG_ERROR([module not found])])
47 ], [AC_MSG_WARN([Could not find the the lua(1) command])
48 AC_MSG_WARN([Will NOT check for the *required* Lua modules])
49 AC_MSG_WARN([See README file for the prerequisites])
53 pkg_libquvi=libquvi-0.9
55 [AS_HELP_STRING([--with-tests],
56 [Enable tests for scripts @<:@default=no@:>@])],
57 [PKG_CHECK_MODULES([libquvi], ["$pkg_libquvi" >= 0.9],
58 [libquvi_modver=`$PKG_CONFIG --modversion $pkg_libquvi 2>/dev/null`
59 PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.24],
60 [PKG_CHECK_MODULES([libcurl], [libcurl >= 7.21], [with_tests=yes])])
63 AM_CONDITIONAL([WITH_TESTS], [test x"$with_tests" = "xyes"])
67 [AS_HELP_STRING([--with-nsfw],
68 [Install scripts marked as "NSFW" @<:@default=no@:>@])],
70 AM_CONDITIONAL([WITH_NSFW], [test x"$with_nsfw" != "xno"])
74 [AS_HELP_STRING([--with-fixme],
75 [Install scripts marked as "FIXME" @<:@default=no@:>@])],
77 AM_CONDITIONAL([WITH_FIXME], [test x"$with_fixme" != "xno"])
80 AC_ARG_WITH([geoblocked],
81 [AS_HELP_STRING([--with-geoblocked],
82 [Install scripts marked as "geoblocked" @<:@default=yes@:>@])],
83 [], [with_geoblocked=yes])
84 AM_CONDITIONAL([WITH_GEOBLOCKED], [test x"$with_geoblocked" = "xyes"])
88 [AS_HELP_STRING([--with-manual],
89 [Install manual page(s) @<:@default=yes@:>@])],
90 [], [with_manual=yes])
91 AM_CONDITIONAL([WITH_MANUAL], [test x"$with_manual" != "xno"])
93 # Version: Major/minor -pair, used to symlink
95 # $prefix/share/libquvi-scripts/$version/
97 # $prefix/share/libquvi-scripts/$major.$minor/
98 VERSION_MM=`$srcdir/gen-ver.sh -c -m`
99 AC_SUBST([VERSION_MM])
101 VN_C=`$srcdir/gen-ver.sh -c` # Use this value in the .pc file
111 libquvi-scripts-0.9.pc])
121 luasocket ${have_sct}
125 - tests ${with_tests}
126 - libquvi .pc modversion ${libquvi_modver}
129 - geoblocked ${with_geoblocked}
130 - fixme ${with_fixme}
131 - nsfw ${with_nsfw}])