forked from knik0/faad2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
179 lines (151 loc) · 5 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
dnl
dnl This is the configure.in for faad2 related to unix creation
dnl - libfaad.so
dnl - libmp4ff.a (only static for moment)
dnl - faad
dnl - xmms input mp4/aac plugin
dnl - mpeg4ip plugin (requires mpeg4ip's libmp4v2 to be installed)
AC_PREREQ(2.50)
AC_INIT(faad2, 2.10.1)
AC_CONFIG_AUX_DIR(.)
AM_INIT_AUTOMAKE([subdir-objects])
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
dnl Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CPP
dnl disable for mpeg4ip plugin
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_CHECK_PROGS(RPMBUILD, rpmbuild, rpm)
AC_CONFIG_HEADERS([config.h])
AC_ARG_WITH(xmms,[ --with-xmms compile XMMS-1 plugin],
WITHXMMS=$withval, WITHXMMS=no)
AC_ARG_WITH(drm,[ --with-drm compile libfaad with DRM support],
WITHDRM=$withval, WITHDRM=no)
AC_ARG_WITH(drc,[ --with-drc compile libfaad with DRC support],
WITHDRC=$withval, WITHDRC=yes)
AC_ARG_WITH(mpeg4ip, [ --with-mpeg4ip compile mpeg4ip plugin],
WITHMPEG4IP=$withval, WITHMPEG4IP=no)
dnl Checks for header files required for mp4.h
AC_HEADER_STDC
AC_CHECK_HEADERS(stdint.h inttypes.h)
AC_CHECK_HEADERS(mathf.h)
AC_CHECK_HEADERS(float.h)
AC_CHECK_FUNCS(strchr memcpy)
AC_CHECK_HEADERS(sys/time.h)
AC_HEADER_TIME
dnl DRMS
AC_CHECK_HEADERS(errno.h sys/stat.h sys/types.h limits.h)
AC_CHECK_HEADERS(sysfs/libsysfs.h)
AC_CHECK_HEADERS(IOKit/IOKitLib.h,
[AC_CHECK_LIB(IOKit, main,
[AC_DEFINE(HAVE_IOKIT_IOKITLIB_H, 1, [Define if you have the IOKit API])
MP4FF_LIBS="-lIOKit"
AC_SUBST(MP4FF_LIBS)])])
AC_CHECK_FUNCS(getpwuid)
AC_C_INLINE
AC_C_BIGENDIAN
AC_TYPE_OFF_T
AC_DEFUN([MY_CHECK_TYPEDEF_FROM_INCLUDE],
[
AC_MSG_CHECKING([for $1])
AC_TRY_COMPILE([$2],
[$1;],
libfaad_ok=yes, libfaad_ok=no)
if test $libfaad_ok = yes; then
AC_DEFINE($3, 1, [Define if needed])
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
])
dnl @synopsis AC_C99_FUNC_LRINTF
dnl
dnl Check whether C99's lrintf function is available.
dnl @version 1.3 Feb 12 2002
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
dnl
dnl Permission to use, copy, modify, distribute, and sell this file for any
dnl purpose is hereby granted without fee, provided that the above copyright
dnl and this permission notice appear in all copies. No representations are
dnl made about the suitability of this software for any purpose. It is
dnl provided "as is" without express or implied warranty.
dnl
AC_DEFUN([AC_C99_FUNC_LRINTF],
[AC_CACHE_CHECK(for lrintf,
ac_cv_c99_lrintf,
[
lrintf_save_CFLAGS=$CFLAGS
lrintf_save_LIBS=$LIBS
CFLAGS="-O"
LIBS="-lm"
AC_TRY_LINK([
#define _ISOC9X_SOURCE 1
#define _ISOC99_SOURCE 1
#define __USE_ISOC99 1
#define __USE_ISOC9X 1
#include <math.h>
], if (!lrintf(3.14159)) lrintf(2.7183);, ac_cv_c99_lrintf=yes, ac_cv_c99_lrintf=no)
CFLAGS=$lrintf_save_CFLAGS
LIBS=$lrintf_save_LIBS
])
if test "$ac_cv_c99_lrintf" = yes; then
AC_DEFINE(HAVE_LRINTF, 1,
[Define if you have C99's lrintf function.])
fi
])# AC_C99_FUNC_LRINTF
AC_C99_FUNC_LRINTF
MY_CHECK_TYPEDEF_FROM_INCLUDE([float32_t temp],
[#include <sys/types.h>,
#include <sys/float.h>], [HAVE_FLOAT32_T])
AC_CHECK_FUNCS(strsep)
AC_CHECK_PROG(external_mp4v2, mpeg4ip-config, yes, no)
AM_CONDITIONAL(HAVE_MPEG4IP_PLUG, false)
if test x$WITHMPEG4IP = xyes; then
if test x$external_mp4v2 = xyes; then
AM_CONDITIONAL(HAVE_MPEG4IP_PLUG, true)
AC_MSG_NOTICE("Building MPEG4IP plugin")
else
AC_MSG_NOTICE("MPEG4IP libmp4v2 is required for MPEG4IP plugin")
fi
fi
if test x$WITHXMMS = xyes; then
AC_CHECK_PROGS(XMMS_CONFIG, xmms-config,"not_found")
if test "$XMMS_CONFIG" = "not_found"; then
AC_MSG_ERROR("*** xmms-config not found - xmms plugin can't be build")
fi
AC_CHECK_HEADER(pthread.h,,
AC_MSG_ERROR(*** pthread headers support not installed or not found))
AC_CHECK_HEADER(id3.h,,
AC_MSG_ERROR(*** id3lib headers support not installed or not found))
AC_CHECK_PROGS(GTK_CONFIG, gtk-config, "not_found")
if test "$XGTK_CONFIG" = "not_found"; then
AC_MSG_ERROR("*** gtk-config not found - xmms plugin can't be build without")
fi
AM_CONDITIONAL(HAVE_XMMS, true)
else
AC_MSG_NOTICE(no xmms build configured)
AM_CONDITIONAL(HAVE_XMMS, false)
fi
if test x$WITHDRM = xyes; then
AC_DEFINE(DRM, 1, [Define if you want to use libfaad together with Digital Radio Mondiale (DRM)])
AC_DEFINE(DRM_PS, 1, [Define if you want support for Digital Radio Mondiale (DRM) parametric stereo])
fi
if test x$WITHDRC = xyes; then
AC_DEFINE(APPLY_DRC, 1, [Define if you want to process Dynamic Range Compression (DRC)])
fi
AC_CONFIG_FILES(libfaad/Makefile)
AC_CONFIG_FILES(libfaad/faad2.pc)
AC_CONFIG_FILES(include/faad.h)
AC_CONFIG_FILES(plugins/Makefile)
AC_CONFIG_FILES(plugins/xmms/Makefile)
AC_CONFIG_FILES(plugins/xmms/src/Makefile)
AC_CONFIG_FILES(plugins/mpeg4ip/Makefile)
AC_CONFIG_FILES(faad2.spec)
AC_CONFIG_FILES(frontend/Makefile)
AC_CONFIG_FILES(Makefile)
AC_OUTPUT