gen-ver.sh: Update parsing from m4/version.m4
[libquvi-scripts.git] / configure.ac
blob6591597ecf63a6e64b4e14883317e8174a60cf84
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_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])
16 #AM_PROG_AR
18 # Checks for programs.
20 AC_PATH_PROG([QUVI], [quvi], [], [$QUVI_PATH$PATH_SEPARATOR$PATH])
21 AM_CONDITIONAL([HAVE_QUVI], [test -n "$QUVI"])
22 AS_IF([test -n "$QUVI"], [quviver=`$QUVI --version | head -n1 2>/dev/null`])
23 AC_SUBST([QUVI])
25 AC_PATH_PROG([PROVE], [prove], [], [$PROVE_PATH$PATH_SEPARATOR$PATH])
26 AM_CONDITIONAL([HAVE_PROVE], [test -n "$PROVE"])
27 AC_SUBST([PROVE])
29 AC_PATH_PROG([VALGRIND], [valgrind], [], [$VALGRIND_PATH$PATH_SEPARATOR$PATH])
30 AM_CONDITIONAL([HAVE_VALGRIND], [test -n "$VALGRIND"])
31 AC_SUBST([VALGRIND])
33 # Version.
34 VN_RMAJ=libquvi_scripts_rmaj
35 VN_RMIN=libquvi_scripts_rmin
36 VN_RMIC=libquvi_scripts_rmic
37 AC_SUBST([VN_RMAJ])
38 AC_SUBST([VN_RMIN])
39 AC_SUBST([VN_RMIC])
41 VERSION_MM="$VN_RMAJ.$VN_RMIN"
42 AC_SUBST([VERSION_MM])
44 genver="$srcdir/gen-ver.sh"
45 AS_IF([test -x "$genver"], [VN=`"$genver" "$srcdir"`])
46 AM_CONDITIONAL([HAVE_VN], [test -n "$VN"])
48 # --with-tests
49 AC_ARG_WITH([tests],
50   [AS_HELP_STRING([--with-tests], [with tests @<:@default=no@:>@])],
51   [AS_IF([test -z "$QUVI"], [
52     AC_MSG_NOTICE([quvi not found. Ignoring --with-tests.])
53     with_tests=no])],
54   [with_tests=no])
55 AM_CONDITIONAL([WITH_TESTS], [test x"$with_tests" != "xno"])
57 # --with-nsfw
58 AC_ARG_WITH([nsfw],
59   [AS_HELP_STRING([--with-nsfw],
60     [build with adult website support @<:@default=no@:>@])],
61   [],
62   [with_nsfw=no])
63 AM_CONDITIONAL([WITH_NSFW], [test x"$with_nsfw" != "xno"])
65 # --with-fixme
66 AC_ARG_WITH([fixme],
67   [AS_HELP_STRING([--with-fixme],
68     [with website scripts marked as "fixme" @<:@default=no@:>@])],
69   [],
70   [with_fixme=no])
71 AM_CONDITIONAL([WITH_FIXME], [test x"$with_fixme" != "xno"])
73 # --with-nlfy
74 AC_ARG_WITH([nlfy],
75   [AS_HELP_STRING([--with-nlfy],
76     [test scripts marked as "nlfy" @<:@default=no@:>@])],
77   [],
78   [with_nlfy=no])
79 AM_CONDITIONAL([WITH_NLFY], [test x"$with_nlfy" != "xno"])
81 # --with-manual
82 AC_ARG_WITH([manual],
83   [AS_HELP_STRING([--with-manual],
84     [install manual pages @<:@default=yes@:>@])],
85   [],
86   [with_manual=yes])
87 AM_CONDITIONAL([WITH_MANUAL], [test x"$with_manual" != "xno"])
89 AC_CONFIG_FILES([
90   Makefile
91   doc/Makefile
92   doc/man7/Makefile
93   share/Makefile
94   tests/Makefile
95   libquvi-scripts-1.0.pc])
96 AC_OUTPUT
98 AC_MSG_NOTICE([
99   version:    ${VERSION} (${VN})
100   prefix:     ${prefix}
101 quvi:
102   version:    ${quviver}
103   path:       ${QUVI}
104 Options:
105   with tests: ${with_tests}
106   with fixme: ${with_fixme}
107   with nsfw:  ${with_nsfw}
108   with nlfy:  ${with_nlfy}])