File: configure.ac

package info (click to toggle)
synfig 0.62.00-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 11,728 kB
  • ctags: 6,387
  • sloc: cpp: 52,666; sh: 10,829; ansic: 4,124; makefile: 1,357; csh: 243; sed: 16
file content (728 lines) | stat: -rw-r--r-- 18,270 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
# $Id$

# -- I N I T --------------------------------------------------

AC_INIT([Synfig Core],[0.62.00],[http://synfig.org/Bugs],[synfig])
AC_REVISION

AC_CONFIG_AUX_DIR(config)
AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_HOST
dnl AC_CANONICAL_TARGET

AM_INIT_AUTOMAKE([nostdinc])
AM_MAINTAINER_MODE

LT_INIT([dlopen])
LTDL_INIT

API_VERSION=0.0


AC_DEFINE(LT_SCOPE,[extern],[LibLTDL is linked staticly])




# -- V A R I A B L E S ----------------------------------------

SVN_REPOSITORY=https://synfig.svn.sourceforge.net/svnroot/synfig/synfig-core
AC_SUBST(SVN_REPOSITORY)


# -- P R O G R A M S ------------------------------------------

AC_PROG_CC
AC_GNU_SOURCE
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_CXXCPP
AC_PROG_INSTALL

AC_LANG([C++])

AC_C_BIGENDIAN


# -- A R G U M E N T S ----------------------------------------


AC_ARG_DEBUG
AC_ARG_OPTIMIZATION
AC_ARG_WARNINGS
AC_ARG_PROFILING
AC_ARG_PROFILE_ARCS
AC_ARG_BRANCH_PROBABILITIES

AC_ARG_ENABLE(g5opt,[
  --enable-g5opt           enable optimizations specific to G5 proc],[
#	CXXFLAGS="$CXXFLAGS -fastf -fPIC"
#	CFLAGS="$CFLAGS -fastf -fPIC"
	CXXFLAGS="$CXXFLAGS -mtune=G5 -falign-loops=32"
	CFLAGS="$CFLAGS -mtune=G5"
],
[
	true
])

#MINGW_FLAGS="-mno-cygwin"

AC_WIN32_QUIRKS

# If we are in debug mode, use the debugging version of the
# Microsoft Visual C Runtime Library
#if [[ $debug = "yes" ]] ; then {
#	WIN32_DEBUG_LIBRARY="msvcr70d"
#	WIN32_DEBUG_LIBRARY="msvcrtd"
#	LIBTOOL_PATCH_SED="$LIBTOOL_PATCH_SED
#		s/-lmsvcrt/-l$WIN32_DEBUG_LIBRARY/g;
#	";
#} ; fi

AC_LIBTOOL_WIN32_DLL
AC_LIBTOOL_DLOPEN
AC_DISABLE_STATIC
AC_ENABLE_SHARED
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
AC_LIBTOOL_PATCH

#if [[ "$LIBTOOL_PATCH_SED""x" != "x" ]] ; then {
#	printf "Patching libtool... "
#	cat libtool | sed "$LIBTOOL_PATCH_SED" > libtool2
#	rm libtool
#	mv libtool2 libtool
#	chmod +x libtool
#	AC_MSG_RESULT([patched])
#} fi ;


dnl
dnl dynamic linker
dnl
AC_CHECK_LIB(c, dlopen,
	DYNAMIC_LD_LIBS="",
	AC_CHECK_LIB(
		dl,
		dlopen,
        DYNAMIC_LD_LIBS="-ldl",
	    DYNAMIC_LD_LIBS=""
	)
)

AC_SUBST(DYNAMIC_LD_LIBS)

AC_ARG_ENABLE(half,[
  --enable-half           Use OpenEXR's "half" type for color],[
	use_openexr_half=$enableval
],
[
	use_openexr_half="no"
])



AC_ARG_ENABLE(layer-profiling,[
  --enable-layer-profiling       Enable layer profiling],[
	use_layerprofiling=$enableval
],
[
	use_layerprofiling="no"
])
if test $use_layerprofiling = "yes" ; then {
	AC_DEFINE(SYNFIG_PROFILE_LAYERS,[1],[enable layer profiling])
} ; fi




AC_ARG_WITH(imagemagick,[
  --without-imagemagick   Disable support for ImageMagick],[
],[
    AC_CHECK_PROG([imagemagick_convert],[convert],[yes],[no])
    with_imagemagick=$imagemagick_convert
])
if test $with_imagemagick = "no" ; then {
	AM_CONDITIONAL(WITH_IMAGEMAGICK,false)
} else {
	AM_CONDITIONAL(WITH_IMAGEMAGICK,true)
} ; fi





AC_ARG_WITH(magickpp,[
  --without-magickpp        Disable support for Magick++],[
],[
	with_magickpp="yes"
])
if test $with_magickpp = "yes" ; then {
  AC_CHECK_HEADER([Magick++.h],[
  	MAGICKPP_LIBS="-lMagick++"
  	AC_DEFINE(HAVE_MAGICKPP,[], [ Define if Magick++ library is available ] )
  	AC_SUBST(MAGICKPP_LIBS)
  	AM_CONDITIONAL(HAVE_LIBMAGICKPP,true)
	AC_CHECK_LIB(Magick,OptimizeImageTransparency,[
		AC_DEFINE(HAVE_MAGICK_OPTIMIZE,[], [ Define if Magick++ defines OptimizeImageTransparency() ] )
		AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,true)
	],[
		AC_MSG_RESULT([ *** OptimizeImageTransparency() not available - need ImageMagick 6.3 or newer ])
		AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,false)
	])
  ],[
	with_magickpp="no"
  	AC_MSG_RESULT([ *** Magick++ Output target disabled])
  	TARGET_MAGICKPP="no"
  	AM_CONDITIONAL(HAVE_LIBMAGICKPP,false)
	AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,false)
  ])
} else {
	AM_CONDITIONAL(HAVE_LIBMAGICKPP,false)
	AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,false)
} ; fi




