File: configure.ac

package info (click to toggle)
mm-common 0.9.7-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,840 kB
  • ctags: 44
  • sloc: sh: 603; perl: 235; makefile: 193; cpp: 26; xml: 2
file content (72 lines) | stat: -rw-r--r-- 3,003 bytes parent folder | download
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
## 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], [0.9.7], [https://bugzilla.gnome.org/enter_bug.cgi?product=mm-common],
        [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 dist-bzip2 no-define std-options])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
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
dnl list of tar execs is taken from the generated ./missing script.
AC_CHECK_PROGS([TAR], [tar gnutar gtar], [no])
AS_VAR_IF([TAR], [no], [AC_MSG_ERROR([tar utility not found])])

AC_MSG_CHECKING([whether to enable network])
AC_ARG_ENABLE([network],
              [AS_HELP_STRING([--enable-network],
                              [use network to download tags if needed @<:@default=same as maintainer mode@:>@])],
              [AS_VAR_IF([enableval], ['yes'],,
                         [AS_VAR_IF([enableval], ['no'],,
                                    [AC_MSG_ERROR([[Pass either `yes', `no' or nothing to --enable-network.]])]
                                   )
                         ]
                        )
               AS_VAR_SET([enable_network], ["$enableval"])
              ],
              [AS_VAR_SET([enable_network], ["$USE_MAINTAINER_MODE"])]
             )
AC_SUBST([USE_NETWORK], ["$enable_network"])
AM_CONDITIONAL(NETWORK_ENABLED, [test "x$enable_network" = 'xyes'])
AC_MSG_RESULT([$USE_NETWORK])

AS_VAR_IF([USE_NETWORK], ['yes'],
          [AC_CHECK_PROG([CURL], [curl], [curl])
           AC_CHECK_PROG([WGET], [wget], [wget])
           AS_VAR_IF([CURL], [],
                     [AS_VAR_IF([WGET], [],
                                [AC_MSG_FAILURE([[Network is enabled so either curl or wget is required for building mm-common.]])]
                               )
                     ]
                    )
          ]
         )

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