Commit c1467766 authored by gejun's avatar gejun

adapt gflags>=2.1

parent 5711cfce
......@@ -149,9 +149,12 @@ PROTOC=$(find_bin_or_die protoc)
GFLAGS_HDR=$(find_dir_of_header_or_die gflags/gflags.h)
# namespace of gflags may not be google, grep it from source.
GFLAGS_NS=$(grep "namespace [a-z0-9]\+ {" $GFLAGS_HDR/gflags/gflags.h | head -1 | awk '{print $2}')
GFLAGS_NS=$(grep "namespace [_A-Za-z0-9]\+ {" $GFLAGS_HDR/gflags/gflags_declare.h | head -1 | awk '{print $2}')
if [ "$GFLAGS_NS" == "GFLAGS_NAMESPACE" ]; then
GFLAGS_NS=$(grep "#define GFLAGS_NAMESPACE [_A-Za-z0-9]\+" $GFLAGS_HDR/gflags/gflags_declare.h | head -1 | awk '{print $3}')
fi
if [ -z "$GFLAGS_NS" ]; then
>&2 $ECHO "Fail to grep namespace of gflags source $GFLAGS_HDR/gflags/gflags.h"
>&2 $ECHO "Fail to grep namespace of gflags source $GFLAGS_HDR/gflags/gflags_declare.h"
exit 1
fi
......
syntax="proto2";
package proto;
enum CompressType {
......
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