File: configure

package info (click to toggle)
mtpaint 3.31-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,828 kB
  • ctags: 3,380
  • sloc: ansic: 35,565; sh: 738; makefile: 114; perl: 16
file content (738 lines) | stat: -rwxr-xr-x 17,289 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
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
#!/bin/sh
# Mini configure script
# 1-10-2004

echo

MT_V="3.31"
MT_DATE="2009-04-15"

MT_VERSION="mtPaint $MT_V"
MT_LANG=NO
MT_MAN=NO
MT_LANG_DEST=/usr/share/locale
MT_PO_DEST=$MT_LANG_DEST
MT_MAN_DEST=/usr/local/man/man1
MT_PREFIX=/usr
MT_CPICK=mtpaint
MT_FPICK=mtpaint
MT_ANIM=Gifsicle
LIN_BIN_INSTALL=/usr/local/bin
WIN_BIN_INSTALL="/c/Program Files/mtPaint/bin"
BIN_INSTALL=
MAKE_DIRS=src
ICON_SET=icons1

API_CHECKS=
STATIC_PNG=
STATIC_JPEG=
STATIC_JP2=
STATIC_TIFF=
STATIC_GIF=
STATIC_FT=
AS_NEEDED=
IMAGE_LIBDIR=
HAVE_FUNCS=

GTK_FILE=_conf.txt

CFLAG=
MARCH=
OPTS=YES
DEBUG=NO
HELP=1

if [ "$CROSSCC" ]
then
	CC=$CROSSCC
elif [ -z "$CC" ]
then
	CC=gcc
fi
LD=`which \`$CC -print-prog-name=ld\``
CROSSPF=

GCCVER=$($CC -dumpversion | tr -d '.' | cut -c 1-2)

L_EX=
STATIC_LAST=
# Called with lib ID & static mode
LIB_NAME ()
{
	if [ "$IMAGE_LIBDIR" ]
	then
		L_TNM="${IMAGE_LIBDIR}/lib$1"
		if [ "$2" ]
		then
			L_TNM="${L_TNM}.a"
		else
			L_TNM="${L_TNM}.so"
		fi
		if [ -r $L_TNM ]
		then
			L_EX="$L_EX $L_TNM"
			return
		fi
	fi
	if [ "$2" ]
	then
		if [ -z "$STATIC_LAST" ]
		then
			L_EX="$L_EX -Wl,-dn"
		fi
	else
		if [ "$STATIC_LAST" ]
		then
			L_EX="$L_EX -Wl,-dy"
		fi
	fi
	L_EX="$L_EX -l$1"
	STATIC_LAST=$2
}

if [ "$OSTYPE" = "msys" ]
then
	OS="MinGW/MSYS"
	GTK=2
	IS_LIB()
	{
		redir -e /dev/null $LD -$1 -o _conf.tmp -L/lib > /dev/null 2>&1
	}
	HAVE_FUNC()
	{
		echo "main() { $1(); }" > _conf.c
		redir -e /dev/null $CC _conf.c -o _conf.tmp -L/lib > /dev/null 2>&1
	}
elif [ "$CROSSCC" ]
then
	OS="MinGW/GNU/Linux"
	GTK=2
	CROSSPF=`echo $CROSSCC | sed -e 's/[^/]\+\/[^/]*\$//'`
	IS_LIB()
	{
		$LD -$1 -o _conf.tmp -L$CROSSPF/lib > /dev/null 2>&1
	}
	HAVE_FUNC()
	{
		echo "main() { $1(); }" > _conf.c
		$CC _conf.c -o _conf.tmp -L$CROSSPF/lib > /dev/null 2>&1
	}
