forked from stoth68000/obe-rt
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconfigure.ac
135 lines (118 loc) · 4.32 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68])
AC_INIT([obe], [1.5], [[email protected]])
AM_INIT_AUTOMAKE
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST
AM_SILENT_RULES([yes])
# Checks for programs.
AC_CHECK_PROGS(YASM, yasm)
AC_PROG_CC
AC_PROG_CC_C99
AC_PROG_CXX
AM_PROG_AS
AX_PROG_YASM()
#CCAS=yasm
#CCASFLAGS=
#AC_SUBST(CCAS)
#AC_SUBST(CCASFLAGS)
# We always build with -fPIC in case our static libraries end up
# being linked into a consumer's shared library
AC_MSG_CHECKING(whether fPIC compiler option is accepted)
SAVED_CFLAGS="$CFLAGS -DKL_USERSPACE"
CFLAGS="$CFLAGS -fPIC -Werror "
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
[AC_MSG_RESULT(yes)
CFLAGS="$SAVED_CFLAGS -fPIC"],
[AC_MSG_RESULT(no)
CFLAGS="$SAVED_CFLAGS"])
AC_PROG_RANLIB
AC_PROG_LIBTOOL
# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netinet/in.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h])
AC_CHECK_HEADERS([alsa/asoundlib.h],
[break],
[AC_MSG_ERROR([libasound (alsa) headers not found or not usable])])
AC_CHECK_HEADERS([fdk-aac/aacdecoder_lib.h],
[break],
[AC_MSG_ERROR([libfdk-aac headers not found or not usable])])
AC_CHECK_HEADERS([libavutil/avutil.h],
[break],
[AC_MSG_ERROR([libavutil headers not found or not usable])])
AC_CHECK_HEADERS([libyuv.h],
[break],
[AC_MSG_ERROR([libyuv headers not found or not usable])])
AC_CHECK_HEADERS([libklvanc/vanc.h],
[break],
[AC_MSG_ERROR([libklvanc headers not found or not usable])])
AC_CHECK_HEADERS([libklscte35/scte35.h],
[break],
[AC_MSG_ERROR([libklscte35 headers not found or not usable])])
AC_CHECK_HEADERS([x264.h],
[break],
[AC_MSG_ERROR([libx264 headers not found or not usable])])
AC_CHECK_HEADERS([readline/readline.h],
[break],
[AC_MSG_ERROR([libreadline headers not found or not usable])])
AC_CHECK_HEADERS([libmpegts.h],
[break],
[AC_MSG_ERROR([libmpegts headers not found or not usable])])
AC_CHECK_HEADERS([libzvbi.h],
[break],
[AC_MSG_ERROR([libzvbi headers not found or not usable])])
AC_CHECK_HEADERS([twolame.h],
[break],
[AC_MSG_ERROR([libtwolame headers not found or not usable])])
AC_CHECK_HEADERS([Processing.NDI.Lib.h], HEADER_NDILIB="yes")
#if test "x$HEADER_NDILIB" == "xyes" ; then
# LDFLAGS+=" -lx265 "
#fi
AM_CONDITIONAL(NDILIB, test x"$HEADER_NDILIB" == x"yes")
AC_CHECK_HEADERS([BlueDriver_p.h], HEADER_BLUEFISH444="yes")
#if test "x$HEADER_LIBX265" == "xyes" ; then
# LDFLAGS+=" -lx265 "
#fi
AM_CONDITIONAL(BLUEFISH444, test x"$HEADER_BLUEFISH444" == x"yes")
## Check for x265 (optional)
AC_CHECK_HEADERS([x265.h], HEADER_LIBX265="yes")
#if test "x$HEADER_LIBX265" == "xyes" ; then
# LDFLAGS+=" -lx265 "
#fi
AM_CONDITIONAL(LIBX265, test x"$HEADER_LIBX265" == x"yes")
## Check for VAAPI (optional)
AC_CHECK_HEADERS([va/va.h], HEADER_LIBVA="yes")
AM_CONDITIONAL(LIBVA, test x"$HEADER_LIBVA" == x"yes")
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_UINT16_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_CHECK_FUNCS([memset strrchr])
# Add debug support
AC_ARG_ENABLE(debug,
AS_HELP_STRING(
[--enable-debug],
[enable debugging, default: no]),
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac],
[debug=false])
AM_CONDITIONAL(DEBUG, test x"$debug" = x"true")
AM_COND_IF(DEBUG,
AC_DEFINE(DEBUG, 1, [Define to 0 if this is a release build]),
AC_DEFINE(DEBUG, 0, [Define to 1 or higher if this is a debug build]))
AC_ARG_ENABLE(websockets,
AS_HELP_STRING(
[--enable-websockets],
[enable websockets, default: no]),
[case "${enableval}" in
yes) websockets=true ;;
no) websockets=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-websockets]) ;;
esac],
[websockets=false])
AM_CONDITIONAL(WEBSOCKETS, test x"$websockets" = x"true")
AC_CONFIG_FILES([Makefile obe/Makefile])
AC_OUTPUT