[config] Add NDEBUG and HB_NDEBUG

Part of https://github.com/harfbuzz/harfbuzz/issues/1652
diff --git a/src/hb-config.hh b/src/hb-config.hh
index c34d7fb..caff9d8 100644
--- a/src/hb-config.hh
+++ b/src/hb-config.hh
@@ -40,10 +40,14 @@
 #define HB_LEAN
 #define HB_MINI
 #define HB_NO_MT
+#ifndef NDEBUG
+#define NDEBUG
+#endif
 #endif
 
 #ifdef HB_LEAN
 #define HB_DISABLE_DEPRECATED
+#define HB_NDEBUG
 #define HB_NO_ATEXIT
 #define HB_NO_BUFFER_SERIALIZE
 #define HB_NO_BITMAP
@@ -103,6 +107,12 @@
 #define HB_NO_OT_SHAPE_COMPLEX_VOWEL_CONSTRAINTS
 #endif
 
+#ifdef NDEBUG
+#ifndef HB_NDEBUG
+#define HB_NDEBUG
+#endif
+#endif
+
 
 #ifdef HAVE_CONFIG_OVERRIDE_H
 #include "config-override.h"
diff --git a/src/hb.hh b/src/hb.hh
index 47f24af..e6d22fe 100644
--- a/src/hb.hh
+++ b/src/hb.hh
@@ -468,16 +468,6 @@
 #endif
 
 
-/* HB_NDEBUG disables some sanity checks that are very safe to disable and
- * should be disabled in production systems.  If NDEBUG is defined, enable
- * HB_NDEBUG; but if it's desirable that normal assert()s (which are very
- * light-weight) to be enabled, then HB_DEBUG can be defined to disable
- * the costlier checks. */
-#ifdef NDEBUG
-#define HB_NDEBUG 1
-#endif
-
-
 /* Flags */
 
 /* Enable bitwise ops on enums marked as flags_t */