configure.ac 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ([2.59])
  4. AC_INIT(bind, 10.0.0, bind10-bugs@isc.org)
  5. AC_CONFIG_SRCDIR(README)
  6. AM_INIT_AUTOMAKE
  7. AC_CONFIG_HEADERS([config.h])
  8. # Checks for programs.
  9. AC_PROG_CXX
  10. AC_PROG_CC
  11. AC_PROG_RANLIB
  12. # Checks for libraries.
  13. # Checks for header files.
  14. # Checks for typedefs, structures, and compiler characteristics.
  15. AC_HEADER_STDBOOL
  16. AC_TYPE_SIZE_T
  17. AC_MSG_CHECKING(for sa_len in struct sockaddr)
  18. AC_TRY_COMPILE([
  19. #include <sys/types.h>
  20. #include <sys/socket.h>],
  21. [struct sockaddr sa; sa.sa_len = 0; return (0);],
  22. [AC_MSG_RESULT(yes)
  23. AC_DEFINE(HAVE_SIN_LEN, 1, Define to 1 if sockaddr_in has a sin_len member)],
  24. AC_MSG_RESULT(no))
  25. #
  26. # Check availablity of gtest, which might be used for unit tests.
  27. #
  28. AC_ARG_WITH(gtest,
  29. [ --with-gtest=PATH specify a path to Gtest header files (PATH/include) and library (PATH/lib)],
  30. gtest_path="$withval", gtest_path="no")
  31. if test "$gtest_path" != "no"
  32. then
  33. GTEST_INCLUDES="-I${gtest_path}/include"
  34. GTEST_LDFLAGS="-L${gtest_path}/lib"
  35. GTEST_LDADD="-lgtest"
  36. else
  37. GTEST_INCLUDES=
  38. GTEST_LDFLAGS=
  39. GTEST_LDADD=
  40. fi
  41. AM_CONDITIONAL(HAVE_GTEST, test $gtest_path != "no")
  42. AC_SUBST(GTEST_INCLUDES)
  43. AC_SUBST(GTEST_LDFLAGS)
  44. AC_SUBST(GTEST_LDADD)
  45. # Checks for library functions.
  46. AC_CONFIG_FILES([Makefile
  47. src/Makefile
  48. src/bin/Makefile
  49. src/bin/host/Makefile
  50. src/bin/parkinglot/Makefile
  51. src/lib/Makefile
  52. src/lib/cc/Makefile
  53. src/lib/cc/cpp/Makefile
  54. src/lib/dns/Makefile
  55. ])
  56. AC_OUTPUT([src/bin/bind-cfgd/bind-cfgd
  57. src/bin/bind10/bind10
  58. ], [
  59. chmod +x src/bin/bind-cfgd/bind-cfgd
  60. chmod +x src/bin/bind10/bind10
  61. ])
  62. AC_OUTPUT