autogen.sh: -c option: Revise warning message
[libquvi-scripts.git] / configure.ac
blob0b254492fe7407ed1d1ab7dda3425112f7a87662
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ([2.67])
6 m4_include([m4/version.m4])
8 AC_INIT([libquvi-scripts], [libquvi_scripts_rel],
9         [http://quvi.sf.net/bugs/], [], [http://quvi.sf.net/])
11 AC_CONFIG_SRCDIR([tests/lib/env.c])
12 AC_CONFIG_HEADERS([config.h])
13 AC_CONFIG_AUX_DIR([config.aux])
14 AC_CONFIG_MACRO_DIR([m4])
16 AM_INIT_AUTOMAKE([1.11.1 -Wall -Werror dist-xz no-dist-gzip tar-ustar])
17 AM_SILENT_RULES([yes])
18 #AM_PROG_AR
20 LT_INIT([disable-static])
21 LT_PREREQ([2.2.6])
23 # Checks for programs.
24 AC_PROG_CC
25 AM_PROG_CC_C_O
26 AC_PROG_LN_S
28 # Version.
29 VN_RMAJ=libquvi_scripts_rmaj
30 VN_RMIN=libquvi_scripts_rmin
31 VN_RMIC=libquvi_scripts_rmic
32 AC_SUBST([VN_RMAJ])
33 AC_SUBST([VN_RMIN])
34 AC_SUBST([VN_RMIC])
36 VERSION_MM="$VN_RMAJ.$VN_RMIN"
37 AC_SUBST([VERSION_MM])
39 genver="$srcdir/gen-ver.sh"
40 AS_IF([test -x "$genver"], [VN=`"$genver" "$srcdir"`])
41 AM_CONDITIONAL([HAVE_VN], [test -n "$VN"])
43 # --with-tests
44 pkg_libquvi=libquvi-0.9
45 AC_ARG_WITH([tests],
46   [AS_HELP_STRING([--with-tests],
47     [Enable tests for scripts @<:@default=no@:>@])],
48   [PKG_CHECK_MODULES([libquvi], ["$pkg_libquvi" >= 0.9],
49     [libquvi_modver=`$PKG_CONFIG --modversion $pkg_libquvi 2>/dev/null`
50       PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.24],
51       [PKG_CHECK_MODULES([libcurl], [libcurl >= 7.21], [with_tests=yes])])
52     ])
53   ], [with_tests=no])
54 AM_CONDITIONAL([WITH_TESTS], [test x"$with_tests" = "xyes"])
56 # --with-nsfw
57 AC_ARG_WITH([nsfw],
58   [AS_HELP_STRING([--with-nsfw],
59     [Install scripts marked as "NSFW" @<:@default=no@:>@])],
60   [], [with_nsfw=no])
61 AM_CONDITIONAL([WITH_NSFW], [test x"$with_nsfw" != "xno"])
63 # --with-fixme
64 AC_ARG_WITH([fixme],
65   [AS_HELP_STRING([--with-fixme],
66     [Install scripts marked as "FIXME" @<:@default=no@:>@])],
67   [], [with_fixme=no])
68 AM_CONDITIONAL([WITH_FIXME], [test x"$with_fixme" != "xno"])
70 # --with-geoblocked
71 AC_ARG_WITH([geoblocked],
72   [AS_HELP_STRING([--with-geoblocked],
73     [Install scripts marked as "geoblocked" @<:@default=yes@:>@])],
74   [], [with_geoblocked=yes])
75 AM_CONDITIONAL([WITH_GEOBLOCKED], [test x"$with_geoblocked" = "xyes"])
77 # --with-manual
78 AC_ARG_WITH([manual],
79   [AS_HELP_STRING([--with-manual],
80     [Install manual page(s) @<:@default=yes@:>@])],
81   [], [with_manual=yes])
82 AM_CONDITIONAL([WITH_MANUAL], [test x"$with_manual" != "xno"])
84 AC_CONFIG_FILES([
85   Makefile
86   doc/Makefile
87   doc/man7/Makefile
88   share/Makefile
89   tests/Makefile
90   tests/lib/Makefile
91   libquvi-scripts-0.9.pc])
92 AC_OUTPUT
94 AC_MSG_NOTICE([
95   version:    ${VERSION} (${VN})
96   prefix:     ${prefix}
97   compiler    ${CC}
98   cflags      ${CFLAGS}
99 Testsuite options:
100   with:
101   - tests: ${with_tests} (libquvi, .pc modversion ${libquvi_modver})
102 Install options:
103   with:
104   - geoblocked:  ${with_geoblocked}
105   - fixme:       ${with_fixme}
106   - nsfw:        ${with_nsfw}])