-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.m4
More file actions
executable file
·45 lines (36 loc) · 1.1 KB
/
Copy pathconfig.m4
File metadata and controls
executable file
·45 lines (36 loc) · 1.1 KB
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(opus, whether to enable opus support,
[ --enable-opus Enable opus extension], no)
if test "$PHP_OPUS" != "no"; then
dnl === SOXR É OBRIGATÓRIO ===
AC_CHECK_HEADER(soxr.h, [], [
AC_MSG_ERROR([soxr.h not found. libsoxr is mandatory for opus extension])
])
AC_CHECK_LIB(
soxr,
soxr_create,
[],
[AC_MSG_ERROR([libsoxr not found or missing soxr_create()])],
[-lm -lpthread]
)
dnl === OPUS TAMBÉM ===
AC_CHECK_HEADER(opus/opus.h, [], [
AC_MSG_ERROR([opus/opus.h not found. libopus is required])
])
AC_CHECK_LIB(
opus,
opus_encoder_create,
[],
[AC_MSG_ERROR([libopus not found or missing opus_encoder_create()])],
[-lm]
)
dnl === DEFINES ===
AC_DEFINE(HAVE_LIBSOXR, 1, [libsoxr support enabled])
dnl === EXTENSION ===
PHP_NEW_EXTENSION(opus, opus.c opus_channel.c, $ext_shared)
dnl === LINKAGEM FINAL ===
PHP_ADD_LIBRARY(soxr, 1, OPUS_SHARED_LIBADD)
PHP_ADD_LIBRARY(opus, 1, OPUS_SHARED_LIBADD)
PHP_ADD_LIBRARY(m, 1, OPUS_SHARED_LIBADD)
PHP_ADD_LIBRARY(pthread, 1, OPUS_SHARED_LIBADD)
PHP_SUBST(OPUS_SHARED_LIBADD)
fi