File: configure.in

package info (click to toggle)
gtk-sharp2 2.8.3-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 21,208 kB
  • ctags: 5,843
  • sloc: xml: 245,420; cs: 24,183; sh: 8,547; ansic: 2,739; makefile: 1,582; perl: 1,177
file content (370 lines) | stat: -rw-r--r-- 10,699 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
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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370

AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gtk-sharp, 2.8.3)
AM_MAINTAINER_MODE

API_VERSION=2.8.0.0
AC_SUBST(API_VERSION)
POLICY_VERSIONS="2.4 2.6"
AC_SUBST(POLICY_VERSIONS)

PACKAGE_VERSION=gtk-sharp-2.0
AC_SUBST(PACKAGE_VERSION)

case "$host" in
	*-*-mingw*|*-*-cygwin*)
		platform_win32=yes
		AC_DEFINE(PLATFORM_WIN32,1,[Platform is Win32])
		CC="gcc -mno-cygwin -g"
		HOST_CC="gcc"
		;;
	*)
		platform_win32=no
		;;
esac

AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)

AC_CHECK_TOOL(CC, gcc, gcc)
AC_PROG_CC
AM_PROG_CC_STDC
AC_PROG_INSTALL

dnl may require a specific autoconf version
dnl AC_PROG_CC_FOR_BUILD
dnl CC_FOR_BUILD not automatically detected
CC_FOR_BUILD=$CC
BUILD_EXEEXT=
if test "x$cross_compiling" = "xyes"; then
	CC_FOR_BUILD=cc
	BUILD_EXEEXT=""
fi
AC_SUBST(CC_FOR_BUILD)
AC_SUBST(HOST_CC)
AC_SUBST(BUILD_EXEEXT)

# Set STDC_HEADERS
AC_HEADER_STDC
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL

if test x$platform_win32 = xyes; then
   # Get rid of 'cyg' prefixes in library names
   sed -e "s/\/cyg\//\/\//" libtool > libtool.new; mv libtool.new libtool; chmod 755 libtool
fi

# not 64 bit clean in cross-compile
AC_CHECK_SIZEOF(void *, 4)

CFLAGS='-g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes  -Wmissing-prototypes -Wnested-externs  -Wshadow -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings'

if test "x$enable_maintainer_mode" = "xyes"; then
DEBUG_FLAGS='-debug'
else
DEBUG_FLAGS=
AC_ARG_ENABLE(debug, [  --enable-debug          Build debugger (.mdb) files for dlls],
	DEBUG_FLAGS='-debug'
)
fi

CSDEFINES='-define:GTK_SHARP_2_6 -define:GTK_SHARP_2_8'
CSFLAGS="$DEBUG_FLAGS $CSDEFINES"
AC_SUBST(CSFLAGS)

GTK_SHARP_VERSION_CFLAGS='-DGTK_SHARP_2_6 -DGTK_SHARP_2_8'
AC_SUBST(GTK_SHARP_VERSION_CFLAGS)

AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
	AC_MSG_ERROR([You need to install pkg-config])
fi

dnl for use on the build system
BUILD_GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
BUILD_GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
AC_SUBST(BUILD_GTK_CFLAGS)
AC_SUBST(BUILD_GTK_LIBS)

MONO_REQUIRED_VERSION=1.0
PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false)

AC_PATH_PROG(GACUTIL, gacutil, no)
if test "x$GACUTIL" = "xno" ; then
	AC_MSG_ERROR([No gacutil tool found. You need to install either the mono or .Net SDK.])
fi

AC_PATH_PROG(AL, al, no)
if test "x$AL" = "xno" ; then
	AC_MSG_ERROR([No al tool found. You need to install either the mono or .Net SDK.])
fi