AC_ARG_WITH(ffmpeg,[
  --without-ffmpeg        Disable support for FFMPEG],[
],[
	with_ffmpeg="yes"
])
if test $with_ffmpeg = "no" ; then {
	AM_CONDITIONAL(WITH_FFMPEG,false)
} else {
	AM_CONDITIONAL(WITH_FFMPEG,true)
} ; fi




AC_ARG_WITH(vimage,[
  --with-vimage        Enable support for apple vImage],[
],[
	with_vimage="no"
])
if test $with_vimage = "no" ; then {
	AM_CONDITIONAL(WITH_VIMAGE,false)
} else {
	AM_CONDITIONAL(WITH_VIMAGE,true)
	AC_DEFINE(HAS_VIMAGE,[1],[enable apple vImage])
	VIMAGE_LIBS="-Wc,-framework -Wc,Accelerate"

} ; fi



AC_ARG_WITH(libdv,[
  --without-libdv         Disable support for libdv],[
],[
	with_libdv="yes"
])
if test $with_libdv = "no" ; then {
	AM_CONDITIONAL(WITH_LIBDV,false)
} else {
	AM_CONDITIONAL(WITH_LIBDV,true)
} ; fi




# LIBAVCODEC CHECK--------------------

AC_ARG_WITH(libavcodec,[
  --with-libavcodec         Enable support for libavcodec (Default=no)],[
],[
	with_libavcodec="no"
])

if test $with_libavcodec != "no" ; then {
	PKG_CHECK_MODULES(LIBAVCODEC, [libavcodec libavformat],[],[echo no; with_libavcodec="no"])
} ; fi
if test $with_libavcodec = "yes" ; then {
	AC_DEFINE(WITH_LIBAVCODEC,[],[enable libavcodec support])
	AM_CONDITIONAL(WITH_LIBAVCODEC,true)
} else {
	AM_CONDITIONAL(WITH_LIBAVCODEC,false)
} ; fi