else
	OS="GNU/Linux"
	if pkg-config gtk+-2.0 --cflags > /dev/null
	then
		GTK=2
	else
		GTK=1
	fi
	CROSSPF="/usr"
	IS_LIB()
	{
		$LD -$1 -o _conf.tmp -L/lib -L/usr/lib -L/usr/X11R6/lib -lX11 -lz -lm > /dev/null 2>&1
	}
	HAVE_FUNC()
	{
		echo "main() { $1(); }" > _conf.c
		$CC _conf.c -o _conf.tmp -L/lib -L/usr/lib -L/usr/X11R6/lib -lX11 -lz -lm > /dev/null 2>&1
	}
fi

if HAVE_FUNC "mkdtemp"
then
	HAVE_FUNCS="$HAVE_FUNCS -DHAVE_MKDTEMP"
fi

if IS_LIB "lgif"
then
	NGIF=GIF
else
	if IS_LIB "lungif"
	then
		NGIF=YES
	else
		NGIF=NO
	fi
fi

if IS_LIB "ljpeg"
then
	NJPEG=YES
else
	NJPEG=NO
fi

if IS_LIB "lopenjpeg"
then
	NJP2=YES
else
	NJP2=NO
fi

if IS_LIB "ltiff"
then
	NTIFF=YES
else
	NTIFF=NO
fi

if IS_LIB "lfreetype"
then
	NFT=YES
else
	NFT=NO
fi

rm _conf.c _conf.tmp

