-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconfigure.ac
376 lines (323 loc) · 9.2 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
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
371
372
373
374
375
376
dnl Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_SRCDIR([README.md])
AM_INIT_AUTOMAKE(gimp-sharp, 0.19)
LT_INIT
AC_CONFIG_HEADERS([config.h])
dnl find and test the C compiler
AC_PROG_INSTALL
AC_PROG_MAKE_SET
VERSION="0.19"
AC_SUBST(VERSION)
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
AC_MSG_ERROR(['pkg-config' is not in your PATH.])
fi
AC_PATH_PROG(MONO, mono, no)
if test "$MONO" = "no"; then
AC_MSG_ERROR(['mono' is not in your PATH.])
fi
AC_SUBST(MONO)
PKG_CHECK_MODULES(MONO, mono >= 2.8)
AC_SUBST(MONO_CFLAGS)
AC_SUBST(MONO_LIBS)
PKG_CHECK_MODULES(MONO_DEPENDENCY, mono, has_mono=true, has_mono=false)
if test "x$has_mono" = "xtrue"; then
AC_PATH_PROG(RUNTIME, mono, no)
AC_PATH_PROG(CSC, csc, no)
CSC_FLAGS=-langversion:7.2
AC_SUBST(CSC_FLAGS)
LIB_PREFIX=.so
LIB_SUFFIX=
else
AC_PATH_PROG(CSC, gcsc.exe, no)
fi
if test x$CSC = "xno"; then
AC_MSG_ERROR([You need to install either mono or .Net])
fi
AC_PATH_PROG(GIMPTOOL, gimptool-2.0, no)
if test "x$GIMPTOOL" = "xno"; then
AC_MSG_ERROR([You don't have gimptool-2.0. Please install the GIMP development package!])
fi
AC_SUBST(GIMPTOOL)
if test "x$OS" != "xWindows_NT"; then
dnl set GIMP plug-in path
dnl GIMPPLUGINDIR=/usr/local/lib/gimp/2.0/plug-ins
GIMPPLUGINDIR=`gimptool-2.0 -n --install-admin-bin README | head -1 | sed "s/\(.* \)\\(.*\\)/\2/g"`
AC_SUBST(GIMPPLUGINDIR)
GIMPLOCALE="`gimptool-2.0 --prefix`/share/locale"
AC_SUBST(GIMPLOCALE)
fi
AC_SUBST(CSC)
#
# Check if we want to build unit test plug-in.
#
unittest=no
AC_ARG_WITH(unittest,[ --with-unittest build unittest plug-in (default-no)])
if test "x$with_unittest" == xyes; then
unittest=yes
fi
#
# Check if we want to build the webserver plug-in.
#
webserver=no
AC_ARG_WITH(webserver,[ --with-webserver build embedded webserver plug-in (default-no)])
if test "x$with_webserver" == xyes; then
webserver=yes
fi
#
# Check if we want to build the Paint.NET plug-in.
#
pdn=no
AC_ARG_WITH(pdn,[ --with-pdn build Paint.NET plug-in (default-no)])
if test "x$with_pdn" == xyes; then
pdn=yes
fi
#
# Check if we want to build ECW plug-in.
#
have_libecw=no
AC_ARG_WITH(libecw, [ --without-ecw do not build the ECW plug-in])
if test x$with_ecw != xno && test -z "$LIBECW"; then
have_libecw=yes
AC_CHECK_LIB(NCSEcw, NCSecwInit,
[AC_CHECK_HEADER(NCSEcw.h,
ECW='ecw$(EXEEXT)'; LIBECW='-lNCSEcw',
[have_libecw="no (ECW header file not found)"])],
[have_libecw="no (ECW library not found)"], -lNCSUtil -lNCSCnet)
fi
AC_SUBST(ECW)
AC_SUBST(LIBECW)
#
# Check if we can build the Colorize plug-in
#
have_umfpack=yes
if test -z "$LIBUMFPACK"; then
AC_CHECK_LIB(umfpack, umfpack_di_solve,
[AC_CHECK_HEADER(umfpack.h,
LIBUMFPACK='-lumfpack',
[have_umfpack="no"])],
[have_umfpack="no"], -lblas -lamd -lm)
fi
AC_SUBST(LIBUMFPACK)
AC_SUBST(LIBZ)
AC_SUBST(PSP)
#
# Check if we want to build incomplete plug-ins
#
incomplete=no
AC_ARG_WITH(incomplete,[ --with-incomplete build incomplete plug-ins (default-no)])
if test "x$with_incomplete" == xyes; then
incomplete=yes
fi
#
# Check if we want to support Java language for plug-ins.
#
java=no
AC_ARG_WITH(java,[ --with-java support for the Java language (default-no)])
if test "x$with_java" == xyes; then
java=yes
fi
#
# Check if we want to support Boo
#
boo=no
AC_ARG_WITH(boo,[ --with-boo support for Boo (default-no)])
if test "x$with_boo" == xyes; then
boo=yes
AC_PATH_PROG(BOOC, booc, no)
if test "$BOOC" = "no"; then
AC_MSG_ERROR(['booc' (Boo) is not in your PATH.])
fi
AC_SUBST(BOOC)
fi
#
# Check if we want to support F#
#
fsharp=no
AC_ARG_WITH(fsharp,[ --with-fsharp support for F\# (default-no)])
if test "x$with_fsharp" == xyes; then
fsharp=yes
AC_PATH_PROG(FSC, fsc, no)
if test "$FSC" = "no"; then
AC_MSG_ERROR(['fsc' (FSharp) is not in your PATH.])
fi
AC_SUBST(FSC)
fi
#
# Check if we want to support IronPython
#
iron_python=no
AC_ARG_WITH(python,[ --with-ironpython support for IronPython (default-no)])
if test "x$with_ironpython" == xyes; then
iron_python=yes
AC_PATH_PROG(IPY, ipy, no)
if test "$IPY" = "no"; then
AC_MSG_ERROR(['ipy' (IronPython) is not in your PATH.])
fi
AC_SUBST(IPY)
fi
#
# Check if we want to support IronRuby
#
iron_ruby=no
AC_ARG_WITH(ironruby,[ --with-ironruby support for IronRuby (default-no)])
if test "x$with_ironruby" == xyes; then
iron_ruby=yes
AC_PATH_PROG(IR, ir.cmd, no)
if test "$IR" = "no"; then
AC_MSG_ERROR(['ir' (IronRuby) is not in your PATH.])
fi
AC_SUBST(IR)
fi
#
# Check if we want to support Nemerle
#
nemerle=no
AC_ARG_WITH(nemerle,[ --with-nemerle support for Nemerle (default-no)])
if test "x$with_nemerle" == xyes; then
nemerle=yes
AC_PATH_PROG(NCC, ncc, no)
if test "$NCC" = "no"; then
AC_MSG_ERROR(['ncc' (Nemerle) is not in your PATH.])
fi
AC_SUBST(NCC)
fi
#
# Check if we want to support Oxygene
#
oxygene=no
AC_ARG_WITH(oxygene,[ --with-oxygene support for Oxygene (default-no)])
if test "x$with_oxygene" == xyes; then
oxygene=yes
AC_PATH_PROG(Oxygene, Oxygene.exe, no)
if test "$Oxygene" = "no"; then
AC_MSG_ERROR(['Oxygene.exe' (Oxygene) is not in your PATH.])
fi
AC_SUBST(Oxygene)
fi
#
# Check if we want to support Scala
#
scala=no
AC_ARG_WITH(scala,[ --with-scala support for Scala (default-no)])
if test "x$with_scala" == xyes; then
scala=yes
AC_PATH_PROG(SCALA, scalac-net, no)
if test "$Scala" = "no"; then
AC_MSG_ERROR(['scalac-net' (Scala) is not in your PATH.])
fi
AC_SUBST(SCALA)
fi
#
# Check if we want to support Visual Basic
#
visual_basic=no
AC_ARG_WITH(vb,[ --with-vb support for Visual Basic (default-no)])
if test "x$with_vb" == xyes; then
visual_basic=yes
AC_PATH_PROG(VBNC, vbnc, no)
if test "$VBNC" = "no"; then
AC_MSG_ERROR(['vbnc' (Visual Basic) is not in your PATH.])
fi
AC_SUBST(VBNC)
fi
AM_CONDITIONAL(BUILD_BOO, test x$boo = xyes)
AM_CONDITIONAL(BUILD_COLORIZE, test x$have_umfpack = xyes)
AM_CONDITIONAL(BUILD_FSHARP, test x$fsharp = xyes)
AM_CONDITIONAL(BUILD_UNITTEST, test x$unittest = xyes)
AM_CONDITIONAL(BUILD_WEBSERVER, test x$webserver = xyes)
AM_CONDITIONAL(BUILD_PDN, test x$pdn = xyes)
AM_CONDITIONAL(BUILD_INCOMPLETE, test x$incomplete = xyes)
AM_CONDITIONAL(BUILD_ECW, test x"$have_libecw" = xyes)
AM_CONDITIONAL(BUILD_JAVA, test x$java = xyes)
AM_CONDITIONAL(BUILD_IRONPYTHON, test x$iron_python = xyes)
AM_CONDITIONAL(BUILD_IRONRUBY, test x$iron_ruby = xyes)
AM_CONDITIONAL(BUILD_NEMERLE, test x$nemerle = xyes)
AM_CONDITIONAL(BUILD_OXYGENE, test x$oxygene = xyes)
AM_CONDITIONAL(BUILD_SCALA, test x$scala = xyes)
AM_CONDITIONAL(BUILD_VISUALBASIC, test x$visual_basic = xyes)
dnl read Makefile.in and write Makefile
AC_CONFIG_FILES([
Makefile lib/Makefile
java/Makefile
java/stubs/Makefile
plug-ins/Makefile
plug-ins/AverageBlur/Makefile
plug-ins/AverageBlur/po/Makefile
plug-ins/BooSample/Makefile
plug-ins/Colorize/Makefile
plug-ins/Colorize/po/Makefile
plug-ins/CountTool/Makefile
plug-ins/DifferenceClouds/Makefile
plug-ins/DifferenceClouds/po/Makefile
plug-ins/ecw/Makefile
plug-ins/Forge/Makefile
plug-ins/Forge/po/Makefile
plug-ins/Fragment/Makefile
plug-ins/Fragment/po/Makefile
plug-ins/FSharpSample/Makefile
plug-ins/GemImg/Makefile
plug-ins/JavaFX/Makefile
plug-ins/KoalaPaint/Makefile
plug-ins/KoalaPaint/po/Makefile
plug-ins/ncp/Makefile
plug-ins/ncp/po/Makefile
plug-ins/Mezzotint/Makefile
plug-ins/Mezzotint/po/Makefile
plug-ins/Ministeck/Makefile
plug-ins/Ministeck/po/Makefile
plug-ins/NemerleSample/Makefile
plug-ins/neo/Makefile
plug-ins/neo/po/Makefile
plug-ins/OxygeneSample/Makefile
plug-ins/Pdn/Makefile
plug-ins/PhotoshopActions/Makefile
plug-ins/PictureFrame/Makefile
plug-ins/PicturePackage/Makefile
plug-ins/PicturePackage/po/Makefile
plug-ins/Pointillize/Makefile
plug-ins/Pointillize/po/Makefile
plug-ins/PythonSample/Makefile
plug-ins/QR/Makefile
plug-ins/Raindrops/Makefile
plug-ins/Raindrops/po/Makefile
plug-ins/ScalaSample/Makefile
plug-ins/ShapeCollage/Makefile
plug-ins/Shatter/Makefile
plug-ins/Sky/Makefile
plug-ins/SliceTool/Makefile
plug-ins/SliceTool/po/Makefile
plug-ins/Splitter/Makefile
plug-ins/Splitter/po/Makefile
plug-ins/Swirlies/Makefile
plug-ins/Swirlies/po/Makefile
plug-ins/Trim/Makefile
plug-ins/UnitTest/Makefile
plug-ins/UpdateCheck/Makefile
plug-ins/UpdateCheck/po/Makefile
plug-ins/VisualBasicSample/Makefile
plug-ins/wbmp/Makefile
plug-ins/wbmp/po/Makefile
plug-ins/WebServer/Makefile
])
AC_OUTPUT
dnl Print a summary of features enabled/disabled:
AC_MSG_RESULT([
Building GIMP-SHARP with prefix=$prefix
GIMP-SHARP Features:
Unit Tests : $unittest
Embedded Webserver : $webserver
Paint.NET : $pdn
Incomplete : $incomplete
ECW : $have_libecw
Boo support : $boo
FSharp support : $fsharp
IronPython support : $iron_python
IronRuby support : $iron_ruby
Java support : $java
Nemerle support : $nemerle
Oxygene support : $oxygene
Scala support : $scala
Visual Basic support: $visual_basic
]);