FIX: media/dailymotion.lua: sequence pattern (PORTpt4)
[libquvi-scripts.git] / configure.ac
blobcd2aaaec2333471751e5e367f9200d6934fc5185
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ([2.69])
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 BUILD_OPTS="$@"
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])
26 LT_PREREQ([2.2.6])
28 # Checks for programs.
29 AC_PROG_CC
30 AM_PROG_CC_C_O
31 AC_PROG_LN_S
33 AC_PATH_PROG([A2X], [a2x], [no])
34 AM_CONDITIONAL([HAVE_A2X], [test x"$A2X" != "xno"])
35 AC_SUBST([A2X])
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])])
40 # Check for headers.
41 AC_CHECK_HEADERS([string.h])
43 # Check for functions.
44 AC_CHECK_FUNCS([memset])
46 # --with-tests
47 pkg_libquvi=libquvi-0.9
48 AC_ARG_WITH([tests],
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])])
55     ])
56   ], [with_tests=no])
57 AM_CONDITIONAL([WITH_TESTS], [test x"$with_tests" = "xyes"])
59 # --with-nsfw
60 AC_ARG_WITH([nsfw],
61   [AS_HELP_STRING([--with-nsfw],
62     [Install scripts marked as "NSFW" @<:@default=no@:>@])],
63   [], [with_nsfw=no])
64 AM_CONDITIONAL([WITH_NSFW], [test x"$with_nsfw" != "xno"])
66 # --with-fixme
67 AC_ARG_WITH([fixme],
68   [AS_HELP_STRING([--with-fixme],
69     [Install scripts marked as "FIXME" @<:@default=no@:>@])],
70   [], [with_fixme=no])
71 AM_CONDITIONAL([WITH_FIXME], [test x"$with_fixme" != "xno"])
73 # --with-geoblocked
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"])
80 # --with-manual
81 AC_ARG_WITH([manual],
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
88 # from
89 #   $prefix/share/libquvi-scripts/$version/
90 # to
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
96 AC_SUBST([VN_C])
98 AC_CONFIG_FILES([
99   Makefile
100   doc/Makefile
101   doc/man7/Makefile
102   share/Makefile
103   tests/Makefile
104   tests/lib/Makefile
105   libquvi-scripts-0.9.pc])
106 AC_OUTPUT
108 AC_MSG_NOTICE([
109   version       ${VERSION}
110   prefix        ${prefix}
111   compiler      ${CC}
112   cflags        ${CFLAGS}
113 Testsuite options
114   with
115   - tests       ${with_tests}
116     - libquvi .pc modversion ${libquvi_modver}
117 Install options
118   with
119   - geoblocked  ${with_geoblocked}
120   - fixme       ${with_fixme}
121   - nsfw        ${with_nsfw}])
123 # vim: set ts=2 sw=2 tw=72 expandtab: