mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-21 09:50:33 +01:00
[configure.ac] Sanitize feature names
This commit is contained in:
parent
c2062dc8b7
commit
4edda79e71
1 changed files with 9 additions and 9 deletions
|
|
@ -206,17 +206,17 @@ m4_define([_CAIRO_BUILD_FEATURE_NAME_NORMALIZED],
|
|||
[CAIRO_HAS_[$1]m4_bmatch([$1],[$2$],,[$2])])
|
||||
|
||||
m4_define([_CAIRO_BUILD_FEATURE_NAME],
|
||||
[_CAIRO_BUILD_FEATURE_NAME_NORMALIZED(m4_translit([$1],[a-z_ -],[A-Z___]),m4_translit(m4_ifval([$2],[ $2]),[a-z_ -],[A-Z___]))])
|
||||
[_CAIRO_BUILD_FEATURE_NAME_NORMALIZED(AS_TR_CPP([$1]),AS_TR_CPP(m4_ifval([$2],[ $2])))])
|
||||
|
||||
dnl Like _CAIRO_ENABLE*, but takes an object type too
|
||||
AC_DEFUN([_CAIRO_ENABLE],
|
||||
[_CAIRO_ENABLE_FULL(
|
||||
m4_translit([$1],[A-Z_ -],[a-z___]),
|
||||
[$2],
|
||||
m4_translit([$1],[A-Z_ -],[a-z---]),
|
||||
_CAIRO_BUILD_FEATURE_NAME([$1],[$3]),
|
||||
[$3],
|
||||
[$4],
|
||||
[m4_if([$1],m4_tolower(AS_TR_SH([$1])),,[m4_fatal([invalid feature name `$1'])])_CAIRO_ENABLE_FULL(
|
||||
[$1],
|
||||
m4_normalize([$2]),
|
||||
m4_translit([$1],[_],[-]),
|
||||
_CAIRO_BUILD_FEATURE_NAME([$1],m4_normalize([$3])),
|
||||
m4_normalize([$3]),
|
||||
m4_normalize([$4]),
|
||||
[$5]
|
||||
)])
|
||||
|
||||
|
|
@ -227,7 +227,7 @@ dnl - Macro: CAIRO_ENABLE_* (NAMESPACE, NAME, DEFAULT, COMMANDS)
|
|||
dnl
|
||||
dnl where:
|
||||
dnl
|
||||
dnl NAMESPACE is the sub-namespace in function names, eg. "ft" for cairo_ft_...
|
||||
dnl FEATURENAME is the feature name, eg. "ft" for cairo_ft_...
|
||||
dnl NAME is the human-readable name of the feature, eg. "FreeType"
|
||||
dnl DEFAULT is the default state of the backend:
|
||||
dnl "no" for experimental backends, eg. your favorite new backend
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue