summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 273dedde4e5d6bb3d371aeda9b23f899992032fd (plain)
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
## Copyright (c) 2009  Openismus GmbH  <http://www.openismus.com/>
##
## This file is part of mm-common.
##
## mm-common is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published
## by the Free Software Foundation, either version 2 of the License,
## or (at your option) any later version.
##
## mm-common is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with mm-common.  If not, see <http://www.gnu.org/licenses/>.

AC_INIT([mm-common], [1.0.5], [https://gitlab.gnome.org/GNOME/mm-common/issues/],
        [mm-common], [http://www.gtkmm.org/])
AC_PREREQ([2.59])
AC_CONFIG_SRCDIR([util/mm-common-prepare.in])

AM_INIT_AUTOMAKE([1.9 -Wno-portability check-news no-dist-gzip dist-xz no-define std-options foreign])
# Support silent build rules.
# Disable by either passing --disable-silent-rules to configure or passing V=1 to make.
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_MAINTAINER_MODE

AC_ARG_VAR([ACLOCAL_FLAGS], [aclocal flags, e.g. -I <macro dir>])
AC_ARG_VAR([CURL], [curl transfer command])
AC_ARG_VAR([WGET], [wget download command])

AC_PROG_SED
## List of tar execs is taken from the generated ./missing script.
AC_CHECK_PROGS([TAR], [tar gnutar gtar], [no])
AS_IF([test "x$TAR" = xno], [AC_MSG_ERROR([tar utility not found])])

AC_MSG_CHECKING([whether to download libstdc++ tags])
AC_ARG_ENABLE([network],
              [AS_HELP_STRING([[--disable-network]],
                              [do not attempt to download libstdc++ tags]
                              [[default=enabled in maintainer mode]])],
              [USE_NETWORK=$enableval], [USE_NETWORK=$USE_MAINTAINER_MODE])
AC_MSG_RESULT([$USE_NETWORK])
AC_SUBST([USE_NETWORK])

AC_CHECK_PROG([CURL], [curl], [curl])
AC_CHECK_PROG([WGET], [wget], [wget])

AS_IF([test "x$USE_NETWORK$CURL$WGET" = xyes],
      [AC_MSG_ERROR([[Either curl or wget is required to download the libstdc++ tags.]])])

AC_CONFIG_FILES([
  Makefile
  doctags/mm-common-libstdc++.pc
  doctags/mm-common-libstdc++-uninstalled.pc
  macros/mm-common.m4
  util/mm-common-prepare
  util/mm-common-get
  util/mm-common-util.pc
  util/mm-common-util-uninstalled.pc
])
AC_OUTPUT