File: configure.ac

package info (click to toggle)
libquvi-scripts 0.9.20131130-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 2,828 kB
  • sloc: sh: 11,744; ansic: 2,587; makefile: 226
file content (123 lines) | stat: -rw-r--r-- 3,385 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])

AC_INIT([libquvi-scripts], m4_esyscmd([./gen-ver.sh -c | tr -d '\n']),
        [http://quvi.sf.net/bugs/],[],[http://quvi.sf.net/])

BUILD_OPTS="$@"
AC_SUBST([BUILD_OPTS])

AC_CONFIG_SRCDIR([tests/lib/env.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([config.aux])
AC_CONFIG_MACRO_DIR([m4])

AM_INIT_AUTOMAKE([1.11.1 -Wall -Werror dist-xz no-dist-gzip
                  tar-ustar subdir-objects])
AM_SILENT_RULES([yes])

# GNU Automake 1.12 requires this macro. Earlier versions do not
# recognize this macro. Work around this.
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])

LT_INIT([disable-static])
LT_PREREQ([2.2.6])

# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_LN_S

AC_PATH_PROG([A2X], [a2x], [no])
AM_CONDITIONAL([HAVE_A2X], [test x"$A2X" != "xno"])
AC_SUBST([A2X])

AS_IF([test x"$A2X" = "xno" && test -d "$srcdir/.git"],
  AC_MSG_ERROR([a2x is required to create man pages when building from git])])

# Check for headers.
AC_CHECK_HEADERS([string.h])

# Check for functions.
AC_CHECK_FUNCS([memset])

# --with-tests
pkg_libquvi=libquvi-0.9
AC_ARG_WITH([tests],
  [AS_HELP_STRING([--with-tests],
    [Enable tests for scripts @<:@default=no@:>@])],
  [PKG_CHECK_MODULES([libquvi], ["$pkg_libquvi" >= 0.9],
    [libquvi_modver=`$PKG_CONFIG --modversion $pkg_libquvi 2>/dev/null`
      PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.24],
      [PKG_CHECK_MODULES([libcurl], [libcurl >= 7.21], [with_tests=yes])])
    ])
  ], [with_tests=no])
AM_CONDITIONAL([WITH_TESTS], [test x"$with_tests" = "xyes"])

# --with-nsfw
AC_ARG_WITH([nsfw],
  [AS_HELP_STRING([--with-nsfw],
    [Install scripts marked as "NSFW" @<:@default=no@:>@])],
  [], [with_nsfw=no])
AM_CONDITIONAL([WITH_NSFW], [test x"$with_nsfw" != "xno"])

# --with-fixme
AC_ARG_WITH([fixme],
  [AS_HELP_STRING([--with-fixme],
    [Install scripts marked as "FIXME" @<:@default=no@:>@])],
  [], [with_fixme=no])
AM_CONDITIONAL([WITH_FIXME], [test x"$with_fixme" != "xno"])

# --with-geoblocked
AC_ARG_WITH([geoblocked],
  [AS_HELP_STRING([--with-geoblocked],
    [Install scripts marked as "geoblocked" @<:@default=yes@:>@])],
  [], [with_geoblocked=yes])
AM_CONDITIONAL([WITH_GEOBLOCKED], [test x"$with_geoblocked" = "xyes"])

# --with-manual
AC_ARG_WITH([manual],
  [AS_HELP_STRING([--with-manual],
    [Install manual page(s) @<:@default=yes@:>@])],
  [], [with_manual=yes])
AM_CONDITIONAL([WITH_MANUAL], [test x"$with_manual" != "xno"])

# Version: Major/minor -pair, used to symlink
# from
#   $prefix/share/libquvi-scripts/$version/
# to
#   $prefix/share/libquvi-scripts/$major.$minor/
VERSION_MM=`$srcdir/gen-ver.sh -c -m`
AC_SUBST([VERSION_MM])

VN_C=`$srcdir/gen-ver.sh -c` # Use this value in the .pc file
AC_SUBST([VN_C])

AC_CONFIG_FILES([
  Makefile
  doc/Makefile
  doc/man7/Makefile
  share/Makefile
  tests/Makefile
  tests/lib/Makefile
  libquvi-scripts-0.9.pc])
AC_OUTPUT

AC_MSG_NOTICE([
  version       ${VERSION}
  prefix        ${prefix}
  compiler      ${CC}
  cflags        ${CFLAGS}
Testsuite options
  with
  - tests       ${with_tests}
    - libquvi .pc modversion ${libquvi_modver}
Install options
  with
  - geoblocked  ${with_geoblocked}
  - fixme       ${with_fixme}
  - nsfw        ${with_nsfw}])

# vim: set ts=2 sw=2 tw=72 expandtab: