README: Requirements: Use "sudo aptitude"
[libquvi-scripts.git] / configure.ac
blobcff060d19839af45b44cf0bbeb6408d7593f8186
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 # Check for headers.
34 AC_CHECK_HEADERS([string.h])
36 # Check for functions.
37 AC_CHECK_FUNCS([memset])
39 # --with-tests
40 pkg_libquvi=libquvi-0.9
41 AC_ARG_WITH([tests],
42   [AS_HELP_STRING([--with-tests],
43     [Enable tests for scripts @<:@default=no@:>@])],
44   [PKG_CHECK_MODULES([libquvi], ["$pkg_libquvi" >= 0.9],
45     [libquvi_modver=`$PKG_CONFIG --modversion $pkg_libquvi 2>/dev/null`
46       PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.24],
47       [PKG_CHECK_MODULES([libcurl], [libcurl >= 7.21], [with_tests=yes])])
48     ])
49   ], [with_tests=no])
50 AM_CONDITIONAL([WITH_TESTS], [test x"$with_tests" = "xyes"])
52 # --with-nsfw
53 AC_ARG_WITH([nsfw],
54   [AS_HELP_STRING([--with-nsfw],
55     [Install scripts marked as "NSFW" @<:@default=no@:>@])],
56   [], [with_nsfw=no])
57 AM_CONDITIONAL([WITH_NSFW], [test x"$with_nsfw" != "xno"])
59 # --with-fixme
60 AC_ARG_WITH([fixme],
61   [AS_HELP_STRING([--with-fixme],
62     [Install scripts marked as "FIXME" @<:@default=no@:>@])],
63   [], [with_fixme=no])
64 AM_CONDITIONAL([WITH_FIXME], [test x"$with_fixme" != "xno"])
66 # --with-geoblocked
67 AC_ARG_WITH([geoblocked],
68   [AS_HELP_STRING([--with-geoblocked],
69     [Install scripts marked as "geoblocked" @<:@default=yes@:>@])],
70   [], [with_geoblocked=yes])
71 AM_CONDITIONAL([WITH_GEOBLOCKED], [test x"$with_geoblocked" = "xyes"])
73 # --with-manual
74 AC_ARG_WITH([manual],
75   [AS_HELP_STRING([--with-manual],
76     [Install manual page(s) @<:@default=yes@:>@])],
77   [], [with_manual=yes])
78 AM_CONDITIONAL([WITH_MANUAL], [test x"$with_manual" != "xno"])
80 # Version: Major/minor -pair, used to symlink
81 # from
82 #   $prefix/share/libquvi-scripts/$version/
83 # to
84 #   $prefix/share/libquvi-scripts/$major.$minor/
85 VERSION_MM=`$srcdir/gen-ver.sh -c -m`
86 AC_SUBST([VERSION_MM])
88 VN_C=`$srcdir/gen-ver.sh -c` # Use this value in the .pc file
89 AC_SUBST([VN_C])
91 AC_CONFIG_FILES([
92   Makefile
93   doc/Makefile
94   doc/man7/Makefile
95   share/Makefile
96   tests/Makefile
97   tests/lib/Makefile
98   libquvi-scripts-0.9.pc])
99 AC_OUTPUT
101 AC_MSG_NOTICE([
102   version       ${VERSION}
103   prefix        ${prefix}
104   compiler      ${CC}
105   cflags        ${CFLAGS}
106 Testsuite options
107   with
108   - tests       ${with_tests}
109     - libquvi .pc modversion ${libquvi_modver}
110 Install options
111   with
112   - geoblocked  ${with_geoblocked}
113   - fixme       ${with_fixme}
114   - nsfw        ${with_nsfw}])