[CONFIG] Add HB_CONFIG_OVERRIDE_H to simplify config overrides
This commit is contained in:
parent
74b46b29e7
commit
b95d252fab
15
CONFIG.md
15
CONFIG.md
|
@ -135,10 +135,17 @@ The pre-defined configurations are:
|
||||||
Most of the time, one of the pre-defined configuration is exactly what one needs.
|
Most of the time, one of the pre-defined configuration is exactly what one needs.
|
||||||
Sometimes, however, the pre-defined configuration cuts out features that might
|
Sometimes, however, the pre-defined configuration cuts out features that might
|
||||||
be desired in the library. Unfortunately there is no quick way to undo those
|
be desired in the library. Unfortunately there is no quick way to undo those
|
||||||
configurations from the command-line. But one can add a header file called
|
configurations from the command-line.
|
||||||
`config-override.h` to undefine certain `HB_NO_*` symbols as desired. Then
|
|
||||||
define `HAVE_CONFIG_OVERRIDE_H` to make `hb-config.hh` include your configuration
|
However, configuration can still be overridden from a file. To do that, add your
|
||||||
overrides at the end.
|
override instructions (mostly `undef` instructions) to a header file and define
|
||||||
|
the macro `HB_CONFIG_OVERRIDE_H` to the string containing to that header file's
|
||||||
|
name. HarfBuzz will then include that file at appropriate right place during
|
||||||
|
configuration.
|
||||||
|
|
||||||
|
Up until HarfBuzz 3.1.2 the the configuration override header file's name was
|
||||||
|
fixed and called `config-override.h`, and was activated by defining the macro
|
||||||
|
`HAVE_CONFIG_OVERRIDE_H`. That still works.
|
||||||
|
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
|
@ -86,8 +86,11 @@
|
||||||
#define HB_NO_LEGACY
|
#define HB_NO_LEGACY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_OVERRIDE_H
|
#if defined(HAVE_CONFIG_OVERRIDE_H) || defined(HB_CONFIG_OVERRIDE_H)
|
||||||
#include "config-override.h"
|
#ifndef HB_CONFIG_OVERRIDE_H
|
||||||
|
#define HB_CONFIG_OVERRIDE_H "config-override.h"
|
||||||
|
#endif
|
||||||
|
#include HB_CONFIG_OVERRIDE_H
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Closure of options. */
|
/* Closure of options. */
|
||||||
|
|
Loading…
Reference in New Issue