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.
 
 
 
 
 
 

72 lines
1.7 KiB

  1. dnl Checks for required headers and functions
  2. dnl
  3. dnl Version: 20170917
  4. dnl Function to detect if libpff dependencies are available
  5. AC_DEFUN([AX_LIBPFF_CHECK_LOCAL],
  6. [dnl Check for internationalization functions in libpff/libpff_i18n.c
  7. AC_CHECK_FUNCS([bindtextdomain])
  8. dnl Check if library should be build with verbose output
  9. AX_COMMON_CHECK_ENABLE_VERBOSE_OUTPUT
  10. dnl Check if library should be build with debug output
  11. AX_COMMON_CHECK_ENABLE_DEBUG_OUTPUT
  12. dnl Check if DLL support is needed
  13. AS_IF(
  14. [test "x$enable_shared" = xyes],
  15. [AS_CASE(
  16. [$host],
  17. [*cygwin* | *mingw*],
  18. [AC_DEFINE(
  19. [HAVE_DLLMAIN],
  20. [1],
  21. [Define to 1 to enable the DllMain function.])
  22. AC_SUBST(
  23. [HAVE_DLLMAIN],
  24. [1])
  25. ])
  26. ])
  27. ])
  28. dnl Function to detect if pfftools dependencies are available
  29. AC_DEFUN([AX_PFFTOOLS_CHECK_LOCAL],
  30. [AC_CHECK_HEADERS([signal.h sys/signal.h unistd.h])
  31. AC_CHECK_FUNCS([close getopt setvbuf])
  32. AS_IF(
  33. [test "x$ac_cv_func_close" != xyes],
  34. [AC_MSG_FAILURE(
  35. [Missing function: close],
  36. [1])
  37. ])
  38. dnl Headers included in pfftools/log_handle.c
  39. AC_CHECK_HEADERS([stdarg.h varargs.h])
  40. AS_IF(
  41. [test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes],
  42. [AC_MSG_FAILURE(
  43. [Missing headers: stdarg.h and varargs.h],
  44. [1])
  45. ])
  46. dnl Check if tools should be build as static executables
  47. AX_COMMON_CHECK_ENABLE_STATIC_EXECUTABLES
  48. dnl Check if DLL support is needed
  49. AS_IF(
  50. [test "x$enable_shared" = xyes && test "x$ac_cv_enable_static_executables" = xno],
  51. [AS_CASE(
  52. [$host],
  53. [*cygwin* | *mingw*],
  54. [AC_SUBST(
  55. [LIBPFF_DLL_IMPORT],
  56. ["-DLIBPFF_DLL_IMPORT"])
  57. ])
  58. ])
  59. ])