if test "x$has_mono" = "xtrue"; then
GACUTIL_FLAGS='/package $(PACKAGE_VERSION) /gacdir $(DESTDIR)$(prefix)/lib'
GENERATED_SOURCES=generated/*.cs
AC_PATH_PROG(RUNTIME, mono, no)

# If mono is found, it's in the path.  Require it to be in the path at runtime as well
if test "x$RUNTIME" != "no" ; then
	RUNTIME=mono
fi

AC_PATH_PROG(CSC, mcs, no)
if test `uname -s` = "Darwin"; then
	LIB_PREFIX=
	LIB_SUFFIX=.dylib
else
	LIB_PREFIX=.so
	LIB_SUFFIX=
fi
SDCHECK="`$GACUTIL /l |grep ^System.Drawing, | head -n1 |cut -f1 -d','`"
if test "x$SDCHECK" = "xSystem.Drawing"; then
	enable_dotnet=yes
else
	enable_dotnet=no
fi
else
AC_PATH_PROG(CSC, csc.exe, no)
GACUTIL_FLAGS=
GENERATED_SOURCES=generated\\\\*.cs
enable_dotnet=yes

if test x$CSC = "xno"; then
	AC_MSG_ERROR([You need to install either mono or .Net])
else
RUNTIME=
LIB_PREFIX=
LIB_SUFFIX=.dylib
fi
fi

CS="C#"
if test "x$CSC" = "xno" ; then
	AC_MSG_ERROR([No $CS compiler found])
fi

AC_SUBST(RUNTIME)
AC_SUBST(CSC)
AC_SUBST(GACUTIL)
AC_SUBST(GACUTIL_FLAGS)
AC_SUBST(LIB_PREFIX)
AC_SUBST(LIB_SUFFIX)
AC_SUBST(GENERATED_SOURCES)

PKG_CHECK_MODULES(MONO_CAIRO, mono-cairo >= $MONO_REQUIRED_VERSION, has_mono_cairo=true, has_mono_cairo=false)
AC_SUBST(MONO_CAIRO_LIBS)

if test "x$has_mono_cairo" = "xfalse" -a "x$API_VERSION" = "x2.8.0.0"; then
	AC_MSG_ERROR([You need to install Mono.Cairo.dll and its pkgconfig file or set PKG_CONFIG_PATH to find it.])
fi

GTK_REQUIRED_VERSION=2.8.0

PKG_CHECK_MODULES(GLIB, gobject-2.0 >= $GTK_REQUIRED_VERSION)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)

PKG_CHECK_MODULES(PANGO, pango)
AC_SUBST(PANGO_CFLAGS)
AC_SUBST(PANGO_LIBS)

PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED_VERSION)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)

## Versions of dependencies
GNOME_REQUIRED_VERSION=2.10.0
ART_REQUIRED_VERSION=2.3.16

PKG_CHECK_MODULES(LIBART, libart-2.0 >= $ART_REQUIRED_VERSION, enable_libart=yes, enable_libart=no)
AC_SUBST(LIBART_CFLAGS)
AC_SUBST(LIBART_LIBS)

PKG_CHECK_MODULES(GNOMEVFS, gnome-vfs-2.0 >= $GNOME_REQUIRED_VERSION, enable_gnomevfs=yes, enable_gnomevfs=no)
AC_SUBST(GNOMEVFS_CFLAGS)
AC_SUBST(GNOMEVFS_LIBS)

PKG_CHECK_MODULES(GNOME, libgnomecanvas-2.0 >= $GNOME_REQUIRED_VERSION libgnomeui-2.0 >= $GNOME_REQUIRED_VERSION gtk+-2.0 >= $GTK_REQUIRED_VERSION libgnomeprintui-2.2 >= $GNOME_REQUIRED_VERSION gmodule-2.0 >= $GTK_REQUIRED_VERSION libpanelapplet-2.0 >= $GNOME_REQUIRED_VERSION, enable_gnome=yes, enable_gnome=no)
AC_SUBST(GNOME_CFLAGS)
AC_SUBST(GNOME_LIBS)

GLADE_REQUIRED_VERSION=2.3.6
PKG_CHECK_MODULES(GLADE, libglade-2.0 >= $GLADE_REQUIRED_VERSION, enable_glade=yes, enable_glade=no)
AC_SUBST(GLADE_CFLAGS)
AC_SUBST(GLADE_LIBS)

RSVG_REQUIRED_VERSION=2.0.1
PKG_CHECK_MODULES(RSVG_DEPENDENCIES, librsvg-2.0 >= $RSVG_REQUIRED_VERSION, enable_rsvg=yes, enable_rsvg=no)

if test "x$enable_gnome" = "xyes"; then
GTKHTML_REQUIRED_VERSION=3.8.0
PKG_CHECK_MODULES(GTKHTML_DEPENDENCIES, libgtkhtml-3.8 >= $GTKHTML_REQUIRED_VERSION, enable_gtkhtml=yes, enable_gtkhtml=no)
if test "x$enable_gtkhtml" = "xyes"; then
GTKHTML_VERSION=3.8
GTKHTML_SOVERSION=15
else
GTKHTML_REQUIRED_VERSION=3.6.0
PKG_CHECK_MODULES(GTKHTML_DEPENDENCIES, libgtkhtml-3.6 >= $GTKHTML_REQUIRED_VERSION, enable_gtkhtml=yes, enable_gtkhtml=no)
if test "x$enable_gtkhtml" = "xyes"; then
GTKHTML_VERSION=3.6
GTKHTML_SOVERSION=18
else
GTKHTML_REQUIRED_VERSION=3.2.0
PKG_CHECK_MODULES(GTKHTML_DEPENDENCIES, libgtkhtml-3.1 >= $GTKHTML_REQUIRED_VERSION, enable_gtkhtml=yes, enable_gtkhtml=no)
if test "x$enable_gtkhtml" = "xyes"; then
GTKHTML_VERSION=3.1
GTKHTML_SOVERSION=11
else
GTKHTML_REQUIRED_VERSION=3.0.10
PKG_CHECK_MODULES(GTKHTML_DEPENDENCIES, libgtkhtml-3.0 >= $GTKHTML_REQUIRED_VERSION, enable_gtkhtml=yes, enable_gtkhtml=no)
if test "x$enable_gtkhtml" = "xyes"; then
GTKHTML_VERSION=3.0
GTKHTML_SOVERSION=4
else
GTKHTML_VERSION=
GTKHTML_SOVERSION=
fi
fi
fi
fi
AC_SUBST(GTKHTML_VERSION)
AC_SUBST(GTKHTML_SOVERSION)
else
enable_gtkhtml=no
fi

VTE_REQUIRED_VERSION=0.11.10
PKG_CHECK_MODULES(VTE_DEPENDENCIES, vte >= $VTE_REQUIRED_VERSION gtk+-2.0 >= $GTK_REQUIRED_VERSION, enable_vte=yes, enable_vte=no)

AC_PATH_PROG(MDASSEMBLER, mdassembler, no)
AC_PATH_PROG(MONODOCER, monodocer, no)
if test "x$MONODOCER" = "xno" -o "x$MDASSEMBLER" = "xno"; then
  enable_monodoc=no
  doc_sources_dir=
else
  enable_monodoc=yes
  doc_sources_dir="`pkg-config --variable=sourcesdir monodoc`"
fi
AC_SUBST(MDASSEMBLER)
AC_SUBST(MONODOCER)

AM_CONDITIONAL(ENABLE_LIBART, test "x$enable_libart" = "xyes")
AM_CONDITIONAL(ENABLE_GNOMEVFS, test "x$enable_gnomevfs" = "xyes")
AM_CONDITIONAL(ENABLE_GNOME, test "x$enable_gnome" = "xyes")
AM_CONDITIONAL(ENABLE_GLADE, test "x$enable_glade" = "xyes")
AM_CONDITIONAL(ENABLE_RSVG, test "x$enable_rsvg" = "xyes")
AM_CONDITIONAL(ENABLE_GTKHTML, test "x$enable_gtkhtml" = "xyes")
AM_CONDITIONAL(ENABLE_VTE, test "x$enable_vte" = "xyes")
AM_CONDITIONAL(ENABLE_DOTNET, test "x$enable_dotnet" = "xyes")
AM_CONDITIONAL(ENABLE_MONODOC, test "x$enable_monodoc" = "xyes")
AM_CONDITIONAL(ENABLE_MONOGETOPTIONS, test "x$has_mono" = "xtrue")
AM_CONDITIONAL(ENABLE_ALL_OPTIONAL, test "x$enable_libart" = "xyes" -a "x$enable_gnomevfs" = "xyes" -a "x$enable_gnome" = "xyes" -a "x$enable_glade" = "xyes" -a "x$enable_rsvg" = "xyes" -a "x$enable_gtkhtml" = "xyes" -a "x$enable_vte" = "xyes" -a "x$enable_dotnet" = "xyes" -a "x$enable_monodoc" = "xyes")

AC_SUBST(CFLAGS)

AC_OUTPUT([
AssemblyInfo.cs
Makefile
policy.config
sources/Makefile
parser/Makefile
parser/gapi-2.0.pc
parser/gapi2-fixup
parser/gapi2-parser
generator/Makefile
generator/gapi2-codegen
glib/Makefile
glib/glib-sharp-2.0.pc
glib/glib-sharp.dll.config
glib/glue/Makefile
pango/Makefile
pango/pango-sharp.dll.config
pango/glue/Makefile
atk/Makefile
atk/atk-sharp.dll.config
art/Makefile
art/art-sharp.dll.config
art/art-sharp-2.0.pc
gdk/Makefile
gdk/gdk-sharp.dll.config
gdk/glue/Makefile
gtk/Makefile
gtk/gtk-sharp-2.0.pc
gtk/gtk-sharp.dll.config
gtk/glue/Makefile
glade/Makefile
glade/glade-sharp.dll.config
glade/glade-sharp-2.0.pc
glade/glue/Makefile
gnome/Makefile
gnome/gnome-sharp.dll.config
gnome/gnome-sharp-2.0.pc
gnome/glue/Makefile
gnomevfs/Makefile
gnomevfs/gnome-vfs-sharp.dll.config
gnomevfs/gnome-vfs-sharp-2.0.pc
gconf/Makefile
gconf/doc/Makefile
gconf/GConf/Makefile
gconf/GConf/gconf-sharp.dll.config
gconf/GConf/gconf-sharp-2.0.pc
gconf/GConf.PropertyEditors/Makefile
gconf/tools/Makefile
gconf/tools/gconfsharp2-schemagen
gtkhtml/Makefile
gtkhtml/gtkhtml-sharp.dll.config
gtkhtml/gtkhtml-sharp-2.0.pc
rsvg/Makefile
rsvg/rsvg-sharp.dll.config
rsvg/rsvg-sharp-2.0.pc
vte/Makefile
vte/glue/Makefile
vte/vte-sharp.dll.config
vte/vte-sharp-2.0.pc
gtkdotnet/Makefile
gtkdotnet/gtk-dotnet.dll.config
gtkdotnet/gtk-dotnet-2.0.pc
doc/Makefile
sample/GtkDemo/Makefile
sample/Makefile
sample/gconf/Makefile
sample/gnomevfs/Makefile
sample/pixmaps/Makefile
sample/rsvg/Makefile
sample/test/Makefile
sample/valtest/Makefile
sample/valtest/valtest.exe.config
sample/opaquetest/Makefile
sample/opaquetest/opaquetest.exe.config
sample/cairo-sample.exe.config
])

echo "---"
echo "Configuration summary"
echo ""
echo "   * Installation prefix = $prefix"
echo "   * $CS compiler: $CSC $CSFLAGS"
echo ""
echo "   Optional assemblies included in the build:"
echo ""
echo "      * art-sharp.dll: $enable_libart"
echo "      * gnomevfs-sharp.dll: $enable_gnomevfs"
echo "      * gnome-sharp.dll: $enable_gnome"
echo "      * glade-sharp.dll: $enable_glade"
echo "      * rsvg-sharp.dll: $enable_rsvg "
echo "      * gtkhtml-sharp.dll: $enable_gtkhtml "
echo "      * vte-sharp.dll: $enable_vte "
echo "      * gtk-dotnet.dll: $enable_dotnet "
echo ""
echo "      NOTE: if any of the above say 'no' you may install the"
echo "            corresponding development packages for them, rerun"
echo "            autogen.sh to include them in the build."
echo ""
echo "   * Documentation build enabled: $enable_monodoc "
if test "x$enable_monodoc" = "xyes" -a "x$doc_sources_dir" != "x$prefix/lib/monodoc/sources"; then
  echo "      WARNING: The install prefix is different than the monodoc prefix."
  echo "               Monodoc will not be able to load the documentation."
fi
echo "---"