if test $with_libavcodec = "yes" ; then {

	# Need to check both the new and old locations for the avformat header
	# Need to save flags, add avformat flags, check headers and restore flags
	ac_save_CPPFLAGS="$CPPFLAGS"
	ac_save_CFLAGS="$CFLAGS"
	CPPFLAGS="${CPPFLAGS} ${LIBAVCODEC_CFLAGS}"
	CFLAGS="${CFLAGS} ${LIBAVCODEC_CFLAGS}"
	AC_CHECK_HEADERS(libavformat/avformat.h avformat.h ffmpeg/avformat.h)
	CPPFLAGS="${ac_save_CPPFLAGS}"
	CFLAGS="${ac_save_CFLAGS}"

	AC_ARG_WITH(libswscale,
		[AS_HELP_STRING([--without-libswscale],
			[disable support for libswscale (Default=auto)])],
		[],
		[with_libswscale="yes"]
	)

	if test $with_libswscale != "no" ; then {
		PKG_CHECK_MODULES(LIBSWSCALE, [libswscale], [], [echo no; with_libswscale="no"])
	} ; fi

	if test $with_libswscale = "yes" ; then {
		AC_DEFINE(WITH_LIBSWSCALE, [], [enable libswscale support])

		# Need to check both the new and old locations for the swscale header
		# Need to save flags, add swscale flags, check headers and restore flags
		ac_save_CPPFLAGS="$CPPFLAGS"
		ac_save_CFLAGS="$CFLAGS"
		CPPFLAGS="${CPPFLAGS} ${LIBSWSCALE_CFLAGS}"
		CFLAGS="${CFLAGS} ${LIBSWSCALE_CFLAGS}"
		AC_CHECK_HEADERS(libswscale/swscale.h swscale.h ffmpeg/swscale.h)
		CPPFLAGS="${ac_save_CPPFLAGS}"
		CFLAGS="${ac_save_CFLAGS}"
    	} else {
		AC_CHECK_LIB(avcodec, img_convert,
			[AC_MSG_RESULT([ *** Using deprecated function img_convert.])],
			[AC_MSG_FAILURE([Neither libswscale nor function img_convert was found.])],
			[]
		)
	} ; fi
} ; fi
AM_CONDITIONAL(WITH_LIBSWSCALE, test "x$with_libswscale" = "xyes")


# FREETYPE2 CHECK--------------------

AC_ARG_WITH(freetype,[
  --without-freetype         disable support for freetype (Default=auto)],[
],[
	with_freetype="yes"
])

if test $with_freetype != "no" ; then {
	PKG_CHECK_MODULES(FREETYPE, freetype2,[
		with_freetype="yes"
	],[
		PKG_CHECK_MODULES(FREETYPE, xft,[
			with_freetype="yes"
		],[
			with_freetype="no"
		])
	])
} ; fi

if test $with_freetype = "no" ; then {
	AM_CONDITIONAL(WITH_FREETYPE,false)
} else {
	AM_CONDITIONAL(WITH_FREETYPE,true)
} ; fi


# FONTCONFIG CHECK--------------------

AC_ARG_WITH(fontconfig,[
  --without-fontconfig         disable support for fontconfig (Default=auto)],[
],[
	with_fontconfig="yes"
])

if test $with_fontconfig != "no" ; then {
	PKG_CHECK_MODULES(FONTCONFIG, fontconfig,[
		with_fontconfig="yes"
	],[
		with_fontconfig="no"
	])
} ; fi

if test $with_fontconfig = "yes" ; then {
	AC_DEFINE(WITH_FONTCONFIG,[],[enable fontconfig support])
	AM_CONDITIONAL(WITH_FONTCONFIG,true)
} else {
	AM_CONDITIONAL(WITH_FONTCONFIG,false)
} ; fi


