-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure.ac
135 lines (107 loc) · 4.18 KB
/
configure.ac
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
# ClutterBox2D package version number, (as distinct from shared library version)
# An odd micro number indicates in-progress development, (eg. from git)
# An even micro number indicates a released version.
m4_define(clutter_box2d_version_major, 0)
m4_define(clutter_box2d_version_minor, 12)
m4_define(clutter_box2d_version_micro, 1)
m4_define([clutter_box2d_version],
[clutter_box2d_version_major.clutter_box2d_version_minor.clutter_box2d_version_micro])
m4_define([clutter_box2d_api_version],
[clutter_box2d_version_major.clutter_box2d_version_minor])
# increase the interface age by 2 for each release; if the API changes,
# set to 0. interface_age and binary_age are used to create the soname
# of the shared object:
#
# (<minor> * 100 + <micro>) - <interface_age>
#
# this allows using the same soname for different micro-releases in case
# no API was added or deprecated. for instance:
#
# 1.2.0 -> 100 * 2 + 0 = 200, interface age = 0 -> 200
# 1.2.2 -> 100 * 2 + 2 = 202, interface age = 2 -> 200
# 1.2.4 -> 100 * 2 + 4 = 204, interface age = 4 -> 200
# [ API addition, deprecation ]
# 1.2.6 -> 100 * 2 + 6 = 206, interface age = 0 -> 206
# 1.2.8 -> 100 * 2 + 8 = 208, interface age = 2 -> 206
# 1.2.10 -> 100 * 2 + 10 = 210, interface age = 4 -> 206
# ...
m4_define([clutter_box2d_interface_age], [0])
m4_define([clutter_box2d_binary_age],
[m4_eval(100 * clutter_box2d_version_minor + clutter_box2d_version_micro)])
# Autoconf configuration
AC_PREREQ(2.53)
AC_INIT([clutter-box2d],
[clutter_box2d_version],
[http://bugzilla.clutter-project.org/enter_bug.cgi?product=clutter-box2d])
AC_CONFIG_SRCDIR([clutter-box2d/clutter-box2d.h])
AC_CONFIG_MACRO_DIR([build/autotools])
# Automake configuration
AM_INIT_AUTOMAKE([1.9])
AM_CONFIG_HEADER([config.h])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
# libtool configuration
LT_PREREQ([2.2.6])
LT_INIT([win32-dll disable-static])
# export a few variables
CLUTTER_BOX2D_MAJOR_VERSION=clutter_box2d_major
CLUTTER_BOX2D_MINOR_VERSION=clutter_box2d_minor
CLUTTER_BOX2D_MICRO_VERSION=clutter_box2d_micro
CLUTTER_BOX2D_VERSION=clutter_box2d_version
CLUTTER_BOX2D_API_VERSION=clutter_box2d_api_version
AC_SUBST(CLUTTER_BOX2D_MAJOR_VERSION)
AC_SUBST(CLUTTER_BOX2D_MINOR_VERSION)
AC_SUBST(CLUTTER_BOX2D_MICRO_VERSION)
AC_SUBST(CLUTTER_BOX2D_API_VERSION)
m4_define([lt_current],
[m4_eval(clutter_box2d_binary_age - clutter_box2d_interface_age)])
m4_define([lt_revision], [clutter_box2d_interface_age])
m4_define([lt_age], [m4_eval(clutter_box2d_binary_age - clutter_box2d_interface_age)])
CLUTTER_BOX2D_LT_CURRENT=lt_current
CLUTTER_BOX2D_LT_REV=lt_revision
CLUTTER_BOX2D_LT_AGE=lt_age
CLUTTER_BOX2D_LT_VERSION="$CLUTTER_BOX2D_LT_CURRENT:$CLUTTER_BOX2D_LT_REV:$CLUTTER_BOX2D_LT_AGE"
CLUTTER_BOX2D_LT_LDFLAGS="-version-info $CLUTTER_BOX2D_LT_VERSION"
AC_SUBST(CLUTTER_BOX2D_LT_VERSION)
AC_SUBST(CLUTTER_BOX2D_LT_LDFLAGS)
dnl ========================================================================
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_CHECK_FUNCS([memset munmap strcasecmp strdup])
dnl ========================================================================
pkg_modules="clutter-1.0 >= 1.0.0"
PKG_CHECK_MODULES(DEPS, [$pkg_modules])
AS_COMPILER_FLAGS([MAINTAINER_CFLAGS], ["-Wall"])
AC_SUBST(MAINTAINER_CFLAGS)
dnl = GTK Doc check ========================================================
GTK_DOC_CHECK([1.13])
dnl ========================================================================
GOBJECT_INTROSPECTION_CHECK([0.6.8])
AC_CONFIG_FILES([
Makefile
build/Makefile
build/autotools/Makefile
clutter-box2d.pc
examples/Makefile
box2d/Makefile
clutter-box2d/Makefile
doc/Makefile
doc/reference/Makefile
doc/reference/version.xml
])
AC_OUTPUT
echo ""
echo " ClutterBox2D $VERSION"
echo " ====================="
echo ""
echo " Documentation: ${enable_gtk_doc}"
echo ""