Make build script compatible with klp and up

It gets rid of c++11 and makes build script compatible with klp and up.

It also includes GL headers here, because headers in framework/native
might be different across API levels.

Change-Id: Ida425416a392cef878256965d69b54afe42b7263
diff --git a/shared/OpenglCodecCommon/ChecksumCalculator.cpp b/shared/OpenglCodecCommon/ChecksumCalculator.cpp
index 60940b8..7bd8211 100644
--- a/shared/OpenglCodecCommon/ChecksumCalculator.cpp
+++ b/shared/OpenglCodecCommon/ChecksumCalculator.cpp
@@ -16,8 +16,6 @@
 
 #include "ChecksumCalculator.h"
 
-#include <string>
-#include <vector>
 #include <string.h>
 
 // Checklist when implementing new protocol:
@@ -34,7 +32,7 @@
 // as well as modifying the maxChecksumSize function.
 static const size_t kV1ChecksumSize = 8;
 
-static constexpr size_t maxChecksumSize() {
+static size_t maxChecksumSize() {
     return 0 > kV1ChecksumSize ? 0 : kV1ChecksumSize;
 }
 
@@ -86,6 +84,15 @@
     }
 }
 
+ChecksumCalculator::ChecksumCalculator()
+                : m_version(0)
+                , m_numRead(0)
+                , m_numWrite(0)
+                , m_isEncodingChecksum(false)
+                , m_v1BufferTotalLength(0)
+{
+}
+
 void ChecksumCalculator::addBuffer(const void* buf, size_t packetLen) {
     m_isEncodingChecksum = true;
     switch (m_version) {
diff --git a/shared/OpenglCodecCommon/ChecksumCalculator.h b/shared/OpenglCodecCommon/ChecksumCalculator.h
index 4cc231a..7d00617 100644
--- a/shared/OpenglCodecCommon/ChecksumCalculator.h
+++ b/shared/OpenglCodecCommon/ChecksumCalculator.h
@@ -123,6 +123,7 @@
 
 class ChecksumCalculator {
 public:
+    ChecksumCalculator();
     // Get and set current checksum version
     uint32_t getVersion() const { return m_version; }
     // Call setVersion to set a checksum version. It should be called before
@@ -165,17 +166,17 @@
     // Will reset the list of buffers by calling resetChecksum.
     bool validate(const void* expectedChecksum, size_t expectedChecksumLen);
 protected:
-    uint32_t m_version = 0;
+    uint32_t m_version;
     // A temporary state used to compute the total length of a list of buffers,
     // if addBuffer is called.
-    uint32_t m_numRead = 0;
-    uint32_t m_numWrite = 0;
+    uint32_t m_numRead;
+    uint32_t m_numWrite;
     // m_isEncodingChecksum is true when between addBuffer and writeChecksum
-    bool m_isEncodingChecksum = false;
+    bool m_isEncodingChecksum;
 private:
     // Compute a 32bit checksum
     // Used in protocol v1
     uint32_t computeV1Checksum();
     // The buffer used in protocol version 1 to compute checksum.
-    uint32_t m_v1BufferTotalLength = 0;
+    uint32_t m_v1BufferTotalLength;
 };