blob: 2a636dd538a71929a039008f80b1a7a158a652c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
AC_DEFUN(ZEPHYR_FUNC_REGCOMP,
[AC_MSG_CHECKING(for working regcomp)
AC_CACHE_VAL(zephyr_cv_func_regcomp,
[AC_TRY_RUN([
#include <sys/types.h>
#include <regex.h>
int main()
{
regex_t reg;
int retval;
char errbuf[512];
retval = regcomp(®, "[Ff]rom:", REG_EXTENDED | REG_NOSUB);
exit(retval != 0);
}
], zephyr_cv_func_regcomp=yes, zephyr_cv_func_regcomp=no,
zephyr_cv_func_regcomp=no)])dnl
AC_MSG_RESULT($zephyr_cv_func_regcomp)
if test $zephyr_cv_func_regcomp = yes; then
AC_DEFINE(HAVE_REGCOMP)
fi])
|