2
0

sac-su.m4 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. dnl ======================================================================
  2. dnl su module
  3. dnl ======================================================================
  4. dnl The macro SAC_SOFIA_SU is in a separate file, sofia-su2.m4, because
  5. dnl SAC_SOFIA_SU creates a separate configuration file <su/su_configure.h>.
  6. dnl If SAC_SOFIA_SU is included to a aclocal.m4 of another package,
  7. dnl autoheader returns a spurious error and automake complains about missing
  8. dnl su/su_configure.h.
  9. dnl ======================================================================
  10. dnl SAC_WITH_RT - check for POSIX realtime library
  11. dnl ======================================================================
  12. AC_DEFUN([SAC_WITH_RT],[
  13. AC_ARG_WITH(rt,
  14. [ --with-rt use POSIX realtime library [[used by default]]])
  15. ])
  16. dnl ======================================================================
  17. dnl SAC_CHECK_SU_LIBS - check for libraries used by su
  18. dnl ======================================================================
  19. AC_DEFUN([SAC_CHECK_SU_LIBS], [
  20. AC_REQUIRE([SAC_WITH_RT])
  21. AC_CHECK_LIB(pthread, pthread_create)
  22. AC_CHECK_LIB(socket, socketpair,,,-lnsl)
  23. if test "${with_rt}" != no; then
  24. AC_SEARCH_LIBS(clock_gettime, rt)
  25. fi
  26. ])dnl
  27. dnl ======================================================================
  28. dnl SAC_SU - main macro for checking su dependencies
  29. dnl ======================================================================
  30. AC_DEFUN([SAC_SU], [
  31. AC_REQUIRE([SAC_CHECK_SU_LIBS])
  32. ])