diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 2f70a39b..14351a8b 100644 --- a/configure.ac +++ b/configure.ac @@ -12,13 +12,22 @@ AC_PREREQ(2.59) # In the SVN trunk, the version should always be the next anticipated release # version with the "-pre" suffix. (We used to use "-SNAPSHOT" but this pushed # the size of one file name in the dist tarfile over the 99-char limit.) -AC_INIT([Protocol Buffers],[2.4.1],[protobuf@googlegroups.com],[protobuf]) +AC_INIT([Protocol Buffers],[3.0.0-alpha-3-pre],[protobuf@googlegroups.com],[protobuf]) +AM_MAINTAINER_MODE([enable]) AC_CONFIG_SRCDIR(src/google/protobuf/message.cc) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) +AC_ARG_VAR(DIST_LANG, [language to include in the distribution package (i.e., make dist)]) +case "$DIST_LANG" in + "") DIST_LANG=all ;; + all | cpp | java | python | javanano | ruby) ;; + *) AC_MSG_FAILURE([unknown language: $DIST_LANG]) ;; +esac +AC_SUBST(DIST_LANG) + # autoconf's default CXXFLAGS are usually "-g -O2". These aren't necessarily # the best choice for libprotobuf. AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"], @@ -28,7 +37,7 @@ AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"], AC_CANONICAL_TARGET -AM_INIT_AUTOMAKE +AM_INIT_AUTOMAKE([1.9 tar-ustar subdir-objects]) AC_ARG_WITH([zlib], [AS_HELP_STRING([--with-zlib], @@ -45,6 +54,7 @@ AC_PROG_CC AC_PROG_CXX AC_LANG([C++]) ACX_USE_SYSTEM_EXTENSIONS +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) AM_CONDITIONAL(GCC, test "$GCC" = yes) # let the Makefile know if we're gcc # test_util.cc takes forever to compile with GCC and optimization turned on. @@ -89,12 +99,12 @@ AS_IF([test "$with_zlib" != no], [ # First check the zlib header version. AC_COMPILE_IFELSE( - AC_LANG_PROGRAM([[ + [AC_LANG_PROGRAM([[ #include <zlib.h> #if !defined(ZLIB_VERNUM) || (ZLIB_VERNUM < 0x1204) # error zlib version too old #endif - ]], []), [ + ]], [])], [ AC_MSG_RESULT([ok (1.2.0.4 or later)]) # Also need to add -lz to the linker flags and make sure this succeeds. @@ -138,6 +148,15 @@ AM_CONDITIONAL([USE_EXTERNAL_PROTOC], [test "$with_protoc" != "no"]) ACX_PTHREAD AC_CXX_STL_HASH +case "$target_os" in + mingw* | cygwin* | win*) + ;; + *) + # Need to link against rt on Solaris + AC_SEARCH_LIBS([sched_yield], [rt], [], [AC_MSG_FAILURE([sched_yield was not found on your system])]) + ;; +esac + # HACK: Make gtest's configure script pick up our copy of CFLAGS and CXXFLAGS, # since the flags added by ACX_CHECK_SUNCC must be used when compiling gtest # too. |