forked from arthenica/ffmpeg-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
61 lines (47 loc) · 1.68 KB
/
configure.ac
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# ffmpeg-kit 5.1 configure.ac
AC_INIT([ffmpeg-kit], [5.1], [https://github.com/arthenica/ffmpeg-kit/issues/new])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/FFmpegKit.cpp])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
AM_MAINTAINER_MODE
# Check for os version
VERSION_OS=$(uname -s)
AC_DEFINE_UNQUOTED(VERSION_OS, "$VERSION_OS", [os version])
# Check host so we can infer target CPU (and assembly optimizations)
AC_CANONICAL_HOST
# Check for processor characteristics
AC_C_BIGENDIAN(AC_DEFINE([HIGHFIRST], [1], [big-endian machine]))
# Checks for programs.
cflags_bckup="$CFLAGS"
AC_LANG([C++])
AC_PROG_CXX(clang++ llvm-g++ g++)
AX_CXX_COMPILE_STDCXX(11, noext)
AM_PROG_AR
CFLAGS="$cflags_bckup"
FFMPEG_LIBS="-lavcodec -lavfilter -lavformat -lavutil -lswscale -lswresample"
AC_SUBST(FFMPEG_LIBS)
VERSION_INFO="9:1:5"
AC_SUBST(VERSION_INFO)
LT_INIT
# Checks for header files.
AC_CHECK_HEADERS([libavformat/avformat.h libavcodec/avcodec.h libavfilter/avfilter.h libavutil/avutil.h libswresample/swresample.h], [], [
AC_MSG_ERROR([unable to find ffmpeg headers])
])
AC_CHECK_HEADERS([rapidjson/document.h], [], [
AC_MSG_ERROR([unable to find rapidjson headers])
])
AC_CHECK_HEADERS([fcntl.h limits.h stdint.h stdlib.h string.h sys/ioctl.h sys/time.h termios.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_INT8_T
AC_TYPE_SIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_CHECK_FUNCS([dup2 floor memmove memset select strchr strcspn strerror strrchr strstr strtol malloc strcpy strlen vsnprintf])
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT