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/])
10 AC_SUBST([BUILD_OPTS])
12 AC_CONFIG_SRCDIR([tests/lib/env.c])
13 AC_CONFIG_HEADERS([config.h])
14 AC_CONFIG_AUX_DIR([config.aux])
15 AC_CONFIG_MACRO_DIR([m4])
17 AM_INIT_AUTOMAKE([1.11.1 -Wall -Werror dist-xz no-dist-gzip
18 tar-ustar subdir-objects])
19 AM_SILENT_RULES([yes])
21 # GNU Automake 1.12 requires this macro. Earlier versions do not
22 # recognize this macro. Work around this.
23 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
25 LT_INIT([disable-static])
28 # Checks for programs.
33 AC_PATH_PROG([A2X], [a2x], [no])
34 AM_CONDITIONAL([HAVE_A2X], [test x"$A2X" != "xno"])
37 AS_IF([test x"$A2X" = "xno" && test -d "$srcdir/.git"],
38 AC_MSG_ERROR([a2x is required to create man pages when building from git])])
41 AC_CHECK_HEADERS([string.h])
43 # Check for functions.
44 AC_CHECK_FUNCS([memset])
47 pkg_libquvi=libquvi-0.9
49 [AS_HELP_STRING([--with-tests],
50 [Enable tests for scripts @<:@default=no@:>@])],
51 [PKG_CHECK_MODULES([libquvi], ["$pkg_libquvi" >= 0.9],
52 [libquvi_modver=`$PKG_CONFIG --modversion $pkg_libquvi 2>/dev/null`
53 PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.24],
54 [PKG_CHECK_MODULES([libcurl], [libcurl >= 7.21], [with_tests=yes])])
57 AM_CONDITIONAL([WITH_TESTS], [test x"$with_tests" = "xyes"])
61 [AS_HELP_STRING([--with-nsfw],
62 [Install scripts marked as "NSFW" @<:@default=no@:>@])],
64 AM_CONDITIONAL([WITH_NSFW], [test x"$with_nsfw" != "xno"])
68 [AS_HELP_STRING([--with-fixme],
69 [Install scripts marked as "FIXME" @<:@default=no@:>@])],
71 AM_CONDITIONAL([WITH_FIXME], [test x"$with_fixme" != "xno"])
74 AC_ARG_WITH([geoblocked],
75 [AS_HELP_STRING([--with-geoblocked],
76 [Install scripts marked as "geoblocked" @<:@default=yes@:>@])],
77 [], [with_geoblocked=yes])
78 AM_CONDITIONAL([WITH_GEOBLOCKED], [test x"$with_geoblocked" = "xyes"])
82 [AS_HELP_STRING([--with-manual],
83 [Install manual page(s) @<:@default=yes@:>@])],
84 [], [with_manual=yes])
85 AM_CONDITIONAL([WITH_MANUAL], [test x"$with_manual" != "xno"])
87 # Version: Major/minor -pair, used to symlink
89 # $prefix/share/libquvi-scripts/$version/
91 # $prefix/share/libquvi-scripts/$major.$minor/
92 VERSION_MM=`$srcdir/gen-ver.sh -c -m`
93 AC_SUBST([VERSION_MM])
95 VN_C=`$srcdir/gen-ver.sh -c` # Use this value in the .pc file
105 libquvi-scripts-0.9.pc])
115 - tests ${with_tests}
116 - libquvi .pc modversion ${libquvi_modver}
119 - geoblocked ${with_geoblocked}
120 - fixme ${with_fixme}
121 - nsfw ${with_nsfw}])
123 # vim: set ts=2 sw=2 tw=72 expandtab: