3 # -- I N I T --------------------------------------------------
5 . $srcdir/config/build.cfg
7 AC_INIT(@PACKAGE_NAME@,@PACKAGE_VERSION@,@PACKAGE_BUGREPORT@,@PACKAGE_TARNAME@)
10 AC_CONFIG_AUX_DIR(config)
11 AM_CONFIG_HEADER(config.h)
13 dnl AC_CANONICAL_TARGET
18 AC_LIBLTDL_INSTALLABLE
22 API_VERSION=@API_VERSION@
25 AC_DEFINE(LT_SCOPE,[extern],[LibLTDL is linked staticly])
30 # -- V A R I A B L E S ----------------------------------------
32 SVN_REPOSITORY=@SVN_REPOSITORY@
33 AC_SUBST(SVN_REPOSITORY)
35 # -- P R O G R A M S ------------------------------------------
46 # -- A R G U M E N T S ----------------------------------------
55 AC_ARG_BRANCH_PROBABILITIES
56 dnl AC_ARG_LICENSE_KEY
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"
69 #MINGW_FLAGS="-mno-cygwin"
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;
88 AC_SUBST(LIBTOOL_DEPS)
91 #if [[ "$LIBTOOL_PATCH_SED""x" != "x" ]] ; then {
92 # printf "Patching libtool... "
93 # cat libtool | sed "$LIBTOOL_PATCH_SED" > libtool2
97 # AC_MSG_RESULT([patched])
104 AC_CHECK_LIB(c, dlopen,
109 DYNAMIC_LD_LIBS="-ldl",
114 AC_SUBST(DYNAMIC_LD_LIBS)
117 --enable-half Use OpenEXR's "half" type for color],[
118 use_openexr_half=$enableval
121 use_openexr_half="no"
126 AC_ARG_ENABLE(layer-profiling,[
127 --enable-layer-profiling Enable layer profiling],[
128 use_layerprofiling=$enableval
131 use_layerprofiling="no"
133 if test $use_layerprofiling = "yes" ; then {
134 AC_DEFINE(SYNFIG_PROFILE_LAYERS,[1],[enable layer profiling])
140 AC_ARG_WITH(imagemagick,[
141 --without-imagemagick Disable support for ImageMagick],[
143 AC_CHECK_PROG([imagemagick_convert],[convert],[yes],[no])
144 with_imagemagick=$imagemagick_convert
146 if test $with_imagemagick = "no" ; then {
147 AM_CONDITIONAL(WITH_IMAGEMAGICK,false)
149 AM_CONDITIONAL(WITH_IMAGEMAGICK,true)
156 AC_ARG_WITH(magickpp,[
157 --without-magickpp Disable support for Magick++],[
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)
171 AC_MSG_RESULT([ *** OptimizeImageTransparency() not available - need ImageMagick 6.3 or newer ])
172 AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,false)
176 AC_MSG_RESULT([ *** Magick++ Output target disabled])
178 AM_CONDITIONAL(HAVE_LIBMAGICKPP,false)
181 AM_CONDITIONAL(HAVE_LIBMAGICKPP,false)
188 --without-ffmpeg Disable support for FFMPEG],[
192 if test $with_ffmpeg = "no" ; then {
193 AM_CONDITIONAL(WITH_FFMPEG,false)
195 AM_CONDITIONAL(WITH_FFMPEG,true)
202 --with-vimage Enable support for apple vImage],[
206 if test $with_vimage = "no" ; then {
207 AM_CONDITIONAL(WITH_VIMAGE,false)
209 AM_CONDITIONAL(WITH_VIMAGE,true)
210 AC_DEFINE(HAS_VIMAGE,[1],[enable apple vImage])
211 VIMAGE_LIBS="-Wc,-framework -Wc,Accelerate"
218 --without-libdv Disable support for libdv],[
222 if test $with_libdv = "no" ; then {
223 AM_CONDITIONAL(WITH_LIBDV,false)
225 AM_CONDITIONAL(WITH_LIBDV,true)
231 # LIBAVCODEC CHECK--------------------
233 AC_ARG_WITH(libavcodec,[
234 --without-libavcodec disable support for libavcodec (Default=auto)],[
236 with_libavcodec="yes"
239 if test $with_libavcodec != "no" ; then {
240 PKG_CHECK_MODULES(LIBAVCODEC, [libavcodec libavformat],[],[echo no; with_libavcodec="no"])
242 if test $with_libavcodec = "yes" ; then {
243 AC_DEFINE(WITH_LIBAVCODEC,[],[enable libavcodec support])
244 AM_CONDITIONAL(WITH_LIBAVCODEC,true)
246 AM_CONDITIONAL(WITH_LIBAVCODEC,false)
251 # FREETYPE2 CHECK--------------------
253 AC_ARG_WITH(freetype,[
254 --without-freetype disable support for freetype (Default=auto)],[
259 if test $with_freetype != "no" ; then {
260 PKG_CHECK_MODULES(FREETYPE, freetype2,[
263 PKG_CHECK_MODULES(FREETYPE, xft,[
271 if test $with_freetype = "no" ; then {
272 AM_CONDITIONAL(WITH_FREETYPE,false)
274 AM_CONDITIONAL(WITH_FREETYPE,true)
278 # FONTCONFIG CHECK--------------------
280 AC_ARG_WITH(fontconfig,[
281 --without-fontconfig disable support for fontconfig (Default=auto)],[
283 with_fontconfig="yes"
286 if test $with_fontconfig != "no" ; then {
287 PKG_CHECK_MODULES(FONTCONFIG, fontconfig,[
288 with_fontconfig="yes"
294 if test $with_fontconfig = "yes" ; then {
295 AC_DEFINE(WITH_FONTCONFIG,[],[enable fontconfig support])
296 AM_CONDITIONAL(WITH_FONTCONFIG,true)
298 AM_CONDITIONAL(WITH_FONTCONFIG,false)
302 # OPENEXR CHECK------------------------
303 AC_ARG_WITH(openexr,[
304 --without-openexr Disable support for ILM's OpenEXR],[
308 if test $with_openexr = "yes" ; then {
309 PKG_CHECK_MODULES(OPENEXR, OpenEXR,[
310 CONFIG_DEPS="$CONFIG_DEPS OpenEXR"
312 AC_DEFINE(HAVE_OPENEXR,[], [ Define if OpenEXR is available ] )
313 AM_CONDITIONAL(WITH_OPENEXR,true)
319 if test $with_openexr = "no" ; then {
320 AM_CONDITIONAL(WITH_OPENEXR,false)
321 use_openexr_half="no"
323 if test $use_openexr_half = yes ; then {
324 AC_MSG_RESULT([ ** Using OpenEXR Half.])
325 CONFIG_CFLAGS="$CONFIG_CFLAGS -DUSE_HALF_TYPE"
326 OPENEXR_HALF_LIBS="-lHalf"
335 # -- L I B R A R I E S ----------------------------------------
339 PKG_CHECK_MODULES(ETL, [ETL >= 0.04.10],,[
340 AC_MSG_ERROR([ ** You need to install the ETL (version 0.04.10 or greater).])
342 CONFIG_DEPS="$CONFIG_DEPS ETL"
345 PKG_CHECK_MODULES(LIBXMLPP, libxml++-2.6,[
346 CONFIG_DEPS="$CONFIG_DEPS libxml++-2.6"
348 PKG_CHECK_MODULES(LIBXMLPP, libxml++-1.0,[
349 CONFIG_DEPS="$CONFIG_DEPS libxml++-1.0"
351 AC_MSG_ERROR([ ** You need to install libxml++, either verison 2.6 or 1.0.])
355 PKG_CHECK_MODULES(LIBSIGC, [sigc++-2.0],,[
356 AC_MSG_ERROR([ ** libsigc++-2.0 not found. It is required. You should really install it.])
357 dnl PKG_CHECK_MODULES(LIBSIGC, [sigc++-1.2],,[
358 dnl AC_MSG_ERROR([ ** At least libsigc++-1.2 is required.])
361 CONFIG_DEPS="$CONFIG_DEPS sigc++-2.0"
363 dnl PKG_CHECK_MODULES(GLIB, glib-2.0,[GLIB="yes"],[GLIB="no"])
374 if test "$TARGET_TIF" != "disabled" ; then
375 AC_CHECK_LIB(tiff, TIFFClose,[
377 AC_DEFINE(HAVE_LIBTIFF,[], [ Define if TIFF library is available ] )
379 AM_CONDITIONAL(HAVE_LIBTIFF,true)
381 AC_MSG_RESULT([ *** TIFF Output target disabled])
383 AM_CONDITIONAL(HAVE_LIBTIFF,false)
387 AC_CHECK_LIB(png, png_write_row,[
389 AC_DEFINE(HAVE_LIBPNG,[], [ Define if PNG library is available ] )
391 AM_CONDITIONAL(HAVE_LIBPNG,true)
393 AC_CHECK_LIB(png12, png_write_row,[
395 AC_DEFINE(HAVE_LIBPNG,[])
397 AM_CONDITIONAL(HAVE_LIBPNG,true)
399 AC_MSG_RESULT([ *** PNG Output target disabled])
401 AM_CONDITIONAL(HAVE_LIBPNG,false)
402 ],[-lz -L${exec_prefix}/lib])
403 ],[-lz -L${exec_prefix}/lib])
405 AC_CHECK_LIB(mng, mng_initialize,[
407 AC_DEFINE(HAVE_LIBMNG,[], [ Define if MNG library is available ] )
409 AM_CONDITIONAL(HAVE_LIBMNG,true)
411 AC_MSG_RESULT([ *** MNG Output target disabled])
413 AM_CONDITIONAL(HAVE_LIBMNG,false)
414 ],[-lz -L${exec_prefix}/lib])
416 AC_CHECK_LIB(jpeg, main,[
418 AC_DEFINE(HAVE_LIBJPEG,[], [ Define if JPEG library is available ] )
420 AM_CONDITIONAL(HAVE_LIBJPEG,true)
422 AC_MSG_RESULT([ *** JPEG Output target disabled])
424 AM_CONDITIONAL(HAVE_LIBJPEG,false)
425 ],[-L${exec_prefix}/lib])
428 dnl AC_CHECK_HEADERS(jpeglib.h,[],[
429 dnl AC_MSG_RESULT([ *** JPEG Output target disabled])
431 dnl AM_CONDITIONAL(HAVE_LIBJPEG,false)
436 MODULE_DIR='${libdir}/synfig/modules'
437 moduledir=$libdir/synfig/modules
439 SYNFIGLIB_DIR=$libdir/synfig
440 AC_SUBST(SYNFIGLIB_DIR)
446 CXXFLAGS="$CXXFLAGS -fpermissive"
448 AC_CHECK_HEADERS(signal.h termios.h sys/errno.h)
453 AM_CONDITIONAL(WIN32_PKG, true)
454 AM_CONDITIONAL(MACOSX_PKG, false)
457 AM_CONDITIONAL(WIN32_PKG, false)
458 AM_CONDITIONAL(MACOSX_PKG, true)
461 AM_CONDITIONAL(WIN32_PKG, false)
462 AM_CONDITIONAL(MACOSX_PKG, false)
468 # -- H E A D E R S --------------------------------------------
470 # -- T Y P E S & S T R U C T S --------------------------------
472 # -- F U N C T I O N S ----------------------------------------
474 dnl AC_CHECK_FUNCS([floor pow sqrt],[],[
475 dnl AC_MSG_ERROR([ ** Could not find proper math functions.])
478 AC_CHECK_FUNCS([fork])
479 AC_CHECK_FUNCS([kill])
480 AC_CHECK_FUNCS([pipe])
512 AC_CHECK_LIB([pthread],[pthread_create])
514 # -- O U T P U T ----------------------------------------------
521 VERSION_MAJ=@VERSION_MAJ@
522 VERSION_MIN=@VERSION_MIN@
523 VERSION_REV=@VERSION_REV@
524 AC_SUBST(VERSION_MAJ)
525 AC_SUBST(VERSION_MIN)
526 AC_SUBST(VERSION_REV)
528 dnl 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"
538 SYNFIG_CFLAGS="$LIBXMLPP_CFLAGS $ETL_CFLAGS $LIBSIGC_CFLAGS $CONFIG_CFLAGS -DSYNFIG_NO_DEPRECATED"
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)
556 [ -d libltdl ] || mkdir libltdl;
561 echo ../$srcdir/libltdl/configure $ac_configure_args "'--srcdir="../$srcdir/libltdl"'" --with-auxdir=../$srcdir/config "'CFLAGS=$CFLAGS'" "'LDFLAGS=$LDFLAGS'" "'CC=$CC'" "'CPP=$CPP'" "'CPPFLAGS=$CPPFLAGS'" --disable-shared --enable-static
562 echo ../$srcdir/libltdl/configure $ac_configure_args "'--srcdir="../$srcdir/libltdl"'" --with-auxdir=../$srcdir/config "'CFLAGS=$CFLAGS'" "'LDFLAGS=$LDFLAGS'" "'CC=$CC'" "'CPP=$CPP'" "'CPPFLAGS=$CPPFLAGS'" --disable-shared --enable-static | sh
573 src/modules/lyr_freetype/Makefile
574 src/modules/lyr_std/Makefile
575 src/modules/mod_bmp/Makefile
576 src/modules/mod_dv/Makefile
577 src/modules/mod_ffmpeg/Makefile
578 src/modules/mod_filter/Makefile
579 src/modules/mod_geometry/Makefile
580 src/modules/mod_gif/Makefile
581 src/modules/mod_gradient/Makefile
582 src/modules/mod_imagemagick/Makefile
583 src/modules/mod_jpeg/Makefile
584 src/modules/mod_libavcodec/Makefile
585 src/modules/mod_magickpp/Makefile
586 src/modules/mod_mng/Makefile
587 src/modules/mod_noise/Makefile
588 src/modules/mod_openexr/Makefile
589 src/modules/mod_particle/Makefile
590 src/modules/mod_png/Makefile
591 src/modules/mod_ppm/Makefile
592 src/modules/mod_yuv420p/Makefile
594 src/modules/synfig_modules.cfg
595 examples/walk/Makefile
598 pkg-info/macosx/synfig-core.info
599 dnl src/modules/trgt_mpg/Makefile
600 dnl src/modules/mptr_mplayer/Makefile
603 # -- S U M M A R Y --------------------------------------------
606 $PACKAGE_NAME v.$VERSION
607 Configuration Summary
610 Install Prefix -------------------> $prefix
611 Module directory -----------------> $moduledir
612 Build Platform -------------------> $build
613 Host Platform --------------------> $host
614 Time Limit -----------------------> $death_time
615 Arc Profiling --------------------> $profile_arcs
616 GProf Profiling ------------------> $profiling
617 Debug Mode -----------------------> $debug ($debug_flags)
618 Optimization ---------------------> $optimization
619 PNG output target support --------> $TARGET_PNG
620 MNG output target support --------> $TARGET_MNG
621 TIFF output target support -------> $TARGET_TIF
622 JPEG output target support -------> $TARGET_JPEG
623 ETL_CFLAGS -----------------------> $ETL_CFLAGS
624 FreeType2 ------------------------> $with_freetype
625 fontconfig -----------------------> $with_fontconfig
626 libavcodec -----------------------> $with_libavcodec
627 vImage ---------------------------> $with_vimage
628 ImageMagick ----------------------> $with_imagemagick
629 Magick++ -------------------------> $with_magickpp
630 FFMPEG ---------------------------> $with_ffmpeg
631 libdv ----------------------------> $with_libdv
632 OpenEXR --------------------------> $with_openexr
633 Using OpenEXR's \"half\" type ------> $use_openexr_half
635 "'$'"CXX -----------------------------> '$CXX'
636 "'$'"CXXFLAGS ------------------------> '$CXXFLAGS'
637 "'$'"SYNFIG_LIBS ---------------------> '$SYNFIG_LIBS'
638 "'$'"LIBXMLPP_LIBS -------------------> '$LIBXMLPP_LIBS'
639 "'$'"ETL_LIBS ------------------------> '$ETL_LIBS'
640 "'$'"LIBSIGC_LIBS --------------------> '$LIBSIGC_LIBS'
641 "'$'"SYNFIG_CFLAGS -------------------> '$SYNFIG_CFLAGS'
642 "'$'"LIBADD_DL -----------------------> '$LIBADD_DL'