for A in "$@"
do
	case "$A" in
		"flush" )	echo Clearing out directory to original state
				echo
				make clean
				echo
				rm _conf.txt
				rm po/mtpaint.pot
				rm src/graphics/*.xpm src/graphics/*.xbm
				rm -rf slack
				rm -f *.tgz
				exit;;
		"api" )		API_CHECKS=YES;;
		"staticpng" )	STATIC_PNG=PNG;;
		"GIF" )		NGIF=GIF;;
		"gif" )		NGIF=YES;;
		"nogif" )	NGIF=NO;;
		"staticgif" )	STATIC_GIF=GIF;;
		"jpeg" )	NJPEG=YES;;
		"nojpeg" )	NJPEG=NO;;
		"staticjpeg" )	STATIC_JPEG=JPEG;;
		"jp2" )		NJP2=YES;;
		"nojp2" )	NJP2=NO;;
		"staticjp2" )	STATIC_JP2=JPEG2000;;
		"tiff" )	NTIFF=YES;;
		"notiff" )	NTIFF=NO;;
		"statictiff" )	STATIC_TIFF=TIFF;;
		"noft" )	NFT=NO;;
		"staticft" )	STATIC_FT=FreeType;;
		"--libdir="* )	IMAGE_LIBDIR="`echo "$A" | sed -e "s/--libdir=//"`";;
		"slow" )	OPTS=NO;;
		"asneeded" )	AS_NEEDED=-Wl,--as-needed;;
		"debug" )	DEBUG=YES
				OPTS=NO;;
		"gtk1" )	GTK=1;;
		"gtk2" )	GTK=2;;
		"gtkfilesel" )	MT_FPICK=gtkfilesel;;
		"gtkcolsel" )	MT_CPICK=gtkcolsel;;
		"imagick" )	MT_ANIM=ImageMagick;;
		"win" )		OS="MinGW/MSYS"
				GTK=2;;
		"intl" )	MT_LANG=YES;;
		"merge" )	xgettext src/*.c src/*.h --keyword=_ -o po/mtpaint.pot
				cd po
				NEW_DIR=trans_
				mkdir $NEW_DIR`date +%d-%m-%Y-%H-%M-%S`
				ls *.po | while read file
				do
					echo New file = $file-a
					mv $file $file-a
					msgmerge -N $file-a mtpaint.pot > $file-b
					perl xtend.pl $file-b $file
					mv $file-* $NEW_DIR*
				done
				rm mtpaint.pot
				mv $NEW_DIR* ../../old_trans
				exit;;
		"newpo" )	xgettext src/*.c src/*.h --keyword=_ -o po/mtpaint.pot
				exit;;
		"man" )		MT_MAN=YES;;
		"pod" )		MT_POD=YES;;
		"--help" )	HELP=0;;
		"mtk="* )	MTK_DIR="`echo "$A" | sed -e "s/mtk=//"`"
				mkdir $MTK_DIR/mtpaint-$MT_V
				cp -ar $MTK_DIR/locale $MTK_DIR/mtpaint-$MT_V
				MT_LANG_DEST="$MTK_DIR/mtpaint-$MT_V/locale"
				MT_PO_DEST="locale"
				LIN_BIN_INSTALL="$MTK_DIR/mtpaint-$MT_V"
				WIN_BIN_INSTALL=$LIN_BIN_INSTALL
				MTK_XFT=YES
				;;
		"noxft" )	MTK_XFT=NO
				;;
		"--bindir="* )	LIN_BIN_INSTALL="`echo "$A" | sed -e "s/--bindir=//"`"
				WIN_BIN_INSTALL=$LIN_BIN_INSTALL;;
		"--locale="* )	MT_LANG_DEST="`echo "$A" | sed -e "s/--locale=//"`"
				MT_PO_DEST=$MT_LANG_DEST;;
		"--mandir="* )	MT_MAN_DEST="`echo "$A" | sed -e "s/--mandir=//"`";;
		"cflags" )	CFLAG=${CFLAGS};;
		"--cpu="* )	MARCH='-march='"`echo "$A" | sed -e "s/--cpu=//"`";;
		"icons"* )	ICON_SET=$A;;
		"386" )		MARCH='-march=i386';;
		"486" )		MARCH='-march=i486';;
		"586" )		MARCH='-march=i586';;
		"686" )		MARCH='-march=i686';;
		"release" )	CFLAG='-O2 -march=i386'
				if [ "$GCCVER" \< "40" ]
				then
					CFLAG="$CFLAG -fweb"
				else
					CFLAG="$CFLAG -fweb -fomit-frame-pointer -fmodulo-sched"
				fi
				AS_NEEDED=-Wl,--as-needed
				HAVE_FUNCS="$HAVE_FUNCS -DGTK_NO_CHECK_CASTS -DG_DISABLE_CAST_CHECKS";;
		"--prefix="* )	MT_PREFIX="`echo "$A" | sed -e "s/--prefix=//"`"
				WIN_BIN_INSTALL="$MT_PREFIX/bin"
				LIN_BIN_INSTALL="$MT_PREFIX/bin"
				MT_LANG_DEST="$MT_PREFIX/share/locale"
				MT_PO_DEST=$MT_LANG_DEST
				MT_MAN_DEST="$MT_PREFIX/man/man1";;
		"--po="* )	MT_PO_DEST="`echo "$A" | sed -e "s/--po=//"`";;
		"build" )	./configure flush
				I_DIR=/home/wj/sf
				cd ..
				zip -r $I_DIR/mtpaint-$MT_V.zip mtpaint-$MT_V*/
				tar cjvf $I_DIR/mtpaint-$MT_V.tar.bz2 mtpaint-$MT_V*/
				cd mtpaint-$MT_V*

				./configure --mandir=/usr/man/man1 intl pod man release staticgif nojp2 --libdir=$I_DIR/libpng0
				make
				mkdir -p slack/install/
				mkdir -p slack/usr/doc/mtpaint/
				cp -r ../docs-mtpaint3/mtpaint_*/docs/* slack/usr/doc/mtpaint/
				make install DESTDIR=`pwd`/slack
				cp doc/slack-desc slack/install/
				cd slack
				GTK_V=gtk2
				makepkg --chown n $I_DIR/mtpaint-$MT_V$GTK_V-i386-1.tgz
				cd ..
				./configure flush

				./configure --mandir=/usr/man/man1 intl man gtk1 release staticgif nojp2 --libdir=$I_DIR/libpng0
				make
				mkdir -p slack/install/
				mkdir -p slack/usr/doc/mtpaint/
				cp -r ../docs-mtpaint3/mtpaint_*/docs/* slack/usr/doc/mtpaint/
				make install DESTDIR=`pwd`/slack
				cp doc/slack-desc slack/install/
				cd slack
				GTK_V=gtk1
				makepkg --chown y $I_DIR/mtpaint-$MT_V$GTK_V-i386-1.tgz
				cd ..
				./configure flush

				./configure --prefix=/usr intl man release GIF staticgif nojp2 --libdir=$I_DIR/ubuntulibs
				make
				mkdir -p slack/install/
				mkdir -p slack/usr/share/doc/mtpaint/
				cp -r ../docs-mtpaint3/mtpaint_*/docs/* slack/usr/share/doc/mtpaint/
				make install DESTDIR=`pwd`/slack
				cp doc/slack-desc slack/install/
				cd slack
				makepkg --chown y $I_DIR/mtpaint-$MT_V.tgz
				cd ..
				./configure flush

				cp doc/alien-desc "$I_DIR"
				cd "$I_DIR"
				export EMAIL="mtpaint-user@lists.sourceforge.net"
				alien -d --version=$MT_V --description="`cat alien-desc`" mtpaint-$MT_V.tgz
				rename -2_all _i386 *.deb
				chown wj:users *
				exit;;
	esac
done


if [ "$HELP" = 0 ]
then

cat << EOF
Usage: ./configure [OPTION] ...

Options:

win ............. Configure for Windows MinGW / MSYS
gtk1 ............ Configure for GTK+1
gtk2 ............ Configure for GTK+2
gtkfilesel ...... Use GtkFileSelection file picker
gtkcolsel ....... Use GtkColorSelection colour picker
imagick ......... Use ImageMagick for GIF animation tasks
mtk=DIR ......... Configure for MTK at the given location, e.g. /home/mark/mtk-1.0
noxft ........... Don't use Xft in MTK

cflags .......... Use CFLAGS environment variable
--cpu= .......... Target a specific CPU, e.g. athlon-xp, x86-64
686 ............. Target 686 machines
586 ............. Target 586 machines
486 ............. Target 486 machines
386 ............. Target 386 machines
slow ............ Don't use compiler optimizations
asneeded ........ Use linker optimization --as-needed
release ......... Use the set of optimizations which work best for mtPaint code

staticpng ....... Statically link PNG library
GIF ............. Use libgif
gif ............. Use libungif
nogif ........... Don't use libgif and libungif
staticgif ....... Statically link GIF library
jpeg ............ Use libjpeg
nojpeg .......... Don't use libjpeg
staticjpeg ...... Statically link JPEG library
jp2 ............. Use libopenjpeg
nojp2 ........... Don't use libopenjpeg
staticjp2 ....... Statically link JPEG 2000 library
tiff ............ Use libtiff
notiff .......... Don't use libtiff
statictiff ...... Statically link TIFF library
noft ............ Don't use FreeType
staticft ........ Statically link FreeType library
--libdir=DIR .... DIR = location of image library files to use for cross-compilation

flush ........... Flush directories to initial state
debug ........... Include debugging info in binary
api ............. Use extra sanity checks required for libmtpaint
--bindir=DIR .... DIR = location of bin file to install, /usr/local/bin by default

intl ............ Use internationalized po files
newpo ........... Create ./po/mtpaint.pot
merge ........... Update all po files with new strings - developers only
--locale=DIR .... DIR = location of locale files to install, /usr/share/locale by default

man ............. Install the mtPaint man page
pod ............. Compile new man page - see ./doc/README for details
--mandir=DIR .... DIR = location of man page to install, /usr/local/man/man1 by default

--prefix=DIR .... DIR = prefix location of all installs, e.g. /usr or /usr/local

icons ........... Compile with alternative icon set - see ./src/icons1/README for details

Default settings: GNU/Linux system, O2 optimizations, English only version,
mtpaint file picker, mtpaint colour picker.
pkg-config gtk+-2.0 is checked to determine GTK+2 availability in GNU/Linux
EOF
else
	cp src/$ICON_SET/*.xpm src/$ICON_SET/*.xbm src/graphics

	if [ "$GCCVER" \< "40" ]
	then
		echo CC = $CC -Wall > $GTK_FILE
	else # Tell gcc 4.x to shut up
		echo CC = $CC -Wall -Wno-pointer-sign > $GTK_FILE
	fi
	echo "MT_VERSION=$MT_VERSION" >> $GTK_FILE
	echo "MT_DATE=$MT_DATE" >> $GTK_FILE
	echo "MT_PREFIX=\"$MT_PREFIX\"" >> $GTK_FILE

	if [ "$MTK_DIR" ]
	then
		BIN_INSTALL=$LIN_BIN_INSTALL
		GTK_INCLUDE="-I$MTK_DIR/include -I$MTK_DIR/include/glib -I/usr/include/X11 -DU_MTK"
		GTK_LIB="$MTK_DIR/lib/libgtk.a $MTK_DIR/lib/libgdk.a $MTK_DIR/lib/libgmodule.a $MTK_DIR/lib/libglib.a"

		echo "MTK_LIB = $GTK_LIB" >> $GTK_FILE

		GTK_LIB="-L/usr/lib -L/usr/X11R6/lib $GTK_LIB -ldl -lXi -lXext -lX11 -lm"

		if [ "$MTK_XFT" = "YES" ]
		then
			GTK_LIB="$GTK_LIB -lXft"
		fi
	else
	if [ "$OS" = "GNU/Linux" ]
	then
		BIN_INSTALL=$LIN_BIN_INSTALL
		if [ "$GTK" = "1" ]
		then
			if gtk-config --cflags > /dev/null
			then
				GTK_INCLUDE=`gtk-config --cflags`
				GTK_LIB=`gtk-config --libs`
			else
				echo
				echo I have not been able to find gtk-config so I am assuming the following:
				echo
				GTK_INCLUDE="-I/opt/gnome/include/gtk-1.2 -I/opt/gnome/include/glib-1.2 -I/opt/gnome/lib/glib/include -I/usr/X11R6/include"
				GTK_LIB="-L/usr/lib -L/usr/X11R6/lib -L/opt/gnome/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXext -lX11 -lm"
				echo GTK_INCLUDE = $GTK_INCLUDE
				echo GTK_LIB = $GTK_LIB
				echo
				echo If these values are not right for your system, edit the configure script
				echo
			fi
		else
			GTK_INCLUDE=`pkg-config gtk+-2.0 --cflags`
			GTK_LIB=`pkg-config gtk+-2.0 --libs`
		fi
	else
		BIN_INSTALL=$WIN_BIN_INSTALL
		MT_LANG_DEST=locale
		MT_PO_DEST=locale
		if [ "$GTK" = "1" ]
		then
			GTK_INCLUDE="-I/include -I/include/glib-2.0 -I/lib/gtk+/include -I/lib/glib-2.0/include -mms-bitfields"
			GTK_LIB="-L/lib -lgtk -lgdk -lglib-2.0 -lm -mwindows"
		else
			GTK_INCLUDE="-I$CROSSPF/include/gtk-2.0 -I$CROSSPF/lib/gtk-2.0/include -I$CROSSPF/include/atk-1.0 -I$CROSSPF/include/pango-1.0 -I$CROSSPF/include/freetype2 -I$CROSSPF/include/glib-2.0 -I$CROSSPF/lib/glib-2.0/include -I$CROSSPF/include -mms-bitfields"
			GTK_LIB="-L$CROSSPF/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -lpango-1.0 -lglib-2.0 -lgobject-2.0 -lgdk_pixbuf-2.0 -lm -mwindows"
		fi
	fi
	fi	# MTK

	if [ "$IMAGE_LIBDIR" ]
	then
		AS_NEEDED="-Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
	fi

	L_EX=$AS_NEEDED
	I_EX=$HAVE_FUNCS
	if [ "$NGIF" != "NO" ]
	then
		if [ "$NGIF" = "GIF" ]
		then
			LIB_NAME gif "$STATIC_GIF"
		else
			LIB_NAME ungif "$STATIC_GIF"
		fi
		I_EX="$I_EX -DU_GIF"
	fi
	if [ "$NJPEG" = "YES" ]
	then
		LIB_NAME jpeg "$STATIC_JPEG"
		I_EX="$I_EX -DU_JPEG"
	fi
	if [ "$NJP2" = "YES" ]
	then
		LIB_NAME openjpeg "$STATIC_JP2"
		I_EX="$I_EX -I$CROSSPF/include/openjpeg -DU_JP2"
		if [ "$STATIC_JP2" ] || [ "$OS" != "GNU/Linux" ]
		then
			I_EX="$I_EX -DOPJ_STATIC"
		fi
	fi
	if [ "$NTIFF" = "YES" ]
	then
		LIB_NAME tiff "$STATIC_TIFF"
		I_EX="$I_EX -DU_TIFF"
	fi
	LIB_NAME png "$STATIC_PNG"
	LIB_NAME z "$STATIC_PNG"
	LIB_NAME freetype "$STATIC_FT"
	if [ "$STATIC_LAST" ] && [ -z "$IMAGE_LIBDIR" ]
	then
		L_EX="$L_EX -Wl,-dy"
	fi

	if [ "$API_CHECKS" ]
	then
		I_EX="$I_EX -DU_API"
	fi

	if [ "$MT_FPICK" = mtpaint ]
	then
		I_EX="$I_EX -DU_FPICK_MTPAINT"
	fi
	if [ "$MT_FPICK" = gtkfilesel ]
	then
		I_EX="$I_EX -DU_FPICK_GTKFILESEL"
	fi

	if [ "$MT_CPICK" = mtpaint ]
	then
		I_EX="$I_EX -DU_CPICK_MTPAINT"
	fi
	if [ "$MT_CPICK" = gtkcolsel ]
	then
		I_EX="$I_EX -DU_CPICK_GTK"
	fi

	if [ "$MT_ANIM" = ImageMagick ]
	then
		I_EX="$I_EX -DU_ANIM_IMAGICK"
	fi


	if [ "$DEBUG" = NO ]
	then
		GTK_LIB="$GTK_LIB -s"
	else
		I_EX="$I_EX -ggdb"
	fi

	if [ "$MT_CUSTOM" ]
	then
		I_EX="$I_EX -DU_$MT_CUSTOM"
	fi

	if [ "$NFT" = YES ]
	then
		if [ "$OS" = "GNU/Linux" ]
		then
			I_EX="$I_EX -DU_FREETYPE `freetype-config --cflags`"
			L_EX="$L_EX `freetype-config --libs`"
		else
			I_EX="$I_EX -DU_FREETYPE"
			L_EX="$L_EX -lfreetype -liconv"
		fi
	fi

	if [ "$MT_LANG" = YES ]
	then
		I_EX="$I_EX -DU_NLS -DMT_LANG_DEST=\"\\\"$MT_PO_DEST\"\\\""
		MAKE_DIRS="$MAKE_DIRS po"

		if [ "$OS" = "GNU/Linux" ]
		then
			echo "MT_LANG_DEST=\"$MT_LANG_DEST\"" >> $GTK_FILE
		else
			L_EX="$L_EX -lintl"
			echo "MT_LANG_DEST=\"$BIN_INSTALL/$MT_LANG_DEST\"" >> $GTK_FILE
		fi
	fi
	if [ "$MT_MAN" = YES ]
	then
		MAKE_DIRS="$MAKE_DIRS doc"
		echo "MT_MAN_DEST=\"$MT_MAN_DEST\"" >> $GTK_FILE
	fi

	I_EX="$I_EX -DVERSION=\"\\\"$MT_VERSION\"\\\""
	GTK_INCLUDE="$GTK_INCLUDE $I_EX"
	echo "LDFLAG = $L_EX $GTK_LIB" >> $GTK_FILE

	if [ "$CFLAG" ]
	then
		echo "CFLAG = $CFLAG $GTK_INCLUDE" >> $GTK_FILE
	else
		if [ "$OPTS" = "YES" ]
		then
			echo "CFLAG = -O2 $MARCH $GTK_INCLUDE" >> $GTK_FILE
		else
			echo "CFLAG = $MARCH $GTK_INCLUDE" >> $GTK_FILE
		fi
	fi

	echo "subdirs = $MAKE_DIRS" >> $GTK_FILE
	echo "BIN_INSTALL=\"$BIN_INSTALL\"" >> $GTK_FILE


	if [ "$MT_POD" = "YES" ]
	then
		cd doc
		make pod
		cd ..
	fi

	echo
	echo ---------------------
	echo mtPaint Configuration
	echo ---------------------
	echo
	echo "-------"
	echo "General"
	echo "-------"
	echo
	echo "    Version             $MT_V"
	echo "    System              $OS"
	echo -n "    Toolkit             "
if [ "$MTK_DIR" ]
then
	echo "MTK - $MTK_DIR"
	echo "    Use Xft             $MTK_XFT"
else
	echo "GTK+$GTK"
fi
	echo "    File Picker         $MT_FPICK"
	echo "    Colour Picker       $MT_CPICK"
	echo "    Animation Package   $MT_ANIM"
if [ "$API_CHECKS" ]
then
	echo "    API checks          $API_CHECKS"
fi
	echo "    Use FreeType        $NFT"
if [ "$MT_CUSTOM" ]
then
	echo "    Customized for      $MT_CUSTOM"
fi
	echo "    Icon set            $ICON_SET"
	echo "    Internationalized   $MT_LANG"


	echo
	echo "--------"
	echo "Compiler"
	echo "--------"
	echo
if [ "$CFLAG" ]
then
	echo "    CFLAGS              $CFLAG"
else
if [ "$MARCH" ]
then
	echo "    MARCH target        $MARCH"
fi
	echo "    Optimizations       $OPTS $AS_NEEDED"
fi
	echo "    Debug info          $DEBUG"
if [ "$STATIC_PNG" ] || [ "$STATIC_GIF" ] || [ "$STATIC_JPEG" ] || [ "$STATIC_JP2" ] || [ "$STATIC_TIFF" ]
then
	echo -n "    Static libraries    "
	if [ "$STATIC_PNG" ]
	then
		echo -n "$STATIC_PNG "
	fi
	if [ "$STATIC_GIF" ]
	then
		echo -n "$STATIC_GIF "
	fi
	if [ "$STATIC_JPEG" ]
	then
		echo -n "$STATIC_JPEG "
	fi
	if [ "$STATIC_JP2" ]
	then
		echo -n "$STATIC_JP2 "
	fi
	if [ "$STATIC_TIFF" ]
	then
		echo -n "$STATIC_TIFF "
	fi
	if [ "$STATIC_FT" ]
	then
		echo -n "$STATIC_FT "
	fi
	echo
fi


	echo
	echo "----------"
	echo "File Types"
	echo "----------"
	echo
	echo "    Use GIF             $NGIF"
	echo "    Use JPEG            $NJPEG"
	echo "    Use JPEG 2000       $NJP2"
	echo "    Use TIFF            $NTIFF"



	echo
	echo "------------"
	echo "Installation"
	echo "------------"
	echo
	echo "    Binary install      $BIN_INSTALL"
if [ "$MT_LANG" = YES ]
then
	echo "    Locale install      $MT_LANG_DEST"
	echo "    Locale program      $MT_PO_DEST"
fi
	echo "    Install man page    $MT_MAN"
if [ "$MT_MAN" = YES ]
then
	echo "    Man page install    $MT_MAN_DEST"
fi
	echo


fi

echo