diff options
author | snappy.mirrorbot@gmail.com <snappy.mirrorbot@gmail.com@03e5f5b5-db94-4691-08a0-1a8bf15f6143> | 2011-03-23 11:13:13 +0000 |
---|---|---|
committer | snappy.mirrorbot@gmail.com <snappy.mirrorbot@gmail.com@03e5f5b5-db94-4691-08a0-1a8bf15f6143> | 2011-03-23 11:13:13 +0000 |
commit | 5aaf1a52abe923bfcc904e3e1d47c58de84c8679 (patch) | |
tree | ff6fd686dab0770ba41fb7eb3ccbecbf3daa994b /configure.ac | |
parent | fc8c9d670527ec6c5a7d0c968de37db71051be06 (diff) | |
download | snappy-5aaf1a52abe923bfcc904e3e1d47c58de84c8679.tar.gz |
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: http://snappy.googlecode.com/svn/trunk@9 03e5f5b5-db94-4691-08a0-1a8bf15f6143
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 49d8cf5..3a3da35 100644 --- a/configure.ac +++ b/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. |