# OPENEXR CHECK------------------------
AC_ARG_WITH(openexr,[
  --without-openexr        Disable support for ILM's OpenEXR],[
],[
	with_openexr="yes"
])
if test $with_openexr = "yes" ; then {
	PKG_CHECK_MODULES(OPENEXR, OpenEXR,[
		AC_DEFINE(HAVE_OPENEXR,[], [ Define if OpenEXR is available ] )
		AM_CONDITIONAL(WITH_OPENEXR,true)
	],
	[
		with_openexr="no"
	])
} ; fi
if test $with_openexr = "no" ; then {
	AM_CONDITIONAL(WITH_OPENEXR,false)
	use_openexr_half="no"
} ; fi
if test $use_openexr_half = yes ; then {
	AC_MSG_RESULT([ ** Using OpenEXR Half.])
	CONFIG_DEPS="$CONFIG_DEPS OpenEXR"
	CONFIG_CFLAGS="$CONFIG_CFLAGS -DUSE_HALF_TYPE"
	OPENEXR_HALF_LIBS="-lHalf"
} else {
	OPENEXR_HALF_LIBS=""
} ; fi


# JPEG CHECK (commandline switch) ------------------------
AC_ARG_WITH(jpeg,[
  --without-jpeg        Disable support for JPEG],[
],[
	with_jpeg="yes"
])
if test $with_jpeg = "no" ; then {
	AM_CONDITIONAL(WITH_JPEG,false)
} else {
	AM_CONDITIONAL(WITH_JPEG,true)
} ; fi





# -- L I B R A R I E S ----------------------------------------

ALL_LINGUAS="es fr ru"
AM_GNU_GETTEXT([external])
# This is here so autoreconf will run autopoint
AM_GNU_GETTEXT_VERSION([0.15])
localedir="$datadir/locale"

PKG_CHECK_MODULES(ETL, [ETL >= 0.04.13],,[
	AC_MSG_ERROR([ ** You need to install the ETL (version 0.04.13 or greater).])
])
CONFIG_DEPS="$CONFIG_DEPS ETL"


PKG_CHECK_MODULES(LIBXMLPP, libxml++-2.6,[
	CONFIG_DEPS="$CONFIG_DEPS libxml++-2.6"
],[
	PKG_CHECK_MODULES(LIBXMLPP, libxml++-1.0,[
		CONFIG_DEPS="$CONFIG_DEPS libxml++-1.0"
	],[
		AC_MSG_ERROR([ ** You need to install libxml++, either verison 2.6 or 1.0.])
	])
])

PKG_CHECK_MODULES(LIBSIGC, [sigc++-2.0],,[
	AC_MSG_ERROR([ ** libsigc++-2.0 not found. It is required. You should really install it.])
dnl	PKG_CHECK_MODULES(LIBSIGC, [sigc++-1.2],,[
dnl		AC_MSG_ERROR([ ** At least libsigc++-1.2 is required.])
dnl	])
])
CONFIG_DEPS="$CONFIG_DEPS sigc++-2.0"

dnl PKG_CHECK_MODULES(GLIB, glib-2.0,[GLIB="yes"],[GLIB="no"])





TARGET_PNG="yes"
TARGET_MNG="yes"

AC_CHECK_LIB(png, png_write_row,[
	PNG_LIBS="-lpng"
	AC_DEFINE(HAVE_LIBPNG,[], [ Define if PNG library is available ] )
	AC_SUBST(PNG_LIBS)
	AM_CONDITIONAL(HAVE_LIBPNG,true)
],[
	AC_CHECK_LIB(png12, png_write_row,[
	PNG_LIBS="-lpng12"
	AC_DEFINE(HAVE_LIBPNG,[])
	AC_SUBST(PNG_LIBS)
	AM_CONDITIONAL(HAVE_LIBPNG,true)
	],[
		AC_MSG_RESULT([ *** PNG Output target disabled])
		TARGET_PNG="no"
		AM_CONDITIONAL(HAVE_LIBPNG,false)
	],[-lz -L${exec_prefix}/lib])
],[-lz -L${exec_prefix}/lib])

