Fix public issue #6: Add a --with-gflags for disabling gflags autodetection
and using a manually given setting (use/don't use) instead. R=csilvers DELTA=16 (13 added, 0 deleted, 3 changed) Revision created by MOE tool push_codebase. MOE_MIGRATION=991 git-svn-id: https://snappy.googlecode.com/svn/trunk@9 03e5f5b5-db94-4691-08a0-1a8bf15f6143
This commit is contained in:
19
configure.ac
19
configure.ac
@@ -21,10 +21,23 @@ AC_CHECK_HEADERS([stdint.h stddef.h])
|
||||
AC_CHECK_FUNC([mmap])
|
||||
|
||||
GTEST_LIB_CHECK([], [true], [true # Ignore; we can live without it.])
|
||||
PKG_CHECK_MODULES([gflags], [libgflags],
|
||||
|
||||
AC_ARG_WITH([gflags],
|
||||
[AS_HELP_STRING(
|
||||
[--with-gflags],
|
||||
[use Google Flags package to enhance the unit test @<:@default=check@:>@])],
|
||||
[],
|
||||
[with_gflags=check])
|
||||
|
||||
if test "x$with_gflags" != "xno"; then
|
||||
PKG_CHECK_MODULES(
|
||||
[gflags],
|
||||
[libgflags],
|
||||
[AC_DEFINE([HAVE_GFLAGS], [1], [Use the gflags package for command-line parsing.])],
|
||||
[true # Ignore; we can live without it.]
|
||||
)
|
||||
[if test "x$with_gflags" != "xcheck"; then
|
||||
AC_MSG_FAILURE([--with-gflags was given, but test for gflags failed])
|
||||
fi])
|
||||
fi
|
||||
|
||||
# See if we have __builtin_expect.
|
||||
# TODO: Use AC_CACHE.
|
||||
|
||||
Reference in New Issue
Block a user