Protobuf model and library code for oaktree
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.

configure.ac 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. dnl -*- bash -*-
  2. dnl Process this file with autoconf to produce a configure script.
  3. dnl Copyright (C) 2009 Sun Microsystems, Inc.
  4. dnl
  5. dnl This program is free software; you can redistribute it and/or modify
  6. dnl it under the terms of the GNU General Public License as published by
  7. dnl the Free Software Foundation; version 2 of the License.
  8. dnl
  9. dnl This program is distributed in the hope that it will be useful,
  10. dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. dnl GNU General Public License for more details.
  13. dnl
  14. dnl You should have received a copy of the GNU General Public License
  15. dnl along with this program; if not, write to the Free Software
  16. dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  17. AC_INIT(
  18. [liboaktreemodel],
  19. [1.0],
  20. [http://storyboard.openstack.org],
  21. [liboaktreemodel],
  22. [http://openstack.org/])
  23. AC_CONFIG_AUX_DIR([config])
  24. AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability subdir-objects foreign tar-ustar])
  25. AC_PREREQ(2.59)dnl Minimum Autoconf version required.
  26. AC_CANONICAL_HOST
  27. AC_CANONICAL_BUILD
  28. AC_ARG_PROGRAM
  29. AC_USE_SYSTEM_EXTENSIONS
  30. AC_CONFIG_MACRO_DIR([m4])
  31. AC_CONFIG_HEADERS([config.h])
  32. AC_CONFIG_SRCDIR([oaktreemodel/oaktree.proto])
  33. OAKTREE_CANONICAL_TARGET([require-cxx, version-from-vc])
  34. LT_PREREQ([2.4])
  35. LT_INIT
  36. LT_LANG([C++])
  37. gl_VISIBILITY
  38. AX_ASSERT
  39. AS_IF([test "x${pandora_cv_skip_requires}" != "xno"],[
  40. AC_ARG_WITH([comment],
  41. [AS_HELP_STRING([--with-comment],
  42. [Comment about compilation environment. @<:@default=off@:>@])],
  43. [with_comment=$withval],
  44. [with_comment=no])
  45. AS_IF([test "$with_comment" != "no"],[
  46. COMPILATION_COMMENT=$with_comment
  47. ],[
  48. COMPILATION_COMMENT="Source distribution (${PANDORA_RELEASE_COMMENT})"
  49. ])
  50. AC_DEFINE_UNQUOTED([COMPILATION_COMMENT],["$COMPILATION_COMMENT"],
  51. [Comment about compilation environment])
  52. ])
  53. PKG_CHECK_MODULES(PROTOBUF, protobuf >= 2.4.0)
  54. AC_SUBST(PROTOBUF_LIBS)
  55. AC_SUBST(PROTOBUF_CFLAGS)
  56. AC_SUBST(PROTOBUF_VERSION)
  57. AM_CFLAGS="${PROTOBUF_CFLAGS} ${AM_CFLAGS}"
  58. AM_LDFLAGS="${PROTOBUF_LIBS} ${AM_LDFLAGS}"
  59. AC_PATH_PROG(
  60. [PROTOC],
  61. [protoc],
  62. [AC_MSG_ERROR([oaktreemodel requires protobuf])],
  63. )
  64. AC_PATH_PROG(
  65. [GRPC_CPP_PLUGIN],
  66. [grpc_cpp_plugin],
  67. [AC_MSG_ERROR([oaktreemodel requires grpc_cpp_plugin])],
  68. )
  69. AC_PATH_PROG(
  70. [GRPC_PYTHON_PLUGIN],
  71. [grpc_python_plugin],
  72. [AC_MSG_ERROR([oaktreemodel requires grpc_python_plugin])],
  73. )
  74. AC_PATH_PROG(
  75. [GRPC_GO_PLUGIN],
  76. [protoc-gen-go])
  77. AM_CONDITIONAL([HAVE_GO_PLUGIN], [test "x$ac_cv_path_GRPC_GO_PLUGIN" != "x"])
  78. AX_PTHREAD([
  79. AM_CXXFLAGS="${PTHREAD_CFLAGS} ${AM_CXXFLAGS}"
  80. AM_LDFLAGS="${PTHREAD_LIBS} ${AM_LDFLAGS}"
  81. LIBS="${PTHREAD_LIBS} ${LIBS}"
  82. ], [AC_MSG_ERROR([oaktreemodel requires pthreads])])
  83. #########################################################################
  84. AS_IF([test "$lt_cv_prog_gnu_ld" = "yes"],[
  85. LDFLAGS="${LDFLAGS} ${LD_VERSION_SCRIPT}"
  86. ])
  87. AM_CXXFLAGS="-std=c++11 $AM_CXXFLAGS"
  88. AC_CONFIG_FILES([Makefile])
  89. AC_OUTPUT
  90. echo "---"
  91. echo "Configuration summary for $PACKAGE_NAME version $VERSION"
  92. echo ""
  93. echo " * Installation prefix: $prefix"
  94. echo " * System type: $host_vendor-$host_os"
  95. echo " * Host CPU: $host_cpu"
  96. echo " * C++ Compiler: $CXX_VERSION"
  97. echo " * C++ Flags: $CXXFLAGS"
  98. echo " * C++ AM Flags: $AM_CXXFLAGS"
  99. echo " * CPP Flags: $CPPFLAGS"
  100. echo " * CPP AM Flags: $AM_CPPFLAGS"
  101. echo " * Assertions enabled: $ac_cv_assert"
  102. echo " * Debug enabled: $with_debug"
  103. echo " * Profiling enabled: $ac_profiling"
  104. echo " * Coverage enabled: $ac_coverage"
  105. echo " * Warnings as failure: $ac_cv_warnings_as_errors"
  106. echo ""
  107. echo "---"
  108. dnl libtoolize scans configure.ac and needs to see some text
  109. m4_define([LIBTOOLIZE_AC_INIT], [])
  110. m4_define([UNUSED_MACRO], [
  111. LT_INIT
  112. AC_CONFIG_MACRO_DIR([m4])
  113. ])