Skip to content

Commit

Permalink
Merge pull request #8285 from s1341/master
Browse files Browse the repository at this point in the history
Fix missing -llog when compiling for android
  • Loading branch information
acozzette committed Mar 15, 2021
2 parents f154323 + ee05cc1 commit 28dbe3b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions configure.ac
Expand Up @@ -223,6 +223,19 @@ case "$target_os" in
esac
AM_CONDITIONAL([OBJC_CONFORMANCE_TEST], [test $OBJC_CONFORMANCE_TEST = 1])

AC_MSG_CHECKING(whether -llog is needed)
ANDROID_TEST=no
case "$target_os" in
*android*)
ANDROID_TEST=yes
;;
esac
AC_MSG_RESULT($ANDROID_TEST)
if test "x$ANDROID_TEST" = xyes; then
LIBLOG_LIBS="-llog"
fi
AC_SUBST([LIBLOG_LIBS])

# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
# too.
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Expand Up @@ -30,7 +30,7 @@ endif

AM_CXXFLAGS = $(NO_OPT_CXXFLAGS) $(PROTOBUF_OPT_FLAG)

AM_LDFLAGS = $(PTHREAD_CFLAGS)
AM_LDFLAGS = $(PTHREAD_CFLAGS) ${LIBLOG_LIBS}

# If I say "dist_include_DATA", automake complains that $(includedir) is not
# a "legitimate" directory for DATA. Screw you, automake.
Expand Down

0 comments on commit 28dbe3b

Please sign in to comment.