Commit 315d590c authored by 's avatar

Apply patch given by maw (thanks!). The patch was modified a bit using AC_ARG_WITH.

- Fix build problems when building with gtest.
- --with-gflags support.


git-svn-id: https://google-glog.googlecode.com/svn/trunk@42 eb4d4688-79bd-11dd-afb4-1d65580434c0
parent b86afef3
......@@ -47,9 +47,9 @@ lib_LTLIBRARIES =
# The libraries libglog depends on.
COMMON_LIBS = $(PTHREAD_LIBS) $(GFLAGS_LIBS) $(UNWIND_LIBS)
# Compile switches for our unittest.
TEST_CFLAGS = $(GTEST_CFLAGS) $(GMOCK_CFLAGS)
TEST_CFLAGS = $(GTEST_CFLAGS) $(GMOCK_CFLAGS) $(GFLAGS_CFLAGS)
# Libraries for our unittest.
TEST_LIBS = $(GTEST_LIBS) $(GMOCK_LIBS)
TEST_LIBS = $(GTEST_LIBS) $(GMOCK_LIBS) $(GFLAGS_LIBS)
## unittests you want to run when people type 'make check'.
## TESTS is for binary unittests, check_SCRIPTS for script-based unittests.
......@@ -94,7 +94,7 @@ TEST_BINARIES += logging_striptest0
logging_striptest0_SOURCES = $(gloginclude_HEADERS) \
src/logging_striptest_main.cc
nodist_logging_striptest0_SOURCES = $(nodist_gloginclude_HEADERS)
logging_striptest0_CXXFLAGS = $(PTHREAD_CFLAGS)
logging_striptest0_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
logging_striptest0_LDFLAGS = $(PTHREAD_CFLAGS)
logging_striptest0_LDADD = libglog.la $(COMMON_LIBS)
......@@ -102,7 +102,7 @@ TEST_BINARIES += logging_striptest2
logging_striptest2_SOURCES = $(gloginclude_HEADERS) \
src/logging_striptest2.cc
nodist_logging_striptest2_SOURCES = $(nodist_gloginclude_HEADERS)
logging_striptest2_CXXFLAGS = $(PTHREAD_CFLAGS)
logging_striptest2_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
logging_striptest2_LDFLAGS = $(PTHREAD_CFLAGS)
logging_striptest2_LDADD = libglog.la $(COMMON_LIBS)
......@@ -110,7 +110,7 @@ TEST_BINARIES += logging_striptest10
logging_striptest10_SOURCES = $(gloginclude_HEADERS) \
src/logging_striptest10.cc
nodist_logging_striptest10_SOURCES = $(nodist_gloginclude_HEADERS)
logging_striptest10_CXXFLAGS = $(PTHREAD_CFLAGS)
logging_striptest10_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
logging_striptest10_LDFLAGS = $(PTHREAD_CFLAGS)
logging_striptest10_LDADD = libglog.la $(COMMON_LIBS)
......@@ -126,7 +126,7 @@ TESTS += stacktrace_unittest
stacktrace_unittest_SOURCES = $(gloginclude_HEADERS) \
src/stacktrace_unittest.cc
nodist_stacktrace_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
stacktrace_unittest_CXXFLAGS = $(PTHREAD_CFLAGS)
stacktrace_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
stacktrace_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
stacktrace_unittest_LDADD = libglog.la $(COMMON_LIBS)
......@@ -142,17 +142,17 @@ TESTS += stl_logging_unittest
stl_logging_unittest_SOURCES = $(gloginclude_HEADERS) \
src/stl_logging_unittest.cc
nodist_stl_logging_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
stl_logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS)
stl_logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
stl_logging_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
stl_logging_unittest_LDADD = libglog.la $(COMMON_LIBS)
stl_logging_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
TEST_BINARIES += signalhandler_unittest
signalhandler_unittest_SOURCES = $(gloginclude_HEADERS) \
src/signalhandler_unittest.cc
nodist_signalhandler_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
signalhandler_unittest_CXXFLAGS = $(PTHREAD_CFLAGS)
signalhandler_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
signalhandler_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
signalhandler_unittest_LDADD = libglog.la $(COMMON_LIBS)
signalhandler_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
TESTS += utilities_unittest
utilities_unittest_SOURCES = $(gloginclude_HEADERS) \
......@@ -191,8 +191,8 @@ libglog_la_SOURCES = $(gloginclude_HEADERS) \
src/base/commandlineflags.h src/googletest.h
nodist_libglog_la_SOURCES = $(nodist_gloginclude_HEADERS)
libglog_la_CXXFLAGS = $(PTRHEAD_CFLAGS) -DNDEBUG
libglog_la_LDFLAGS = $(PTRHEAD_CFLAGS)
libglog_la_CXXFLAGS = $(PTRHEAD_CFLAGS) $(GFLAGS_CFLAGS) -DNDEBUG
libglog_la_LDFLAGS = $(PTRHEAD_CFLAGS) $(GFLAGS_LDFLAGS)
libglog_la_LIBADD = $(COMMON_LIBS)
## The location of the windows project file for each binary we make
......
......@@ -115,9 +115,8 @@ am_demangle_unittest_OBJECTS = $(am__objects_1) \
nodist_demangle_unittest_OBJECTS = $(am__objects_1)
demangle_unittest_OBJECTS = $(am_demangle_unittest_OBJECTS) \
$(nodist_demangle_unittest_OBJECTS)
am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
demangle_unittest_DEPENDENCIES = libglog.la $(am__DEPENDENCIES_2) \
$(am__DEPENDENCIES_3)
$(am__DEPENDENCIES_2)
demangle_unittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
$(demangle_unittest_CXXFLAGS) $(CXXFLAGS) \
......@@ -158,7 +157,7 @@ nodist_logging_unittest_OBJECTS = $(am__objects_1)
logging_unittest_OBJECTS = $(am_logging_unittest_OBJECTS) \
$(nodist_logging_unittest_OBJECTS)
logging_unittest_DEPENDENCIES = libglog.la $(am__DEPENDENCIES_2) \
$(am__DEPENDENCIES_3)
$(am__DEPENDENCIES_2)
logging_unittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
$(logging_unittest_CXXFLAGS) $(CXXFLAGS) \
......@@ -171,7 +170,7 @@ am__mock_log_test_SOURCES_DIST = src/glog/log_severity.h \
mock_log_test_OBJECTS = $(am_mock_log_test_OBJECTS) \
$(nodist_mock_log_test_OBJECTS)
@HAVE_GMOCK_TRUE@mock_log_test_DEPENDENCIES = libglog.la \
@HAVE_GMOCK_TRUE@ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3)
@HAVE_GMOCK_TRUE@ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_2)
mock_log_test_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(mock_log_test_CXXFLAGS) \
$(CXXFLAGS) $(mock_log_test_LDFLAGS) $(LDFLAGS) -o $@
......@@ -180,7 +179,8 @@ am_signalhandler_unittest_OBJECTS = $(am__objects_1) \
nodist_signalhandler_unittest_OBJECTS = $(am__objects_1)
signalhandler_unittest_OBJECTS = $(am_signalhandler_unittest_OBJECTS) \
$(nodist_signalhandler_unittest_OBJECTS)
signalhandler_unittest_DEPENDENCIES = libglog.la $(am__DEPENDENCIES_2)
signalhandler_unittest_DEPENDENCIES = libglog.la $(am__DEPENDENCIES_2) \
$(am__DEPENDENCIES_2)
signalhandler_unittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
$(signalhandler_unittest_CXXFLAGS) $(CXXFLAGS) \
......@@ -200,7 +200,8 @@ am_stl_logging_unittest_OBJECTS = $(am__objects_1) \
nodist_stl_logging_unittest_OBJECTS = $(am__objects_1)
stl_logging_unittest_OBJECTS = $(am_stl_logging_unittest_OBJECTS) \
$(nodist_stl_logging_unittest_OBJECTS)
stl_logging_unittest_DEPENDENCIES = libglog.la $(am__DEPENDENCIES_2)
stl_logging_unittest_DEPENDENCIES = libglog.la $(am__DEPENDENCIES_2) \
$(am__DEPENDENCIES_2)
stl_logging_unittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
$(stl_logging_unittest_CXXFLAGS) $(CXXFLAGS) \
......@@ -211,7 +212,7 @@ nodist_symbolize_unittest_OBJECTS = $(am__objects_1)
symbolize_unittest_OBJECTS = $(am_symbolize_unittest_OBJECTS) \
$(nodist_symbolize_unittest_OBJECTS)
symbolize_unittest_DEPENDENCIES = libglog.la $(am__DEPENDENCIES_2) \
$(am__DEPENDENCIES_3)
$(am__DEPENDENCIES_2)
symbolize_unittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
$(symbolize_unittest_CXXFLAGS) $(CXXFLAGS) \
......@@ -222,7 +223,7 @@ nodist_utilities_unittest_OBJECTS = $(am__objects_1)
utilities_unittest_OBJECTS = $(am_utilities_unittest_OBJECTS) \
$(nodist_utilities_unittest_OBJECTS)
utilities_unittest_DEPENDENCIES = libglog.la $(am__DEPENDENCIES_2) \
$(am__DEPENDENCIES_3)
$(am__DEPENDENCIES_2)
utilities_unittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
$(utilities_unittest_CXXFLAGS) $(CXXFLAGS) \
......@@ -324,6 +325,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GFLAGS_CFLAGS = @GFLAGS_CFLAGS@
GFLAGS_LIBS = @GFLAGS_LIBS@
GMOCK_CFLAGS = @GMOCK_CFLAGS@
GMOCK_CONFIG = @GMOCK_CONFIG@
......@@ -453,9 +455,9 @@ lib_LTLIBRARIES = libglog.la
# The libraries libglog depends on.
COMMON_LIBS = $(PTHREAD_LIBS) $(GFLAGS_LIBS) $(UNWIND_LIBS)
# Compile switches for our unittest.
TEST_CFLAGS = $(GTEST_CFLAGS) $(GMOCK_CFLAGS)
TEST_CFLAGS = $(GTEST_CFLAGS) $(GMOCK_CFLAGS) $(GFLAGS_CFLAGS)
# Libraries for our unittest.
TEST_LIBS = $(GTEST_LIBS) $(GMOCK_LIBS)
TEST_LIBS = $(GTEST_LIBS) $(GMOCK_LIBS) $(GFLAGS_LIBS)
TESTS_ENVIRONMENT =
check_SCRIPTS = logging_striplog_test_sh demangle_unittest_sh \
signalhandler_unittest_sh
......@@ -478,21 +480,21 @@ logging_striptest0_SOURCES = $(gloginclude_HEADERS) \
src/logging_striptest_main.cc
nodist_logging_striptest0_SOURCES = $(nodist_gloginclude_HEADERS)
logging_striptest0_CXXFLAGS = $(PTHREAD_CFLAGS)
logging_striptest0_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
logging_striptest0_LDFLAGS = $(PTHREAD_CFLAGS)
logging_striptest0_LDADD = libglog.la $(COMMON_LIBS)
logging_striptest2_SOURCES = $(gloginclude_HEADERS) \
src/logging_striptest2.cc
nodist_logging_striptest2_SOURCES = $(nodist_gloginclude_HEADERS)
logging_striptest2_CXXFLAGS = $(PTHREAD_CFLAGS)
logging_striptest2_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
logging_striptest2_LDFLAGS = $(PTHREAD_CFLAGS)
logging_striptest2_LDADD = libglog.la $(COMMON_LIBS)
logging_striptest10_SOURCES = $(gloginclude_HEADERS) \
src/logging_striptest10.cc
nodist_logging_striptest10_SOURCES = $(nodist_gloginclude_HEADERS)
logging_striptest10_CXXFLAGS = $(PTHREAD_CFLAGS)
logging_striptest10_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
logging_striptest10_LDFLAGS = $(PTHREAD_CFLAGS)
logging_striptest10_LDADD = libglog.la $(COMMON_LIBS)
demangle_unittest_SOURCES = $(gloginclude_HEADERS) \
......@@ -506,7 +508,7 @@ stacktrace_unittest_SOURCES = $(gloginclude_HEADERS) \
src/stacktrace_unittest.cc
nodist_stacktrace_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
stacktrace_unittest_CXXFLAGS = $(PTHREAD_CFLAGS)
stacktrace_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
stacktrace_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
stacktrace_unittest_LDADD = libglog.la $(COMMON_LIBS)
symbolize_unittest_SOURCES = $(gloginclude_HEADERS) \
......@@ -520,16 +522,16 @@ stl_logging_unittest_SOURCES = $(gloginclude_HEADERS) \
src/stl_logging_unittest.cc
nodist_stl_logging_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
stl_logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS)
stl_logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
stl_logging_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
stl_logging_unittest_LDADD = libglog.la $(COMMON_LIBS)
stl_logging_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
signalhandler_unittest_SOURCES = $(gloginclude_HEADERS) \
src/signalhandler_unittest.cc
nodist_signalhandler_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
signalhandler_unittest_CXXFLAGS = $(PTHREAD_CFLAGS)
signalhandler_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
signalhandler_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
signalhandler_unittest_LDADD = libglog.la $(COMMON_LIBS)
signalhandler_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS)
utilities_unittest_SOURCES = $(gloginclude_HEADERS) \
src/utilities_unittest.cc
......@@ -560,8 +562,8 @@ libglog_la_SOURCES = $(gloginclude_HEADERS) \
src/base/commandlineflags.h src/googletest.h
nodist_libglog_la_SOURCES = $(nodist_gloginclude_HEADERS)
libglog_la_CXXFLAGS = $(PTRHEAD_CFLAGS) -DNDEBUG
libglog_la_LDFLAGS = $(PTRHEAD_CFLAGS)
libglog_la_CXXFLAGS = $(PTRHEAD_CFLAGS) $(GFLAGS_CFLAGS) -DNDEBUG
libglog_la_LDFLAGS = $(PTRHEAD_CFLAGS) $(GFLAGS_LDFLAGS)
libglog_la_LIBADD = $(COMMON_LIBS)
WINDOWS_PROJECTS = google-glog.sln vsprojects/libglog/libglog.vcproj \
vsprojects/logging_unittest/logging_unittest.vcproj \
......
......@@ -904,9 +904,10 @@ ac_cv_have_uint16_t
ac_cv_have_u_int16_t
ac_cv_have___uint16
ac_cv_have_libgflags
GFLAGS_LIBS
GFLAGS_CFLAGS
GTEST_CFLAGS
GMOCK_CFLAGS
GFLAGS_LIBS
GTEST_LIBS
GMOCK_LIBS
LIBOBJS
......@@ -1527,6 +1528,7 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-tags[=TAGS] include additional configurations [automatic]
--with-gflags=GFLAGS_DIR
Some influential environment variables:
CC C compiler command
......@@ -5072,7 +5074,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 5075 "configure"' > conftest.$ac_ext
echo '#line 5077 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
......@@ -7427,11 +7429,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:7430: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7432: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7434: \$? = $ac_status" >&5
echo "$as_me:7436: \$? = $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.
......@@ -7717,11 +7719,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:7720: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7722: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7724: \$? = $ac_status" >&5
echo "$as_me:7726: \$? = $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.
......@@ -7821,11 +7823,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:7824: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7826: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:7828: \$? = $ac_status" >&5
echo "$as_me:7830: \$? = $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
......@@ -10198,7 +10200,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 10201 "configure"
#line 10203 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
......@@ -10298,7 +10300,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 10301 "configure"
#line 10303 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
......@@ -12699,11 +12701,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:12702: $lt_compile\"" >&5)
(eval echo "\"\$as_me:12704: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:12706: \$? = $ac_status" >&5
echo "$as_me:12708: \$? = $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.
......@@ -12803,11 +12805,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:12806: $lt_compile\"" >&5)
(eval echo "\"\$as_me:12808: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:12810: \$? = $ac_status" >&5
echo "$as_me:12812: \$? = $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
......@@ -14401,11 +14403,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:14404: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14406: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:14408: \$? = $ac_status" >&5
echo "$as_me:14410: \$? = $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.
......@@ -14505,11 +14507,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:14508: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14510: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:14512: \$? = $ac_status" >&5
echo "$as_me:14514: \$? = $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
......@@ -16725,11 +16727,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:16728: $lt_compile\"" >&5)
(eval echo "\"\$as_me:16730: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:16732: \$? = $ac_status" >&5
echo "$as_me:16734: \$? = $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.
......@@ -17015,11 +17017,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:17018: $lt_compile\"" >&5)
(eval echo "\"\$as_me:17020: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:17022: \$? = $ac_status" >&5
echo "$as_me:17024: \$? = $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.
......@@ -17119,11 +17121,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:17122: $lt_compile\"" >&5)
(eval echo "\"\$as_me:17124: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:17126: \$? = $ac_status" >&5
echo "$as_me:17128: \$? = $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
......@@ -23863,6 +23865,18 @@ fi
fi
# Check if there is google-gflags library installed.
SAVE_CFLAGS="$CFLAGS"
SAVE_LIBS="$LIBS"
# Check whether --with-gflags was given.
if test "${with_gflags+set}" = set; then
withval=$with_gflags; GFLAGS_CFLAGS="-I${with_gflags}/include"
GFLAGS_LIBS="-L${with_gflags}/lib -lgflags"
CFLAGS="$CFLAGS $GFLAGS_CFLAGS"
LIBS="$LIBS $GFLAGS_LIBS"
fi
{ echo "$as_me:$LINENO: checking for main in -lgflags" >&5
echo $ECHO_N "checking for main in -lgflags... $ECHO_C" >&6; }
if test "${ac_cv_lib_gflags_main+set}" = set; then
......@@ -23925,15 +23939,17 @@ else
fi
if test x"$ac_cv_have_libgflags" = x"1"; then
GFLAGS_LIBS=-lgflags
cat >>confdefs.h <<\_ACEOF
#define HAVE_LIB_GFLAGS 1
_ACEOF
else
GFLAGS_CFLAGS=
GFLAGS_LIBS=
fi
#CFLAGS="$SAVE_CFLAGS"
#LIBS="$SAVE_LIBS"
# TODO(hamaji): Use official m4 macros provided by testing libraries
# once the m4 macro of Google Mocking becomes ready.
......@@ -24608,6 +24624,7 @@ fi
# Write generated configuration file
......@@ -25470,16 +25487,17 @@ ac_cv_have_uint16_t!$ac_cv_have_uint16_t$ac_delim
ac_cv_have_u_int16_t!$ac_cv_have_u_int16_t$ac_delim
ac_cv_have___uint16!$ac_cv_have___uint16$ac_delim
ac_cv_have_libgflags!$ac_cv_have_libgflags$ac_delim
GFLAGS_LIBS!$GFLAGS_LIBS$ac_delim
GFLAGS_CFLAGS!$GFLAGS_CFLAGS$ac_delim
GTEST_CFLAGS!$GTEST_CFLAGS$ac_delim
GMOCK_CFLAGS!$GMOCK_CFLAGS$ac_delim
GFLAGS_LIBS!$GFLAGS_LIBS$ac_delim
GTEST_LIBS!$GTEST_LIBS$ac_delim
GMOCK_LIBS!$GMOCK_LIBS$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 45; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 46; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
......
......@@ -99,13 +99,23 @@ if test x"$acx_pthread_ok" = x"yes"; then
fi
# Check if there is google-gflags library installed.
SAVE_CFLAGS="$CFLAGS"
SAVE_LIBS="$LIBS"
AC_ARG_WITH(gflags, AS_HELP_STRING[--with-gflags=GFLAGS_DIR],
GFLAGS_CFLAGS="-I${with_gflags}/include"
GFLAGS_LIBS="-L${with_gflags}/lib -lgflags"
CFLAGS="$CFLAGS $GFLAGS_CFLAGS"
LIBS="$LIBS $GFLAGS_LIBS"
)
AC_CHECK_LIB(gflags, main, ac_cv_have_libgflags=1, ac_cv_have_libgflags=0)
if test x"$ac_cv_have_libgflags" = x"1"; then
GFLAGS_LIBS=-lgflags
AC_DEFINE(HAVE_LIB_GFLAGS, 1, [define if you have google gflags library])
else
GFLAGS_CFLAGS=
GFLAGS_LIBS=
fi
CFLAGS="$SAVE_CFLAGS"
LIBS="$SAVE_LIBS"
# TODO(hamaji): Use official m4 macros provided by testing libraries
# once the m4 macro of Google Mocking becomes ready.
......@@ -211,9 +221,10 @@ AC_SUBST(ac_cv_have_uint16_t)
AC_SUBST(ac_cv_have_u_int16_t)
AC_SUBST(ac_cv_have___uint16)
AC_SUBST(ac_cv_have_libgflags)
AC_SUBST(GFLAGS_LIBS)
AC_SUBST(GFLAGS_CFLAGS)
AC_SUBST(GTEST_CFLAGS)
AC_SUBST(GMOCK_CFLAGS)
AC_SUBST(GFLAGS_LIBS)
AC_SUBST(GTEST_LIBS)
AC_SUBST(GMOCK_LIBS)
......
......@@ -1120,10 +1120,12 @@ TEST(TestExitOnDFatal, ToBeOrNotToBe) {
base::internal::SetExitOnDFatal(true);
EXPECT_TRUE(base::internal::GetExitOnDFatal());
#ifdef GTEST_HAS_DEATH_TEST
// Death comes on little cats' feet.
EXPECT_DEBUG_DEATH({
LOG(DFATAL) << "This should be fatal in debug mode";
}, "This should be fatal in debug mode");
#endif
}
#ifdef HAVE_STACKTRACE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment