3 # -- I N I T --------------------------------------------------
5 AC_INIT([Synfig Core],[0.61.07],[http://sourceforge.net/tracker/?group_id=144022&atid=757416],[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 ----------------------------------------
54 AC_ARG_BRANCH_PROBABILITIES
55 dnl AC_ARG_LICENSE_KEY
58 --enable-g5opt enable optimizations specific to G5 proc],[
59 # CXXFLAGS="$CXXFLAGS -fastf -fPIC"
60 # CFLAGS="$CFLAGS -fastf -fPIC"
61 CXXFLAGS="$CXXFLAGS -mtune=G5 -falign-loops=32"
62 CFLAGS="$CFLAGS -mtune=G5"
68 #MINGW_FLAGS="-mno-cygwin"
72 # If we are in debug mode, use the debugging version of the
73 # Microsoft Visual C Runtime Library
74 #if [[ $debug = "yes" ]] ; then {
75 # WIN32_DEBUG_LIBRARY="msvcr70d"
76 # WIN32_DEBUG_LIBRARY="msvcrtd"
77 # LIBTOOL_PATCH_SED="$LIBTOOL_PATCH_SED
78 # s/-lmsvcrt/-l$WIN32_DEBUG_LIBRARY/g;
87 AC_SUBST(LIBTOOL_DEPS)
90 #if [[ "$LIBTOOL_PATCH_SED""x" != "x" ]] ; then {
91 # printf "Patching libtool... "
92 # cat libtool | sed "$LIBTOOL_PATCH_SED" > libtool2
96 # AC_MSG_RESULT([patched])
103 AC_CHECK_LIB(c, dlopen,
108 DYNAMIC_LD_LIBS="-ldl",
113 AC_SUBST(DYNAMIC_LD_LIBS)
116 --enable-half Use OpenEXR's "half" type for color],[
117 use_openexr_half=$enableval
120 use_openexr_half="no"
125 AC_ARG_ENABLE(layer-profiling,[
126 --enable-layer-profiling Enable layer profiling],[
127 use_layerprofiling=$enableval
130 use_layerprofiling="no"
132 if test $use_layerprofiling = "yes" ; then {
133 AC_DEFINE(SYNFIG_PROFILE_LAYERS,[1],[enable layer profiling])
139 AC_ARG_WITH(imagemagick,[
140 --without-imagemagick Disable support for ImageMagick],[
142 AC_CHECK_PROG([imagemagick_convert],[convert],[yes],[no])
143 with_imagemagick=$imagemagick_convert
145 if test $with_imagemagick = "no" ; then {
146 AM_CONDITIONAL(WITH_IMAGEMAGICK,false)
148 AM_CONDITIONAL(WITH_IMAGEMAGICK,true)
155 AC_ARG_WITH(magickpp,[
156 --without-magickpp Disable support for Magick++],[
160 if test $with_magickpp = "yes" ; then {
161 AC_CHECK_HEADER([Magick++.h],[
162 MAGICKPP_LIBS="-lMagick++"
163 AC_DEFINE(HAVE_MAGICKPP,[], [ Define if Magick++ library is available ] )
164 AC_SUBST(MAGICKPP_LIBS)
165 AM_CONDITIONAL(HAVE_LIBMAGICKPP,true)
166 AC_CHECK_LIB(Magick,OptimizeImageTransparency,[
167 AC_DEFINE(HAVE_MAGICK_OPTIMIZE,[], [ Define if Magick++ defines OptimizeImageTransparency() ] )
168 AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,true)
170 AC_MSG_RESULT([ *** OptimizeImageTransparency() not available - need ImageMagick 6.3 or newer ])
171 AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,false)
175 AC_MSG_RESULT([ *** Magick++ Output target disabled])
177 AM_CONDITIONAL(HAVE_LIBMAGICKPP,false)
178 AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,false)
181 AM_CONDITIONAL(HAVE_LIBMAGICKPP,false)
182 AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,false)
189 --without-ffmpeg Disable support for FFMPEG],[
193 if test $with_ffmpeg = "no" ; then {
194 AM_CONDITIONAL(WITH_FFMPEG,false)
196 AM_CONDITIONAL(WITH_FFMPEG,true)
203 --with-vimage Enable support for apple vImage],[
207 if test $with_vimage = "no" ; then {
208 AM_CONDITIONAL(WITH_VIMAGE,false)
210 AM_CONDITIONAL(WITH_VIMAGE,true)
211 AC_DEFINE(HAS_VIMAGE,[1],[enable apple vImage])
212 VIMAGE_LIBS="-Wc,-framework -Wc,Accelerate"
219 --without-libdv Disable support for libdv],[
223 if test $with_libdv = "no" ; then {
224 AM_CONDITIONAL(WITH_LIBDV,false)
226 AM_CONDITIONAL(WITH_LIBDV,true)
232 # LIBAVCODEC CHECK--------------------
234 AC_ARG_WITH(libavcodec,[
235 --without-libavcodec disable support for libavcodec (Default=auto)],[
237 with_libavcodec="yes"
240 if test $with_libavcodec != "no" ; then {
241 PKG_CHECK_MODULES(LIBAVCODEC, [libavcodec libavformat],[],[echo no; with_libavcodec="no"])
243 if test $with_libavcodec = "yes" ; then {
244 AC_DEFINE(WITH_LIBAVCODEC,[],[enable libavcodec support])
245 AM_CONDITIONAL(WITH_LIBAVCODEC,true)
247 AM_CONDITIONAL(WITH_LIBAVCODEC,false)
252 # FREETYPE2 CHECK--------------------
254 AC_ARG_WITH(freetype,[
255 --without-freetype disable support for freetype (Default=auto)],[
260 if test $with_freetype != "no" ; then {
261 PKG_CHECK_MODULES(FREETYPE, freetype2,[
264 PKG_CHECK_MODULES(FREETYPE, xft,[
272 if test $with_freetype = "no" ; then {
273 AM_CONDITIONAL(WITH_FREETYPE,false)
275 AM_CONDITIONAL(WITH_FREETYPE,true)
279 # FONTCONFIG CHECK--------------------
281 AC_ARG_WITH(fontconfig,[
282 --without-fontconfig disable support for fontconfig (Default=auto)],[
284 with_fontconfig="yes"
287 if test $with_fontconfig != "no" ; then {
288 PKG_CHECK_MODULES(FONTCONFIG, fontconfig,[
289 with_fontconfig="yes"
295 if test $with_fontconfig = "yes" ; then {
296 AC_DEFINE(WITH_FONTCONFIG,[],[enable fontconfig support])
297 AM_CONDITIONAL(WITH_FONTCONFIG,true)
299 AM_CONDITIONAL(WITH_FONTCONFIG,false)
303 # OPENEXR CHECK------------------------
304 AC_ARG_WITH(openexr,[
305 --without-openexr Disable support for ILM's OpenEXR],[
309 if test $with_openexr = "yes" ; then {
310 PKG_CHECK_MODULES(OPENEXR, OpenEXR,[
311 CONFIG_DEPS="$CONFIG_DEPS OpenEXR"
313 AC_DEFINE(HAVE_OPENEXR,[], [ Define if OpenEXR is available ] )
314 AM_CONDITIONAL(WITH_OPENEXR,true)
320 if test $with_openexr = "no" ; then {
321 AM_CONDITIONAL(WITH_OPENEXR,false)
322 use_openexr_half="no"
324 if test $use_openexr_half = yes ; then {
325 AC_MSG_RESULT([ ** Using OpenEXR Half.])
326 CONFIG_CFLAGS="$CONFIG_CFLAGS -DUSE_HALF_TYPE"
327 OPENEXR_HALF_LIBS="-lHalf"
336 # -- L I B R A R I E S ----------------------------------------
341 AM_GNU_GETTEXT([external])
342 # This is here so autoreconf will run autopoint
343 AM_GNU_GETTEXT_VERSION([0.13])
344 localedir="$datadir/locale"
346 PKG_CHECK_MODULES(ETL, [ETL >= 0.04.10],,[
347 AC_MSG_ERROR([ ** You need to install the ETL (version 0.04.10 or greater).])
349 CONFIG_DEPS="$CONFIG_DEPS ETL"
352 PKG_CHECK_MODULES(LIBXMLPP, libxml++-2.6,[
353 CONFIG_DEPS="$CONFIG_DEPS libxml++-2.6"
355 PKG_CHECK_MODULES(LIBXMLPP, libxml++-1.0,[
356 CONFIG_DEPS="$CONFIG_DEPS libxml++-1.0"
358 AC_MSG_ERROR([ ** You need to install libxml++, either verison 2.6 or 1.0.])
362 PKG_CHECK_MODULES(LIBSIGC, [sigc++-2.0],,[
363 AC_MSG_ERROR([ ** libsigc++-2.0 not found. It is required. You should really install it.])
364 dnl PKG_CHECK_MODULES(LIBSIGC, [sigc++-1.2],,[
365 dnl AC_MSG_ERROR([ ** At least libsigc++-1.2 is required.])
368 CONFIG_DEPS="$CONFIG_DEPS sigc++-2.0"
370 dnl PKG_CHECK_MODULES(GLIB, glib-2.0,[GLIB="yes"],[GLIB="no"])
381 if test "$TARGET_TIF" != "disabled" ; then
382 AC_CHECK_LIB(tiff, TIFFClose,[
384 AC_DEFINE(HAVE_LIBTIFF,[], [ Define if TIFF library is available ] )
386 AM_CONDITIONAL(HAVE_LIBTIFF,true)
388 AC_MSG_RESULT([ *** TIFF Output target disabled])
390 AM_CONDITIONAL(HAVE_LIBTIFF,false)
394 AC_CHECK_LIB(png, png_write_row,[
396 AC_DEFINE(HAVE_LIBPNG,[], [ Define if PNG library is available ] )
398 AM_CONDITIONAL(HAVE_LIBPNG,true)
400 AC_CHECK_LIB(png12, png_write_row,[
402 AC_DEFINE(HAVE_LIBPNG,[])
404 AM_CONDITIONAL(HAVE_LIBPNG,true)
406 AC_MSG_RESULT([ *** PNG Output target disabled])
408 AM_CONDITIONAL(HAVE_LIBPNG,false)
409 ],[-lz -L${exec_prefix}/lib])
410 ],[-lz -L${exec_prefix}/lib])
412 AC_CHECK_LIB(mng, mng_initialize,[
414 AC_DEFINE(HAVE_LIBMNG,[], [ Define if MNG library is available ] )
416 AM_CONDITIONAL(HAVE_LIBMNG,true)
418 AC_MSG_RESULT([ *** MNG Output target disabled])
420 AM_CONDITIONAL(HAVE_LIBMNG,false)
421 ],[-lz -L${exec_prefix}/lib])
423 AC_CHECK_LIB(jpeg, main,[
425 AC_DEFINE(HAVE_LIBJPEG,[], [ Define if JPEG library is available ] )
427 AM_CONDITIONAL(HAVE_LIBJPEG,true)
429 AC_MSG_RESULT([ *** JPEG Output target disabled])
431 AM_CONDITIONAL(HAVE_LIBJPEG,false)
432 ],[-L${exec_prefix}/lib])
435 dnl AC_CHECK_HEADERS(jpeglib.h,[],[
436 dnl AC_MSG_RESULT([ *** JPEG Output target disabled])
438 dnl AM_CONDITIONAL(HAVE_LIBJPEG,false)
443 MODULE_DIR='${libdir}/synfig/modules'
444 moduledir=$libdir/synfig/modules
446 SYNFIGLIB_DIR=$libdir/synfig
447 AC_SUBST(SYNFIGLIB_DIR)
453 CXXFLAGS="$CXXFLAGS -fpermissive"
455 AC_CHECK_HEADERS(signal.h termios.h sys/errno.h)
460 AM_CONDITIONAL(WIN32_PKG, true)
461 AM_CONDITIONAL(MACOSX_PKG, false)
464 AM_CONDITIONAL(WIN32_PKG, false)
465 AM_CONDITIONAL(MACOSX_PKG, true)
468 AM_CONDITIONAL(WIN32_PKG, false)
469 AM_CONDITIONAL(MACOSX_PKG, false)
475 # -- H E A D E R S --------------------------------------------
477 # -- T Y P E S & S T R U C T S --------------------------------
479 # -- F U N C T I O N S ----------------------------------------
481 dnl AC_CHECK_FUNCS([floor pow sqrt],[],[
482 dnl AC_MSG_ERROR([ ** Could not find proper math functions.])
485 AC_CHECK_FUNCS([fork])
486 AC_CHECK_FUNCS([kill])
487 AC_CHECK_FUNCS([pipe])
519 AC_CHECK_LIB([pthread],[pthread_create])
521 # -- O U T P U T ----------------------------------------------
528 AC_CONFIG_SUBDIRS(libltdl)
530 CONFIG_LIBS="-lsynfig"
531 CONFIG_CFLAGS="$CONFIG_CFLAGS"
532 AC_SUBST(CONFIG_LIBS)
533 AC_SUBST(CONFIG_CFLAGS)
534 AC_SUBST(CONFIG_DEPS)
537 SYNFIG_LIBS="$VIMAGE_LIBS $LIBXMLPP_LIBS $ETL_LIBS $LIBSIGC_LIBS $LTLIBINTL"
538 SYNFIG_CFLAGS="$LIBXMLPP_CFLAGS $ETL_CFLAGS $LIBSIGC_CFLAGS $CONFIG_CFLAGS -DSYNFIG_NO_DEPRECATED -DLOCALEDIR=\\\"$localedir\\\""
540 CONFIG_CFLAGS="`echo $CONFIG_CFLAGS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
541 SYNFIG_CFLAGS="`echo $SYNFIG_CFLAGS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
542 SYNFIG_LIBS="`echo $SYNFIG_LIBS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
546 AC_SUBST(SYNFIG_LIBS)
547 AC_SUBST(SYNFIG_CFLAGS)
548 AC_SUBST(OPENEXR_HALF_LIBS)
550 AC_SUBST(API_VERSION)
552 synfigincludedir=$includedir/synfig-$API_VERSION
553 AC_SUBST(synfigincludedir)
565 src/modules/lyr_freetype/Makefile
566 src/modules/lyr_std/Makefile
567 src/modules/mod_bmp/Makefile
568 src/modules/mod_dv/Makefile
569 src/modules/mod_ffmpeg/Makefile
570 src/modules/mod_filter/Makefile
571 src/modules/mod_geometry/Makefile
572 src/modules/mod_gif/Makefile
573 src/modules/mod_gradient/Makefile
574 src/modules/mod_imagemagick/Makefile
575 src/modules/mod_jpeg/Makefile
576 src/modules/mod_libavcodec/Makefile
577 src/modules/mod_magickpp/Makefile
578 src/modules/mod_mng/Makefile
579 src/modules/mod_noise/Makefile
580 src/modules/mod_openexr/Makefile
581 src/modules/mod_particle/Makefile
582 src/modules/mod_png/Makefile
583 src/modules/mod_ppm/Makefile
584 src/modules/mod_yuv420p/Makefile
586 src/modules/synfig_modules.cfg
587 examples/walk/Makefile
590 pkg-info/macosx/synfig-core.info
591 dnl src/modules/trgt_mpg/Makefile
592 dnl src/modules/mptr_mplayer/Makefile
595 # -- S U M M A R Y --------------------------------------------
598 $PACKAGE_NAME v.$VERSION
599 Configuration Summary
602 Install Prefix -------------------> $prefix
603 Module directory -----------------> $moduledir
604 Build Platform -------------------> $build
605 Host Platform --------------------> $host
606 Time Limit -----------------------> $death_time
607 Arc Profiling --------------------> $profile_arcs
608 GProf Profiling ------------------> $profiling
609 Debug Mode -----------------------> $debug ($debug_flags)
610 Optimization ---------------------> $optimization
611 PNG output target support --------> $TARGET_PNG
612 MNG output target support --------> $TARGET_MNG
613 TIFF output target support -------> $TARGET_TIF
614 JPEG output target support -------> $TARGET_JPEG
615 ETL_CFLAGS -----------------------> $ETL_CFLAGS
616 FreeType2 ------------------------> $with_freetype
617 fontconfig -----------------------> $with_fontconfig
618 libavcodec -----------------------> $with_libavcodec
619 vImage ---------------------------> $with_vimage
620 ImageMagick ----------------------> $with_imagemagick
621 Magick++ -------------------------> $with_magickpp
622 FFMPEG ---------------------------> $with_ffmpeg
623 libdv ----------------------------> $with_libdv
624 OpenEXR --------------------------> $with_openexr
625 Using OpenEXR's \"half\" type ------> $use_openexr_half
627 "'$'"CXX -----------------------------> '$CXX'
628 "'$'"CXXFLAGS ------------------------> '$CXXFLAGS'
629 "'$'"SYNFIG_LIBS ---------------------> '$SYNFIG_LIBS'
630 "'$'"LIBXMLPP_LIBS -------------------> '$LIBXMLPP_LIBS'
631 "'$'"ETL_LIBS ------------------------> '$ETL_LIBS'
632 "'$'"LIBSIGC_LIBS --------------------> '$LIBSIGC_LIBS'
633 "'$'"SYNFIG_CFLAGS -------------------> '$SYNFIG_CFLAGS'
634 "'$'"LIBADD_DL -----------------------> '$LIBADD_DL'