Program to generate an xml file based on a provided text file
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configure.ac 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. AC_INIT([generarxml], [1.1], [chris@cromer.cl], [generarxml], [https://www.cromer.cl])
  2. AC_PREFIX_DEFAULT([/usr])
  3. AC_CONFIG_SRCDIR([src/main.c])
  4. AM_INIT_AUTOMAKE([foreign])
  5. AC_CONFIG_MACRO_DIR([m4])
  6. AC_PROG_CC([gcc])
  7. AX_CHECK_COMPILE_FLAG([-std=c11], [
  8. CFLAGS+=" -std=c11"
  9. ], [
  10. echo "C compiler cannot compile C11 code"
  11. exit -1
  12. ])
  13. AC_PROG_INSTALL
  14. AC_PATH_PROG([M4], [m4])
  15. AC_ARG_WITH(debug, [AS_HELP_STRING([--with-debug], [include debug messages])],
  16. [case $with_debug in
  17. yes) AC_DEFINE(DEBUG)
  18. ;;
  19. no) ;;
  20. *) AC_MSG_ERROR(["--with-debug does not take an argument."])
  21. ;;
  22. esac])
  23. AC_ARG_WITH(debug_encoding, [AS_HELP_STRING([--with-debug-encoding], [include encoding debug messages])],
  24. [case $with_debug_encoding in
  25. yes) AC_DEFINE(DEBUG_ENCODING)
  26. ;;
  27. no) ;;
  28. *) AC_MSG_ERROR(["--with-debug-encoding does not take an argument."])
  29. ;;
  30. esac])
  31. AC_DEFINE(_DEFAULT_SOURCE)
  32. AM_PATH_XML2(2.9.0,,AC_MSG_ERROR([
  33. *** Libxml is required to build generarxml; Available at
  34. http://www.libxml.org/.]))
  35. AM_CFLAGS=(`xml2-config --cflags --libs`)
  36. PKG_CHECK_MODULES([libxml2], [libxml-2.0])
  37. case "$host" in
  38. *mingw*)
  39. AC_MSG_RESULT(OS Detected: $host)
  40. AC_MSG_RESULT(Adding iconv flag for mingw...)
  41. LDFLAGS="-liconv $AM_LDFLAGS $LDFLAGS"
  42. ;;
  43. *) ;;
  44. esac
  45. AC_CONFIG_FILES([Makefile
  46. src/Makefile
  47. ])
  48. AC_OUTPUT