libexpat.m4 646 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. dnl file : m4/libexpat.m4
  2. dnl copyright : Copyright (c) 2013-2014 Code Synthesis Tools CC
  3. dnl license : MIT; see accompanying LICENSE file
  4. dnl
  5. dnl LIBEXPAT([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
  6. dnl
  7. dnl
  8. AC_DEFUN([LIBEXPAT], [
  9. libexpat_found=no
  10. AC_MSG_CHECKING([for expat])
  11. save_LIBS="$LIBS"
  12. LIBS="-lexpat $LIBS"
  13. CXX_LIBTOOL_LINK_IFELSE([
  14. AC_LANG_SOURCE([
  15. #include <expat.h>
  16. int
  17. main ()
  18. {
  19. XML_Parser p (XML_ParserCreateNS (0, XML_Char (' ')));
  20. XML_ParserFree (p);
  21. }
  22. ])],
  23. [
  24. libexpat_found=yes
  25. ])
  26. if test x"$libexpat_found" = xyes; then
  27. AC_MSG_RESULT([yes])
  28. [$1]
  29. else
  30. LIBS="$save_LIBS"
  31. AC_MSG_RESULT([no])
  32. [$2]
  33. fi
  34. ])dnl