1 i# $Header: /opt/voria/cvs/synfig/config/configure.ac,v 1.10 2005/03/24 21:07:24 darco Exp $
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_CONVENIENCE
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 ----------------------------------------
33 # -- P R O G R A M S ------------------------------------------
44 # -- A R G U M E N T S ----------------------------------------
53 AC_ARG_BRANCH_PROBABILITIES
54 dnl AC_ARG_LICENSE_KEY
57 --enable-g5opt enable optimizations specific to G5 proc],[
58 # CXXFLAGS="$CXXFLAGS -fastf -fPIC"
59 # CFLAGS="$CFLAGS -fastf -fPIC"
60 CXXFLAGS="$CXXFLAGS -mtune=G5 -falign-loops=32"
61 CFLAGS="$CFLAGS -mtune=G5"
67 #MINGW_FLAGS="-mno-cygwin"
71 # If we are in debug mode, use the debugging version of the
72 # Microsoft Visual C Runtime Library
73 #if [[ $debug = "yes" ]] ; then {
74 # WIN32_DEBUG_LIBRARY="msvcr70d"
75 # WIN32_DEBUG_LIBRARY="msvcrtd"
76 # LIBTOOL_PATCH_SED="$LIBTOOL_PATCH_SED
77 # s/-lmsvcrt/-l$WIN32_DEBUG_LIBRARY/g;
86 AC_SUBST(LIBTOOL_DEPS)
89 #if [[ "$LIBTOOL_PATCH_SED""x" != "x" ]] ; then {
90 # printf "Patching libtool... "
91 # cat libtool | sed "$LIBTOOL_PATCH_SED" > libtool2
95 # AC_MSG_RESULT([patched])
102 AC_CHECK_LIB(c, dlopen,
107 DYNAMIC_LD_LIBS="-ldl",
112 AC_SUBST(DYNAMIC_LD_LIBS)
115 --enable-half Use OpenEXR's "half" type for color],[
116 use_openexr_half=$enableval
119 use_openexr_half="no"
124 AC_ARG_ENABLE(layer-profiling,[
125 --enable-layer-profiling Enable layer profiling],[
126 use_layerprofiling=$enableval
129 use_layerprofiling="no"
131 if test $use_layerprofiling = "yes" ; then {
132 AC_DEFINE(SYNFIG_PROFILE_LAYERS,[1],[enable layer profiling])
138 AC_ARG_WITH(imagemagick,[
139 --without-imagemagick Disable support for ImageMagick],[
141 with_imagemagick="yes"
143 if test $with_imagemagick = "no" ; then {
144 AM_CONDITIONAL(WITH_IMAGEMAGICK,false)
146 AM_CONDITIONAL(WITH_IMAGEMAGICK,true)
154 --without-ffmpeg Disable support for FFMPEG],[
158 if test $with_ffmpeg = "no" ; then {
159 AM_CONDITIONAL(WITH_FFMPEG,false)
161 AM_CONDITIONAL(WITH_FFMPEG,true)
168 --with-vimage Enable support for apple vImage],[
172 if test $with_vimage = "no" ; then {
173 AM_CONDITIONAL(WITH_VIMAGE,false)
175 AM_CONDITIONAL(WITH_VIMAGE,true)
176 AC_DEFINE(HAS_VIMAGE,[1],[enable apple vImage])
177 VIMAGE_LIBS="-Wc,-framework -Wc,Accelerate"
184 --without-libdv Disable support for libdv],[
188 if test $with_libdv = "no" ; then {
189 AM_CONDITIONAL(WITH_LIBDV,false)
191 AM_CONDITIONAL(WITH_LIBDV,true)
198 AC_ARG_WITH(libavcodec,[
199 --with-libavcodec Enable support for libavcodec (Default=auto)],[
201 AC_CHECK_LIB(avcodec, avcodec_find_encoder,[
202 with_libavcodec="yes"
207 if test $with_libavcodec = "no" ; then {
208 AM_CONDITIONAL(WITH_LIBAVCODEC,false)
210 AM_CONDITIONAL(WITH_LIBAVCODEC,true)
217 # FREETYPE2 CHECK--------------------
219 AC_ARG_WITH(freetype,[
220 --without-freetype disable support for freetype (Default=auto)],[
226 if test $with_freetype != "no" ; then {
227 PKG_CHECK_MODULES(FREETYPE, xft fontconfig,[
230 PKG_CHECK_MODULES(FREETYPE, freetype2 fontconfig,[
237 # with_freetype="yes"
243 if test $with_freetype = "no" ; then {
244 AM_CONDITIONAL(WITH_FREETYPE,false)
246 AM_CONDITIONAL(WITH_FREETYPE,true)
254 # OPENEXR CHECK------------------------
255 AC_ARG_WITH(openexr,[
256 --without-openexr Disable support for ILM's OpenEXR],[
260 if test $with_openexr = "yes" ; then {
261 PKG_CHECK_MODULES(OPENEXR, OpenEXR,[
262 CONFIG_DEPS="$CONFIG_DEPS OpenEXR"
264 AC_DEFINE(HAVE_OPENEXR,[], [ Define if OpenEXR is available ] )
265 AM_CONDITIONAL(WITH_OPENEXR,true)
271 if test $with_openexr = "no" ; then {
272 AM_CONDITIONAL(WITH_OPENEXR,false)
273 use_openexr_half="no"
275 if test $use_openexr_half = yes ; then {
276 AC_MSG_RESULT([ ** Using OpenEXR Half.])
277 CONFIG_CFLAGS="$CONFIG_CFLAGS -DUSE_HALF_TYPE"
284 # -- L I B R A R I E S ----------------------------------------
288 PKG_CHECK_MODULES(ETL, ETL,,[
289 AC_MSG_ERROR([ ** You need to install the ETL.])
291 CONFIG_DEPS="$CONFIG_DEPS ETL"
294 PKG_CHECK_MODULES(LIBXMLPP, libxml++-2.6,[
295 CONFIG_DEPS="$CONFIG_DEPS libxml++-2.6"
297 PKG_CHECK_MODULES(LIBXMLPP, libxml++-1.0,[
298 CONFIG_DEPS="$CONFIG_DEPS libxml++-1.0"
300 AC_MSG_ERROR([ ** You need to install libxml++, either verison 2.6 or 1.0.])
304 PKG_CHECK_MODULES(LIBSIGC, [sigc++-2.0],,[
305 AC_MSG_ERROR([ ** libsigc++-2.0 not found. It is required. You should really install it.])
306 dnl PKG_CHECK_MODULES(LIBSIGC, [sigc++-1.2],,[
307 dnl AC_MSG_ERROR([ ** At least libsigc++-1.2 is required.])
310 CONFIG_DEPS="$CONFIG_DEPS sigc++-2.0"
312 dnl PKG_CHECK_MODULES(GLIB, glib-2.0,[GLIB="yes"],[GLIB="no"])
322 if test "$TARGET_TIF" != "disabled" ; then
323 AC_CHECK_LIB(tiff, TIFFClose,[
325 AC_DEFINE(HAVE_LIBTIFF,[], [ Define if TIFF library is available ] )
327 AM_CONDITIONAL(HAVE_LIBTIFF,true)
329 AC_MSG_RESULT([ *** TIFF Output target disabled])
331 AM_CONDITIONAL(HAVE_LIBTIFF,false)
335 AC_CHECK_LIB(png, png_write_row,[
337 AC_DEFINE(HAVE_LIBPNG,[], [ Define if PNG library is available ] )
339 AM_CONDITIONAL(HAVE_LIBPNG,true)
341 AC_MSG_RESULT([ *** PNG Output target disabled])
343 AM_CONDITIONAL(HAVE_LIBPNG,false)
344 ],[-lz -L${exec_prefix}/lib])
346 AC_CHECK_LIB(jpeg, main,[
348 AC_DEFINE(HAVE_LIBJPEG,[], [ Define if JPEG library is available ] )
350 AM_CONDITIONAL(HAVE_LIBJPEG,true)
352 AC_MSG_RESULT([ *** JPEG Output target disabled])
354 AM_CONDITIONAL(HAVE_LIBJPEG,false)
355 ],[-L${exec_prefix}/lib])
358 dnl AC_CHECK_HEADERS(jpeglib.h,[],[
359 dnl AC_MSG_RESULT([ *** JPEG Output target disabled])
361 dnl AM_CONDITIONAL(HAVE_LIBJPEG,false)
366 MODULE_DIR='${libdir}/synfig/modules'
367 moduledir=$libdir/synfig/modules
369 SYNFIGLIB_DIR=$libdir/synfig
370 AC_SUBST(SYNFIGLIB_DIR)
376 CXXFLAGS="$CXXFLAGS -fpermissive"
378 AC_CHECK_HEADERS(signal.h termios.h sys/errno.h)
383 AM_CONDITIONAL(WIN32_PKG, true)
384 AM_CONDITIONAL(MACOSX_PKG, false)
387 AM_CONDITIONAL(WIN32_PKG, false)
388 AM_CONDITIONAL(MACOSX_PKG, true)
391 AM_CONDITIONAL(WIN32_PKG, false)
392 AM_CONDITIONAL(MACOSX_PKG, false)
398 # -- H E A D E R S --------------------------------------------
400 # -- T Y P E S & S T R U C T S --------------------------------
402 # -- F U N C T I O N S ----------------------------------------
404 dnl AC_CHECK_FUNCS([floor pow sqrt],[],[
405 dnl AC_MSG_ERROR([ ** Could not find proper math functions.])
408 AC_CHECK_FUNCS([fork])
409 AC_CHECK_FUNCS([kill])
410 AC_CHECK_FUNCS([pipe])
442 AC_CHECK_LIB([pthread],[pthread_create])
444 # -- O U T P U T ----------------------------------------------
451 VERSION_MAJ=@VERSION_MAJ@
452 VERSION_MIN=@VERSION_MIN@
453 VERSION_REV=@VERSION_REV@
454 AC_SUBST(VERSION_MAJ)
455 AC_SUBST(VERSION_MIN)
456 AC_SUBST(VERSION_REV)
458 dnl AC_CONFIG_SUBDIRS(libltdl)
460 CONFIG_LIBS="-lsynfig"
461 CONFIG_CFLAGS="$CONFIG_CFLAGS"
462 AC_SUBST(CONFIG_LIBS)
463 AC_SUBST(CONFIG_CFLAGS)
464 AC_SUBST(CONFIG_DEPS)
467 SYNFIG_LIBS="$VIMAGE_LIBS $LIBXMLPP_LIBS $ETL_LIBS $LIBSIGC_LIBS"
468 SYNFIG_CFLAGS="$LIBXMLPP_CFLAGS $ETL_CFLAGS $LIBSIGC_CFLAGS $CONFIG_CFLAGS -DSYNFIG_NO_DEPRECATED"
470 CONFIG_CFLAGS="`echo $CONFIG_CFLAGS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
471 SYNFIG_CFLAGS="`echo $SYNFIG_CFLAGS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
472 SYNFIG_LIBS="`echo $SYNFIG_LIBS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
476 AC_SUBST(SYNFIG_LIBS)
477 AC_SUBST(SYNFIG_CFLAGS)
478 AC_SUBST(API_VERSION)
480 synfigincludedir=$includedir/synfig-@API_VERSION@
481 AC_SUBST(synfigincludedir)
484 [ -d libltdl ] || mkdir libltdl;
489 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
490 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
501 src/modules/mod_filter/Makefile
502 src/modules/mod_bmp/Makefile
503 src/modules/mod_gif/Makefile
504 src/modules/mod_ppm/Makefile
505 src/modules/mod_png/Makefile
506 src/modules/mod_jpeg/Makefile
507 src/modules/lyr_std/Makefile
508 src/modules/mod_geometry/Makefile
509 src/modules/mod_gradient/Makefile
510 src/modules/mod_noise/Makefile
511 src/modules/lyr_freetype/Makefile
512 src/modules/mod_ffmpeg/Makefile
513 src/modules/mod_dv/Makefile
514 src/modules/mod_imagemagick/Makefile
515 src/modules/mod_openexr/Makefile
516 src/modules/mod_libavcodec/Makefile
517 src/modules/mod_yuv420p/Makefile
518 src/modules/mod_particle/Makefile
520 src/modules/synfig_modules.cfg
523 pkg-info/macosx/synfig-core.info
524 dnl src/modules/trgt_mpg/Makefile
525 dnl src/modules/mptr_mplayer/Makefile
528 # -- S U M M A R Y --------------------------------------------
531 $PACKAGE_NAME v.$VERSION
532 Configuration Summary
535 Install Prefix -------------------> $prefix
536 Module directory -----------------> $moduledir
537 Build Platform -------------------> $build
538 Host Platform --------------------> $host
539 Time Limit -----------------------> $death_time
540 Arc Profiling --------------------> $profile_arcs
541 GProf Profiling ------------------> $profiling
542 Debug Mode -----------------------> $debug ($debug_flags)
543 Optimization ---------------------> $optimization
544 PNG output target support --------> $TARGET_PNG
545 TIFF output target support -------> $TARGET_TIF
546 JPEG output target support -------> $TARGET_JPEG
547 ETL_CFLAGS -----------------------> $ETL_CFLAGS
548 FreeType2 ------------------------> $with_freetype
549 libavcodec -----------------------> $with_libavcodec
550 vImage ---------------------------> $with_vimage
551 GLib -----------------------------> $GLIB
552 ImageMagick ----------------------> $with_imagemagick
553 FFMPEG ---------------------------> $with_ffmpeg
554 libdv ----------------------------> $with_libdv
555 OpenEXR --------------------------> $with_openexr
556 Using OpenEXR's \"half\" type ------> $use_openexr_half
558 "'$'"CXX ------------------------------> '$CXX'
559 "'$'"CXXFLAGS -------------------------> '$CXXFLAGS'
560 "'$'"SYNFIG_LIBS -----------------------> '$SYNFIG_LIBS'
561 "'$'"LIBXMLPP_LIBS --------------------> '$LIBXMLPP_LIBS'
562 "'$'"ETL_LIBS -------------------------> '$ETL_LIBS'
563 "'$'"LIBSIGC_LIBS ---------------------> '$LIBSIGC_LIBS'
564 "'$'"SYNFIG_CFLAGS ---------------------> '$SYNFIG_CFLAGS'
565 "'$'"LIBADD_DL ------------------------> '$LIBADD_DL'