3 # -- I N I T --------------------------------------------------
5 AC_INIT([Synfig Core],[0.61.07],[http://synfig.org/Bugs],[synfig])
8 AC_CONFIG_AUX_DIR(config)
9 AM_CONFIG_HEADER(config.h)
11 dnl AC_CANONICAL_TARGET
13 AM_INIT_AUTOMAKE([nostdinc])
16 AC_LIBLTDL_CONVENIENCE
23 AC_DEFINE(LT_SCOPE,[extern],[LibLTDL is linked staticly])
28 # -- V A R I A B L E S ----------------------------------------
30 SVN_REPOSITORY=http://svn.voria.com/code/synfig-core
31 AC_SUBST(SVN_REPOSITORY)
33 # -- P R O G R A M S ------------------------------------------
45 # -- A R G U M E N T S ----------------------------------------
53 AC_ARG_BRANCH_PROBABILITIES
56 --enable-g5opt enable optimizations specific to G5 proc],[
57 # CXXFLAGS="$CXXFLAGS -fastf -fPIC"
58 # CFLAGS="$CFLAGS -fastf -fPIC"
59 CXXFLAGS="$CXXFLAGS -mtune=G5 -falign-loops=32"
60 CFLAGS="$CFLAGS -mtune=G5"
66 #MINGW_FLAGS="-mno-cygwin"
70 # If we are in debug mode, use the debugging version of the
71 # Microsoft Visual C Runtime Library
72 #if [[ $debug = "yes" ]] ; then {
73 # WIN32_DEBUG_LIBRARY="msvcr70d"
74 # WIN32_DEBUG_LIBRARY="msvcrtd"
75 # LIBTOOL_PATCH_SED="$LIBTOOL_PATCH_SED
76 # s/-lmsvcrt/-l$WIN32_DEBUG_LIBRARY/g;
85 AC_SUBST(LIBTOOL_DEPS)
88 #if [[ "$LIBTOOL_PATCH_SED""x" != "x" ]] ; then {
89 # printf "Patching libtool... "
90 # cat libtool | sed "$LIBTOOL_PATCH_SED" > libtool2
94 # AC_MSG_RESULT([patched])
101 AC_CHECK_LIB(c, dlopen,
106 DYNAMIC_LD_LIBS="-ldl",
111 AC_SUBST(DYNAMIC_LD_LIBS)
114 --enable-half Use OpenEXR's "half" type for color],[
115 use_openexr_half=$enableval
118 use_openexr_half="no"
123 AC_ARG_ENABLE(layer-profiling,[
124 --enable-layer-profiling Enable layer profiling],[
125 use_layerprofiling=$enableval
128 use_layerprofiling="no"
130 if test $use_layerprofiling = "yes" ; then {
131 AC_DEFINE(SYNFIG_PROFILE_LAYERS,[1],[enable layer profiling])
137 AC_ARG_WITH(imagemagick,[
138 --without-imagemagick Disable support for ImageMagick],[
140 AC_CHECK_PROG([imagemagick_convert],[convert],[yes],[no])
141 with_imagemagick=$imagemagick_convert
143 if test $with_imagemagick = "no" ; then {
144 AM_CONDITIONAL(WITH_IMAGEMAGICK,false)
146 AM_CONDITIONAL(WITH_IMAGEMAGICK,true)
153 AC_ARG_WITH(magickpp,[
154 --without-magickpp Disable support for Magick++],[
158 if test $with_magickpp = "yes" ; then {
159 AC_CHECK_HEADER([Magick++.h],[
160 MAGICKPP_LIBS="-lMagick++"
161 AC_DEFINE(HAVE_MAGICKPP,[], [ Define if Magick++ library is available ] )
162 AC_SUBST(MAGICKPP_LIBS)
163 AM_CONDITIONAL(HAVE_LIBMAGICKPP,true)
164 AC_CHECK_LIB(Magick,OptimizeImageTransparency,[
165 AC_DEFINE(HAVE_MAGICK_OPTIMIZE,[], [ Define if Magick++ defines OptimizeImageTransparency() ] )
166 AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,true)
168 AC_MSG_RESULT([ *** OptimizeImageTransparency() not available - need ImageMagick 6.3 or newer ])
169 AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,false)
173 AC_MSG_RESULT([ *** Magick++ Output target disabled])
175 AM_CONDITIONAL(HAVE_LIBMAGICKPP,false)
176 AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,false)
179 AM_CONDITIONAL(HAVE_LIBMAGICKPP,false)
180 AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,false)
187 --without-ffmpeg Disable support for FFMPEG],[
191 if test $with_ffmpeg = "no" ; then {
192 AM_CONDITIONAL(WITH_FFMPEG,false)
194 AM_CONDITIONAL(WITH_FFMPEG,true)
201 --with-vimage Enable support for apple vImage],[
205 if test $with_vimage = "no" ; then {
206 AM_CONDITIONAL(WITH_VIMAGE,false)
208 AM_CONDITIONAL(WITH_VIMAGE,true)
209 AC_DEFINE(HAS_VIMAGE,[1],[enable apple vImage])
210 VIMAGE_LIBS="-Wc,-framework -Wc,Accelerate"
217 --without-libdv Disable support for libdv],[
221 if test $with_libdv = "no" ; then {
222 AM_CONDITIONAL(WITH_LIBDV,false)
224 AM_CONDITIONAL(WITH_LIBDV,true)
230 # LIBAVCODEC CHECK--------------------
232 AC_ARG_WITH(libavcodec,[
233 --without-libavcodec disable support for libavcodec (Default=auto)],[
235 with_libavcodec="yes"
238 if test $with_libavcodec != "no" ; then {
239 PKG_CHECK_MODULES(LIBAVCODEC, [libavcodec libavformat],[],[echo no; with_libavcodec="no"])
241 if test $with_libavcodec = "yes" ; then {
242 AC_DEFINE(WITH_LIBAVCODEC,[],[enable libavcodec support])
243 AM_CONDITIONAL(WITH_LIBAVCODEC,true)
245 AM_CONDITIONAL(WITH_LIBAVCODEC,false)
250 # FREETYPE2 CHECK--------------------
252 AC_ARG_WITH(freetype,[
253 --without-freetype disable support for freetype (Default=auto)],[
258 if test $with_freetype != "no" ; then {
259 PKG_CHECK_MODULES(FREETYPE, freetype2,[
262 PKG_CHECK_MODULES(FREETYPE, xft,[
270 if test $with_freetype = "no" ; then {
271 AM_CONDITIONAL(WITH_FREETYPE,false)
273 AM_CONDITIONAL(WITH_FREETYPE,true)
277 # FONTCONFIG CHECK--------------------
279 AC_ARG_WITH(fontconfig,[
280 --without-fontconfig disable support for fontconfig (Default=auto)],[
282 with_fontconfig="yes"
285 if test $with_fontconfig != "no" ; then {
286 PKG_CHECK_MODULES(FONTCONFIG, fontconfig,[
287 with_fontconfig="yes"
293 if test $with_fontconfig = "yes" ; then {
294 AC_DEFINE(WITH_FONTCONFIG,[],[enable fontconfig support])
295 AM_CONDITIONAL(WITH_FONTCONFIG,true)
297 AM_CONDITIONAL(WITH_FONTCONFIG,false)
301 # OPENEXR CHECK------------------------
302 AC_ARG_WITH(openexr,[
303 --without-openexr Disable support for ILM's OpenEXR],[
307 if test $with_openexr = "yes" ; then {
308 PKG_CHECK_MODULES(OPENEXR, OpenEXR,[
309 CONFIG_DEPS="$CONFIG_DEPS OpenEXR"
311 AC_DEFINE(HAVE_OPENEXR,[], [ Define if OpenEXR is available ] )
312 AM_CONDITIONAL(WITH_OPENEXR,true)
318 if test $with_openexr = "no" ; then {
319 AM_CONDITIONAL(WITH_OPENEXR,false)
320 use_openexr_half="no"
322 if test $use_openexr_half = yes ; then {
323 AC_MSG_RESULT([ ** Using OpenEXR Half.])
324 CONFIG_CFLAGS="$CONFIG_CFLAGS -DUSE_HALF_TYPE"
325 OPENEXR_HALF_LIBS="-lHalf"
334 # -- L I B R A R I E S ----------------------------------------
339 AM_GNU_GETTEXT([external])
340 # This is here so autoreconf will run autopoint
341 AM_GNU_GETTEXT_VERSION([0.14.4])
342 localedir="$datadir/locale"
344 PKG_CHECK_MODULES(ETL, [ETL >= 0.04.10],,[
345 AC_MSG_ERROR([ ** You need to install the ETL (version 0.04.10 or greater).])
347 CONFIG_DEPS="$CONFIG_DEPS ETL"
350 PKG_CHECK_MODULES(LIBXMLPP, libxml++-2.6,[
351 CONFIG_DEPS="$CONFIG_DEPS libxml++-2.6"
353 PKG_CHECK_MODULES(LIBXMLPP, libxml++-1.0,[
354 CONFIG_DEPS="$CONFIG_DEPS libxml++-1.0"
356 AC_MSG_ERROR([ ** You need to install libxml++, either verison 2.6 or 1.0.])
360 PKG_CHECK_MODULES(LIBSIGC, [sigc++-2.0],,[
361 AC_MSG_ERROR([ ** libsigc++-2.0 not found. It is required. You should really install it.])
362 dnl PKG_CHECK_MODULES(LIBSIGC, [sigc++-1.2],,[
363 dnl AC_MSG_ERROR([ ** At least libsigc++-1.2 is required.])
366 CONFIG_DEPS="$CONFIG_DEPS sigc++-2.0"
368 dnl PKG_CHECK_MODULES(GLIB, glib-2.0,[GLIB="yes"],[GLIB="no"])
379 if test "$TARGET_TIF" != "disabled" ; then
380 AC_CHECK_LIB(tiff, TIFFClose,[
382 AC_DEFINE(HAVE_LIBTIFF,[], [ Define if TIFF library is available ] )
384 AM_CONDITIONAL(HAVE_LIBTIFF,true)
386 AC_MSG_RESULT([ *** TIFF Output target disabled])
388 AM_CONDITIONAL(HAVE_LIBTIFF,false)
392 AC_CHECK_LIB(png, png_write_row,[
394 AC_DEFINE(HAVE_LIBPNG,[], [ Define if PNG library is available ] )
396 AM_CONDITIONAL(HAVE_LIBPNG,true)
398 AC_CHECK_LIB(png12, png_write_row,[
400 AC_DEFINE(HAVE_LIBPNG,[])
402 AM_CONDITIONAL(HAVE_LIBPNG,true)
404 AC_MSG_RESULT([ *** PNG Output target disabled])
406 AM_CONDITIONAL(HAVE_LIBPNG,false)
407 ],[-lz -L${exec_prefix}/lib])
408 ],[-lz -L${exec_prefix}/lib])
410 AC_CHECK_LIB(mng, mng_initialize,[
412 AC_DEFINE(HAVE_LIBMNG,[], [ Define if MNG library is available ] )
414 AM_CONDITIONAL(HAVE_LIBMNG,true)
416 AC_MSG_RESULT([ *** MNG Output target disabled])
418 AM_CONDITIONAL(HAVE_LIBMNG,false)
419 ],[-lz -L${exec_prefix}/lib])
421 AC_CHECK_LIB(jpeg, main,[
423 AC_DEFINE(HAVE_LIBJPEG,[], [ Define if JPEG library is available ] )
425 AM_CONDITIONAL(HAVE_LIBJPEG,true)
427 AC_MSG_RESULT([ *** JPEG Output target disabled])
429 AM_CONDITIONAL(HAVE_LIBJPEG,false)
430 ],[-L${exec_prefix}/lib])
433 dnl AC_CHECK_HEADERS(jpeglib.h,[],[
434 dnl AC_MSG_RESULT([ *** JPEG Output target disabled])
436 dnl AM_CONDITIONAL(HAVE_LIBJPEG,false)
441 MODULE_DIR='${libdir}/synfig/modules'
442 moduledir=$libdir/synfig/modules
444 SYNFIGLIB_DIR=$libdir/synfig
445 AC_SUBST(SYNFIGLIB_DIR)
447 # Check for unordered_map or hash_map headers
448 AC_MSG_CHECKING([for unordered_map<int,int>::const_iterator])
451 [#include <tr1/unordered_map>]
453 [std::tr1::unordered_map<int,int>::const_iterator iter;]
456 AC_DEFINE([HASH_MAP_CLASS],[HASH_MAP_NAMESPACE::unordered_map],[The template name for unordered maps.])
457 AC_DEFINE([HASH_MAP_H],[<tr1/unordered_map>],[The header file to include for unordered maps.])
458 AC_DEFINE([HASH_MAP_NAMESPACE],[std::tr1],[The namespace for unordered maps.])
459 AC_DEFINE([FUNCTIONAL_H],[<tr1/functional>],[The header file for hash<T>.])
460 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.])
463 AC_CHECK_HEADERS([ext/hash_map],[
464 AC_DEFINE([HASH_MAP_CLASS],[HASH_MAP_NAMESPACE::hash_map],[The template name for unordered maps.])
465 AC_DEFINE([HASH_MAP_H],[<ext/hash_map>],[The header file to include for unordered maps.])
466 AC_DEFINE([HASH_MAP_NAMESPACE],[__gnu_cxx],[The namespace for unordered maps.])
467 AC_DEFINE([FUNCTIONAL_H],[<ext/functional>],[The header file for hash<T>.])
469 AC_MSG_ERROR([C++ compiler does not seem to support unordered containers])
473 # Check for unordered_set or hash_set headers
474 AC_MSG_CHECKING([for unordered_set<int,int>::const_iterator])
477 [#include <tr1/unordered_set>]
479 [std::tr1::unordered_set<int,int>::const_iterator iter;]
482 AC_DEFINE([HASH_SET_CLASS],[HASH_SET_NAMESPACE::unordered_set],[The template name for unordered sets.])
483 AC_DEFINE([HASH_SET_H],[<tr1/unordered_set>],[The header file to include for unordered sets.])
484 AC_DEFINE([HASH_SET_NAMESPACE],[std::tr1],[The namespace for unordered sets.])
487 AC_CHECK_HEADERS([ext/hash_set],[
488 AC_DEFINE([HASH_SET_CLASS],[HASH_SET_NAMESPACE::hash_set],[The template name for unordered sets.])
489 AC_DEFINE([HASH_SET_H],[<ext/hash_set>],[The header file to include for unordered sets.])
490 AC_DEFINE([HASH_SET_NAMESPACE],[__gnu_cxx],[The namespace for unordered sets.])
492 AC_MSG_ERROR([C++ compiler does not seem to support unordered containers])
500 AC_CHECK_HEADERS(signal.h termios.h sys/errno.h)
505 AM_CONDITIONAL(WIN32_PKG, true)
506 AM_CONDITIONAL(MACOSX_PKG, false)
509 AM_CONDITIONAL(WIN32_PKG, false)
510 AM_CONDITIONAL(MACOSX_PKG, true)
513 AM_CONDITIONAL(WIN32_PKG, false)
514 AM_CONDITIONAL(MACOSX_PKG, false)
520 # -- H E A D E R S --------------------------------------------
523 AC_CHECK_HEADERS([process.h io.h fcntl.h])
525 # -- T Y P E S & S T R U C T S --------------------------------
527 # -- F U N C T I O N S ----------------------------------------
529 dnl AC_CHECK_FUNCS([floor pow sqrt],[],[
530 dnl AC_MSG_ERROR([ ** Could not find proper math functions.])
533 AC_CHECK_FUNCS([fork])
534 AC_CHECK_FUNCS([kill])
535 AC_CHECK_FUNCS([pipe])
536 AC_CHECK_FUNCS([waitpid])
568 AC_CHECK_LIB([pthread],[pthread_create])
570 # -- O U T P U T ----------------------------------------------
577 AC_CONFIG_SUBDIRS(libltdl)
579 CONFIG_LIBS="-lsynfig"
580 CONFIG_CFLAGS="$CONFIG_CFLAGS"
581 AC_SUBST(CONFIG_LIBS)
582 AC_SUBST(CONFIG_CFLAGS)
583 AC_SUBST(CONFIG_DEPS)
586 SYNFIG_LIBS="$VIMAGE_LIBS $LIBXMLPP_LIBS $ETL_LIBS $LIBSIGC_LIBS $LTLIBINTL"
587 SYNFIG_CFLAGS="$LIBXMLPP_CFLAGS $ETL_CFLAGS $LIBSIGC_CFLAGS $CONFIG_CFLAGS -DSYNFIG_NO_DEPRECATED -DLOCALEDIR=\\\"$localedir\\\""
589 CONFIG_CFLAGS="`echo $CONFIG_CFLAGS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
590 SYNFIG_CFLAGS="`echo $SYNFIG_CFLAGS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
591 SYNFIG_LIBS="`echo $SYNFIG_LIBS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
595 AC_SUBST(SYNFIG_LIBS)
596 AC_SUBST(SYNFIG_CFLAGS)
597 AC_SUBST(OPENEXR_HALF_LIBS)
599 AC_SUBST(API_VERSION)
601 synfigincludedir=$includedir/synfig-$API_VERSION
602 AC_SUBST(synfigincludedir)
613 src/modules/lyr_freetype/Makefile
614 src/modules/lyr_std/Makefile
615 src/modules/mod_bmp/Makefile
616 src/modules/mod_dv/Makefile
617 src/modules/mod_ffmpeg/Makefile
618 src/modules/mod_filter/Makefile
619 src/modules/mod_geometry/Makefile
620 src/modules/mod_gif/Makefile
621 src/modules/mod_gradient/Makefile
622 src/modules/mod_imagemagick/Makefile
623 src/modules/mod_jpeg/Makefile
624 src/modules/mod_libavcodec/Makefile
625 src/modules/mod_magickpp/Makefile
626 src/modules/mod_mng/Makefile
627 src/modules/mod_noise/Makefile
628 src/modules/mod_openexr/Makefile
629 src/modules/mod_particle/Makefile
630 src/modules/mod_png/Makefile
631 src/modules/mod_ppm/Makefile
632 src/modules/mod_yuv420p/Makefile
634 src/modules/synfig_modules.cfg
635 examples/walk/Makefile
638 pkg-info/macosx/synfig-core.info
639 dnl src/modules/trgt_mpg/Makefile
640 dnl src/modules/mptr_mplayer/Makefile
643 # -- S U M M A R Y --------------------------------------------
646 $PACKAGE_NAME v.$VERSION
647 Configuration Summary
650 Install Prefix -------------------> $prefix
651 Module directory -----------------> $moduledir
652 Build Platform -------------------> $build
653 Host Platform --------------------> $host
654 Arc Profiling --------------------> $profile_arcs
655 GProf Profiling ------------------> $profiling
656 Debug Mode -----------------------> $debug ($debug_flags)
657 Optimization ---------------------> $optimization
658 PNG output target support --------> $TARGET_PNG
659 MNG output target support --------> $TARGET_MNG
660 TIFF output target support -------> $TARGET_TIF
661 JPEG output target support -------> $TARGET_JPEG
662 ETL_CFLAGS -----------------------> $ETL_CFLAGS
663 FreeType2 ------------------------> $with_freetype
664 fontconfig -----------------------> $with_fontconfig
665 libavcodec -----------------------> $with_libavcodec
666 vImage ---------------------------> $with_vimage
667 ImageMagick ----------------------> $with_imagemagick
668 Magick++ -------------------------> $with_magickpp
669 FFMPEG ---------------------------> $with_ffmpeg
670 libdv ----------------------------> $with_libdv
671 OpenEXR --------------------------> $with_openexr
672 Using OpenEXR's \"half\" type ------> $use_openexr_half
674 "'$'"CXX -----------------------------> '$CXX'
675 "'$'"CXXFLAGS ------------------------> '$CXXFLAGS'
676 "'$'"SYNFIG_LIBS ---------------------> '$SYNFIG_LIBS'
677 "'$'"LIBXMLPP_LIBS -------------------> '$LIBXMLPP_LIBS'
678 "'$'"ETL_LIBS ------------------------> '$ETL_LIBS'
679 "'$'"LIBSIGC_LIBS --------------------> '$LIBSIGC_LIBS'
680 "'$'"SYNFIG_CFLAGS -------------------> '$SYNFIG_CFLAGS'
681 "'$'"LIBADD_DL -----------------------> '$LIBADD_DL'