synfig.m4 936 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # SYNFIG M4 Macro
  2. # For GNU Autotools
  3. # $Id$
  4. #
  5. # By Robert B. Quattlebaum Jr. <darco@users.sf.net>
  6. # AM_LIBXMLPP(,$2)
  7. AC_DEFUN([SYNFIG_DEPS],
  8. [
  9. USING_ETL(,$2)
  10. AM_PATH_XML2(,,$2)
  11. AC_CHECK_FUNCS([floor pow sqrt],,$2)
  12. AM_LIBXMLPP(,$2)
  13. CXXFLAGS="$CXXFLAGS $LIBXMLPP_CFLAGS"
  14. LIBS="$LIBS $LIBXMLPP_LIBS"
  15. $1
  16. ])
  17. AC_DEFUN([USING_SYNFIG],
  18. [
  19. AC_ARG_WITH(synfig-includes,
  20. [ --with-synfig-includes Specify location of synfig headers],[
  21. CXXFLAGS="$CXXFLAGS -I$withval"
  22. ])
  23. AC_PATH_PROG(SYNFIG_CONFIG,synfig-config,no)
  24. if test "$SYNFIG_CONFIG" = "no"; then
  25. no_SYNFIG_config="yes"
  26. $2
  27. else
  28. AC_MSG_CHECKING([if $SYNFIG_CONFIG works])
  29. if $SYNFIG_CONFIG --libs >/dev/null 2>&1; then
  30. SYNFIG_VERSION="`$SYNFIG_CONFIG --version`"
  31. AC_MSG_RESULT([yes, $SYNFIG_VERSION])
  32. CXXFLAGS="$CXXFLAGS `$SYNFIG_CONFIG --cxxflags`"
  33. $1
  34. else
  35. AC_MSG_RESULT(no)
  36. no_SYNFIG_config="yes"
  37. $2
  38. fi
  39. fi
  40. SYNFIG_DEPS($1,$2)
  41. ])