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:
snappy.mirrorbot@gmail.com
2011-03-23 11:13:13 +00:00
parent 60add43d99
commit 39d27bea23
6 changed files with 255 additions and 172 deletions

71
configure vendored
View File

@@ -884,6 +884,7 @@ enable_dependency_tracking
with_gnu_ld
enable_libtool_lock
enable_gtest
with_gflags
'
ac_precious_vars='build_alias
host_alias
@@ -1542,6 +1543,8 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-gflags use Google Flags package to enhance the unit test
[default=check]
Some influential environment variables:
CC C compiler command
@@ -4741,13 +4744,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
(eval echo "\"\$as_me:4744: $ac_compile\"" >&5)
(eval echo "\"\$as_me:4747: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
(eval echo "\"\$as_me:4747: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval echo "\"\$as_me:4750: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
(eval echo "\"\$as_me:4750: output\"" >&5)
(eval echo "\"\$as_me:4753: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -5953,7 +5956,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 5956 "configure"' > conftest.$ac_ext
echo '#line 5959 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -7479,11 +7482,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7482: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7485: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7486: \$? = $ac_status" >&5
echo "$as_me:7489: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7818,11 +7821,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7821: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7824: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7825: \$? = $ac_status" >&5
echo "$as_me:7828: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7923,11 +7926,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7926: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7929: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:7930: \$? = $ac_status" >&5
echo "$as_me:7933: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -7978,11 +7981,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7981: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7984: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:7985: \$? = $ac_status" >&5
echo "$as_me:7988: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -10362,7 +10365,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 10365 "configure"
#line 10368 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10458,7 +10461,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 10461 "configure"
#line 10464 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13344,11 +13347,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13347: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13350: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:13351: \$? = $ac_status" >&5
echo "$as_me:13354: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13443,11 +13446,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13446: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13449: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:13450: \$? = $ac_status" >&5
echo "$as_me:13453: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -13495,11 +13498,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13498: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13501: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:13502: \$? = $ac_status" >&5
echo "$as_me:13505: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14824,6 +14827,17 @@ fi
# Check whether --with-gflags was given.
if test "${with_gflags+set}" = set; then :
withval=$with_gflags;
else
with_gflags=check
fi
if test "x$with_gflags" != "xno"; then
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
@@ -14999,11 +15013,19 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
true # Ignore; we can live without it.
if test "x$with_gflags" != "xcheck"; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "--with-gflags was given, but test for gflags failed
See \`config.log' for more details." "$LINENO" 5; }
fi
elif test $pkg_failed = untried; then
true # Ignore; we can live without it.
if test "x$with_gflags" != "xcheck"; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "--with-gflags was given, but test for gflags failed
See \`config.log' for more details." "$LINENO" 5; }
fi
else
gflags_CFLAGS=$pkg_cv_gflags_CFLAGS
gflags_LIBS=$pkg_cv_gflags_LIBS
@@ -15012,6 +15034,7 @@ $as_echo "yes" >&6; }
$as_echo "#define HAVE_GFLAGS 1" >>confdefs.h
fi
fi
# See if we have __builtin_expect.