From 0bc2d94cd115bdd87b4ff3be291c23a8a658bb16 Mon Sep 17 00:00:00 2001 From: Prem Nair Date: Wed, 19 Dec 2018 10:09:17 -0800 Subject: [PATCH] Fix bazel build with gflags The code references `@ac_cv_have_libgflags@` but not `@ac_cv_have_libgflags_h@`. This corrects that. `int(with_gflags)` incorporates the possibility of `True/False`: https://github.com/bazelbuild/bazel/issues/4792 --- bazel/glog.bzl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bazel/glog.bzl b/bazel/glog.bzl index 5334fd8..0bb9110 100644 --- a/bazel/glog.bzl +++ b/bazel/glog.bzl @@ -94,18 +94,18 @@ sed -e 's/@ac_cv_cxx_using_operator@/1/g' \ -e 's/@ac_cv_have_unistd_h@/1/g' \ -e 's/@ac_cv_have_stdint_h@/1/g' \ -e 's/@ac_cv_have_systypes_h@/1/g' \ - -e 's/@ac_cv_have_libgflags_h@/1/g' \ + -e 's/@ac_cv_have_libgflags@/{}/g' \ -e 's/@ac_cv_have_uint16_t@/1/g' \ -e 's/@ac_cv_have___builtin_expect@/1/g' \ -e 's/@ac_cv_have_.*@/0/g' \ - -e 's/@ac_google_start_namespace@/namespace google {/g' \ - -e 's/@ac_google_end_namespace@/}/g' \ + -e 's/@ac_google_start_namespace@/namespace google {{/g' \ + -e 's/@ac_google_end_namespace@/}}/g' \ -e 's/@ac_google_namespace@/google/g' \ -e 's/@ac_cv___attribute___noinline@/__attribute__((noinline))/g' \ -e 's/@ac_cv___attribute___noreturn@/__attribute__((noreturn))/g' \ -e 's/@ac_cv___attribute___printf_4_5@/__attribute__((__format__ (__printf__, 4, 5)))/g' EOF -''', +'''.format(int(with_gflags)), ) native.genrule(