AC_CHECK_LIB(mng, mng_initialize,[
	MNG_LIBS="-lmng -lz"
	AC_DEFINE(HAVE_LIBMNG,[], [ Define if MNG library is available ] )
	AC_SUBST(MNG_LIBS)
	AM_CONDITIONAL(HAVE_LIBMNG,true)
],[
	AC_MSG_RESULT([ *** MNG Output target disabled])
	TARGET_MNG="no"
	AM_CONDITIONAL(HAVE_LIBMNG,false)
],[-lz -L${exec_prefix}/lib])

# check for JPEG availability
if test $with_jpeg = "yes" ; then {
	AC_CHECK_LIB(jpeg, jpeg_CreateCompress,[
		JPEG_LIBS="-ljpeg"
		AC_DEFINE(HAVE_LIBJPEG,[], [ Define if JPEG library is available ] )
		AC_SUBST(JPEG_LIBS)
		TARGET_JPEG="yes"
		AM_CONDITIONAL(HAVE_LIBJPEG,true)
	],[
		AC_MSG_RESULT([ *** JPEG Output target disabled])
		TARGET_JPEG="no"
		AM_CONDITIONAL(HAVE_LIBJPEG,false)
	],[
		-L${exec_prefix}/lib
	])
} else {
	AC_MSG_RESULT([ *** JPEG Output target disabled])
	TARGET_JPEG="no"
	AM_CONDITIONAL(HAVE_LIBJPEG,false)
} ; fi



MODULE_DIR='${libdir}/synfig/modules'
moduledir=$libdir/synfig/modules
AC_SUBST(MODULE_DIR)
SYNFIGLIB_DIR=$libdir/synfig
AC_SUBST(SYNFIGLIB_DIR)

# Check for unordered_map or hash_map headers
AC_MSG_CHECKING([for unordered_map<int,int>::const_iterator])
AC_COMPILE_IFELSE([
	AC_LANG_PROGRAM([
		[#include <tr1/unordered_map>]
	],[
		[std::tr1::unordered_map<int,int>::const_iterator iter;]
	])],[
	AC_MSG_RESULT([yes])
	AC_DEFINE([HASH_MAP_CLASS],[HASH_MAP_NAMESPACE::unordered_map],[The template name for unordered maps.])
	AC_DEFINE([HASH_MAP_H],[<tr1/unordered_map>],[The header file to include for unordered maps.])
	AC_DEFINE([HASH_MAP_NAMESPACE],[std::tr1],[The namespace for unordered maps.])
	AC_DEFINE([FUNCTIONAL_H],[<tr1/functional>],[The header file for hash<T>.])
	AC_DEFINE([FUNCTIONAL_HASH_ON_STRING],[1],[Define to 1 if hash<T> needs to use T=String rather than T=char* to hash strings.])
],[
	AC_MSG_RESULT([no])
	AC_CHECK_HEADERS([ext/hash_map],[
		AC_DEFINE([HASH_MAP_CLASS],[HASH_MAP_NAMESPACE::hash_map],[The template name for unordered maps.])
		AC_DEFINE([HASH_MAP_H],[<ext/hash_map>],[The header file to include for unordered maps.])
		AC_DEFINE([HASH_MAP_NAMESPACE],[__gnu_cxx],[The namespace for unordered maps.])
		AC_DEFINE([FUNCTIONAL_H],[<ext/functional>],[The header file for hash<T>.])
	],[
		AC_MSG_ERROR([C++ compiler does not seem to support unordered containers])
	])
])

# Check for unordered_set or hash_set headers
AC_MSG_CHECKING([for unordered_set<int,int>::const_iterator])
AC_COMPILE_IFELSE([
	AC_LANG_PROGRAM([
		[#include <tr1/unordered_set>]
	],[
		[std::tr1::unordered_set<int,int>::const_iterator iter;]
	])],[
	AC_MSG_RESULT([yes])
	AC_DEFINE([HASH_SET_CLASS],[HASH_SET_NAMESPACE::unordered_set],[The template name for unordered sets.])
	AC_DEFINE([HASH_SET_H],[<tr1/unordered_set>],[The header file to include for unordered sets.])
	AC_DEFINE([HASH_SET_NAMESPACE],[std::tr1],[The namespace for unordered sets.])
],[
	AC_MSG_RESULT([no])
	AC_CHECK_HEADERS([ext/hash_set],[
		AC_DEFINE([HASH_SET_CLASS],[HASH_SET_NAMESPACE::hash_set],[The template name for unordered sets.])
		AC_DEFINE([HASH_SET_H],[<ext/hash_set>],[The header file to include for unordered sets.])
		AC_DEFINE([HASH_SET_NAMESPACE],[__gnu_cxx],[The namespace for unordered sets.])
	],[
		AC_MSG_ERROR([C++ compiler does not seem to support unordered containers])
	])
])





AC_CHECK_HEADERS(signal.h termios.h sys/errno.h)


case "$host" in
	*mingw* | *cygwin*)
		AM_CONDITIONAL(WIN32_PKG, true)
		AM_CONDITIONAL(MACOSX_PKG, false)
	;;
	*darwin*)
		AM_CONDITIONAL(WIN32_PKG, false)
		AM_CONDITIONAL(MACOSX_PKG, true)
	;;
	*)
		AM_CONDITIONAL(WIN32_PKG, false)
		AM_CONDITIONAL(MACOSX_PKG, false)
	;;
