File: configure.in

package info (click to toggle)
gnome-sharp2 2.20.1-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,524 kB
  • ctags: 1,144
  • sloc: sh: 9,068; cs: 5,409; makefile: 526; ansic: 239; xml: 112; perl: 32
file content (251 lines) | stat: -rw-r--r-- 7,022 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

AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gnome-sharp, 2.20.1)
AM_MAINTAINER_MODE

API_VERSION=2.20.0.0
AC_SUBST(API_VERSION)
POLICY_VERSIONS="2.4 2.6 2.8 2.16"
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 -define:GNOME_SHARP_2_16 -define:GNOME_SHARP_2_20'
CSFLAGS="$DEBUG_FLAGS $CSDEFINES"
AC_SUBST(CSFLAGS)

GTK_SHARP_VERSION_CFLAGS='-DGTK_SHARP_2_6 -DGTK_SHARP_2_8 -DGNOME_SHARP_2_16 -DGNOME_SHARP_2_20'
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
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.12.0
GTK_SHARP_REQUIRED_VERSION=2.12.1

PKG_CHECK_MODULES(GTKSHARP, gtk-sharp-2.0 >= $GTK_SHARP_REQUIRED_VERSION)
AC_SUBST(GTKSHARP_CFLAGS)
AC_SUBST(GTKSHARP_LIBS)

PKG_CHECK_MODULES(GLADESHARP, glade-sharp-2.0 >= $GTK_SHARP_REQUIRED_VERSION)
AC_SUBST(GLADESHARP_CFLAGS)
AC_SUBST(GLADESHARP_LIBS)

PKG_CHECK_MODULES(GAPI, gapi-2.0 >= $GTK_SHARP_REQUIRED_VERSION)
AC_PATH_PROG(GAPI_PARSER, gapi2-parser, no)
AC_SUBST(GAPI_PARSER)
AC_PATH_PROG(GAPI_CODEGEN, gapi2-codegen, no)
AC_SUBST(GAPI_CODEGEN)
AC_PATH_PROG(GAPI_FIXUP, gapi2-fixup, no)
AC_SUBST(GAPI_FIXUP)

## Versions of dependencies
GNOME_REQUIRED_VERSION=2.20.0
ART_REQUIRED_VERSION=2.3.19

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)

GNOMECANVAS_REQUIRED_VERSION=2.20.0
GNOMEPANEL_REQUIRED_VERSION=2.20.0
GNOMEPRINT_REQUIRED_VERSION=2.18.0

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

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_MONOGETOPTIONS, test "x$has_mono" = "xtrue")

AC_SUBST(CFLAGS)

AC_OUTPUT([
AssemblyInfo.cs
Makefile
policy.config
sources/Makefile
art/Makefile
art/art-sharp.dll.config
art/art-sharp-2.0.pc
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/GConf.PropertyEditors/gconf-sharp-peditors-2.0.pc
gconf/tools/Makefile
gconf/tools/gconfsharp2-schemagen
sample/Makefile
sample/gconf/Makefile
sample/gnomevfs/Makefile
])

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 ""
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 "            gnome-sharp.dll requires libgnomecanvas, libgnome,"
echo "            libgnomeui, libgnomeprint, libgnomeprintui, and"
echo "            libpanelapplet."
echo "---"