configure.ac 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. m4_define([_AM_PYTHON_INTERPRETER_LIST], [python python3 python3.1])
  13. AM_PATH_PYTHON([3.1])
  14. # Checks for libraries.
  15. # Checks for header files.
  16. # Checks for typedefs, structures, and compiler characteristics.
  17. AC_HEADER_STDBOOL
  18. AC_TYPE_SIZE_T
  19. AC_MSG_CHECKING(for sa_len in struct sockaddr)
  20. AC_TRY_COMPILE([
  21. #include <sys/types.h>
  22. #include <sys/socket.h>],
  23. [struct sockaddr sa; sa.sa_len = 0; return (0);],
  24. [AC_MSG_RESULT(yes)
  25. AC_DEFINE(HAVE_SIN_LEN, 1, Define to 1 if sockaddr_in has a sin_len member)],
  26. AC_MSG_RESULT(no))
  27. #
  28. # Check availablity of gtest, which might be used for unit tests.
  29. #
  30. AC_ARG_WITH(gtest,
  31. [ --with-gtest=PATH specify a path to Gtest header files (PATH/include) and library (PATH/lib)],
  32. gtest_path="$withval", gtest_path="no")
  33. if test "$gtest_path" != "no"
  34. then
  35. GTEST_INCLUDES="-I${gtest_path}/include"
  36. GTEST_LDFLAGS="-L${gtest_path}/lib"
  37. GTEST_LDADD="-lgtest"
  38. else
  39. GTEST_INCLUDES=
  40. GTEST_LDFLAGS=
  41. GTEST_LDADD=
  42. fi
  43. AM_CONDITIONAL(HAVE_GTEST, test $gtest_path != "no")
  44. AC_SUBST(GTEST_INCLUDES)
  45. AC_SUBST(GTEST_LDFLAGS)
  46. AC_SUBST(GTEST_LDADD)
  47. # Checks for library functions.
  48. AC_CONFIG_FILES([Makefile
  49. src/Makefile
  50. src/bin/Makefile
  51. src/bin/bigtool/Makefile
  52. src/bin/bind10/Makefile
  53. src/bin/host/Makefile
  54. src/bin/msgq/Makefile
  55. src/bin/parkinglot/Makefile
  56. src/lib/Makefile
  57. src/lib/cc/Makefile
  58. src/lib/cc/cpp/Makefile
  59. src/lib/dns/Makefile
  60. ])
  61. AC_OUTPUT([src/bin/bind-cfgd/bind-cfgd
  62. src/bin/bigtool/run_bigtool
  63. src/bin/bind10/bind10
  64. src/bin/msgq/msgq
  65. src/bin/msgq/msgq_test
  66. ], [
  67. chmod +x src/bin/bind-cfgd/bind-cfgd
  68. chmod +x src/bin/bigtool/run_bigtool
  69. chmod +x src/bin/bind10/bind10
  70. chmod +x src/bin/msgq/msgq
  71. chmod +x src/bin/msgq/msgq_test
  72. ])
  73. AC_OUTPUT