Applied the following dooglus patches from the sourceforge tracker:
[synfig.git] / synfig-core / trunk / config / configure.ac
index 34760e1..faef858 100644 (file)
@@ -15,7 +15,7 @@ dnl AC_CANONICAL_TARGET
 AM_INIT_AUTOMAKE
 AM_MAINTAINER_MODE
 
-AC_LIBLTDL_CONVENIENCE
+AC_LIBLTDL_INSTALLABLE
 AC_SUBST(INCLTDL)
 AC_SUBST(LIBLTDL)
 
@@ -29,6 +29,8 @@ AC_DEFINE(LT_SCOPE,[extern],[LibLTDL is linked staticly])
 
 # -- V A R I A B L E S ----------------------------------------
 
+SVN_REPOSITORY=@SVN_REPOSITORY@
+AC_SUBST(SVN_REPOSITORY)
 
 # -- P R O G R A M S ------------------------------------------
 
@@ -138,7 +140,8 @@ if test $use_layerprofiling = "yes" ; then {
 AC_ARG_WITH(imagemagick,[
   --without-imagemagick   Disable support for ImageMagick],[
 ],[
-       with_imagemagick="yes"
+    AC_CHECK_PROG([imagemagick_convert],[convert],[yes],[no])
+    with_imagemagick=$imagemagick_convert
 ])
 if test $with_imagemagick = "no" ; then {
        AM_CONDITIONAL(WITH_IMAGEMAGICK,false)
@@ -222,18 +225,12 @@ AC_ARG_WITH(freetype,[
        with_freetype="yes"
 ])
 
-
 if test $with_freetype != "no" ; then {
        PKG_CHECK_MODULES(FREETYPE, freetype2,[
                with_freetype="yes"
        ],[
                with_freetype="no"
        ])
-#      AC_CHECK_FT2(,[
-#              with_freetype="yes"
-#      ],[
-#              with_freetype="no"
-#      ])      
 } ; fi
 
 if test $with_freetype = "no" ; then {
@@ -243,8 +240,28 @@ if test $with_freetype = "no" ; then {
 } ; fi
 
 
+# FONTCONFIG CHECK--------------------
+
+AC_ARG_WITH(fontconfig,[
+  --without-fontconfig         disable support for fontconfig (Default=auto)],[
+],[
+       with_fontconfig="yes"
+])
 
+if test $with_fontconfig != "no" ; then {
+       PKG_CHECK_MODULES(FONTCONFIG, fontconfig,[
+               with_fontconfig="yes"
+       ],[
+               with_fontconfig="no"
+       ])
+} ; fi
 
+if test $with_fontconfig = "yes" ; then {
+       AC_DEFINE(WITH_FONTCONFIG,[],[enable fontconfig support])
+       AM_CONDITIONAL(WITH_FONTCONFIG,true)
+} else {
+       AM_CONDITIONAL(WITH_FONTCONFIG,false)
+} ; fi
 
 
 # OPENEXR CHECK------------------------
@@ -334,10 +351,17 @@ AC_CHECK_LIB(png, png_write_row,[
        AC_SUBST(PNG_LIBS)
        AM_CONDITIONAL(HAVE_LIBPNG,true)
 ],[
-       AC_MSG_RESULT([ *** PNG Output target disabled])
-       TARGET_PNG="no"
-       AM_CONDITIONAL(HAVE_LIBPNG,false)
-],[-lz])
+       AC_CHECK_LIB(png12, png_write_row,[
+       PNG_LIBS="-lpng12"
+       AC_DEFINE(HAVE_LIBPNG,[])
+       AC_SUBST(PNG_LIBS)
+       AM_CONDITIONAL(HAVE_LIBPNG,true)
+       ],[
+               AC_MSG_RESULT([ *** PNG Output target disabled])
+               TARGET_PNG="no"
+               AM_CONDITIONAL(HAVE_LIBPNG,false)
+       ],[-lz -L${exec_prefix}/lib])
+],[-lz -L${exec_prefix}/lib])
 
 AC_CHECK_LIB(jpeg, main,[
        JPEG_LIBS="-ljpeg"
@@ -348,7 +372,7 @@ AC_CHECK_LIB(jpeg, main,[
        AC_MSG_RESULT([ *** JPEG Output target disabled])
        TARGET_JPEG="no"
        AM_CONDITIONAL(HAVE_LIBJPEG,false)
-],[])
+],[-L${exec_prefix}/lib])
 
 
 dnl AC_CHECK_HEADERS(jpeglib.h,[],[
@@ -371,7 +395,7 @@ AC_SUBST(SYNFIGLIB_DIR)
 
 CXXFLAGS="$CXXFLAGS -fpermissive"
 
-AC_CHECK_HEADERS(signal.h termios.h)
+AC_CHECK_HEADERS(signal.h termios.h sys/errno.h)
 
 
 case "$host" in
@@ -460,8 +484,8 @@ AC_SUBST(CONFIG_CFLAGS)
 AC_SUBST(CONFIG_DEPS)
 AC_SUBST(ETL_CFLAGS)
 
-SYNFIG_LIBS="$VIMAGE_LIBS $LIBXMLPP_LIBS $ETL_LIBS $OPENEXR_LIBS $LIBSIGC_LIBS"
-SYNFIG_CFLAGS="$LIBXMLPP_CFLAGS $ETL_CFLAGS $OPENEXR_CFLAGS $LIBSIGC_CFLAGS $CONFIG_CFLAGS -DSYNFIG_NO_DEPRECATED"
+SYNFIG_LIBS="$VIMAGE_LIBS $LIBXMLPP_LIBS $ETL_LIBS $LIBSIGC_LIBS"
+SYNFIG_CFLAGS="$LIBXMLPP_CFLAGS $ETL_CFLAGS $LIBSIGC_CFLAGS $CONFIG_CFLAGS -DSYNFIG_NO_DEPRECATED"
 
 CONFIG_CFLAGS="`echo $CONFIG_CFLAGS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
 SYNFIG_CFLAGS="`echo $SYNFIG_CFLAGS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
@@ -494,7 +518,6 @@ Makefile
 src/Makefile
 src/synfig/Makefile
 src/modules/Makefile
-src/modules/example/Makefile
 src/modules/mod_filter/Makefile
 src/modules/mod_bmp/Makefile
 src/modules/mod_gif/Makefile
@@ -515,6 +538,7 @@ src/modules/mod_yuv420p/Makefile
 src/modules/mod_particle/Makefile
 src/tool/Makefile
 src/modules/synfig_modules.cfg
+examples/Makefile
 win32inst.nsi
 pkg-info/macosx/synfig-core.info
 dnl src/modules/trgt_mpg/Makefile
@@ -542,6 +566,7 @@ TIFF output target support -------> $TARGET_TIF
 JPEG output target support -------> $TARGET_JPEG
 ETL_CFLAGS -----------------------> $ETL_CFLAGS
 FreeType2 ------------------------> $with_freetype
+fontconfig ------------------------> $with_fontconfig
 libavcodec -----------------------> $with_libavcodec
 vImage ---------------------------> $with_vimage
 GLib -----------------------------> $GLIB