FIX: resolve_redirections.lua: Do not append #t
[libquvi-scripts.git] / configure.ac
blob4439ab9964b95de40680e0eed0441876c9114f12
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ([2.67])
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])
16 #AM_PROG_AR
18 LT_INIT([disable-static])
19 LT_PREREQ([2.2.6])
21 # Checks for programs.
22 AC_PROG_CC
23 AM_PROG_CC_C_O
24 AC_PROG_LN_S
26 # --with-tests
27 pkg_libquvi=libquvi-0.9
28 AC_ARG_WITH([tests],
29   [AS_HELP_STRING([--with-tests],
30     [Enable tests for scripts @<:@default=no@:>@])],
31   [PKG_CHECK_MODULES([libquvi], ["$pkg_libquvi" >= 0.9],
32     [libquvi_modver=`$PKG_CONFIG --modversion $pkg_libquvi 2>/dev/null`
33       PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.24],
34       [PKG_CHECK_MODULES([libcurl], [libcurl >= 7.21], [with_tests=yes])])
35     ])
36   ], [with_tests=no])
37 AM_CONDITIONAL([WITH_TESTS], [test x"$with_tests" = "xyes"])
39 # --with-nsfw
40 AC_ARG_WITH([nsfw],
41   [AS_HELP_STRING([--with-nsfw],
42     [Install scripts marked as "NSFW" @<:@default=no@:>@])],
43   [], [with_nsfw=no])
44 AM_CONDITIONAL([WITH_NSFW], [test x"$with_nsfw" != "xno"])
46 # --with-fixme
47 AC_ARG_WITH([fixme],
48   [AS_HELP_STRING([--with-fixme],
49     [Install scripts marked as "FIXME" @<:@default=no@:>@])],
50   [], [with_fixme=no])
51 AM_CONDITIONAL([WITH_FIXME], [test x"$with_fixme" != "xno"])
53 # --with-geoblocked
54 AC_ARG_WITH([geoblocked],
55   [AS_HELP_STRING([--with-geoblocked],
56     [Install scripts marked as "geoblocked" @<:@default=yes@:>@])],
57   [], [with_geoblocked=yes])
58 AM_CONDITIONAL([WITH_GEOBLOCKED], [test x"$with_geoblocked" = "xyes"])
60 # --with-manual
61 AC_ARG_WITH([manual],
62   [AS_HELP_STRING([--with-manual],
63     [Install manual page(s) @<:@default=yes@:>@])],
64   [], [with_manual=yes])
65 AM_CONDITIONAL([WITH_MANUAL], [test x"$with_manual" != "xno"])
67 # Version: Major/minor -pair, used to symlink
68 # from
69 #   $prefix/share/libquvi-scripts/$version/
70 # to
71 #   $prefix/share/libquvi-scripts/$major.$minor/
72 VERSION_MM=`$srcdir/gen-ver.sh -c -m`
73 AC_SUBST([VERSION_MM])
75 VN_C=`$srcdir/gen-ver.sh -c` # Use this value in the .pc file
76 AC_SUBST([VN_C])
78 AC_CONFIG_FILES([
79   Makefile
80   doc/Makefile
81   doc/man7/Makefile
82   share/Makefile
83   tests/Makefile
84   tests/lib/Makefile
85   libquvi-scripts-0.9.pc])
86 AC_OUTPUT
88 AC_MSG_NOTICE([
89   version       ${VERSION}
90   prefix        ${prefix}
91   compiler      ${CC}
92   cflags        ${CFLAGS}
93 Testsuite options
94   with
95   - tests       ${with_tests}
96     - libquvi .pc modversion ${libquvi_modver}
97 Install options
98   with
99   - geoblocked  ${with_geoblocked}
100   - fixme       ${with_fixme}
101   - nsfw        ${with_nsfw}])