File: configure.ac

package info (click to toggle)
event-dance 0.2.0-8~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,096 kB
  • sloc: ansic: 29,033; javascript: 2,709; makefile: 434; xml: 247; sh: 30; python: 27
file content (155 lines) | stat: -rw-r--r-- 4,460 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#
# configure.ac
#
# EventDance, Peer-to-peer IPC library <http://eventdance.org>
#
# Copyright (C) 2009-2013, Igalia S.L.
#
# Authors:
#   Eduardo Lima Mitev <elima@igalia.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# version 3, or (at your option) any later version as published by
# the Free Software Foundation.
#
# This library 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
# Lesser General Public License at http://www.gnu.org/licenses/lgpl-3.0.txt
# for more details.
#

AC_PREREQ(2.59)

m4_define([prj_name],       [EventDance])
m4_define([prj_short_name], [evd])
m4_define([prj_home],       [http://eventdance.org])

# package version number (not shared library version)
# odd micro numbers indicate in-progress development
# even micro numbers indicate released versions
m4_define([prj_version_major], [0])
m4_define([prj_version_minor], [2])
m4_define([prj_version_micro], [0])

m4_define([prj_version],
          [prj_version_major.prj_version_minor.prj_version_micro])
m4_define([prj_api_version],
          [prj_version_major.prj_version_minor])

AC_INIT([prj_name],
	[prj_version],
	[prj_home])

AC_CONFIG_HEADERS(config.h)
AC_CONFIG_MACRO_DIR([m4])

AM_INIT_AUTOMAKE

# EventDance specific definitions
m4_define([prj_gir_namespace], [Evd])

EVD_VERSION="prj_version"
AC_SUBST(EVD_VERSION)

EVD_API_VERSION="prj_api_version"
AC_SUBST(EVD_API_VERSION)

EVD_API_NAME="prj_short_name-prj_api_version"
AC_SUBST(EVD_API_NAME)

# Check for programs
AC_PROG_LIBTOOL
AC_PROG_CC
AC_PROG_INSTALL
AM_PROG_CC_C_O

# enable pkg-config
PKG_PROG_PKG_CONFIG

# Required libraries
GLIB_REQUIRED=2.28.0

PKG_CHECK_MODULES(GLIB, gio-2.0 >= $GLIB_REQUIRED
		        glib-2.0 >= $GLIB_REQUIRED
		        gthread-2.0 >= $GLIB_REQUIRED
		        gobject-2.0 >= $GLIB_REQUIRED)

PKG_CHECK_MODULES([GIO_UNIX], [gio-unix-2.0 >= $GLIB_REQUIRED],
        [HAVE_GIO_UNIX=yes],
        [HAVE_GIO_UNIX=no])
AM_CONDITIONAL(HAVE_GIO_UNIX, test x"$HAVE_GIO_UNIX" = x"yes")

PKG_CHECK_MODULES(TLS, gnutls >= 3.0.0)
PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.28.0)
PKG_CHECK_MODULES(UUID, uuid >= 2.16.0)
PKG_CHECK_MODULES(JSON, json-glib-1.0 >= 0.14.0)

# GObject-Introspection check
GOBJECT_INTROSPECTION_CHECK([0.6.7])
if test "x$found_introspection" = "xyes"; then
   EVD_GIR_NAMESPACE="prj_gir_namespace"
   AC_SUBST(EVD_GIR_NAMESPACE)

   EVD_GIR_API_NAME="prj_gir_namespace"-"prj_api_version"
   AC_SUBST(EVD_GIR_API_NAME)

   EVD_GIR_TARGET_NAME="prj_gir_namespace"_"prj_version_major"_"prj_version_minor"_gir
   AC_SUBST(EVD_GIR_TARGET_NAME)

   INTROSPECTION_GIRDIR=`$PKG_CONFIG --define-variable=prefix='${prefix}' --variable=girdir gobject-introspection-1.0`
   AC_SUBST(INTROSPECTION_GIRDIR)

   INTROSPECTION_TYPELIBDIR=`$PKG_CONFIG --define-variable=prefix='${prefix}' --variable=typelibdir gobject-introspection-1.0`
   AC_SUBST(INTROSPECTION_TYPELIBDIR)
fi

# Javascript support check
JS_CHECK([0.3])

# GTK Doc
GTK_DOC_CHECK([1.11])
AM_CONDITIONAL([BUILD_GTK_DOC], [test "x$enable_gtk_doc" = "xyes" || test ! -f "autogen.sh"])

# Silent build
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])

# Tests
AC_ARG_ENABLE(tests,
        AS_HELP_STRING([--enable-tests[=@<:@no/yes@:>@]],
                [Enable automated unit and functional tests [default=yes]]),,
                [enable_tests=yes])

AM_CONDITIONAL(ENABLE_TESTS, test x"${enable_tests}" = x"yes")

# Debug
AC_ARG_ENABLE(debug,
        AS_HELP_STRING([--enable-debug[=@<:@no/yes@:>@]],
                [Enable debug mode by adding -ggdb, -g3, -O0 and -Werror to CFLAGS [default=no]]),,
                [enable_debug=no])

AM_CONDITIONAL(ENABLE_DEBUG, test x"${enable_debug}" = x"yes")

# Output files
AC_OUTPUT([
	Makefile
	evd/Makefile
	evd/evd-0.2.pc
	tests/Makefile
        doc/Makefile
        doc/reference/Makefile
        examples/Makefile
])

echo ""
echo "   EventDance $VERSION"
echo "   ====================="
echo ""
echo "              Install prefix:   ${prefix}"
echo "    Build introspection data:   ${enable_introspection}"
echo "     Build API documentation:   ${enable_gtk_doc}"
echo "           Enable debug mode:   ${enable_debug}"
echo "      Enable automated tests:   ${enable_tests}"
echo "     Enable Javascript tests:   ${enable_js}"
echo ""