File: config.m4

package info (click to toggle)
php-uopz 7.1.1%2B%2B-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 688 kB
  • sloc: ansic: 2,137; xml: 335; makefile: 2
file content (45 lines) | stat: -rw-r--r-- 1,152 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
PHP_ARG_ENABLE([uopz],
  [whether to enable uopz support],
  [AS_HELP_STRING([--enable-uopz],
    [Enable uopz support])])

PHP_ARG_ENABLE([uopz-coverage],
  [whether to enable uopz coverage support],
  [AS_HELP_STRING([--enable-uopz-coverage],
    [Enable uopz coverage support])],
  [no],
  [no])

PHP_ARG_WITH([uopz-sanitize],
  [whether to enable AddressSanitizer for uopz],
  [AS_HELP_STRING([--with-uopz-sanitize],
    [Build uopz with AddressSanitizer support])],
  [no],
  [no])

if test "$PHP_UOPZ" != "no"; then
  AS_VAR_IF([PHP_UOPZ_SANITIZE], [no],, [
    EXTRA_LDFLAGS="-lasan"
    EXTRA_CFLAGS="-fsanitize=address -fno-omit-frame-pointer"
    PHP_SUBST([EXTRA_LDFLAGS])
    PHP_SUBST([EXTRA_CFLAGS])
  ])

  PHP_NEW_EXTENSION([uopz], m4_normalize([
      src/class.c
      src/constant.c
      src/executors.c
      src/function.c
      src/handlers.c
      src/hook.c
      src/return.c
      src/util.c
      uopz.c
    ]),
    [$ext_shared],,
    [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1])
  PHP_ADD_BUILD_DIR([$ext_builddir/src])
  PHP_ADD_INCLUDE([$ext_builddir])

  AS_VAR_IF([PHP_UOPZ_COVERAGE], [no],, [PHP_ADD_MAKEFILE_FRAGMENT])
fi