esac



# -- H E A D E R S --------------------------------------------

AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([process.h io.h fcntl.h])

# -- T Y P E S & S T R U C T S --------------------------------

# -- F U N C T I O N S ----------------------------------------

dnl AC_CHECK_FUNCS([floor pow sqrt],[],[
dnl 	AC_MSG_ERROR([ ** Could not find proper math functions.])
dnl ])

AC_CHECK_FUNCS([fork])
AC_CHECK_FUNCS([kill])
AC_CHECK_FUNCS([pipe])
AC_CHECK_FUNCS([waitpid])

AC_CHECK_FUNCS(
	[isnan],
	[],
	[
		AC_CHECK_FUNCS(
			[_isnan]
		)
	]
)

AC_CHECK_FUNCS(
	[isnanf],
	[],
	[
		AC_CHECK_FUNCS(
			[_isnanf]
		)
	]
)

AC_CHECK_FUNCS(
	[floorl],
	[],
	[
		AC_CHECK_FUNCS(
			[_floorl]
		)
	]
)

AC_CHECK_LIB([pthread],[pthread_create])

# -- O U T P U T ----------------------------------------------

AC_SUBST(CFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)

CONFIG_LIBS="-lsynfig"
CONFIG_CFLAGS="$CONFIG_CFLAGS"
AC_SUBST(CONFIG_LIBS)
AC_SUBST(CONFIG_CFLAGS)
AC_SUBST(CONFIG_DEPS)
AC_SUBST(ETL_CFLAGS)

SYNFIG_LIBS="$VIMAGE_LIBS $LIBXMLPP_LIBS $ETL_LIBS $LIBSIGC_LIBS $LTLIBINTL"
SYNFIG_CFLAGS="$LIBXMLPP_CFLAGS $ETL_CFLAGS $LIBSIGC_CFLAGS $CONFIG_CFLAGS -DSYNFIG_NO_DEPRECATED -DLOCALEDIR=\\\"$localedir\\\""

