Install: Symlink from VERSION to VERSION_MM dir
[libquvi-scripts.git] / configure.ac
blob777a17683b67f1bd6431cead3d8b5f4a8717aef2
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.
19 AC_PROG_LN_S
21 AC_PATH_PROG([QUVI], [quvi], [], [$QUVI_PATH$PATH_SEPARATOR$PATH])
22 AM_CONDITIONAL([HAVE_QUVI], [test -n "$QUVI"])
23 AS_IF([test -n "$QUVI"], [quviver=`$QUVI --version | head -n1 2>/dev/null`])
24 AC_SUBST([QUVI])
26 AC_PATH_PROG([PROVE], [prove], [], [$PROVE_PATH$PATH_SEPARATOR$PATH])
27 AM_CONDITIONAL([HAVE_PROVE], [test -n "$PROVE"])
28 AC_SUBST([PROVE])
30 AC_PATH_PROG([VALGRIND], [valgrind], [], [$VALGRIND_PATH$PATH_SEPARATOR$PATH])
31 AM_CONDITIONAL([HAVE_VALGRIND], [test -n "$VALGRIND"])
32 AC_SUBST([VALGRIND])
34 # Version.
35 VN_RMAJ=libquvi_scripts_rmaj
36 VN_RMIN=libquvi_scripts_rmin
37 VN_RMIC=libquvi_scripts_rmic
38 AC_SUBST([VN_RMAJ])
39 AC_SUBST([VN_RMIN])
40 AC_SUBST([VN_RMIC])
42 VERSION_MM="$VN_RMAJ.$VN_RMIN"
43 AC_SUBST([VERSION_MM])
45 genver="$srcdir/gen-ver.sh"
46 AS_IF([test -x "$genver"], [VN=`"$genver" "$srcdir"`])
47 AM_CONDITIONAL([HAVE_VN], [test -n "$VN"])
49 # --with-tests
50 AC_ARG_WITH([tests],
51   [AS_HELP_STRING([--with-tests], [with tests @<:@default=no@:>@])],
52   [AS_IF([test -z "$QUVI"], [
53     AC_MSG_NOTICE([quvi not found. Ignoring --with-tests.])
54     with_tests=no])],
55   [with_tests=no])
56 AM_CONDITIONAL([WITH_TESTS], [test x"$with_tests" != "xno"])
58 # --with-nsfw
59 AC_ARG_WITH([nsfw],
60   [AS_HELP_STRING([--with-nsfw],
61     [build with adult website support @<:@default=no@:>@])],
62   [],
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     [with website scripts marked as "fixme" @<:@default=no@:>@])],
70   [],
71   [with_fixme=no])
72 AM_CONDITIONAL([WITH_FIXME], [test x"$with_fixme" != "xno"])
74 # --with-nlfy
75 AC_ARG_WITH([nlfy],
76   [AS_HELP_STRING([--with-nlfy],
77     [test scripts marked as "nlfy" @<:@default=no@:>@])],
78   [],
79   [with_nlfy=no])
80 AM_CONDITIONAL([WITH_NLFY], [test x"$with_nlfy" != "xno"])
82 # --with-manual
83 AC_ARG_WITH([manual],
84   [AS_HELP_STRING([--with-manual],
85     [install manual pages @<:@default=yes@:>@])],
86   [],
87   [with_manual=yes])
88 AM_CONDITIONAL([WITH_MANUAL], [test x"$with_manual" != "xno"])
90 AC_CONFIG_FILES([
91   Makefile
92   doc/Makefile
93   doc/man7/Makefile
94   share/Makefile
95   tests/Makefile
96   libquvi-scripts-1.0.pc])
97 AC_OUTPUT
99 AC_MSG_NOTICE([
100   version:    ${VERSION} (${VN})
101   prefix:     ${prefix}
102 quvi:
103   version:    ${quviver}
104   path:       ${QUVI}
105 Options:
106   with tests: ${with_tests}
107   with fixme: ${with_fixme}
108   with nsfw:  ${with_nsfw}
109   with nlfy:  ${with_nlfy}])