-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfigure.in
254 lines (217 loc) · 7.5 KB
/
configure.in
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
AC_PREREQ(2.54)
# Making releases:
# LIBMATECANVAS_MICRO_VERSION += 1;
# LIBMATECANVAS_INTERFACE_AGE += 1;
# if any functions have been added, set LIBMATECANVAS_INTERFACE_AGE to 0.
# if backwards compatibility has been broken,
# set LIBMATECANVAS_BINARY_AGE and LIBMATECANVAS_INTERFACE_AGE to 0.
#
m4_define([libmatecanvas_major_version], [1])
m4_define([libmatecanvas_minor_version], [4])
m4_define([libmatecanvas_micro_version], [0])
m4_define([libmatecanvas_interface_age], [2])
# If you need a modifier for the version number.
# Normally empty, but can be used to make "fixup" releases.
m4_define([libmatecanvas_extraversion], [])
dnl required versions of other programs
m4_define([glib_required_version], [2.10.0])
m4_define([gtk_required_version], [2.2.0])
m4_define([gail_required_version], [1.9.0])
m4_define([libart_required_version], [2.3.8])
m4_define([pango_required_version], [1.0.1])
m4_define([libglade_required_version], [2.0.0])
dnl libtool versioning from libmate
m4_define([libmatecanvas_current], [m4_eval(100 * libmatecanvas_minor_version + libmatecanvas_micro_version - libmatecanvas_interface_age)])
m4_define([libmatecanvas_binary_age], [m4_eval(100 * libmatecanvas_minor_version + libmatecanvas_micro_version)])
m4_define([libmatecanvas_revision], [libmatecanvas_interface_age])
m4_define([libmatecanvas_age], [m4_eval(libmatecanvas_binary_age - libmatecanvas_interface_age)])
m4_define([libmatecanvas_current_minus_age], [m4_eval(libmatecanvas_current - libmatecanvas_age)])
m4_define([libmatecanvas_version], [libmatecanvas_major_version().libmatecanvas_minor_version().libmatecanvas_micro_version()libmatecanvas_extraversion()])
AC_INIT([libmatecanvas], [libmatecanvas_version], [https://github.com/perberos/mate-desktop-environment])
AC_CONFIG_SRCDIR([libmatecanvas/libmatecanvas.h])
LIBMATECANVAS_MAJOR_VERSION=libmatecanvas_major_version
LIBMATECANVAS_MINOR_VERSION=libmatecanvas_minor_version
LIBMATECANVAS_MICRO_VERSION=libmatecanvas_micro_version
LIBMATECANVAS_INTERFACE_AGE=libmatecanvas_interface_age
dnl libtool versioning from libmate
LIBMATECANVAS_CURRENT=libmatecanvas_current
LIBMATECANVAS_REVISION=libmatecanvas_revision
LIBMATECANVAS_AGE=libmatecanvas_age
LIBMATECANVAS_CURRENT_MINUS_AGE=libmatecanvas_current_minus_age
AC_SUBST(LIBMATECANVAS_CURRENT)
AC_SUBST(LIBMATECANVAS_REVISION)
AC_SUBST(LIBMATECANVAS_AGE)
AC_SUBST(LIBMATECANVAS_CURRENT_MINUS_AGE)
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
dnl make aclocal calls respect $ACLOCAL_FLAGS
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
AC_SUBST(ACLOCAL_AMFLAGS)
AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
IT_PROG_INTLTOOL([0.35.0])
MATE_COMPILE_WARNINGS
GETTEXT_PACKAGE=libmatecanvas
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package])
AM_GLIB_GNU_GETTEXT
AM_GLIB_DEFINE_LOCALEDIR([MATECANVASLOCALEDIR])
dnl ---------------------------------------------------------------------------
dnl GTK library version
dnl ---------------------------------------------------------------------------
GTK_API_VERSION=2.0
GAIL_API_VERSION=
GTK_REQUIRED=2.2.0
AC_MSG_CHECKING([which gtk+ version to compile against])
AC_ARG_WITH([gtk],
[AS_HELP_STRING([--with-gtk=2.0|3.0],[which gtk+ version to compile against (default: 2.0)])],
[case "$with_gtk" in
2.0|3.0) ;;
*) AC_MSG_ERROR([invalid gtk version specified]) ;;
esac],
[with_gtk=2.0])
AC_MSG_RESULT([$with_gtk])
case "$with_gtk" in
2.0) GTK_API_VERSION=2.0
GTK_REQUIRED=2.2.0
GAIL_API_VERSION=
;;
3.0) GTK_API_VERSION=3.0
GTK_REQUIRED=3.0.0
GAIL_API_VERSION=-3.0
;;
esac
dnl
dnl GTK+ check
dnl
CANVAS_MODULES="dnl
glib-2.0 >= glib_required_version dnl
gtk+-$GTK_API_VERSION >= $GTK_REQUIRED dnl
gail$GAIL_API_VERSION >= gail_required_version dnl
libart-2.0 >= libart_required_version dnl
pango >= pango_required_version dnl
pangoft2 >= pango_required_version"
PKG_PROG_PKG_CONFIG([0.18])
PKG_CHECK_MODULES(LIBMATECANVAS, $CANVAS_MODULES)
LIBMATECANVAS_LIBS="$LIBMATECANVAS_LIBS -lm"
if test "$enable_maintainer_mode" = "yes"; then
LIBMATECANVAS_DEPRECATED_CFLAGS="-DG_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
AC_SUBST(LIBMATECANVAS_DEPRECATED_CFLAGS)
fi
AC_ARG_ENABLE(glade,
AC_HELP_STRING([--enable-glade],
[enable glade support]),,
[enable_glade=no])
AM_CONDITIONAL(USE_GLADE, test "$enable_glade" = yes)
if test "$enable_glade" = yes; then
PKG_CHECK_MODULES(CANVAS_GLADE, $CANVAS_MODULES libglade-2.0 >= libglade_required_version)
fi
AC_MSG_CHECKING([for native Win32])
case "$host" in
*-*-mingw*)
native_win32=yes
;;
*)
native_win32=no
;;
esac
AC_MSG_RESULT([$native_win32])
AM_CONDITIONAL(OS_WIN32, test "$native_win32" = yes)
AC_MSG_CHECKING([for Win32 platform in general])
case "$host" in
*-*-mingw*|*-*-cygwin*)
platform_win32=yes
;;
*)
platform_win32=no
;;
esac
AC_MSG_RESULT($platform_win32)
AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = yes)
# Ensure MSVC-compatible struct packing convention is used when
# compiling for Win32 with gcc. GTK+ uses this convention, so we must, too.
# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
# gcc2 uses "-fnative-struct".
if test x"$native_win32" = xyes; then
if test x"$GCC" = xyes; then
msnative_struct=''
AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
if test -z "$ac_cv_prog_CC"; then
our_gcc="$CC"
else
our_gcc="$ac_cv_prog_CC"
fi
case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
2.)
if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
msnative_struct='-fnative-struct'
fi
;;
*)
if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
msnative_struct='-mms-bitfields'
fi
;;
esac
if test x"$msnative_struct" = x ; then
AC_MSG_RESULT([no way])
AC_MSG_WARN([produced libraries will be incompatible with prebuilt GTK+ DLLs])
else
CFLAGS="$CFLAGS $msnative_struct"
AC_MSG_RESULT([${msnative_struct}])
fi
fi
fi
dnl Don't use AC_PROG_AWK since we need the full pathname.
AC_PATH_PROGS(AWK, mawk gawk nawk awk, )
AC_PATH_PROGS(PERL, perl5 perl)
# glib-genmarshal
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
dnl
dnl Check for gtk-doc
dnl
GTK_DOC_CHECK([1.0],[--flavour no-tmpl])
DISTCHECK_CONFIGURE_FLAGS="--enable-gtk-doc"
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
# define a MAINT-like variable REBUILD which is set if Perl
# and awk are found, so autogenerated sources can be rebuilt
AC_ARG_ENABLE(rebuilds,
AC_HELP_STRING([--disable-rebuilds],
[disable all source autogeneration rules]),,
[enable_rebuilds=yes])
REBUILD=\#
if test "x$enable_rebuilds" = "xyes" && \
test -n "$PERL" && \
$PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
test -n "$AWK" ; then
REBUILD=
fi
AC_SUBST(REBUILD)
AC_CONFIG_FILES([
Makefile
libmatecanvas-zip
po/Makefile.in
libmatecanvas/Makefile
libmatecanvas/libmatecanvas-2.0.pc
libmatecanvas/libmatecanvas-2.0-uninstalled.pc
glade/Makefile
demos/Makefile
tests/Makefile
docs/Makefile
docs/reference/Makefile
])
AC_OUTPUT
echo "
Configure summary:
Compiler....................: ${CC}
Compiler Flags..............: ${CFLAGS}
Prefix .....................: ${prefix}
Gtk+ version................: ${GTK_API_VERSION}
Glade support...............: ${enable_glade}
Rebuilds....................: ${enable_rebuilds}
Win32.......................: ${platform_win32}
"