neon-test.m4 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright (C) 2001-2022 Joe Orton <[email protected]> -*- autoconf -*-
  2. #
  3. # This file is free software; you may copy and/or distribute it with
  4. # or without modifications, as long as this notice is preserved.
  5. # This software is distributed in the hope that it will be useful, but
  6. # WITHOUT ANY WARRANTY, to the extent permitted by law; without even
  7. # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  8. # PURPOSE.
  9. # The above license applies to THIS FILE ONLY, the neon library code
  10. # itself may be copied and distributed under the terms of the GNU
  11. # LGPL, see COPYING.LIB for more details
  12. # This file is part of the neon HTTP/WebDAV client library.
  13. # See https://notroj.github.io/neon/ for the latest version.
  14. # Please report feedback via <https://github.com/notroj/neon/>
  15. # Tests needed for the neon-test common test code.
  16. AC_DEFUN([NE_FORMAT_TIMET], [
  17. NEON_FORMAT(time_t, [
  18. #ifdef HAVE_SYS_TIME_H
  19. #include <sys/time.h>
  20. #endif])
  21. ])
  22. AC_DEFUN([NEON_TEST], [
  23. AC_REQUIRE([NEON_COMMON_CHECKS])
  24. AC_REQUIRE([NE_FORMAT_TIMET])
  25. AC_REQUIRE([AC_TYPE_PID_T])
  26. dnl NEON_XML_PARSER may add things (e.g. -I/usr/local/include) to
  27. dnl CPPFLAGS which make "gcc -Werror" fail in NEON_FORMAT; suggest
  28. dnl this macro is used first.
  29. AC_BEFORE([$0], [NEON_XML_PARSER])
  30. AC_CHECK_HEADERS(sys/time.h signal.h stdint.h locale.h)
  31. AC_CHECK_FUNCS(pipe isatty usleep shutdown setlocale gethostname)
  32. AC_REQUIRE([NE_FIND_AR])
  33. ])
  34. AC_DEFUN([NEON_TEST_WITHOUT_CHILD], [
  35. AC_DEFINE([NEON_NO_TEST_CHILD], 1, [Define if test suite child process handling is not needed])
  36. ])