CONFIG_CFLAGS="`echo $CONFIG_CFLAGS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
SYNFIG_CFLAGS="`echo $SYNFIG_CFLAGS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
SYNFIG_LIBS="`echo $SYNFIG_LIBS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"

AC_SUBST(LIBADD_DL)

AC_SUBST(SYNFIG_LIBS)
AC_SUBST(SYNFIG_CFLAGS)
AC_SUBST(OPENEXR_HALF_LIBS)

AC_SUBST(API_VERSION)

synfigincludedir=$includedir/synfig-$API_VERSION
AC_SUBST(synfigincludedir)

AC_CONFIG_FILES([synfig-config
build_tools/Makefile
synfig.pc
doxygen.cfg
Makefile
po/Makefile.in
src/Makefile
src/synfig/Makefile
src/modules/Makefile
src/modules/lyr_freetype/Makefile
src/modules/lyr_std/Makefile
src/modules/mod_bmp/Makefile
src/modules/mod_dv/Makefile
src/modules/mod_ffmpeg/Makefile
src/modules/mod_filter/Makefile
src/modules/mod_geometry/Makefile
src/modules/mod_gif/Makefile
src/modules/mod_gradient/Makefile
src/modules/mod_imagemagick/Makefile
src/modules/mod_jpeg/Makefile
src/modules/mod_libavcodec/Makefile
src/modules/mod_magickpp/Makefile
src/modules/mod_mng/Makefile
src/modules/mod_noise/Makefile
src/modules/mod_openexr/Makefile
src/modules/mod_particle/Makefile
src/modules/mod_png/Makefile
src/modules/mod_ppm/Makefile
src/modules/mod_yuv420p/Makefile
src/modules/mod_svg/Makefile
src/modules/example/Makefile
src/tool/Makefile
src/modules/synfig_modules.cfg
examples/walk/Makefile
examples/Makefile
win32inst.nsi
pkg-info/macosx/synfig-core.info
])
## src/modules/trgt_mpg/Makefile
## src/modules/mptr_mplayer/Makefile
AC_OUTPUT

# -- S U M M A R Y --------------------------------------------

echo "
$PACKAGE_NAME v.$VERSION
Configuration Summary
- - - - - -

Install Prefix -------------------> $prefix
Module directory -----------------> $moduledir
Build Platform -------------------> $build
Host Platform --------------------> $host
Arc Profiling --------------------> $profile_arcs
GProf Profiling ------------------> $profiling
Debug Mode -----------------------> $debug ($debug_flags)
Optimization ---------------------> $optimization
PNG output target support --------> $TARGET_PNG
MNG output target support --------> $TARGET_MNG
JPEG output target support -------> $TARGET_JPEG
ETL_CFLAGS -----------------------> $ETL_CFLAGS
FreeType2 ------------------------> $with_freetype
fontconfig -----------------------> $with_fontconfig
libavcodec -----------------------> $with_libavcodec
libswscale -----------------------> $with_libswscale
vImage ---------------------------> $with_vimage
ImageMagick ----------------------> $with_imagemagick
Magick++ -------------------------> $with_magickpp
FFMPEG ---------------------------> $with_ffmpeg
libdv ----------------------------> $with_libdv
OpenEXR --------------------------> $with_openexr
Using OpenEXR's \"half\" type ------> $use_openexr_half

"'$'"CXX -----------------------------> '$CXX'
"'$'"CXXFLAGS ------------------------> '$CXXFLAGS'
"'$'"SYNFIG_LIBS ---------------------> '$SYNFIG_LIBS'
"'$'"LIBXMLPP_LIBS -------------------> '$LIBXMLPP_LIBS'
"'$'"ETL_LIBS ------------------------> '$ETL_LIBS'
"'$'"LIBSIGC_LIBS --------------------> '$LIBSIGC_LIBS'
"'$'"SYNFIG_CFLAGS -------------------> '$SYNFIG_CFLAGS'
"'$'"LIBADD_DL -----------------------> '$LIBADD_DL'
"