Enable tooltips and allow use the 'hint' descriptor for some types for the linkable...
[synfig.git] / synfig-core / configure.ac
1 # $Id$
2
3 # -- I N I T --------------------------------------------------
4
5 AC_INIT([Synfig Core],[0.62.02],[http://sourceforge.net/tracker/?group_id=144022&atid=757416],[synfig])
6 AC_REVISION
7
8 AC_CONFIG_AUX_DIR(config)
9 AC_CONFIG_HEADERS([config.h])
10 AC_CANONICAL_HOST
11 dnl AC_CANONICAL_TARGET
12
13 AM_INIT_AUTOMAKE([nostdinc])
14 AM_MAINTAINER_MODE
15
16 AC_LIBLTDL_CONVENIENCE
17 AC_SUBST(INCLTDL)
18 AC_SUBST(LIBLTDL)
19
20 API_VERSION=0.0
21
22
23 AC_DEFINE(LT_SCOPE,[extern],[LibLTDL is linked staticly])
24
25
26
27
28 # -- V A R I A B L E S ----------------------------------------
29
30 SVN_REPOSITORY=https://synfig.svn.sourceforge.net/svnroot/synfig/synfig-core
31 AC_SUBST(SVN_REPOSITORY)
32
33
34 # -- P R O G R A M S ------------------------------------------
35
36 AC_PROG_CC
37 AC_GNU_SOURCE
38 AC_PROG_CXX
39 AC_PROG_CPP
40 AC_PROG_CXXCPP
41 AC_PROG_INSTALL
42
43 AC_LANG([C++])
44
45 AC_C_BIGENDIAN
46
47
48 # -- A R G U M E N T S ----------------------------------------
49
50
51 AC_ARG_DEBUG
52 AC_ARG_OPTIMIZATION
53 AC_ARG_WARNINGS
54 AC_ARG_PROFILING
55 AC_ARG_PROFILE_ARCS
56 AC_ARG_BRANCH_PROBABILITIES
57
58 AC_ARG_ENABLE(g5opt,[
59   --enable-g5opt           enable optimizations specific to G5 proc],[
60 #       CXXFLAGS="$CXXFLAGS -fastf -fPIC"
61 #       CFLAGS="$CFLAGS -fastf -fPIC"
62         CXXFLAGS="$CXXFLAGS -mtune=G5 -falign-loops=32"
63         CFLAGS="$CFLAGS -mtune=G5"
64 ],
65 [
66         true
67 ])
68
69 #MINGW_FLAGS="-mno-cygwin"
70
71 AC_WIN32_QUIRKS
72
73 # If we are in debug mode, use the debugging version of the
74 # Microsoft Visual C Runtime Library
75 #if [[ $debug = "yes" ]] ; then {
76 #       WIN32_DEBUG_LIBRARY="msvcr70d"
77 #       WIN32_DEBUG_LIBRARY="msvcrtd"
78 #       LIBTOOL_PATCH_SED="$LIBTOOL_PATCH_SED
79 #               s/-lmsvcrt/-l$WIN32_DEBUG_LIBRARY/g;
80 #       ";
81 #} ; fi
82
83 AC_LIBTOOL_WIN32_DLL
84 AC_LIBTOOL_DLOPEN
85 AC_DISABLE_STATIC
86 AC_ENABLE_SHARED
87 AC_PROG_LIBTOOL
88 AC_SUBST(LIBTOOL_DEPS)
89 AC_LIBTOOL_PATCH
90
91 #if [[ "$LIBTOOL_PATCH_SED""x" != "x" ]] ; then {
92 #       printf "Patching libtool... "
93 #       cat libtool | sed "$LIBTOOL_PATCH_SED" > libtool2
94 #       rm libtool
95 #       mv libtool2 libtool
96 #       chmod +x libtool
97 #       AC_MSG_RESULT([patched])
98 #} fi ;
99
100
101 dnl
102 dnl dynamic linker
103 dnl
104 AC_CHECK_LIB(c, dlopen,
105         DYNAMIC_LD_LIBS="",
106         AC_CHECK_LIB(
107                 dl,
108                 dlopen,
109         DYNAMIC_LD_LIBS="-ldl",
110             DYNAMIC_LD_LIBS=""
111         )
112 )
113
114 AC_SUBST(DYNAMIC_LD_LIBS)
115
116 AC_ARG_ENABLE(half,[
117   --enable-half           Use OpenEXR's "half" type for color],[
118         use_openexr_half=$enableval
119 ],
120 [
121         use_openexr_half="no"
122 ])
123
124
125
126 AC_ARG_ENABLE(layer-profiling,[
127   --enable-layer-profiling       Enable layer profiling],[
128         use_layerprofiling=$enableval
129 ],
130 [
131         use_layerprofiling="no"
132 ])
133 if test $use_layerprofiling = "yes" ; then {
134         AC_DEFINE(SYNFIG_PROFILE_LAYERS,[1],[enable layer profiling])
135 } ; fi
136
137
138
139
140 AC_ARG_WITH(imagemagick,[
141   --without-imagemagick   Disable support for ImageMagick],[
142 ],[
143     AC_CHECK_PROG([imagemagick_convert],[convert],[yes],[no])
144     with_imagemagick=$imagemagick_convert
145 ])
146 if test $with_imagemagick = "no" ; then {
147         AM_CONDITIONAL(WITH_IMAGEMAGICK,false)
148 } else {
149         AM_CONDITIONAL(WITH_IMAGEMAGICK,true)
150 } ; fi
151
152
153
154
155
156 AC_ARG_WITH(magickpp,[
157   --without-magickpp        Disable support for Magick++],[
158 ],[
159         with_magickpp="yes"
160 ])
161 if test $with_magickpp = "yes" ; then {
162   AC_CHECK_HEADER([Magick++.h],[
163         MAGICKPP_LIBS="-lMagick++"
164         AC_DEFINE(HAVE_MAGICKPP,[], [ Define if Magick++ library is available ] )
165         AC_SUBST(MAGICKPP_LIBS)
166         AM_CONDITIONAL(HAVE_LIBMAGICKPP,true)
167         AC_CHECK_LIB(Magick,OptimizeImageTransparency,[
168                 AC_DEFINE(HAVE_MAGICK_OPTIMIZE,[], [ Define if Magick++ defines OptimizeImageTransparency() ] )
169                 AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,true)
170         ],[
171                 AC_MSG_RESULT([ *** OptimizeImageTransparency() not available - need ImageMagick 6.3 or newer ])
172                 AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,false)
173         ])
174   ],[
175         with_magickpp="no"
176         AC_MSG_RESULT([ *** Magick++ Output target disabled])
177         TARGET_MAGICKPP="no"
178         AM_CONDITIONAL(HAVE_LIBMAGICKPP,false)
179         AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,false)
180   ])
181 } else {
182         AM_CONDITIONAL(HAVE_LIBMAGICKPP,false)
183         AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,false)
184 } ; fi
185
186
187
188
189 AC_ARG_WITH(ffmpeg,[
190   --without-ffmpeg        Disable support for FFMPEG],[
191 ],[
192         with_ffmpeg="yes"
193 ])
194 if test $with_ffmpeg = "no" ; then {
195         AM_CONDITIONAL(WITH_FFMPEG,false)
196 } else {
197         AM_CONDITIONAL(WITH_FFMPEG,true)
198 } ; fi
199
200
201
202
203 AC_ARG_WITH(vimage,[
204   --with-vimage        Enable support for apple vImage],[
205 ],[
206         with_vimage="no"
207 ])
208 if test $with_vimage = "no" ; then {
209         AM_CONDITIONAL(WITH_VIMAGE,false)
210 } else {
211         AM_CONDITIONAL(WITH_VIMAGE,true)
212         AC_DEFINE(HAS_VIMAGE,[1],[enable apple vImage])
213         VIMAGE_LIBS="-Wc,-framework -Wc,Accelerate"
214
215 } ; fi
216
217
218
219 AC_ARG_WITH(libdv,[
220   --without-libdv         Disable support for libdv],[
221 ],[
222         with_libdv="yes"
223 ])
224 if test $with_libdv = "no" ; then {
225         AM_CONDITIONAL(WITH_LIBDV,false)
226 } else {
227         AM_CONDITIONAL(WITH_LIBDV,true)
228 } ; fi
229
230
231
232
233 # LIBAVCODEC CHECK--------------------
234
235 AC_ARG_WITH(libavcodec,[
236   --with-libavcodec         Enable support for libavcodec (Default=no)],[
237 ],[
238         with_libavcodec="no"
239 ])
240
241 if test $with_libavcodec != "no" ; then {
242         PKG_CHECK_MODULES(LIBAVCODEC, [libavcodec libavformat],[],[echo no; with_libavcodec="no"])
243 } ; fi
244 if test $with_libavcodec = "yes" ; then {
245         AC_DEFINE(WITH_LIBAVCODEC,[],[enable libavcodec support])
246         AM_CONDITIONAL(WITH_LIBAVCODEC,true)
247 } else {
248         AM_CONDITIONAL(WITH_LIBAVCODEC,false)
249 } ; fi
250
251
252 if test $with_libavcodec = "yes" ; then {
253
254         # Need to check both the new and old locations for the avformat header
255         # Need to save flags, add avformat flags, check headers and restore flags
256         ac_save_CPPFLAGS="$CPPFLAGS"
257         ac_save_CFLAGS="$CFLAGS"
258         CPPFLAGS="${CPPFLAGS} ${LIBAVCODEC_CFLAGS}"
259         CFLAGS="${CFLAGS} ${LIBAVCODEC_CFLAGS}"
260         AC_CHECK_HEADERS(libavformat/avformat.h avformat.h ffmpeg/avformat.h)
261         CPPFLAGS="${ac_save_CPPFLAGS}"
262         CFLAGS="${ac_save_CFLAGS}"
263
264         AC_ARG_WITH(libswscale,
265                 [AS_HELP_STRING([--without-libswscale],
266                         [disable support for libswscale (Default=auto)])],
267                 [],
268                 [with_libswscale="yes"]
269         )
270
271         if test $with_libswscale != "no" ; then {
272                 PKG_CHECK_MODULES(LIBSWSCALE, [libswscale], [], [echo no; with_libswscale="no"])
273         } ; fi
274
275         if test $with_libswscale = "yes" ; then {
276                 AC_DEFINE(WITH_LIBSWSCALE, [], [enable libswscale support])
277
278                 # Need to check both the new and old locations for the swscale header
279                 # Need to save flags, add swscale flags, check headers and restore flags
280                 ac_save_CPPFLAGS="$CPPFLAGS"
281                 ac_save_CFLAGS="$CFLAGS"
282                 CPPFLAGS="${CPPFLAGS} ${LIBSWSCALE_CFLAGS}"
283                 CFLAGS="${CFLAGS} ${LIBSWSCALE_CFLAGS}"
284                 AC_CHECK_HEADERS(libswscale/swscale.h swscale.h ffmpeg/swscale.h)
285                 CPPFLAGS="${ac_save_CPPFLAGS}"
286                 CFLAGS="${ac_save_CFLAGS}"
287         } else {
288                 AC_CHECK_LIB(avcodec, img_convert,
289                         [AC_MSG_RESULT([ *** Using deprecated function img_convert.])],
290                         [AC_MSG_FAILURE([Neither libswscale nor function img_convert was found.])],
291                         []
292                 )
293         } ; fi
294 } ; fi
295 AM_CONDITIONAL(WITH_LIBSWSCALE, test "x$with_libswscale" = "xyes")
296
297
298 # FREETYPE2 CHECK--------------------
299
300 AC_ARG_WITH(freetype,[
301   --without-freetype         disable support for freetype (Default=auto)],[
302 ],[
303         with_freetype="yes"
304 ])
305
306 if test $with_freetype != "no" ; then {
307         PKG_CHECK_MODULES(FREETYPE, freetype2,[
308                 with_freetype="yes"
309         ],[
310                 PKG_CHECK_MODULES(FREETYPE, xft,[
311                         with_freetype="yes"
312                 ],[
313                         with_freetype="no"
314                 ])
315         ])
316 } ; fi
317
318 if test $with_freetype = "no" ; then {
319         AM_CONDITIONAL(WITH_FREETYPE,false)
320 } else {
321         AM_CONDITIONAL(WITH_FREETYPE,true)
322 } ; fi
323
324
325 # FONTCONFIG CHECK--------------------
326
327 AC_ARG_WITH(fontconfig,[
328   --without-fontconfig         disable support for fontconfig (Default=auto)],[
329 ],[
330         with_fontconfig="yes"
331 ])
332
333 if test $with_fontconfig != "no" ; then {
334         PKG_CHECK_MODULES(FONTCONFIG, fontconfig,[
335                 with_fontconfig="yes"
336         ],[
337                 with_fontconfig="no"
338         ])
339 } ; fi
340
341 if test $with_fontconfig = "yes" ; then {
342         AC_DEFINE(WITH_FONTCONFIG,[],[enable fontconfig support])
343         AM_CONDITIONAL(WITH_FONTCONFIG,true)
344 } else {
345         AM_CONDITIONAL(WITH_FONTCONFIG,false)
346 } ; fi
347
348
349 # OPENEXR CHECK------------------------
350 AC_ARG_WITH(openexr,[
351   --without-openexr        Disable support for ILM's OpenEXR],[
352 ],[
353         with_openexr="yes"
354 ])
355 if test $with_openexr = "yes" ; then {
356         PKG_CHECK_MODULES(OPENEXR, OpenEXR,[
357                 AC_DEFINE(HAVE_OPENEXR,[], [ Define if OpenEXR is available ] )
358                 AM_CONDITIONAL(WITH_OPENEXR,true)
359         ],
360         [
361                 with_openexr="no"
362         ])
363 } ; fi
364 if test $with_openexr = "no" ; then {
365         AM_CONDITIONAL(WITH_OPENEXR,false)
366         use_openexr_half="no"
367 } ; fi
368 if test $use_openexr_half = yes ; then {
369         AC_MSG_RESULT([ ** Using OpenEXR Half.])
370         CONFIG_DEPS="$CONFIG_DEPS OpenEXR"
371         CONFIG_CFLAGS="$CONFIG_CFLAGS -DUSE_HALF_TYPE"
372         OPENEXR_HALF_LIBS="-lHalf"
373 } else {
374         OPENEXR_HALF_LIBS=""
375 } ; fi
376
377
378 # JPEG CHECK (commandline switch) ------------------------
379 AC_ARG_WITH(jpeg,[
380   --without-jpeg        Disable support for JPEG],[
381 ],[
382         with_jpeg="yes"
383 ])
384 if test $with_jpeg = "no" ; then {
385         AM_CONDITIONAL(WITH_JPEG,false)
386 } else {
387         AM_CONDITIONAL(WITH_JPEG,true)
388 } ; fi
389
390
391
392
393
394 # -- L I B R A R I E S ----------------------------------------
395
396 AC_LIB_LTDL
397
398 ALL_LINGUAS="es fr it ru de en_GB zh_CN"
399 AM_GNU_GETTEXT([external])
400 # This is here so autoreconf will run autopoint
401 AM_GNU_GETTEXT_VERSION([0.15])
402 localedir="$datadir/locale"
403
404 PKG_CHECK_MODULES(ETL, [ETL >= 0.04.13],,[
405         AC_MSG_ERROR([ ** You need to install the ETL (version 0.04.13 or greater).])
406 ])
407 CONFIG_DEPS="$CONFIG_DEPS ETL"
408
409
410 PKG_CHECK_MODULES(LIBXMLPP, libxml++-2.6,[
411         CONFIG_DEPS="$CONFIG_DEPS libxml++-2.6"
412 ],[
413         PKG_CHECK_MODULES(LIBXMLPP, libxml++-1.0,[
414                 CONFIG_DEPS="$CONFIG_DEPS libxml++-1.0"
415         ],[
416                 AC_MSG_ERROR([ ** You need to install libxml++, either verison 2.6 or 1.0.])
417         ])
418 ])
419
420 PKG_CHECK_MODULES(LIBSIGC, [sigc++-2.0],,[
421         AC_MSG_ERROR([ ** libsigc++-2.0 not found. It is required. You should really install it.])
422 dnl     PKG_CHECK_MODULES(LIBSIGC, [sigc++-1.2],,[
423 dnl             AC_MSG_ERROR([ ** At least libsigc++-1.2 is required.])
424 dnl     ])
425 ])
426 CONFIG_DEPS="$CONFIG_DEPS sigc++-2.0"
427
428 dnl PKG_CHECK_MODULES(GLIB, glib-2.0,[GLIB="yes"],[GLIB="no"])
429
430
431
432
433
434 TARGET_PNG="yes"
435 TARGET_MNG="yes"
436
437 AC_CHECK_LIB(png, png_write_row,[
438         PNG_LIBS="-lpng"
439         AC_DEFINE(HAVE_LIBPNG,[], [ Define if PNG library is available ] )
440         AC_SUBST(PNG_LIBS)
441         AM_CONDITIONAL(HAVE_LIBPNG,true)
442 ],[
443         AC_CHECK_LIB(png12, png_write_row,[
444         PNG_LIBS="-lpng12"
445         AC_DEFINE(HAVE_LIBPNG,[])
446         AC_SUBST(PNG_LIBS)
447         AM_CONDITIONAL(HAVE_LIBPNG,true)
448         ],[
449                 AC_MSG_RESULT([ *** PNG Output target disabled])
450                 TARGET_PNG="no"
451                 AM_CONDITIONAL(HAVE_LIBPNG,false)
452         ],[-lz -L${exec_prefix}/lib])
453 ],[-lz -L${exec_prefix}/lib])
454
455 AC_CHECK_LIB(mng, mng_initialize,[
456         MNG_LIBS="-lmng -lz"
457         AC_DEFINE(HAVE_LIBMNG,[], [ Define if MNG library is available ] )
458         AC_SUBST(MNG_LIBS)
459         AM_CONDITIONAL(HAVE_LIBMNG,true)
460 ],[
461         AC_MSG_RESULT([ *** MNG Output target disabled])
462         TARGET_MNG="no"
463         AM_CONDITIONAL(HAVE_LIBMNG,false)
464 ],[-lz -L${exec_prefix}/lib])
465
466 # check for JPEG availability
467 if test $with_jpeg = "yes" ; then {
468         AC_CHECK_LIB(jpeg, jpeg_CreateCompress,[
469                 JPEG_LIBS="-ljpeg"
470                 AC_DEFINE(HAVE_LIBJPEG,[], [ Define if JPEG library is available ] )
471                 AC_SUBST(JPEG_LIBS)
472                 TARGET_JPEG="yes"
473                 AM_CONDITIONAL(HAVE_LIBJPEG,true)
474         ],[
475                 AC_MSG_RESULT([ *** JPEG Output target disabled])
476                 TARGET_JPEG="no"
477                 AM_CONDITIONAL(HAVE_LIBJPEG,false)
478         ],[
479                 -L${exec_prefix}/lib
480         ])
481 } else {
482         AC_MSG_RESULT([ *** JPEG Output target disabled])
483         TARGET_JPEG="no"
484         AM_CONDITIONAL(HAVE_LIBJPEG,false)
485 } ; fi
486
487
488
489 MODULE_DIR='${libdir}/synfig/modules'
490 moduledir=$libdir/synfig/modules
491 AC_SUBST(MODULE_DIR)
492 SYNFIGLIB_DIR=$libdir/synfig
493 AC_SUBST(SYNFIGLIB_DIR)
494
495 # Check for unordered_map or hash_map headers
496 AC_MSG_CHECKING([for unordered_map<int,int>::const_iterator])
497 AC_COMPILE_IFELSE([
498         AC_LANG_PROGRAM([
499                 [#include <tr1/unordered_map>]
500         ],[
501                 [std::tr1::unordered_map<int,int>::const_iterator iter;]
502         ])],[
503         AC_MSG_RESULT([yes])
504         AC_DEFINE([HASH_MAP_CLASS],[HASH_MAP_NAMESPACE::unordered_map],[The template name for unordered maps.])
505         AC_DEFINE([HASH_MAP_H],[<tr1/unordered_map>],[The header file to include for unordered maps.])
506         AC_DEFINE([HASH_MAP_NAMESPACE],[std::tr1],[The namespace for unordered maps.])
507         AC_DEFINE([FUNCTIONAL_H],[<tr1/functional>],[The header file for hash<T>.])
508         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.])
509 ],[
510         AC_MSG_RESULT([no])
511         AC_CHECK_HEADERS([ext/hash_map],[
512                 AC_DEFINE([HASH_MAP_CLASS],[HASH_MAP_NAMESPACE::hash_map],[The template name for unordered maps.])
513                 AC_DEFINE([HASH_MAP_H],[<ext/hash_map>],[The header file to include for unordered maps.])
514                 AC_DEFINE([HASH_MAP_NAMESPACE],[__gnu_cxx],[The namespace for unordered maps.])
515                 AC_DEFINE([FUNCTIONAL_H],[<ext/functional>],[The header file for hash<T>.])
516         ],[
517                 AC_MSG_ERROR([C++ compiler does not seem to support unordered containers])
518         ])
519 ])
520
521 # Check for unordered_set or hash_set headers
522 AC_MSG_CHECKING([for unordered_set<int,int>::const_iterator])
523 AC_COMPILE_IFELSE([
524         AC_LANG_PROGRAM([
525                 [#include <tr1/unordered_set>]
526         ],[
527                 [std::tr1::unordered_set<int,int>::const_iterator iter;]
528         ])],[
529         AC_MSG_RESULT([yes])
530         AC_DEFINE([HASH_SET_CLASS],[HASH_SET_NAMESPACE::unordered_set],[The template name for unordered sets.])
531         AC_DEFINE([HASH_SET_H],[<tr1/unordered_set>],[The header file to include for unordered sets.])
532         AC_DEFINE([HASH_SET_NAMESPACE],[std::tr1],[The namespace for unordered sets.])
533 ],[
534         AC_MSG_RESULT([no])
535         AC_CHECK_HEADERS([ext/hash_set],[
536                 AC_DEFINE([HASH_SET_CLASS],[HASH_SET_NAMESPACE::hash_set],[The template name for unordered sets.])
537                 AC_DEFINE([HASH_SET_H],[<ext/hash_set>],[The header file to include for unordered sets.])
538                 AC_DEFINE([HASH_SET_NAMESPACE],[__gnu_cxx],[The namespace for unordered sets.])
539         ],[
540                 AC_MSG_ERROR([C++ compiler does not seem to support unordered containers])
541         ])
542 ])
543
544
545
546
547
548 AC_CHECK_HEADERS(signal.h termios.h sys/errno.h)
549
550
551 case "$host" in
552         *mingw* | *cygwin*)
553                 AM_CONDITIONAL(WIN32_PKG, true)
554                 AM_CONDITIONAL(MACOSX_PKG, false)
555         ;;
556         *darwin*)
557                 AM_CONDITIONAL(WIN32_PKG, false)
558                 AM_CONDITIONAL(MACOSX_PKG, true)
559         ;;
560         *)
561                 AM_CONDITIONAL(WIN32_PKG, false)
562                 AM_CONDITIONAL(MACOSX_PKG, false)
563         ;;
564 esac
565
566
567
568 # -- H E A D E R S --------------------------------------------
569
570 AC_HEADER_SYS_WAIT
571 AC_CHECK_HEADERS([process.h io.h fcntl.h])
572
573 # -- T Y P E S & S T R U C T S --------------------------------
574
575 # -- F U N C T I O N S ----------------------------------------
576
577 dnl AC_CHECK_FUNCS([floor pow sqrt],[],[
578 dnl     AC_MSG_ERROR([ ** Could not find proper math functions.])
579 dnl ])
580
581 AC_CHECK_FUNCS([fork])
582 AC_CHECK_FUNCS([kill])
583 AC_CHECK_FUNCS([pipe])
584 AC_CHECK_FUNCS([waitpid])
585
586 AC_CHECK_FUNCS(
587         [isnan],
588         [],
589         [
590                 AC_CHECK_FUNCS(
591                         [_isnan]
592                 )
593         ]
594 )
595
596 AC_CHECK_FUNCS(
597         [isnanf],
598         [],
599         [
600                 AC_CHECK_FUNCS(
601                         [_isnanf]
602                 )
603         ]
604 )
605
606 AC_CHECK_FUNCS(
607         [floorl],
608         [],
609         [
610                 AC_CHECK_FUNCS(
611                         [_floorl]
612                 )
613         ]
614 )
615
616 AC_CHECK_LIB([pthread],[pthread_create])
617
618 # -- O U T P U T ----------------------------------------------
619
620 AC_SUBST(CFLAGS)
621 AC_SUBST(CXXFLAGS)
622 AC_SUBST(CPPFLAGS)
623 AC_SUBST(LDFLAGS)
624
625 # AC_CONFIG_SUBDIRS(libltdl) is required for libtool 1.5.26 but must not be present for
626 # libtool 2.2.4. Problem seems to be that AC_LIB_LTDL (above) now calls AC_CONFIG_SUBDIRS
627 # itself, through LTDL_INIT, _LTDL_SETUP, _LTDL_MODE_DISPATCH. We need to check the
628 # condition that libltdl has already been registered with AC_CONFIG_SUBDIRS:
629 m4_ifdef([_AC_SEEN_TAG(libltdl)], [], [AC_CONFIG_SUBDIRS(libltdl)])
630
631 CONFIG_LIBS="-lsynfig"
632 CONFIG_CFLAGS="$CONFIG_CFLAGS"
633 AC_SUBST(CONFIG_LIBS)
634 AC_SUBST(CONFIG_CFLAGS)
635 AC_SUBST(CONFIG_DEPS)
636 AC_SUBST(ETL_CFLAGS)
637
638 SYNFIG_LIBS="$VIMAGE_LIBS $LIBXMLPP_LIBS $ETL_LIBS $LIBSIGC_LIBS $LTLIBINTL"
639 SYNFIG_CFLAGS="$LIBXMLPP_CFLAGS $ETL_CFLAGS $LIBSIGC_CFLAGS $CONFIG_CFLAGS -DSYNFIG_NO_DEPRECATED -DLOCALEDIR=\\\"$localedir\\\""
640
641 CONFIG_CFLAGS="`echo $CONFIG_CFLAGS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
642 SYNFIG_CFLAGS="`echo $SYNFIG_CFLAGS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
643 SYNFIG_LIBS="`echo $SYNFIG_LIBS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
644
645 AC_SUBST(LIBADD_DL)
646
647 AC_SUBST(SYNFIG_LIBS)
648 AC_SUBST(SYNFIG_CFLAGS)
649 AC_SUBST(OPENEXR_HALF_LIBS)
650
651 AC_SUBST(API_VERSION)
652
653 synfigincludedir=$includedir/synfig-$API_VERSION
654 AC_SUBST(synfigincludedir)
655
656 AC_CONFIG_FILES([synfig-config
657 build_tools/Makefile
658 synfig.pc
659 doxygen.cfg
660 Makefile
661 po/Makefile.in
662 src/Makefile
663 src/synfig/Makefile
664 src/modules/Makefile
665 src/modules/lyr_freetype/Makefile
666 src/modules/lyr_std/Makefile
667 src/modules/mod_bmp/Makefile
668 src/modules/mod_dv/Makefile
669 src/modules/mod_ffmpeg/Makefile
670 src/modules/mod_filter/Makefile
671 src/modules/mod_geometry/Makefile
672 src/modules/mod_gif/Makefile
673 src/modules/mod_gradient/Makefile
674 src/modules/mod_imagemagick/Makefile
675 src/modules/mod_jpeg/Makefile
676 src/modules/mod_libavcodec/Makefile
677 src/modules/mod_magickpp/Makefile
678 src/modules/mod_mng/Makefile
679 src/modules/mod_noise/Makefile
680 src/modules/mod_openexr/Makefile
681 src/modules/mod_particle/Makefile
682 src/modules/mod_png/Makefile
683 src/modules/mod_ppm/Makefile
684 src/modules/mod_yuv420p/Makefile
685 src/modules/mod_svg/Makefile
686 src/modules/mod_example/Makefile
687 src/tool/Makefile
688 src/modules/synfig_modules.cfg
689 examples/walk/Makefile
690 examples/Makefile
691 win32inst.nsi
692 pkg-info/macosx/synfig-core.info
693 ])
694 ## src/modules/trgt_mpg/Makefile
695 ## src/modules/mptr_mplayer/Makefile
696 AC_OUTPUT
697
698 # -- S U M M A R Y --------------------------------------------
699
700 echo "
701 $PACKAGE_NAME v.$VERSION
702 Configuration Summary
703 - - - - - -
704
705 Install Prefix -------------------> $prefix
706 Module directory -----------------> $moduledir
707 Build Platform -------------------> $build
708 Host Platform --------------------> $host
709 Arc Profiling --------------------> $profile_arcs
710 GProf Profiling ------------------> $profiling
711 Debug Mode -----------------------> $debug ($debug_flags)
712 Optimization ---------------------> $optimization
713 PNG output target support --------> $TARGET_PNG
714 MNG output target support --------> $TARGET_MNG
715 JPEG output target support -------> $TARGET_JPEG
716 ETL_CFLAGS -----------------------> $ETL_CFLAGS
717 FreeType2 ------------------------> $with_freetype
718 fontconfig -----------------------> $with_fontconfig
719 libavcodec -----------------------> $with_libavcodec
720 libswscale -----------------------> $with_libswscale
721 vImage ---------------------------> $with_vimage
722 ImageMagick ----------------------> $with_imagemagick
723 Magick++ -------------------------> $with_magickpp
724 FFMPEG ---------------------------> $with_ffmpeg
725 libdv ----------------------------> $with_libdv
726 OpenEXR --------------------------> $with_openexr
727 Using OpenEXR's \"half\" type ------> $use_openexr_half
728
729 "'$'"CXX -----------------------------> '$CXX'
730 "'$'"CXXFLAGS ------------------------> '$CXXFLAGS'
731 "'$'"SYNFIG_LIBS ---------------------> '$SYNFIG_LIBS'
732 "'$'"LIBXMLPP_LIBS -------------------> '$LIBXMLPP_LIBS'
733 "'$'"ETL_LIBS ------------------------> '$ETL_LIBS'
734 "'$'"LIBSIGC_LIBS --------------------> '$LIBSIGC_LIBS'
735 "'$'"SYNFIG_CFLAGS -------------------> '$SYNFIG_CFLAGS'
736 "'$'"LIBADD_DL -----------------------> '$LIBADD_DL'
737 "