| 1 |
dnl Functions for testing |
| 2 |
dnl |
| 3 |
dnl Version: 20200712 |
| 4 |
|
| 5 |
dnl Function to detect if tests dependencies are available |
| 6 |
AC_DEFUN([AX_TESTS_CHECK_LOCAL], |
| 7 |
[AC_CHECK_HEADERS([dlfcn.h]) |
| 8 |
|
| 9 |
AC_CHECK_FUNCS([fmemopen getopt mkstemp setenv tzset unlink]) |
| 10 |
|
| 11 |
AC_CHECK_LIB( |
| 12 |
dl, |
| 13 |
dlsym) |
| 14 |
|
| 15 |
AS_IF( |
| 16 |
[test "x$lt_cv_prog_gnu_ld" = xyes && test "x$ac_cv_lib_dl_dlsym" = xyes], |
| 17 |
[AC_DEFINE( |
| 18 |
[HAVE_GNU_DL_DLSYM], |
| 19 |
[1], |
| 20 |
[Define to 1 if dlsym function is available in GNU dl.]) |
| 21 |
]) |
| 22 |
]) |
| 23 |
|
| 24 |
dnl Function to detect if OSS-Fuzz build environment is available |
| 25 |
AC_DEFUN([AX_TESTS_CHECK_OSSFUZZ], |
| 26 |
[AM_CONDITIONAL( |
| 27 |
HAVE_LIB_FUZZING_ENGINE, |
| 28 |
[test "x${LIB_FUZZING_ENGINE}" != x]) |
| 29 |
AC_SUBST( |
| 30 |
[LIB_FUZZING_ENGINE], |
| 31 |
["${LIB_FUZZING_ENGINE}"]) |
| 32 |
]) |
| 33 |
|