tests: media_senat: Update expected title
[libquvi-scripts.git] / configure.ac
blobeeab4d6156916a2dcf15a55fa6ada3c1010795af
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])
17 # GNU Automake 1.12 requires this macro. Earlier versions do not
18 # recognize this macro. Work around this.
19 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
21 LT_INIT([disable-static])
22 LT_PREREQ([2.2.6])
24 # Checks for programs.
25 AC_PROG_CC
26 AM_PROG_CC_C_O
27 AC_PROG_LN_S
29 AC_PATH_PROG([A2X], [a2x], [no])
30 AM_CONDITIONAL([HAVE_A2X], [test x"$A2X" != "xno"])
31 AC_SUBST([A2X])
33 AS_IF([test x"$A2X" = "xno" && test -d "$srcdir/.git"],
34   AC_MSG_ERROR([a2x is required to create man pages when building from git])])
36 # Check for headers.
37 AC_CHECK_HEADERS([string.h])
39 # Check for functions.
40 AC_CHECK_FUNCS([memset])
42 # --with-tests
43 pkg_libquvi=libquvi-0.9
44 AC_ARG_WITH([tests],
45   [AS_HELP_STRING([--with-tests],
46     [Enable tests for scripts @<:@default=no@:>@])],
47   [PKG_CHECK_MODULES([libquvi], ["$pkg_libquvi" >= 0.9],
48     [libquvi_modver=`$PKG_CONFIG --modversion $pkg_libquvi 2>/dev/null`
49       PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.24],
50       [PKG_CHECK_MODULES([libcurl], [libcurl >= 7.21], [with_tests=yes])])
51     ])
52   ], [with_tests=no])
53 AM_CONDITIONAL([WITH_TESTS], [test x"$with_tests" = "xyes"])
55 # --with-nsfw
56 AC_ARG_WITH([nsfw],
57   [AS_HELP_STRING([--with-nsfw],
58     [Install scripts marked as "NSFW" @<:@default=no@:>@])],
59   [], [with_nsfw=no])
60 AM_CONDITIONAL([WITH_NSFW], [test x"$with_nsfw" != "xno"])
62 # --with-fixme
63 AC_ARG_WITH([fixme],
64   [AS_HELP_STRING([--with-fixme],
65     [Install scripts marked as "FIXME" @<:@default=no@:>@])],
66   [], [with_fixme=no])
67 AM_CONDITIONAL([WITH_FIXME], [test x"$with_fixme" != "xno"])
69 # --with-geoblocked
70 AC_ARG_WITH([geoblocked],
71   [AS_HELP_STRING([--with-geoblocked],
72     [Install scripts marked as "geoblocked" @<:@default=yes@:>@])],
73   [], [with_geoblocked=yes])
74 AM_CONDITIONAL([WITH_GEOBLOCKED], [test x"$with_geoblocked" = "xyes"])
76 # --with-manual
77 AC_ARG_WITH([manual],
78   [AS_HELP_STRING([--with-manual],
79     [Install manual page(s) @<:@default=yes@:>@])],
80   [], [with_manual=yes])
81 AM_CONDITIONAL([WITH_MANUAL], [test x"$with_manual" != "xno"])
83 # Version: Major/minor -pair, used to symlink
84 # from
85 #   $prefix/share/libquvi-scripts/$version/
86 # to
87 #   $prefix/share/libquvi-scripts/$major.$minor/
88 VERSION_MM=`$srcdir/gen-ver.sh -c -m`
89 AC_SUBST([VERSION_MM])
91 VN_C=`$srcdir/gen-ver.sh -c` # Use this value in the .pc file
92 AC_SUBST([VN_C])
94 AC_CONFIG_FILES([
95   Makefile
96   doc/Makefile
97   doc/man7/Makefile
98   share/Makefile
99   tests/Makefile
100   tests/lib/Makefile
101   libquvi-scripts-0.9.pc])
102 AC_OUTPUT
104 AC_MSG_NOTICE([
105   version       ${VERSION}
106   prefix        ${prefix}
107   compiler      ${CC}
108   cflags        ${CFLAGS}
109 Testsuite options
110   with
111   - tests       ${with_tests}
112     - libquvi .pc modversion ${libquvi_modver}
113 Install options
114   with
115   - geoblocked  ${with_geoblocked}
116   - fixme       ${with_fixme}
117   - nsfw        ${with_nsfw}])
119 # vim: set ts=2 sw=2 tw=72 expandtab: