diff --git a/libs/libc/Kconfig b/libs/libc/Kconfig index be6219caee..1e26b3ee38 100644 --- a/libs/libc/Kconfig +++ b/libs/libc/Kconfig @@ -29,3 +29,4 @@ source "libs/libc/userfs/Kconfig" source "libs/libc/builtin/Kconfig" source "libs/libc/symtab/Kconfig" source "libs/libc/stream/Kconfig" +source "libs/libc/regex/Kconfig" diff --git a/libs/libc/regex/Kconfig b/libs/libc/regex/Kconfig new file mode 100644 index 0000000000..c211c34be8 --- /dev/null +++ b/libs/libc/regex/Kconfig @@ -0,0 +1,11 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +config LIBC_REGEX + bool "Enable regex" + depends on ALLOW_MIT_COMPONENTS + default y + ---help--- + provide the regex related func, include regcomp, regexec. \ No newline at end of file diff --git a/libs/libc/regex/Make.defs b/libs/libc/regex/Make.defs index 2e97724c1c..8f46954f57 100644 --- a/libs/libc/regex/Make.defs +++ b/libs/libc/regex/Make.defs @@ -18,7 +18,7 @@ # ############################################################################ -ifeq ($(CONFIG_ALLOW_MIT_COMPONENTS),y) +ifeq ($(CONFIG_LIBC_REGEX),y) # Add the regex C files to the build CSRCS += regcomp.c regexec.c regerror.c tre-mem.c