1 dnl Autoconf settings for vlc
3 AC_INIT(vlc,0.5.1-test1)
9 AC_CONFIG_SRCDIR(src/libvlc.c)
12 dnl XXX: we don't put any flags here, because automake 1.5 doesn't support
13 dnl them. And we need the comma otherwize automake will choke on it.
14 AM_INIT_AUTOMAKE(vlc,0.5.1-test1)
15 AM_CONFIG_HEADER(config.h)
20 CPPFLAGS_save="${CPPFLAGS}"
21 CFLAGS_save="${CFLAGS}"
22 CXXFLAGS_save="${CXXFLAGS}"
23 OBJCFLAGS_save="${OBJCFLAGS}"
24 LDFLAGS_save="${LDFLAGS}"
36 dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right
37 dnl now otherwise it might be set in an obscure if statement.
40 dnl AC_PROG_OBJC doesn't seem to exist, this is the KDE workaround
41 AC_MSG_CHECKING(for an Objective-C compiler)
44 OBJCFLAGS="${CXXFLAGS} -fgnu-runtime -fconstant-string-class=NSConstantString"
46 dnl _AM_DEPENDENCIES(OBJC) doesn't work, so hard code OBJCDEPMODE here
47 #OBJCDEPMODE="depmode=gcc3"
48 #AC_SUBST(OBJCDEPMODE)
49 _AM_DEPENDENCIES(OBJC)
50 AC_MSG_RESULT(not implemented yet)
52 dnl Find the right ranlib, even when cross-compiling
53 AC_CHECK_TOOL(RANLIB, ranlib, :)
54 AC_CHECK_TOOL(STRIP, strip, :)
55 AC_CHECK_TOOL(AR, ar, :)
56 AC_CHECK_TOOL(LD, ld, :)
61 dnl Check for compiler properties
66 dnl Set default values
68 LDFLAGS_vlc="${LDFLAGS}"
72 dnl Check the operating system
74 case "x${target_os}" in
83 CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
84 LDFLAGS_dvd="${LDFLAGS_dvd} -ldvd"
85 LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -ldvd"
86 LDFLAGS_vcd="${LDFLAGS_vcd} -ldvd"
90 CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
94 CFLAGS_save="${CFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; CFLAGS="${CFLAGS_save}"
95 CXXFLAGS_save="${CXXFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; CXXFLAGS="${CXXFLAGS_save}"
96 OBJCFLAGS_save="${OBJCFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; OBJCFLAGS="${OBJCFLAGS_save}"
97 LDFLAGS_vlc="${LDFLAGS_vlc} -all_load"
98 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -all_load"
101 x*mingw32* | x*cygwin*)
102 AC_CHECK_TOOL(WINDRES, windres, :)
105 case "x${target_os}" in
110 dnl Check if we are using the mno-cygwin mode in which case we are
111 dnl actually dealing with a mingw32 compiler.
116 SYS=mingw32, SYS=cygwin)
120 if test "x$SYS" = "xmingw32"; then
121 # add ws2_32 for closesocket, select, recv
122 CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"
123 CPPFLAGS="${CPPFLAGS_save}"
124 LDFLAGS_vlc="${LDFLAGS_vlc} -lws2_32 -lnetapi32 -mwindows"
125 LDFLAGS_ipv4="${LDFLAGS_ipv4} -lws2_32"
126 LDFLAGS_ipv6="${LDFLAGS_ipv6} -lws2_32"
127 LDFLAGS_access_http="${LDFLAGS_access_http} -lws2_32"
128 LDFLAGS_access_mms="${LDFLAGS_access_mms} -lws2_32"
129 LDFLAGS_access_udp="${LDFLAGS_access_udp} -lws2_32"
130 LDFLAGS_access_ftp="${LDFLAGS_access_ftp} -lws2_32"
131 LDFLAGS_access_output_udp="${LDFLAGS_access_output_udp} -lws2_32"
132 LDFLAGS_rc="${LDFLAGS_rc} -lws2_32"
133 LDFLAGS_sap="${LDFLAGS_sap} -lws2_32"
138 LDFLAGS_x11="${LDFLAGS_x11} -lsocket"
139 LDFLAGS_xvideo="${LDFLAGS_xvideo} -lsocket"
150 CFLAGS_save="${CFLAGS_save} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CFLAGS="${CFLAGS_save}"
151 CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CXXFLAGS="${CXXFLAGS_save}"
152 LDFLAGS_vlc="${LDFLAGS_vlc} -lbe"
153 LDFLAGS_plugins="${LDFLAGS_plugins} -nostart"
154 LDFLAGS_beos="${LDFLAGS_beos} -lbe -lmedia -lroot -ltracker -lstdc++.r4 -ltranslation"
155 dnl BONE or not BONE ?
156 AC_CHECK_LIB( bind, inet_ntoa,
157 [ LDFLAGS_access_mms="${LDFLAGS_access_mms} -lbind"
158 LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind"],
165 AM_CONDITIONAL(HAVE_BEOS, test "x${SYS}" = "xbeos")
166 AM_CONDITIONAL(HAVE_DARWIN, test "x${SYS}" = "xdarwin")
167 AM_CONDITIONAL(HAVE_WIN32, test "x${SYS}" = "xmingw32")
172 ALL_LINGUAS="de en_GB fr it ja no ru nl pl sv"
173 AM_GNU_GETTEXT_VERSION(0.10.40)
175 if test "${nls_cv_force_use_gnu_gettext}" = "yes"; then
176 AC_DEFINE(HAVE_INCLUDED_GETTEXT, 1, Define if we use the local libintl)
177 INCLUDES="${INCLUDES} -I\\\$(top_srcdir)/intl"
179 AC_CHECK_FUNCS(textdomain,,[
180 AC_CHECK_LIB(intl,textdomain,
181 LDFLAGS_vlc="${LDFLAGS_vlc} -lintl"
182 LDFLAGS_plugins="${LDFLAGS_plugins} -lintl"
186 AM_CONDITIONAL(BUILD_INTL, test "${nls_cv_force_use_gnu_gettext}" = "yes")
187 XGETTEXT="${XGETTEXT} --keyword=_NS"
189 AC_MSG_CHECKING(for suffix of libraries)
190 AC_MSG_RESULT(${LIBEXT})
192 dnl Check for the need to include the mingwex lib for mingw32
193 if test x$SYS = xmingw32
195 AC_CHECK_LIB(mingwex,opendir,
196 AC_CHECK_LIB(mingw32,opendir,LDFLAGS_vlc="${LDFLAGS_vlc}",
197 [LDFLAGS_vlc="${LDFLAGS_vlc} -lmingwex"
198 LDFLAGS_gtk="${LDFLAGS_gtk} -lmingwex"])
202 dnl Check for fnative-struct or mms-bitfields support for mingw32
203 if test x$SYS = xmingw32
205 AC_CACHE_CHECK([if \$CC accepts -mms-bitfields],
206 [ac_cv_c_mms_bitfields],
207 [CFLAGS="${CFLAGS_save} -mms-bitfields"
208 AC_TRY_COMPILE([],,ac_cv_c_mms_bitfields=yes, ac_cv_c_mms_bitfields=no)])
209 if test x"$ac_cv_c_mms_bitfields" != x"no"; then
210 CFLAGS_save="${CFLAGS_save} -mms-bitfields";
211 CXXFLAGS_save="${CXXFLAGS_save} -mms-bitfields";
213 AC_CACHE_CHECK([if \$CC accepts -fnative-struct],
214 [ac_cv_c_fnative_struct],
215 [CFLAGS="${CFLAGS_save} -fnative-struct"
216 AC_TRY_COMPILE([],,ac_cv_c_fnative_struct=yes, ac_cv_c_fnative_struct=no)])
217 if test x"$ac_cv_c_fnative_struct" != x"no"; then
218 CFLAGS_save="${CFLAGS_save} -fnative-struct";
219 CXXFLAGS_save="${CXXFLAGS_save} -fnative-struct";
223 CFLAGS="${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
226 dnl Check for fvtable-thunks support for mingw32
227 if test x$SYS = xmingw32
230 AC_CACHE_CHECK([if \$CXX accepts -fvtable-thunks],
231 [ac_cv_cxx_fvtable_thunks],
232 [CXXFLAGS="${CXXFLAGS_save} -Wall -Werror -fvtable-thunks"
233 AC_TRY_COMPILE([],,ac_cv_cxx_fvtable_thunks=yes,
234 ac_cv_cxx_fvtable_thunks=no)])
235 if test x"$ac_cv_cxx_fvtable_thunks" = x"yes"; then
236 CXXFLAGS_mingw32_special="-fvtable-thunks"
239 CXXFLAGS_save="${CXXFLAGS_save} ${CXXFLAGS_mingw32_special}"
240 CXXFLAGS="${CXXFLAGS_save}"
244 dnl Flags for plugin compilation
247 CFLAGS_pics="${CFLAGS_pics} ${CFLAGS_mingw32_special}"
248 CXXFLAGS_pics="${CXXFLAGS_pics} ${CFLAGS_mingw32_special} ${CXXFLAGS_mingw32_special}"
249 OBJCFLAGS_pics="${OBJCFLAGS_pics} ${CFLAGS_mingw32_special}"
250 CFLAGS_plugins="${CFLAGS_plugins} ${CFLAGS_mingw32_special}"
251 CXXFLAGS_plugins="${CXXFLAGS_plugins} ${CFLAGS_mingw32_special} ${CXXFLAGS_mingw32_special}"
252 OBJCFLAGS_plugins="${OBJCFLAGS_plugins} ${CFLAGS_mingw32_special}"
255 CFLAGS_pics="${CFLAGS_pics} -fPIC"
256 CXXFLAGS_pics="${CXXFLAGS_pics} -fPIC"
257 OBJCFLAGS_pics="${OBJCFLAGS_pics} -fPIC"
258 CFLAGS_plugins="${CFLAGS_plugins} -fPIC"
259 CXXFLAGS_plugins="${CXXFLAGS_plugins} -fPIC"
260 OBJCFLAGS_plugins="${OBJCFLAGS_plugins} -fPIC"
261 LDFLAGS_plugins="${LDFLAGS_plugins} -fPIC"
265 dnl The -DSYS_FOO flag
266 CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"; CPPFLAGS="${CPPFLAGS_save}"
268 dnl Check for system libs needed
271 AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll getenv putenv setenv)
273 dnl Check for usual libc functions
274 AC_CHECK_FUNCS(strdup strndup atof lseek)
275 AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)])
276 AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)])
278 AC_CHECK_FUNCS(connect,,[
279 AC_CHECK_LIB(socket,connect,
280 LDFLAGS_ipv4="${LDFLAGS_ipv4} -lsocket"
281 LDFLAGS_vlc="${LDFLAGS_vlc} -lsocket"
284 AC_CHECK_FUNCS(send,,[
285 AC_CHECK_LIB(socket,send,
286 LDFLAGS_access_http="${LDFLAGS_access_http} -lsocket"
287 LDFLAGS_access_mms="${LDFLAGS_access_mms} -lsocket"
288 LDFLAGS_access_udp="${LDFLAGS_access_udp} -lsocket"
289 LDFLAGS_access_ftp="${LDFLAGS_access_ftp} -lsocket"
290 LDFLAGS_sap="${LDFLAGS_sap} -lsocket"
291 LDFLAGS_access_output_udp="${LDFLAGS_access_output_udp} -lsocket"
294 AC_CHECK_FUNCS(gethostbyname,,[
295 AC_CHECK_LIB(nsl,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lnsl",[
296 AC_CHECK_LIB(bind,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind")])
300 AC_CHECK_FUNCS(nanosleep,have_nanosleep=:,[
301 AC_CHECK_LIB(rt,nanosleep,
302 [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"; have_nanosleep=:],
303 [AC_CHECK_LIB(posix4,nanosleep,
304 [LDFLAGS_vlc="${LDFLAGS_vlc} -lposix4"; have_nanosleep=:])]
307 if ${have_nanosleep}; then
308 AC_DEFINE(HAVE_NANOSLEEP, 1,
309 Define if nanosleep is available.)
312 dnl Check for socklen_t
313 AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
315 [#include <sys/types.h>
316 #include <sys/socket.h>],
317 [socklen_t len = 42; return len;],
318 ac_cv_type_socklen_t=yes,
319 ac_cv_type_socklen_t=no)])
320 if test x$ac_cv_type_socklen_t != xno; then
321 AC_DEFINE(HAVE_SOCKLEN_T, 1,
322 Define if <sys/socket.h> defines socklen_t.)
326 AC_CHECK_LIB(rt,sem_init, [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"])
328 AC_CHECK_FUNCS(inet_aton,,[
329 AC_CHECK_LIB(resolv,inet_aton,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lresolv")
334 AC_CHECK_FUNCS(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
335 [ # FreeBSD has a gnugetopt library for this:
336 AC_CHECK_LIB([gnugetopt],[getopt_long],
337 [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) LDFLAGS_vlc="${LDFLAGS_vlc} -lgnugetopt"],
339 AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt})
342 AC_CHECK_LIB(dl,dlopen,LDFLAGS_vlc="${LDFLAGS_vlc} -ldl")
344 LDFLAGS_imdct="${LDFLAGS_imdct} -lm"
345 LDFLAGS_adjust="${LDFLAGS_adjust} -lm"
346 LDFLAGS_distort="${LDFLAGS_distort} -lm"
347 LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} -lm")
349 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lm"
350 LDFLAGS_imdct="${LDFLAGS_imdct} -lm"
351 LDFLAGS_imdct3dn="${LDFLAGS_imdct3dn} -lm"
352 LDFLAGS_imdctsse="${LDFLAGS_imdctsse} -lm"
353 LDFLAGS_i420_rgb="${LDFLAGS_i420_rgb} -lm"
354 LDFLAGS_faad="${LDFLAGS_faad} -lm"
357 dnl Check for pthreads - borrowed from XMMS
359 if test "x${THREAD_LIB}" = "xerror"; then
360 AC_CHECK_LIB(pthread,main,THREAD_LIB="-lpthread")
362 if test "x${THREAD_LIB}" = "xerror"; then
363 AC_CHECK_LIB(pthreads,main,THREAD_LIB="-lpthreads")
365 if test "x${THREAD_LIB}" = "xerror"; then
366 AC_CHECK_LIB(c_r,main,THREAD_LIB="-lc_r")
368 if test "x${THREAD_LIB}" = "xerror"; then
369 AC_CHECK_FUNCS(pthread_mutex_lock)
373 dnl Check for cthreads under GNU/Hurd for instance
374 AC_CHECK_LIB(threads,cthread_fork,THREAD_LIB="-lthreads")
376 dnl Check for misc headers
377 AC_MSG_CHECKING(for pthread_cond_t in pthread.h)
378 AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
380 AC_DEFINE(PTHREAD_COND_T_IN_PTHREAD_H, 1,
381 Define if <pthread.h> defines pthread_cond_t.)],[
384 AC_MSG_CHECKING(for pthread_once in pthread.h)
385 AC_EGREP_HEADER(pthread_once,pthread.h,[
387 AC_DEFINE(PTHREAD_ONCE_IN_PTHREAD_H, 1,
388 Define if <pthread.h> defines pthread_once.)],[
391 AC_MSG_CHECKING(for strncasecmp in strings.h)
392 AC_EGREP_HEADER(strncasecmp,strings.h,[
394 AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
395 Define if <strings.h> defines strncasecmp.)],[
398 dnl Check for headers
399 AC_CHECK_HEADERS(signal.h time.h errno.h stdint.h getopt.h strings.h inttypes.h sys/int_types.h)
400 AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h)
401 AC_CHECK_HEADERS(dlfcn.h image.h)
402 AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
403 AC_CHECK_HEADERS(machine/param.h sys/shm.h)
404 AC_CHECK_HEADERS(linux/version.h)
410 AC_CHECK_HEADERS(dirent.h,,[need_dirent=:])
411 AM_CONDITIONAL(BUILD_DIRENT, ${need_dirent})
413 dnl Mac OS X and other OSes don't have declaration for nanosleep
414 AC_MSG_CHECKING(for nanosleep in time.h)
415 AC_EGREP_HEADER(nanosleep,time.h,[
417 AC_DEFINE(HAVE_DECL_NANOSLEEP, 1,
418 Define if <time.h> defines nanosleep.)
423 dnl Make sure we have timespecs
424 AC_MSG_CHECKING(for timespec in sys/time.h)
425 AC_EGREP_HEADER(timespec,sys/time.h,[
427 AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
428 Define if <sys/time.h> defines struct timespec.)
433 dnl Check for threads library
434 AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
436 dnl Default X headers and libraries
437 if test "x${x_includes}" = "xNONE"; then
438 x_includes="/usr/X11R6/include"
440 if test "x${x_libraries}" = "xNONE"; then
441 x_libraries="/usr/X11R6/lib"
444 dnl Build the gtk_main plugins?
448 dnl build the qte plugin ?
452 if test "x${SYS}" != "xmingw32"
454 CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
455 AC_CHECK_HEADERS(X11/extensions/dpms.h, [
456 AC_MSG_CHECKING(for DPMSInfo in X11/extensions/dpms.h)
457 AC_EGREP_HEADER(DPMSInfo,X11/extensions/dpms.h,[
459 AC_DEFINE(DPMSINFO_IN_DPMS_H, 1,
460 Define if <X11/extensions/dpms.h> defines DPMSInfo.)
465 #include <X11/Xlib.h>
467 CPPFLAGS="${CPPFLAGS_save}"
470 dnl Check for ntohl, etc.
471 AC_CACHE_CHECK([for ntohl in sys/param.h],
472 [ac_cv_c_ntohl_sys_param_h],
473 [CFLAGS="${CFLAGS_save} -Wall -Werror"
474 AC_TRY_COMPILE([#include <sys/param.h>],
475 [void foo() { int meuh; ntohl(meuh); }],
476 ac_cv_c_ntohl_sys_param_h=yes, ac_cv_c_ntohl_sys_param_h=no)])
477 if test "x${ac_cv_c_ntohl_sys_param_h}" != "xno"; then
478 AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
481 dnl Check for inline function size limit
482 AC_CACHE_CHECK([if \$CC accepts -finline-limit],
483 [ac_cv_c_inline_limit],
484 [CFLAGS="${CFLAGS_save} -finline-limit-30000"
485 AC_TRY_COMPILE([],,ac_cv_c_inline_limit=yes, ac_cv_c_inline_limit=no)])
486 if test "x${ac_cv_c_inline_limit}" != "xno"; then
487 CFLAGS_save="${CFLAGS_save} -finline-limit-30000"; CFLAGS="${CFLAGS_save}"
488 CXXFLAGS_save="${CXXFLAGS_save} -finline-limit-30000"; CXXFLAGS="${CXXFLAGS_save}"
489 OBJCFLAGS_save="${OBJCFLAGS_save} -finline-limit-30000"; OBJCFLAGS="${OBJCFLAGS_save}"
492 # XXX: do this with an M4 macro?
493 #dnl Check for various -W flags
494 #for flag in "" all unreachable-code conversion sign-compare disabled-optimization
496 # AC_CACHE_CHECK([if \$CC accepts -W${flag}],
497 # [ac_cv_c_W${flag}],
498 # [CFLAGS="-W${flag} ${CFLAGS_save}"
499 # AC_TRY_COMPILE([],,ac_cv_c_W${flag}=yes, ac_cv_c_W${flag}=no)])
500 # if test "x${ac_cv_c_W${flag}}" != "xno"; then
501 # CFLAGS_save="-W${flag} ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
502 # CXXFLAGS_save="-W${flag} ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
503 # OBJCFLAGS_save="-W${flag} ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
507 AC_CACHE_CHECK([if \$CC accepts -Wall],
509 [CFLAGS="-Wall ${CFLAGS_save}"
510 AC_TRY_COMPILE([],,ac_cv_c_Wall=yes, ac_cv_c_Wall=no)])
512 AC_CACHE_CHECK([if \$CC accepts -Wconversion],
513 [ac_cv_c_Wconversion],
514 [CFLAGS="-Wconversion ${CFLAGS_save}"
515 AC_TRY_COMPILE([],,ac_cv_c_Wconversion=yes, ac_cv_c_Wconversion=no)])
517 AC_CACHE_CHECK([if \$CC accepts -Wunreachable-code],
518 [ac_cv_c_Wunreachable_code],
519 [CFLAGS="-Wunreachable-code ${CFLAGS_save}"
520 AC_TRY_COMPILE([],,ac_cv_c_Wunreachable_code=yes, ac_cv_c_Wunreachable_code=no)])
522 AC_CACHE_CHECK([if \$CC accepts -Wsign-compare],
523 [ac_cv_c_Wsign_compare],
524 [CFLAGS="-Wsign-compare ${CFLAGS_save}"
525 AC_TRY_COMPILE([],,ac_cv_c_Wsign_compare=yes, ac_cv_c_Wsign_compare=no)])
527 AC_CACHE_CHECK([if \$CC accepts -Wdisabled-optimization],
528 [ac_cv_c_Wdisabled_optimization],
529 [CFLAGS="-Wdisabled-optimization ${CFLAGS_save}"
530 AC_TRY_COMPILE([],,ac_cv_c_Wdisabled_optimization=yes, ac_cv_c_Wdisabled_optimization=no)])
532 AC_CACHE_CHECK([if \$CC accepts -Winline],
534 [CFLAGS="-Winline ${CFLAGS_save}"
535 AC_TRY_COMPILE([],,ac_cv_c_Winline=yes, ac_cv_c_Winline=no)])
537 if test "x${ac_cv_c_Wall}" != "xno"; then
538 CFLAGS_save="-Wall ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
539 CXXFLAGS_save="-Wall ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
540 OBJCFLAGS_save="-Wall ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
543 if test "x${ac_cv_c_Wunreachable_code}" != "xno"; then
544 # CFLAGS_save="-Wunreachable-code ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
545 # CXXFLAGS_save="-Wunreachable-code ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
546 # OBJCFLAGS_save="-Wunreachable-code ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
548 dnl -Wunreachable-code means gcc-3.x, we can use -Wconversion and we can
549 dnl activate -Winline for C++, it won't choke on system headers.
550 # if test "x${ac_cv_c_Wconversion}" != "xno"; then
551 # CFLAGS_save="-Wconversion ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
552 # CXXFLAGS_save="-Wconversion ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
553 # OBJCFLAGS_save="-Wconversion ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
555 if test "x${ac_cv_c_Winline}" != "xno"; then
556 CXXFLAGS_save="-Winline ${CXXFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
561 if test "x${ac_cv_c_Wsign_compare}" != "xno"; then
562 CFLAGS_save="-Wsign-compare ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
563 CXXFLAGS_save="-Wsign-compare ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
564 OBJCFLAGS_save="-Wsign-compare ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
567 if test "x${ac_cv_c_Wdisabled_optimization}" != "xno"; then
568 CFLAGS_save="-Wdisabled-optimization ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
569 CXXFLAGS_save="-Wdisabled-optimization ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
570 OBJCFLAGS_save="-Wdisabled-optimization ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
573 if test "x${ac_cv_c_Winline}" != "xno"; then
574 CFLAGS_save="-Winline ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
575 OBJCFLAGS_save="-Winline ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
579 AC_CACHE_CHECK([if \$CC accepts -pipe],
581 [CFLAGS="${CFLAGS_save} -pipe"
582 AC_TRY_COMPILE([],,ac_cv_c_pipe=yes, ac_cv_c_pipe=no)])
583 if test "x${ac_cv_c_pipe}" != "xno"; then
584 CFLAGS_save="${CFLAGS_save} -pipe"; CFLAGS="${CFLAGS_save}"
585 CXXFLAGS_save="${CXXFLAGS_save} -pipe"; CXXFLAGS="${CXXFLAGS_save}"
586 OBJCFLAGS_save="${OBJCFLAGS_save} -pipe"; OBJCFLAGS="${OBJCFLAGS_save}"
589 dnl Check for various optimization flags
590 AC_CACHE_CHECK([if \$CC accepts -O3],
592 [CFLAGS="${CFLAGS_save} -O3"
593 AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)])
594 if test "x${ac_cv_c_o3}" != "xno"; then
595 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
598 AC_CACHE_CHECK([if \$CC accepts -O2],
600 [CFLAGS="${CFLAGS_save} -O2"
601 AC_TRY_COMPILE([],,ac_cv_c_o2=yes, ac_cv_c_o2=no)])
602 if test "x${ac_cv_c_o2}" != "xno"; then
603 if test "x${ac_cv_c_o3}" = "xno"; then
604 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
606 CFLAGS_NOOPTIM="${CFLAGS_NOOPTIM} -O2"
608 AC_CACHE_CHECK([if \$CC accepts -O],
610 [CFLAGS="${CFLAGS_save} -O"
611 AC_TRY_COMPILE([],,ac_cv_c_o=yes, ac_cv_c_o=no)])
612 if test "x${ac_cv_c_o}" != "xno"; then
613 if test "x${ac_cv_c_o3}" = "xno"; then
614 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
616 CFLAGS_NOOPTIM="${CFLAGS_NOOPTIM} -O"
620 dnl Check for -ffast-math
621 AC_CACHE_CHECK([if \$CC accepts -ffast-math],
623 [CFLAGS="${CFLAGS_save} -ffast-math"
624 AC_TRY_COMPILE([],,ac_cv_c_fast_math=yes, ac_cv_c_fast_math=no)])
625 if test "x${ac_cv_c_fast_math}" != "xno"; then
626 CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
629 dnl Check for -funroll-loops
630 AC_CACHE_CHECK([if \$CC accepts -funroll-loops],
631 [ac_cv_c_unroll_loops],
632 [CFLAGS="${CFLAGS_save} -funroll-loops"
633 AC_TRY_COMPILE([],,ac_cv_c_unroll_loops=yes, ac_cv_c_unroll_loops=no)])
634 if test "x${ac_cv_c_unroll_loops}" != "xno"; then
635 CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
638 dnl Check for -fomit-frame-pointer
639 AC_CACHE_CHECK([if \$CC accepts -fomit-frame-pointer],
640 [ac_cv_c_omit_frame_pointer],
641 [CFLAGS="${CFLAGS_save} -fomit-frame-pointer"
642 AC_TRY_COMPILE([],,ac_cv_c_omit_frame_pointer=yes, ac_cv_c_omit_frame_pointer=no)])
643 if test "x${ac_cv_c_omit_frame_pointer}" != "xno"; then
644 CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
645 # this plugin does not compile without -fomit-frame-pointer, damn gcc!
646 CFLAGS_i420_yuy2_mmx="${CFLAGS_i420_yuy2_mmx} -fomit-frame-pointer"
649 dnl Check for -mdynamic-no-pic
650 AC_CACHE_CHECK([if \$CC accepts -mdynamic-no-pic],
651 [ac_cv_c_dynamic_no_pic],
652 [CFLAGS="${CFLAGS_save} -mdynamic-no-pic"
653 AC_TRY_COMPILE([],,ac_cv_c_dynamic_no_pic=yes, ac_cv_c_dynamic_no_pic=no)])
654 if test "x${ac_cv_c_dynamic_no_pic}" != "xno"; then
655 CFLAGS_builtins="${CFLAGS_builtins} -mdynamic-no-pic"
656 CFLAGS_libvlc="${CFLAGS_libvlc} -mdynamic-no-pic"
659 dnl Check for Darwin plugin linking flags
660 AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error -lcc_dynamic],
662 [CFLAGS="${CFLAGS_save} -bundle -undefined error -lcc_dynamic"
663 AC_TRY_COMPILE([],,ac_cv_ld_darwin=yes, ac_cv_ld_darwin=no)])
664 if test "x${ac_cv_ld_darwin}" != "xno"; then
665 LDFLAGS_plugins="${LDFLAGS_plugins} -bundle -undefined error -lcc_dynamic"
668 dnl Check for standard plugin linking flags
669 AC_CACHE_CHECK([if \$CC accepts -shared],
671 [CFLAGS="${CFLAGS_save} -shared"
672 AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
673 if test "x${ac_cv_ld_plugins}" != "xno"; then
674 LDFLAGS_plugins="${LDFLAGS_plugins} -shared"
677 dnl Check for variadic macros
678 AC_CACHE_CHECK([for variadic cpp macros],
679 [ac_cv_cpp_variadic_macros],
680 [CFLAGS="${CFLAGS_save}"
683 #define a(b,c...) printf(b,##c)],
684 [a("foo");a("%s","bar");a("%s%s","baz","quux");],
685 ac_cv_cpp_variadic_macros=yes,
686 ac_cv_cpp_variadic_macros=no)])
687 if test "x${ac_cv_cpp_variadic_macros}" != "xno"; then
688 AC_DEFINE(HAVE_VARIADIC_MACROS, 1, Support for variadic macros)
691 dnl Checks for __attribute__(aligned()) directive
692 AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
693 [ac_cv_c_attribute_aligned],
694 [ac_cv_c_attribute_aligned=0
695 CFLAGS="${CFLAGS_save} -Werror"
696 for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
698 [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;],
699 [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
701 CFLAGS="${CFLAGS_save}"])
702 if test "x${ac_cv_c_attribute_aligned}" != "x0"; then
703 AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
704 [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
707 dnl Checks for __attribute__(format()) directive
708 AC_CACHE_CHECK([__attribute__ ((format ())) support with function pointers],
709 [ac_cv_c_attribute_format],
710 [ac_cv_c_attribute_format=no
711 CFLAGS="${CFLAGS_save} -Werror"
713 [static void (*pf_printf)(const char *, ...) __attribute__ ((format(printf,1,2)));(void)pf_printf;],
714 [ac_cv_c_attribute_format=yes])
715 CFLAGS="${CFLAGS_save}"])
716 if test "x${ac_cv_c_attribute_format}" != "xno"; then
717 AC_DEFINE(HAVE_ATTRIBUTE_FORMAT, 1, Support for __attribute__((format())) with function pointers)
723 case "x${target_cpu}" in
734 CFLAGS_mpeg_video="${CFLAGS_mpeg_video} -ffunction-sections"
741 PLUGINS="${PLUGINS} dummy rc logger gestures access_file memcpy"
742 PLUGINS="${PLUGINS} es audio m4v mpeg_system ps ts"
743 PLUGINS="${PLUGINS} idct idctclassic motion mpeg_video spudec mpeg_audio"
744 #PLUGINS="${PLUGINS} a52old imdct downmix imdct3dn downmix3dn imdctsse downmixsse"
745 PLUGINS="${PLUGINS} lpcm a52"
746 PLUGINS="${PLUGINS} deinterlace invert adjust wall transform distort clone crop motionblur"
747 PLUGINS="${PLUGINS} float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif fixed32tofloat32 fixed32tos16 s16tofloat32 s16tofloat32swab s8tofloat32 u8tofixed32 u8tofloat32"
748 PLUGINS="${PLUGINS} trivial_resampler ugly_resampler linear_resampler"
749 PLUGINS="${PLUGINS} trivial_channel_mixer headphone_channel_mixer"
750 PLUGINS="${PLUGINS} trivial_mixer spdif_mixer float32_mixer"
751 PLUGINS="${PLUGINS} aout_file"
752 #PLUGINS="${PLUGINS} scope"
753 PLUGINS="${PLUGINS} i420_rgb i420_yuy2 i422_yuy2 i420_ymga"
754 PLUGINS="${PLUGINS} id3 m3u"
755 PLUGINS="${PLUGINS} wav araw demuxdump demuxsub adpcm a52sys"
756 PLUGINS="${PLUGINS} access_udp access_http ipv4 access_mms access_ftp"
757 PLUGINS="${PLUGINS} sap screensaver"
760 dnl Accelerated modules
762 MMX_MODULES="memcpymmx idctmmx motionmmx i420_rgb_mmx i420_yuy2_mmx i422_yuy2_mmx i420_ymga_mmx"
763 MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
764 THREEDNOW_MODULES="memcpy3dn"
766 ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
768 AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
770 [CFLAGS="${CFLAGS_save}"
771 AC_TRY_COMPILE(,[void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));],
772 ac_cv_mmx_inline=yes, ac_cv_mmx_inline=no)])
773 if test "x${ac_cv_mmx_inline}" != "xno"; then
774 ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
777 AC_CACHE_CHECK([if \$CC groks MMX EXT inline assembly],
778 [ac_cv_mmxext_inline],
779 [CFLAGS="${CFLAGS_save}"
780 AC_TRY_COMPILE(,[void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));],
781 ac_cv_mmxext_inline=yes, ac_cv_mmxext_inline=no)])
782 if test "x${ac_cv_mmxext_inline}" != "xno"; then
783 ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
786 AC_CACHE_CHECK([if \$CC groks 3D Now! inline assembly],
787 [ac_cv_3dnow_inline],
788 [CFLAGS="${CFLAGS_save}"
789 AC_TRY_COMPILE(,[void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));],
790 ac_cv_3dnow_inline=yes, ac_cv_3dnow_inline=no)])
791 if test "x${ac_cv_3dnow_inline}" != "xno"; then
792 AC_DEFINE(CAN_COMPILE_3DNOW, 1, Define if \$CC groks 3D Now! inline assembly.)
793 ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
796 AC_CACHE_CHECK([if \$CC groks SSE inline assembly],
798 [CFLAGS="${CFLAGS_save}"
799 AC_TRY_COMPILE(,[void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));],
800 ac_cv_sse_inline=yes, ac_cv_sse_inline=no)])
801 if test "x${ac_cv_sse_inline}" != "xno" -a "x${SYS}" != "xmingw32"; then
802 AC_DEFINE(CAN_COMPILE_SSE, 1, Define if \$CC groks SSE inline assembly.)
803 ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
806 # don't try to grok AltiVec with native mingw32 it doesn't work right now
807 # we should be able to remove this test with future versions of mingw32
808 if test "x${SYS}" != "xmingw32"; then
809 AC_CACHE_CHECK([if \$CC groks AltiVec inline assembly],
810 [ac_cv_altivec_inline],
811 [CFLAGS="${CFLAGS_save}"
812 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
813 ac_cv_altivec_inline=yes,
814 [CFLAGS="${CFLAGS_save} -Wa,-m7400"
815 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
816 [ac_cv_altivec_inline="-Wa,-m7400"],
817 ac_cv_altivec_inline=no)
819 if test "x${ac_cv_altivec_inline}" != "xno"; then
820 AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks AltiVec inline assembly.)
821 if test "x${ac_cv_altivec_inline}" != "xyes"; then
822 CFLAGS_idctaltivec="${CFLAGS_idctaltivec} ${ac_cv_altivec_inline}"
823 CFLAGS_motionaltivec="${CFLAGS_motionaltivec} ${ac_cv_altivec_inline}"
824 CFLAGS_memcpyaltivec="${CFLAGS_memcpyaltivec} ${ac_cv_altivec_inline}"
825 CFLAGS_vlc="${CFLAGS_vlc} ${ac_cv_altivec_inline}"
827 ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
830 AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
832 [CFLAGS="${CFLAGS_save} -faltivec"
834 AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
835 ac_cv_c_altivec=-faltivec, [
837 CFLAGS="${CFLAGS_save} ${CFLAGS_idctaltivec} -fvec"
838 AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
839 [ac_cv_c_altivec="-fvec"], ac_cv_c_altivec=no)
841 CFLAGS="${CFLAGS_save}"])
842 if test "x${ac_cv_c_altivec}" != "xno"; then
843 AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
844 CFLAGS_idctaltivec="${CFLAGS_idctaltivec} ${ac_cv_c_altivec}"
845 CFLAGS_motionaltivec="${CFLAGS_motionaltivec} ${ac_cv_c_altivec}"
846 CFLAGS_memcpyaltivec="${CFLAGS_memcpyaltivec} ${ac_cv_c_altivec}"
847 CFLAGS_vlc="${CFLAGS_vlc} ${ac_cv_c_altivec}"
848 ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
851 AC_CACHE_CHECK([if linker needs -framework vecLib],
853 [LDFLAGS="${LDFLAGS_vlc} -framework vecLib"
854 AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)
855 LDFLAGS="${LDFLAGS_save}"
857 if test "x${ac_cv_ld_altivec}" != "xno"; then
858 LDFLAGS_idctaltivec="${LDFLAGS_idctaltivec} -framework vecLib"
859 LDFLAGS_motionaltivec="${LDFLAGS_motionaltivec} -framework vecLib"
860 LDFLAGS_memcpyaltivec="${LDFLAGS_memcpyaltivec} -framework vecLib"
861 LDFLAGS_vlc="${LDFLAGS_vlc} -framework vecLib"
866 AC_ARG_WITH(,[Optimization options:])
869 dnl Special arch tuning
872 [ --with-tuning=ARCH enable special tuning for an architecture
873 (default i686 on IA-32 and 750 on PPC)])
874 if test "x${with_tuning}" != "x"; then
875 if test "x${target_cpu}" = "xpowerpc"; then
876 CFLAGS_TUNING="-mtune=${with_tuning}"
878 CFLAGS_TUNING="-mcpu=${with_tuning}"
881 if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xi486" -o "x${target_cpu}" = "xi386"; then CFLAGS_TUNING="-mcpu=pentiumpro"
883 if test "x${target_cpu}" = "xpowerpc"; then CFLAGS_TUNING="-mtune=750"; fi
888 dnl x86 accelerations
890 if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xx86" -o "x${target_cpu}" = "xi386"
893 PLUGINS="${PLUGINS} ${ACCEL_MODULES}"
897 dnl Enable/disable optimizations
899 AC_ARG_ENABLE(optimizations,
900 [ --disable-optimizations disable compiler optimizations (default enabled)])
901 AM_CONDITIONAL(OPTIM, test "x${enable_optimizations}" != "xno")
904 dnl AltiVec acceleration
906 AC_ARG_ENABLE(altivec,
907 [ --disable-altivec disable AltiVec optimizations (default enabled on PPC)],
908 [ if test "x${enable_altivec}" = "xyes"; then ARCH="${ARCH} altivec";
909 BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ],
910 [ if test "x${target_cpu}" = "xpowerpc"; then ARCH="${ARCH} altivec";
911 BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ])
917 [ --enable-debug debug mode (default disabled)])
918 AM_CONDITIONAL(DEBUG, test "x${enable_debug}" = "xyes")
921 dnl Enable release-specific flags
923 AC_ARG_ENABLE(release,
924 [ --enable-release activate extra optimizations (default disabled)])
925 AM_CONDITIONAL(RELEASE, test "x${enable_release}" = "xyes")
931 [ --enable-sout Stream output modules (default enabled)])
932 if test "x${enable_sout}" != "xno"
934 PLUGINS="${PLUGINS} access_output_dummy access_output_udp access_output_file"
935 PLUGINS="${PLUGINS} mux_ts mux_ps mux_avi mux_dummy"
936 PLUGINS="${PLUGINS} packetizer_mpegaudio packetizer_mpegvideo packetizer_a52"
937 PLUGINS="${PLUGINS} packetizer_mpeg4video packetizer_mpeg4audio"
938 PLUGINS="${PLUGINS} packetizer_copy"
940 PLUGINS="${PLUGINS} vout_encoder"
948 AC_ARG_WITH(,[Input plugins:])
951 dnl DVD module: optionally check for installed libdvdcss
954 [ --enable-dvd DVD input module (default enabled)])
955 if test "x${enable_dvd}" != "xno"
958 [ --with-dvdcss=PATH libdvdcss headers and libraries])
959 AC_ARG_WITH(dvdcss-tree,
960 [ --with-dvdcss-tree=PATH libdvdcss tree for static linking])
961 case "x${with_dvdcss}" in
963 if test "x${with_dvdcss_tree}" = x
965 AC_CHECK_HEADERS(dvdcss/dvdcss.h,
966 [ PLUGINS="${PLUGINS} dvd"
967 LDFLAGS_dvd="${LDFLAGS_dvd} -ldvdcss"
968 LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -ldvdcss" ],
969 [ AC_MSG_WARN([libdvdcss is no longer provided with vlc; please get libdvdcss from http://www.videolan.org/libdvdcss/ and build it. Then either use --with-dvdcss=<path/where/libdvdcss/was/installed> for dynamic linking (recommended under Unix) or --with-dvdcss-tree=<path/where/libdvdcss/was/built> for static linking (recommended under BeOS, Windows, MacOS X). Alternatively you can use --disable-dvd to disable the DVD plugin.])
970 AC_MSG_ERROR([cannot find libdvdcss headers]) ])
972 AC_MSG_CHECKING(for libdvdcss.a in ${with_dvdcss_tree})
973 real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
974 if test "x${real_dvdcss_tree}" = "x"
976 dnl The given directory can't be found
978 AC_MSG_ERROR([cannot cd to ${with_dvdcss_tree}])
980 if test -f "${real_dvdcss_tree}/src/.libs/libdvdcss.a"
982 dnl Use a custom libdvdcss
983 AC_MSG_RESULT(${real_dvdcss_tree}/src/.libs/libdvdcss.a)
984 BUILTINS="${BUILTINS} dvd"
985 LDFLAGS_dvd="${LDFLAGS_dvd} -L${real_dvdcss_tree}/src/.libs -ldvdcss"
986 LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -L${real_dvdcss_tree}/src/.libs -ldvdcss"
987 CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${real_dvdcss_tree}/src"
989 dnl The given libdvdcss wasn't built
991 AC_MSG_ERROR([cannot find ${real_dvdcss_tree}/src/.libs/libdvdcss.a, make sure you compiled libdvdcss in ${with_dvdcss_tree}])
996 dnl Compile without dvdcss (dlopen version, works only under Linux)
997 PLUGINS="${PLUGINS} dvd"
998 CPPFLAGS_dvd="${CPPFLAGS_dvd} -DGOD_DAMN_DMCA"
999 LDFLAGS_dvd="${LDFLAGS_dvd} -ldl"
1002 AC_MSG_CHECKING(for dvdcss headers in ${with_dvdcss})
1003 if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
1005 dnl Use ${with_dvdcss}/include/dvdcss/dvdcss.h
1007 PLUGINS="${PLUGINS} dvd"
1008 LDFLAGS_dvd="${LDFLAGS_dvd} -L${with_dvdcss}/lib -ldvdcss"
1009 LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -L${with_dvdcss}/lib -ldvdcss"
1010 CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${with_dvdcss}/include"
1012 dnl No libdvdcss could be found, sorry
1014 AC_MSG_ERROR([cannot find ${with_dvdcss}/include/dvdcss/dvdcss.h])
1021 dnl dvdread module: check for libdvdread
1023 AC_ARG_ENABLE(dvdread,
1024 [ --enable-dvdread dvdread input module (default disabled)])
1025 if test "x${enable_dvdread}" != "xno"
1027 AC_ARG_WITH(dvdread,
1028 [ --with-dvdread=PATH libdvdread headers and libraries])
1029 AC_ARG_WITH(dvdread-tree,
1030 [ --with-dvdread-tree=PATH libdvdread tree for static linking])
1031 if test "x${with_dvdread}" = x
1033 if test "x${with_dvdread_tree}" = x
1035 AC_CHECK_HEADERS(dvdread/dvd_reader.h,
1036 [ PLUGINS="${PLUGINS} dvdread"
1037 LDFLAGS_dvdread="${LDFLAGS_dvdread} -ldvdread ${LDFLAGS_dvdcss}" ],
1038 [ if test "x${enable_dvdread}" != "x"
1040 AC_MSG_WARN([Please get libdvdread from http://www.dtek.chalmers.se/groups/dvd/downloads.shtml])
1041 AC_MSG_ERROR([cannot find libdvdread headers])
1044 AC_MSG_CHECKING(for libdvdread.a in ${with_dvdread_tree})
1045 real_dvdread_tree="`cd ${with_dvdread_tree} 2>/dev/null && pwd`"
1046 if test "x${real_dvdread_tree}" = "x"
1048 dnl The given directory can't be found
1050 AC_MSG_ERROR([cannot cd to ${with_dvdread_tree}])
1052 if test -f "${real_dvdread_tree}/dvdread/.libs/libdvdread.a"
1054 dnl Use a custom libdvdread
1055 AC_MSG_RESULT(${real_dvdread_tree}/dvdread/.libs/libdvdread.a)
1056 BUILTINS="${BUILTINS} dvdread"
1057 LDFLAGS_dvdread="${LDFLAGS_dvdread} -L${real_dvdread_tree}/dvdread/.libs -ldvdread ${LDFLAGS_dvdcss}"
1058 CPPFLAGS_dvdread="${CPPFLAGS_dvdread} -I${real_dvdread_tree}"
1060 dnl The given libdvdread wasn't built
1062 AC_MSG_ERROR([cannot find ${real_dvdread_tree}/dvdread/.libs/libdvdread.a, make sure you compiled libdvdread in ${with_dvdread_tree}])
1066 AC_MSG_CHECKING(for dvdread headers in ${with_dvdread})
1067 if test -f ${with_dvdread}/include/dvdread/dvd_reader.h
1069 dnl Use ${with_dvdread}/include/dvdread/dvd_reader.h
1071 PLUGINS="${PLUGINS} dvdread"
1072 LDFLAGS_dvdread="${LDFLAGS_dvdread} -L${with_dvdread}/lib -ldvdread ${LDFLAGS_dvdcss}"
1073 CPPFLAGS_dvdread="${CPPFLAGS_dvdread} -I${with_dvdread}/include"
1075 dnl No libdvdread could be found, sorry
1077 AC_MSG_ERROR([cannot find ${with_dvdread}/include/dvdread/dvd_reader.h])
1083 dnl dvdplay module: check for libdvdplay
1085 AC_ARG_ENABLE(dvdplay,
1086 [ --enable-dvdplay dvdplay input module (default disabled)])
1087 if test "x${enable_dvdplay}" != "xno"
1089 AC_ARG_WITH(dvdplay,
1090 [ --with-dvdplay=PATH libdvdplay headers and libraries])
1091 AC_ARG_WITH(dvdplay-tree,
1092 [ --with-dvdplay-tree=PATH libdvdplay tree for static linking])
1093 if test "x${with_dvdplay}" = x
1095 if test "x${with_dvdplay_tree}" = x
1097 AC_CHECK_HEADERS(dvdplay/dvdplay.h,
1098 [ PLUGINS="${PLUGINS} dvdplay"
1099 LDFLAGS_dvdplay="${LDFLAGS_dvdplay} -ldvdplay ${LDFLAGS_dvdread} ${LDFLAGS_dvdcss}"
1100 CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_dvdread}" ],
1101 [ if test "x${enable_dvdplay}" != "x"
1103 AC_MSG_WARN([Please get libdvdplay from http://www.videolan.org/.])
1104 AC_MSG_ERROR([cannot find libdvdplay headers])
1107 AC_MSG_CHECKING(for libdvdplay.a in ${with_dvdplay_tree})
1108 real_dvdplay_tree="`cd ${with_dvdplay_tree} 2>/dev/null && pwd`"
1109 if test "x${real_dvdplay_tree}" = "x"
1111 dnl The given directory can't be found
1113 AC_MSG_ERROR([cannot cd to ${with_dvdplay_tree}])
1115 if test -f "${real_dvdplay_tree}/src/.libs/libdvdplay.a"
1117 dnl Use a custom libdvdplay
1118 AC_MSG_RESULT(${real_dvdplay_tree}/src/.libs/libdvdplay.a)
1119 BUILTINS="${BUILTINS} dvdplay"
1120 LDFLAGS_dvdplay="${LDFLAGS_dvdplay} -L${real_dvdplay_tree}/src/.libs -ldvdplay ${LDFLAGS_dvdread} ${LDFLAGS_dvdcss}"
1121 CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_dvdread} -I${real_dvdplay_tree}/src"
1123 dnl The given libdvdplay wasn't built
1125 AC_MSG_ERROR([cannot find ${real_dvdplay_tree}/src/.libs/libdvdplay.a, make sure you compiled libdvdplay in ${with_dvdplay_tree}])
1129 AC_MSG_CHECKING(for dvdplay headers in ${with_dvdplay})
1130 if test -f ${with_dvdplay}/include/dvdplay/dvdplay.h
1132 dnl Use ${with_dvdplay}/include/dvdplay/dvdplay.h
1134 PLUGINS="${PLUGINS} dvdplay"
1135 LDFLAGS_dvdplay="${LDFLAGS_dvdplay} -L${with_dvdplay}/lib -ldvdplay ${LDFLAGS_dvdread} ${LDFLAGS_dvdcss}"
1136 CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_dvdread} -I${with_dvdplay}/include"
1138 dnl No libdvdplay could be found, sorry
1140 AC_MSG_ERROR([cannot find ${with_dvdplay}/include/dvdplay/dvdplay.h])
1146 dnl libdvbpsi ts demux/mux
1148 AC_ARG_ENABLE(dvbpsi,
1149 [ --enable-dvbpsi dvbpsi ts mux and demux module (default enabled)])
1150 if test "x${enable_dvbpsi}" != "xno"
1153 [ --with-dvbpsi=PATH libdvbpsi headers and libraries])
1155 [ --with-dvbpsi-tree=PATH libdvbpsi tree for static linking])
1156 case "x${with_dvbpsi}" in
1158 if test "x${with_dvbpsi_tree}" = "x"
1160 AC_CHECK_HEADERS(dvbpsi/dr.h,
1161 [ PLUGINS="${PLUGINS} ts_dvbpsi"
1162 LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} -ldvbpsi"
1163 PLUGINS="${PLUGINS} mux_ts_dvbpsi"
1164 LDFLAGS_mux_ts_dvbpsi="${LDFLAGS_mux_ts_dvbpsi} -ldvbpsi" ],
1165 [ AC_MSG_WARN([cannot find libdvbpsi headers]) ],
1166 [#include <stdint.h>
1167 #include <dvbpsi/dvbpsi.h>
1168 #include <dvbpsi/descriptor.h>
1169 #include <dvbpsi/pat.h>
1170 #include <dvbpsi/pmt.h>])
1172 AC_MSG_CHECKING(for libdvbpsi.a in ${with_dvbpsi_tree})
1173 real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
1174 if test "x${real_dvbpsi_tree}" = "x"
1176 dnl The given directory can't be found
1178 AC_MSG_ERROR([cannot cd to ${with_dvbpsi_tree}])
1180 if test -f "${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
1182 dnl Use a custom libdvbpsi
1183 AC_MSG_RESULT(${real_dvbpsi_tree}/src/.libs/libdvbpsi.a)
1184 BUILTINS="${BUILTINS} ts_dvbpsi"
1185 LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} -L${real_dvbpsi_tree}/src/.libs -ldvbpsi"
1186 CPPFLAGS_ts_dvbpsi="${CPPFLAGS_ts_dvbpsi} -I${real_dvbpsi_tree}/src"
1188 BUILTINS="${BUILTINS} mux_ts_dvbpsi"
1189 LDFLAGS_mux_ts_dvbpsi="${LDFLAGS_mux_ts_dvbpsi} -L${real_dvbpsi_tree}/src/.libs -ldvbpsi"
1190 CPPFLAGS_mux_ts_dvbpsi="${CPPFLAGS_mux_ts_dvbpsi} -I${real_dvbpsi_tree}/src"
1193 dnl The given libdvbpsi wasn't built
1195 AC_MSG_ERROR([cannot find ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a, make sure you compiled libdvbpsi in ${with_dvbpsi_tree}])
1200 dnl Compile without dvbpsi
1203 AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi})
1204 if test "x${with_dvbpsi}" = "x"
1209 LDFLAGS_test="-L${with_dvbpsi}/lib"
1210 CPPFLAGS_test="-I${with_dvbpsi}/include"
1212 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
1213 AC_CHECK_HEADER([dvbpsi/dr.h],[
1214 PLUGINS="${PLUGINS} ts_dvbpsi"
1215 LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} ${LDFLAGS_test} -ldvbpsi"
1216 CPPFLAGS_ts_dvbpsi="${CPPFLAGS_ts_dvbpsi} ${CPPFLAGS_test}"
1217 PLUGINS="${PLUGINS} mux_ts_dvbpsi"
1218 LDFLAGS_mux_ts_dvbpsi="${LDFLAGS_mux_ts_dvbpsi} ${LDFLAGS_test} -ldvbpsi"
1219 CPPFLAGS_mux_ts_dvbpsi="${CPPFLAGS_mux_ts_dvbpsi} ${CPPFLAGS_test}"
1222 if test "x${enable_dvbpsi}" != "x"
1224 AC_MSG_ERROR([Could not find libdvbpsi on your system: you may get it from www.videolan.org, you'll need at least version 0.1.1])
1227 CPPFLAGS="${CPPFLAGS_save}"
1233 dnl Video4Linux plugin
1236 [ --enable-v4l Video4Linux input support (default disabled)])
1237 if test "x${enable_v4l}" = "xyes"
1239 AC_CHECK_HEADERS(libv4l/v4l.h, [
1240 PLUGINS="${PLUGINS} v4l"
1248 [ --enable-vcd VCD support for Linux, FreeBSD, MacOS X and Win32 (default enabled)])
1250 if test "x${enable_vcd}" != "xno"
1252 AC_MSG_CHECKING(for cdrom_msf0 in linux/cdrom.h)
1253 AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
1255 PLUGINS="${PLUGINS} vcd"
1260 AC_MSG_CHECKING(for scsireq in sys/scsiio.h)
1261 AC_EGREP_HEADER(scsireq,sys/scsiio.h,[
1263 PLUGINS="${PLUGINS} vcd"
1264 AC_DEFINE(HAVE_SCSIREQ_IN_SYS_SCSIIO_H, 1, For NetBSD VCD support)
1269 AC_MSG_CHECKING(for ioc_toc_header in sys/cdio.h)
1270 AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
1272 PLUGINS="${PLUGINS} vcd"
1273 AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
1278 if test "x${SYS}" = "xbsdi" -o "x${SYS}" = "xmingw32"
1280 PLUGINS="${PLUGINS} vcd"
1283 if test "x${SYS}" = "xdarwin"
1285 PLUGINS="${PLUGINS} vcd"
1286 LDFLAGS_vcd="${LDFLAGS_vcd} -framework IOKit -framework CoreFoundation"
1291 dnl Satellite input module
1293 AC_ARG_ENABLE(satellite,
1294 [ --enable-satellite satellite card support (default disabled)],
1295 [ if test "x${enable_satellite}" = "xyes"
1297 PLUGINS="${PLUGINS} satellite"
1301 dnl ipv6 plugin - not for QNX yet
1303 if test "x${SYS}" != "xnto" && test "x${SYS}" != "xmingw32"
1306 AC_CHECK_FUNCS(inet_pton,[have_ipv6=:],[
1307 AC_CHECK_LIB(resolv,inet_pton,
1309 LDFLAGS_ipv6="${LDFLAGS_ipv6} -lresolv"])
1311 AC_MSG_CHECKING(for sockaddr_in6 in netinet/in.h)
1312 AC_EGREP_HEADER(sockaddr_in6,netinet/in.h,
1313 [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); have_ipv6=false])
1314 if ${have_ipv6}; then
1315 PLUGINS="${PLUGINS} ipv6"
1318 if test "x${SYS}" = "xmingw32"
1320 AC_MSG_CHECKING(for getaddrinfo in ws2tcpip.h)
1321 AC_EGREP_HEADER(addrinfo,ws2tcpip.h,[AC_MSG_RESULT(yes)
1322 PLUGINS="${PLUGINS} ipv6"],[AC_MSG_RESULT(no)])
1326 dnl AVI demux plugin
1329 [ --enable-avi AVI demux module (default enabled)])
1330 if test "x${enable_avi}" != "xno"
1332 PLUGINS="${PLUGINS} avi"
1336 dnl ASF demux plugin
1339 [ --enable-asf ASF demux module (default enabled)])
1340 if test "x${enable_asf}" != "xno"
1342 PLUGINS="${PLUGINS} asf"
1346 dnl AAC demux plugin
1349 [ --enable-aac AAC demux module (default enabled)])
1350 if test "x${enable_aac}" != "xno"
1352 PLUGINS="${PLUGINS} aac"
1359 [ --enable-ogg Ogg demux support (default enabled)])
1360 if test "x${enable_ogg}" != "xno"
1362 AC_CHECK_HEADERS(ogg/ogg.h, [
1363 AC_CHECK_LIB( ogg, oggpack_read, [
1364 PLUGINS="${PLUGINS} ogg"
1365 LDFLAGS_ogg="${LDFLAGS_ogg} -logg"
1366 AC_CHECK_LIB( ogg, oggpackB_read, [
1367 CPPFLAGS_ogg="${CPPFLAGS_ogg} -DHAVE_OGGPACKB"])])
1372 dnl raw dv demux plugin
1374 AC_ARG_ENABLE(rawdv,
1375 [ --enable-rawdv raw dv demux module (default enabled)])
1376 if test "x${enable_rawdv}" != "xno"
1378 PLUGINS="${PLUGINS} rawdv"
1385 AC_ARG_WITH(,[Codec plugins:])
1391 [ --enable-mad libmad module (default disabled)])
1392 if test "x${enable_mad}" != "xno"
1395 [ --with-mad=PATH path to libmad],[],[])
1396 if test "x${with_mad}" != "xno" -a "x${with_mad}" != "x"
1398 CPPFLAGS_mpgatofixed32="${CPPFLAGS_mpgatofixed32} -I${with_mad}/include"
1399 LDFLAGS_mpgatofixed32="${LDFLAGS_mpgatofixed32} -L${with_mad}/lib"
1402 AC_ARG_WITH(mad-tree,
1403 [ --with-mad-tree=PATH mad tree for static linking],[],[])
1404 if test "x${with_mad_tree}" != "xno" -a "x${with_mad_tree}" != "x"
1406 real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
1407 if test "x${real_mad_tree}" = "x"
1409 dnl The given directory can't be found
1411 AC_MSG_ERROR([${with_mad_tree} directory doesn't exist])
1413 dnl Use a custom libmad
1414 AC_MSG_CHECKING(for mad.h in ${real_mad_tree}/libmad)
1415 if test -f ${real_mad_tree}/libmad/mad.h
1418 CPPFLAGS_mpgatofixed32="${CPPFLAGS_mpgatofixed32} -I${real_mad_tree}/libmad"
1419 LDFLAGS_mpgatofixed32="${LDFLAGS_mpgatofixed32} -L${real_mad_tree}/libmad/.libs"
1420 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mpgatofixed32}"
1421 AC_CHECK_LIB(mad, mad_bit_init, [
1422 BUILTINS="${BUILTINS} mpgatofixed32"
1423 LDFLAGS_mpgatofixed32="${LDFLAGS_mpgatofixed32} -lmad"
1424 ],[ AC_MSG_ERROR([the specified tree hasn't been compiled ])
1426 LDFLAGS="${LDFLAGS_save}"
1429 AC_MSG_ERROR([the specified tree doesn't have mad.h])
1432 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mpgatofixed32}"
1433 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mpgatofixed32}"
1434 AC_CHECK_HEADERS(mad.h, ,
1435 [ AC_MSG_ERROR([Cannot find development headers for libmad...]) ])
1436 AC_CHECK_LIB(mad, mad_bit_init, [
1437 PLUGINS="${PLUGINS} mpgatofixed32"
1438 LDFLAGS_mpgatofixed32="${LDFLAGS_mpgatofixed32} -lmad" ],
1439 [ AC_MSG_ERROR([Cannot find libmad library...]) ])
1440 CPPFLAGS="${CPPFLAGS_save}"
1441 LDFLAGS="${LDFLAGS_save}"
1446 dnl libid3tag support
1448 AC_CHECK_HEADERS(id3tag.h, [
1449 LDFLAGS_id3tag="${LDFLAGS_id3tag} -lz -lid3tag"
1450 PLUGINS="${PLUGINS} id3tag"])
1453 dnl ffmpeg decoder plugin
1455 AC_ARG_ENABLE(ffmpeg,
1456 [ --enable-ffmpeg ffmpeg codec (default disabled)])
1457 if test "x${enable_ffmpeg}" = "xyes"
1460 [ --with-ffmpeg=PATH path to ffmpeg installation],[],[])
1461 if test "x${with_ffmpeg}" != "xno" -a "x${with_ffmpeg}" != "x"
1463 CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${with_ffmpeg}/include/ffmpeg"
1464 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -L${with_ffmpeg}/lib"
1467 dnl Add postprocessing modules
1468 PLUGINS="${PLUGINS} postprocessing_c"
1469 if test "x${ac_cv_mmx_inline}" != "xno"; then
1470 PLUGINS="${PLUGINS} postprocessing_mmx"
1473 if test "x${ac_cv_mmxext_inline}" != "xno"; then
1474 PLUGINS="${PLUGINS} postprocessing_mmxext"
1477 AC_ARG_WITH(ffmpeg-tree,
1478 [ --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
1479 if test "x${with_ffmpeg_tree}" != "x"
1481 AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
1482 real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
1483 if test "x${real_ffmpeg_tree}" = x
1485 dnl The given directory can't be found
1487 AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
1489 if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"
1491 dnl Use a custom libffmpeg
1492 AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
1493 BUILTINS="${BUILTINS} ffmpeg"
1494 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -L${real_ffmpeg_tree}/libavcodec -lavcodec"
1495 CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${real_ffmpeg_tree}/libavcodec"
1497 dnl The given libavcodec wasn't built
1499 AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
1502 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
1503 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
1504 AC_CHECK_LIB(avcodec, avcodec_init, [
1505 BUILTINS="${BUILTINS} ffmpeg"
1506 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lavcodec" ],
1507 [ AC_MSG_ERROR([Cannot find libavcodec library...]) ])
1508 LDFLAGS="${LDFLAGS_save}"
1509 CPPFLAGS="${CPPFLAGS_save}"
1514 dnl faad decoder plugin
1517 [ --enable-faad faad codec (default disabled)])
1518 if test "x${enable_faad}" = "xyes"
1521 [ --with-faad=PATH path to faad installation],[],[])
1522 if test "x${with_faad}" != "xno" -a "x${with_faad}" != "x"
1524 CPPFLAGS_faad="${CPPFLAGS_faad} -I${with_faad}/include"
1525 LDFLAGS_faad="${LDFLAGS_faad} -L${with_faad}/lib"
1527 LDFLAGS_faad="${LDFLAGS_faad}"
1529 AC_ARG_WITH(faad-tree,
1530 [ --with-faad-tree=PATH faad tree for static linking])
1531 if test "x${with_faad_tree}" != "x"
1533 AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
1534 real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
1535 if test "x${real_faad_tree}" = x
1537 dnl The given directory can't be found
1539 AC_MSG_ERROR([cannot cd to ${with_faad_tree}])
1541 if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a"
1543 dnl Use a custom faad
1544 AC_MSG_RESULT(${real_faad_tree}/libfaad/.libs/libfaad.a)
1545 BUILTINS="${BUILTINS} faad"
1546 LDFLAGS_faad="${LDFLAGS_faad} -L${real_faad_tree}/libfaad/.libs -lfaad"
1547 CPPFLAGS_faad="${CPPFLAGS_faad} -I${real_faad_tree}/include"
1549 dnl The given libfaad wasn't built
1551 AC_MSG_ERROR([cannot find ${real_faad_tree}/libfaad/.libs/libfaad.a, make sure you compiled libfaad in ${with_faad_tree}])
1554 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_faad}"
1555 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_faad}"
1556 AC_CHECK_HEADERS(faad.h, ,
1557 [ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ])
1558 AC_CHECK_LIB(faad, faacDecOpen, [
1559 PLUGINS="${PLUGINS} faad"
1560 LDFLAGS_faad="${LDFLAGS_faad} -lfaad" ],
1561 [ AC_MSG_ERROR([Cannot find libfaad library...]) ])
1562 LDFLAGS="${LDFLAGS_save}"
1563 CPPFLAGS="${CPPFLAGS_save}"
1569 dnl xvid decoder plugin
1572 [ --enable-xvid xvid codec (default disabled)])
1573 if test "x${enable_xvid}" = "xyes"
1576 [ --with-xvid=PATH path to xvid installation],[],[])
1577 if test "x${with_xvid}" != "xno" -a "x${with_xvid}" != "x"
1579 CPPFLAGS_xvid="${CPPFLAGS_xvid} -I${with_xvid}/include"
1580 LDFLAGS_xvid="${LDFLAGS_xvid} -L${with_xvid}/lib"
1582 LDFLAGS_xvid="${LDFLAGS_xvid}"
1584 AC_ARG_WITH(xvid-tree,
1585 [ --with-xvid-tree=PATH xvid tree for static linking])
1586 if test "x${with_xvid_tree}" != "x"
1588 AC_MSG_CHECKING(for libxvidcore.a in ${with_xvid_tree})
1589 real_xvid_tree="`cd ${with_xvid_tree} 2>/dev/null && pwd`"
1590 if test "x${real_xvid_tree}" = x
1592 dnl The given directory can't be found
1594 AC_MSG_ERROR([cannot cd to ${with_xvid_tree}])
1596 if test -f "${real_xvid_tree}/build/generic/libxvidcore.a"
1598 dnl Use a custom xvid
1599 AC_MSG_RESULT(${real_xvid_tree}/build/generic/libxvidcore.a)
1600 BUILTINS="${BUILTINS} xvid"
1601 LDFLAGS_xvid="${LDFLAGS_xvid} -L${real_xvid_tree}/build/generic -lxvidcore"
1602 CPPFLAGS_xvid="${CPPFLAGS_xvid} -I${real_xvid_tree}/src"
1604 dnl The given libxvidcore wasn't built
1606 AC_MSG_ERROR([cannot find ${real_xvid_tree}/build/generic/libxvidcore.a, make sure you compiled libxvidcore in ${with_xvid_tree}])
1609 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_xvid}"
1610 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_xvid}"
1611 AC_CHECK_HEADERS(xvid.h, ,
1612 [ AC_MSG_ERROR([Cannot find development headers for libxvidcore...]) ])
1613 AC_CHECK_LIB(xvid, xvid_init, [
1614 PLUGINS="${PLUGINS} xvid"
1615 LDFLAGS_xvid="${LDFLAGS_xvid} -lxvid" ],
1616 [ AC_MSG_ERROR([Cannot find libxvidcore library...]) ])
1617 LDFLAGS="${LDFLAGS_save}"
1618 CPPFLAGS="${CPPFLAGS_save}"
1628 [ --enable-mp4 MP4 demux module (default enabled)])
1629 if test "x${enable_mp4}" != "xno"
1632 PLUGINS="${PLUGINS} mp4"
1633 AC_CHECK_HEADERS(zlib.h,
1634 [ LDFLAGS_mp4="${LDFLAGS_mp4} -lz" ] )
1638 dnl a52 AC3 decoder plugin
1641 [ --enable-a52 A/52 support with liba52 (default enabled)])
1642 if test "x${enable_a52}" != "xno"
1645 [ --with-a52=PATH a52 headers and libraries])
1646 AC_ARG_WITH(a52-tree,
1647 [ --with-a52-tree=PATH a52dec tree for static linking ],[],[])
1648 if test "x${with_a52_tree}" != "xno" -a "x${with_a52_tree}" != "x"
1650 real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
1651 if test "x${real_a52_tree}" = "x"
1653 dnl The given directory can't be found
1655 AC_MSG_ERROR([${with_a52_tree} directory doesn't exist])
1657 dnl Use a custom a52dec
1658 AC_MSG_CHECKING(for a52.h in ${real_a52_tree}/include)
1659 if test -f ${real_a52_tree}/include/a52.h
1662 CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} -I${real_a52_tree}"
1663 LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} -L${real_a52_tree}/liba52/.libs"
1664 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_a52tofloat32}"
1665 AC_CHECK_LIB(a52, a52_free, [
1666 BUILTINS="${BUILTINS} a52tofloat32"
1667 LDFLAGS_a52tofloat32="-la52 ${LDFLAGS_a52tofloat32}"
1668 CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} -DUSE_A52DEC_TREE"
1670 if test -f ${real_a52_tree}/liba52/.libs/liba52.a
1672 AC_MSG_ERROR([make sure you have at least a52dec-0.7.3])
1674 AC_MSG_ERROR([the specified tree hasn't been compiled])
1677 LDFLAGS="${LDFLAGS_save}"
1680 AC_MSG_ERROR([the specified tree doesn't have a52.h])
1683 if test "x${with_a52}" = "x"
1688 LDFLAGS_test="-L${with_a52}/lib"
1689 CPPFLAGS_test="-I${with_a52}/include"
1691 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test} ${CPPFLAGS_a52tofloat32}"
1692 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_test} ${LDFLAGS_a52tofloat32}"
1693 AC_CHECK_HEADERS(a52dec/a52.h, [
1694 AC_CHECK_LIB(a52, a52_free, [
1695 PLUGINS="${PLUGINS} a52tofloat32"
1696 LDFLAGS_a52tofloat32="${LDFLAGS_test} -la52 ${LDFLAGS_a52tofloat32}"
1697 CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} ${CPPFLAGS_test}"
1699 AC_MSG_ERROR([Could not find a52 on your system: you may get it from http://liba52.sf.net/. Alternatively you can use --disable-a52 to disable the a52 plugin.])
1702 CPPFLAGS="${CPPFLAGS_save}"
1703 LDFLAGS="${LDFLAGS_save}"
1710 AC_ARG_ENABLE(cinepak,
1711 [ --enable-cinepak Cinepak decoder (default enabled)])
1712 if test "x${enable_cinepak}" != "xno"
1714 PLUGINS="${PLUGINS} cinepak"
1721 [ --enable-dv DV decoder support (default disabled)])
1722 if test "x${enable_dv}" = "xyes"
1724 AC_CHECK_HEADERS(libdv/dv.h, [
1725 PLUGINS="${PLUGINS} dv"
1726 LDFLAGS_dv="${LDFLAGS_dv} -ldv"
1733 AC_ARG_ENABLE(vorbis,
1734 [ --enable-vorbis Vorbis decoder support (default enabled)])
1735 if test "x${enable_vorbis}" != "xno"
1737 AC_CHECK_HEADERS(vorbis/codec.h, [
1738 PLUGINS="${PLUGINS} vorbis"
1739 LDFLAGS_vorbis="${LDFLAGS_vorbis} -lvorbis -logg"
1746 AC_ARG_ENABLE(tremor,
1747 [ --enable-tremor Tremor decoder support (default disabled)])
1748 if test "x${enable_tremor}" = "xyes"
1750 AC_CHECK_HEADERS(tremor/ivorbiscodec.h, [
1751 PLUGINS="${PLUGINS} tremor"
1752 LDFLAGS_tremor="${LDFLAGS_tremor} -lvorbisidec -logg"
1757 dnl tarkin decoder plugin
1759 AC_ARG_ENABLE(tarkin,
1760 [ --enable-tarkin experimental tarkin codec (default disabled)])
1761 if test "x${enable_tarkin}" = "xyes"
1763 AC_ARG_WITH(tarkin-tree,
1764 [ --with-tarkin-tree=PATH tarkin tree for static linking])
1765 if test "x${with_tarkin_tree}" != "x"
1767 AC_MSG_CHECKING(for tarkin.o in ${with_tarkin_tree})
1768 real_tarkin_tree="`cd ${with_tarkin_tree} 2>/dev/null && pwd`"
1769 if test -f "${real_tarkin_tree}/tarkin.o"
1771 BUILTINS="${BUILTINS} tarkin"
1772 CPPFLAGS_tarkin="${CPPFLAGS_tarkin} -I${real_tarkin_tree}"
1773 LDFLAGS_tarkin="${LDFLAGS_tarkin} ${real_tarkin_tree}/mem.o ${real_tarkin_tree}/pnm.o ${real_tarkin_tree}/wavelet.o ${real_tarkin_tree}/wavelet_xform.o ${real_tarkin_tree}/wavelet_coeff.o ${real_tarkin_tree}/yuv.o ${real_tarkin_tree}/tarkin.o ${real_tarkin_tree}/info.o -logg"
1776 dnl The given tarkin tree wasn't built
1778 AC_MSG_ERROR([cannot find ${real_tarkin_tree}/tarkin.o,
1779 make sure you compiled tarkin in ${with_tarkin_tree}])
1785 dnl theora decoder plugin
1787 AC_ARG_ENABLE(theora,
1788 [ --enable-theora experimental theora codec (default disabled)])
1789 if test "x${enable_theora}" = "xyes"
1791 AC_CHECK_HEADERS(theora/theora.h, [
1792 AC_CHECK_LIB(theora, theora_granule_time, [
1793 BUILTINS="${BUILTINS} theora"
1794 LDFLAGS_theora="${LDFLAGS_theora} -ltheora -logg" ],[
1795 AC_MSG_ERROR([libtheora doesn't appear to be installed on you system.
1796 You also need to check that you have a libogg posterior to the 1.0 release.])],
1805 AC_ARG_WITH(,[Video plugins:])
1809 dnl (enabled by default except on win32)
1812 [ --enable-x11 X11 support (default enabled)])
1813 if test "x${enable_x11}" != "xno" &&
1814 (test "x${SYS}" != "xmingw32" || test "x${enable_x11}" = "xyes"); then
1815 CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
1816 AC_CHECK_HEADERS(X11/Xlib.h, [
1817 PLUGINS="${PLUGINS} x11"
1818 LDFLAGS_x11="${LDFLAGS_x11} -L${x_libraries} -lX11 -lXext"
1819 CPPFLAGS_x11="${CPPFLAGS_x11} -I${x_includes}"
1821 CPPFLAGS="${CPPFLAGS_save}"
1826 dnl (enabled by default except on win32)
1828 AC_ARG_ENABLE(xvideo,
1829 [ --enable-xvideo XVideo support (default enabled)])
1830 if test "x${enable_xvideo}" != "xno" &&
1831 (test "x${SYS}" != "xmingw32" || test "x${enable_xvideo}" = "xyes"); then
1832 CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
1833 AC_CHECK_HEADERS(X11/extensions/Xv.h, [
1834 CFLAGS="${CFLAGS_save} -L${x_libraries} -lX11 -lXext"
1835 AC_CHECK_LIB(Xv_pic,XvPutImage,
1836 # We have Xv_pic, that's good, we can build an xvideo.so plugin !
1837 PLUGINS="${PLUGINS} xvideo"
1838 LDFLAGS_xvideo="${LDFLAGS_xvideo} -L${x_libraries} -lX11 -lXext -lXv_pic"
1839 CPPFLAGS_xvideo="${CPPFLAGS_xvideo} -I${x_includes}",
1840 AC_CHECK_LIB(Xv,XvPutImage,
1841 # We don't have Xv_pic, but we have Xv, let's make xvideo.a as builtin
1842 PLUGINS="${PLUGINS} xvideo"
1843 LDFLAGS_xvideo="${LDFLAGS_xvideo} -L${x_libraries} -lX11 -lXext -lXv"
1844 CPPFLAGS_xvideo="${CPPFLAGS_xvideo} -I${x_includes}",
1845 # Otherwise... well, do nothing.
1849 CFLAGS="${CFLAGS_save}"
1851 CPPFLAGS="${CPPFLAGS_save}")
1858 [ --enable-sdl SDL support (default enabled)])
1859 if test "x${enable_sdl}" != "xno"
1862 AC_ARG_WITH(sdl-config-path,
1863 [ --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)],
1864 [ if test "x${with_sdl_config_path}" != "xno"
1866 SDL_PATH="${with_sdl_config_path}:${PATH}"
1868 AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no, ${SDL_PATH})
1869 SDL_CONFIG="${SDL12_CONFIG}"
1870 SDL_HEADER="SDL12/SDL.h"
1871 if test "x${SDL_CONFIG}" = "xno"
1873 AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no, ${SDL_PATH})
1874 SDL_CONFIG=${SDL11_CONFIG}
1875 SDL_HEADER="SDL11/SDL.h"
1877 if test "x${SDL_CONFIG}" = "xno"
1879 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, ${SDL_PATH})
1880 SDL_HEADER="SDL/SDL.h"
1882 # check for cross-compiling
1884 AC_ARG_WITH(sdl-prefix,
1885 [ --with-sdl-prefix=PATH path to libsdl (needed for cross-compiling),
1887 --with-sdl-prefix=/usr/local/arm/2.95.3/arm-linux/usr)],[],[])
1888 if test "x${with_sdl_prefix}" != "xno" -a "x${with_sdl_prefix}" != "x"
1890 SDL_PREFIX="--prefix=${with_sdl_prefix}"
1892 if test "x${SDL_CONFIG}" != "xno"
1894 PLUGINS="${PLUGINS} vout_sdl aout_sdl"
1895 CFLAGS_vout_sdl="${CFLAGS_vout_sdl} `${SDL_CONFIG} ${SDL_PREFIX} --cflags | sed 's,SDL,,'`"
1896 LDFLAGS_vout_sdl="${LDFLAGS_vout_sdl} `${SDL_CONFIG} ${SDL_PREFIX} --libs | sed 's,-rdynamic,,'`"
1897 CFLAGS_aout_sdl="${CFLAGS_aout_sdl} `${SDL_CONFIG} ${SDL_PREFIX} --cflags | sed 's,SDL,,'`"
1898 LDFLAGS_aout_sdl="${LDFLAGS_aout_sdl} `${SDL_CONFIG} ${SDL_PREFIX} --libs | sed 's,-rdynamic,,'`"
1899 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_vout_sdl}"
1900 AC_CHECK_HEADERS(${SDL_HEADER}, AC_DEFINE_UNQUOTED(SDL_INCLUDE_FILE,
1901 <${SDL_HEADER}>, Indicate whether we should use SDL/SDL.h or SDL11/SDL.h),
1902 [ AC_CHECK_HEADERS(SDL.h, AC_DEFINE(SDL_INCLUDE_FILE, <SDL.h>,
1903 As a last resort we also test for SDL.h presence),
1904 [ AC_MSG_ERROR([The development package for SDL is not installed.
1905 Please install it and try again. Alternatively you can also configure with
1908 CPPFLAGS="${CPPFLAGS_save}"
1909 if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
1911 AC_MSG_ERROR([The development package for SDL is not installed.
1912 Please install it and try again. Alternatively you can also configure with
1915 elif test "x${enable_sdl}" = "xyes"
1917 AC_MSG_ERROR([I couldn't find the SDL package. You can download libSDL
1918 from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
1924 dnl Qt Embedded module
1925 dnl (disabled by default)
1928 [ --enable-qte QT Embedded support (default disabled)])
1929 if test "x${enable_qte}" = "xyes"
1932 [ --with-qte=PATH Qt Embedded headers and libraries])
1933 if test "x${with_qte}" != "xno" -a "x${with_qte}" != "x"
1935 LDFLAGS_qte="${LDFLAGS_qte} -L${with_qte}/lib `echo -L${with_qte}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte"
1936 CPPFLAGS_qte="${CPPFLAGS_qte} -I${with_qte}/include `echo -I${with_qte}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti"
1938 LDFLAGS_qte="${LDFLAGS_qte} -L${QTDIR}/lib `echo -L${QTDIR}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte"
1939 CPPFLAGS_qte="${CPPFLAGS_qte} -I${QTDIR}/include `echo -I${QTDIR}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti"
1941 PLUGINS="${PLUGINS} qte"
1943 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_qte}"
1944 AC_CHECK_HEADERS(qt.h jpeglib.h, ,[
1945 AC_MSG_ERROR([echo "Cannot find QT Embedded development headers."])
1947 CPPFLAGS="${CPPFLAGS_save}"
1951 dnl Windows DirectX module
1953 AC_ARG_ENABLE(directx,
1954 [ --enable-directx Win32 DirectX support (default enabled on Win32)])
1955 if test "x${enable_directx}" != "xno"
1957 if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"
1959 AC_ARG_WITH(directx,
1960 [ --with-directx=PATH Win32 DirectX headers])
1961 if test "x${with_directx}" = "x"
1963 AC_CHECK_HEADERS(ddraw.h,
1964 [ PLUGINS="${PLUGINS} vout_directx aout_directx"
1965 LDFLAGS_vout_directx="${LDFLAGS_directx} -lgdi32" ])
1967 AC_MSG_CHECKING(for directX headers in ${with_directx})
1968 if test -f ${with_directx}/ddraw.h
1970 PLUGINS="${PLUGINS} vout_directx aout_directx"
1971 LDFLAGS_vout_directx="${LDFLAGS_directx} -lgdi32"
1972 CPPFLAGS_vout_directx="${CPPFLAGS_vout_directx} -I${with_directx}"
1973 CPPFLAGS_aout_directx="${CPPFLAGS_aout_directx} -I${with_directx}"
1977 AC_MSG_ERROR([Cannot find ${with_directx}/ddraw.h!])
1984 dnl Linux framebuffer module
1987 [ --enable-fb Linux framebuffer support (default enabled on Linux)])
1988 if test "x${enable_fb}" != "xno"
1990 AC_CHECK_HEADERS(linux/fb.h, [
1991 PLUGINS="${PLUGINS} fb"
1996 dnl Linux MGA module
1999 [ --enable-mga Linux kernel Matrox support (default disabled)],
2000 [ if test "x${enable_mga}" = "xyes"
2002 PLUGINS="${PLUGINS} mga xmga"
2008 AC_ARG_ENABLE(svgalib,
2009 [ --enable-svgalib SVGAlib support (default disabled)])
2010 if test "x${enable_svgalib}" = "xyes"
2012 PLUGINS="${PLUGINS} svgalib"
2013 LDFLAGS_svgalib="${LDFLAGS_svgalib} -lvgagl -lvga"
2020 [ --enable-ggi GGI support (default disabled)])
2021 if test "x${enable_ggi}" = "xyes"
2023 PLUGINS="${PLUGINS} ggi"
2024 LDFLAGS_ggi="${LDFLAGS_ggi} -lggi"
2026 [ --with-ggi=PATH path to libggi],
2027 [ if test "x${with_ggi}" != "xno" -a "x${with_ggi}" != "x"
2029 CPPFLAGS_ggi="${CPPFLAGS_ggi} -I${with_ggi}/include"
2030 LDFLAGS_ggi="${LDFLAGS_ggi} -L${with_ggi}/lib"
2037 AC_ARG_ENABLE(glide,
2038 [ --enable-glide Glide (3dfx) support (default disabled)])
2039 if test "x${enable_glide}" = "xyes"
2041 PLUGINS="${PLUGINS} glide"
2042 LDFLAGS_glide="${LDFLAGS_glide} -lglide2x -lm"
2043 CPPFLAGS_glide="${CPPFLAGS_glide} -I/usr/include/glide"
2045 [ --with-glide=PATH path to libglide],
2046 [ if test "x${with_glide}" != "xno" -a "x${with_glide}" != "x"
2048 CPPFLAGS_glide="${CPPFLAGS_glide} -I${with_glide}/include"
2049 LDFLAGS_glide="${LDFLAGS_glide} -L${with_glide}/lib"
2057 [ --enable-aa aalib output (default disabled)])
2058 if test "x${enable_aa}" = "xyes"
2060 AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
2061 if test "x${have_aa}" = "xtrue"
2063 PLUGINS="${PLUGINS} aa"
2064 LDFLAGS_aa="${LDFLAGS_aa} -laa"
2069 dnl win32 GDI plugin
2071 AC_ARG_ENABLE(wingdi,
2072 [ --enable-wingdi Win32 GDI module (default enabled on Win32)])
2073 if test "x${enable_wingdi}" != "xno"; then
2074 if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
2075 PLUGINS="${PLUGINS} wingdi"
2076 LDFLAGS_wingdi="${LDFLAGS_wingdi} -lgdi32"
2084 AC_ARG_WITH(,[Audio plugins:])
2087 dnl OSS /dev/dsp module (enabled by default except on win32)
2090 [ --enable-oss Linux OSS /dev/dsp support (enabled on Linux)])
2092 if test "x${enable_oss}" != "xno" &&
2093 (test "x${SYS}" != "xmingw32" || test "x${enable_oss}" = "xyes")
2095 AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h, [
2096 PLUGINS="${PLUGINS} oss"
2097 AC_CHECK_LIB(ossaudio,main,LDFLAGS_oss="${LDFLAGS_oss} -lossaudio")
2105 [ --enable-esd Esound library support (default disabled)],
2106 [if test "x${enable_esd}" = "xyes"
2108 AC_PATH_PROG(ESD_CONFIG, esd-config, no)
2109 if test "x${ESD_CONFIG}" != "xno"
2111 PLUGINS="${PLUGINS} esd"
2112 CFLAGS_esd="${CFLAGS_esd} `${ESD_CONFIG} --cflags`"
2113 LDFLAGS_esd="${LDFLAGS_esd} `${ESD_CONFIG} --libs`"
2121 [ --enable-arts aRts sound server (default disabled)],
2122 [if test "x${enable_arts}" = "xyes"
2124 AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
2125 if test "x${ARTS_CONFIG}" != "xno"
2127 PLUGINS="${PLUGINS} arts"
2128 CFLAGS_arts="${CFLAGS_arts} `${ARTS_CONFIG} --cflags`"
2129 LDFLAGS_arts="${LDFLAGS_arts} `${ARTS_CONFIG} --libs `"
2137 [ --enable-alsa ALSA sound support for Linux (default disabled)],
2138 [if test "x${enable_alsa}" = "xyes"
2140 AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
2141 if test "x${have_alsa}" = "xtrue"
2143 AC_TRY_COMPILE([#define ALSA_PCM_NEW_HW_PARAMS_API
2144 #define ALSA_PCM_NEW_SW_PARAMS_API
2145 #include <alsa/asoundlib.h>],
2146 [void foo() { snd_pcm_hw_params_get_period_time(0,0,0); }],
2147 AC_DEFINE(HAVE_ALSA_NEW_API, 1, Define if ALSA is at least rc4))
2148 PLUGINS="${PLUGINS} alsa"
2149 LDFLAGS_alsa="${LDFLAGS_alsa} -lasound -lm -ldl"
2151 AC_MSG_ERROR([Could not find ALSA development headers])
2156 dnl win32 waveOut plugin
2158 AC_ARG_ENABLE(waveout,
2159 [ --enable-waveout Win32 waveOut module (default enabled on Win32)])
2160 if test "x${enable_waveout}" != "xno"; then
2161 if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
2162 PLUGINS="${PLUGINS} waveout"
2163 LDFLAGS_waveout="-lwinmm"
2168 dnl Interface plugins
2171 AC_ARG_WITH(,[Interface plugins:])
2173 dnl special case for BeOS
2174 if test "x${SYS}" = "xbeos"
2176 PLUGINS="${PLUGINS} beos"
2183 [ --enable-gtk Gtk+ support (default enabled)])
2184 if test "x${enable_gtk}" != "xno"
2187 AC_ARG_WITH(gtk-config-path,
2188 [ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
2189 [ if test "x${with_gtk_config_path}" != "xno"
2191 GTK_PATH="${with_gtk_config_path}:${PATH}"
2193 # look for gtk-config
2194 AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
2195 GTK_CONFIG=${GTK12_CONFIG}
2196 if test "x${GTK_CONFIG}" = "xno"
2198 AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
2200 if test "x${GTK_CONFIG}" != "xno"
2202 if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
2204 AC_MSG_ERROR([Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-gtk.])
2206 if test "x${SYS}" != "xmingw32"; then
2207 CFLAGS_gtk="${CFLAGS_gtk} `${GTK_CONFIG} --cflags gtk gthread`"
2208 LDFLAGS_gtk="${LDFLAGS_gtk} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
2210 CFLAGS_gtk="${CFLAGS_gtk} `${GTK_CONFIG} --cflags gtk`"
2211 LDFLAGS_gtk="${LDFLAGS_gtk} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
2213 # now look for the gtk.h header
2214 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gtk}"
2215 ac_cv_gtk_headers=yes
2216 AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
2217 ac_cv_gtk_headers=no
2218 echo "Cannot find gtk development headers."
2220 if test "x${ac_cv_gtk_headers}" = "xyes"
2222 PLUGINS="${PLUGINS} gtk"
2223 if test "x${SYS}" != "xmingw32"; then
2226 ALIASES="${ALIASES} gvlc"
2228 CPPFLAGS="${CPPFLAGS_save}"
2233 dnl Familiar module uses Gtk+ library
2235 AC_ARG_ENABLE(familiar,
2236 [ --enable-familiar Familiar Gtk+ support (default disabled)])
2237 if test "x${enable_familiar}" = "xyes"
2240 AC_ARG_WITH(gtk-config-path,
2241 [ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
2242 [ if test "x${with_gtk_config_path}" != "xno"
2244 GTK_PATH="${with_gtk_config_path}:${PATH}"
2246 # look for gtk-config
2247 AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
2248 GTK_CONFIG=${GTK12_CONFIG}
2249 if test "x${GTK_CONFIG}" = "xno"
2251 AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
2253 # check for cross-compiling
2255 AC_ARG_WITH(gtk-prefix,
2256 [ --with-gtk-prefix=PATH path to libgtk (needed for cross-compiling),
2258 --with-gtk-prefix=/usr/local/arm/2.95.3/arm-linux/usr)],[],[])
2259 if test "x${with_gtk_prefix}" != "xno" -a "x${with_gtk_prefix}" != "x"
2261 GTK_PREFIX="--prefix=$with_gtk_prefix"
2263 if test "x${GTK_CONFIG}" != "xno"
2265 if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
2267 AC_MSG_ERROR([Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-familiar.])
2269 CFLAGS_familiar="${CFLAGS_familiar} `${GTK_CONFIG} ${GTK_PREFIX} --cflags gtk gthread`"
2270 LDFLAGS_familiar="${LDFLAGS_familiar} `${GTK_CONFIG} ${GTK_PREFIX} --libs gtk gthread | sed 's,-rdynamic,,'`"
2271 # now look for the gtk.h header
2272 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_familiar}"
2273 ac_cv_gtk_headers=yes
2274 AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
2275 ac_cv_gtk_headers=no
2276 echo "Cannot find gtk development headers."
2278 if test "x${ac_cv_gtk_headers}" = "xyes"
2280 PLUGINS="${PLUGINS} familiar"
2282 CPPFLAGS="${CPPFLAGS_save}"
2284 # now look for gpe support
2285 AC_ARG_WITH(gpe-prefix,
2286 [ --with-gpe-prefix=PATH gpe installation path prefix (default search in \$PATH)],[],[])
2287 if test "x$with_gpe_prefix" != "xno" -a "x$with_gpe_prefix" != "x"
2289 CFLAGS_gpe="-I$with_gpe_prefix/include"
2290 LDFLAGS_gpe="-lXi -lgdk_pixbuf -L$with_gpe_prefix/lib -lgpewidget"
2291 # now look for gpe/init.h header file
2293 LDFLAGS_save=$LDFLAGS
2294 CFLAGS="${CFLAGS_familiar} ${CFLAGS_gpe}"
2295 LDFLAGS="${LDFLAGS_familiar} ${LDFLAGS_gpe}"
2296 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_familiar} ${CFLAGS_gpe}"
2297 ac_cv_gpe_headers=yes
2298 AC_CHECK_HEADERS(gpe/init.h, ,
2299 [ ac_cv_gpe_headers=no
2300 AC_MSG_ERROR([Cannot find development headers for libgpewidget...]) ])
2302 LDFLAGS=$LDFLAG_save
2303 if test "x${ac_cv_gpe_headers}" = "xyes"
2305 CFLAGS_familiar="${CFLAGS_familiar} ${CFLAGS_gpe}"
2306 LDFLAGS_familiar="${LDFLAGS_familiar} ${LDFLAGS_gpe}"
2310 fi # end gpe support
2311 fi # end gtk+ support
2317 AC_ARG_ENABLE(gnome,
2318 [ --enable-gnome Gnome interface support (default disabled)],
2319 [if test "x${enable_gnome}" = "xyes"; then
2320 # look for gnome-config
2321 AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
2322 if test -x ${GNOME_CONFIG}
2324 CFLAGS_gnome="${CFLAGS_gnome} `${GNOME_CONFIG} --cflags gtk gnomeui`"
2325 LDFLAGS_gnome="${LDFLAGS_gnome} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
2327 # now look for the gnome.h header
2328 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gnome}"
2329 AC_CHECK_HEADERS(gnome.h, [
2330 PLUGINS="${PLUGINS} gnome"
2333 ALIASES="${ALIASES} gnome-vlc"
2334 dnl We need this because of some moronic gnomesupport.h flavours
2335 AC_MSG_CHECKING(for strndup in gnome.h)
2336 AC_EGREP_HEADER(strndup,gnome.h,[
2338 AC_DEFINE(STRNDUP_IN_GNOME_H, 1,
2339 Define if <gnome.h> defines strndup.)],[
2342 AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
2343 developement tools or remove the --enable-gnome option])
2345 CPPFLAGS="${CPPFLAGS_save}"
2349 dnl wxWindows module
2351 AC_ARG_ENABLE(wxwindows,
2352 [ --enable-wxwindows wxWindows support (default enabled)])
2353 if test "x${enable_wxwindows}" != "xno"
2355 WXWINDOWS_PATH="${PATH}"
2356 AC_ARG_WITH(wx-config-path,
2357 [ --with-wx-config-path=PATH wx-config path (default search in \$PATH)],
2358 [ if test "x${with_wx_config_path}" != "xno"
2360 WXWINDOWS_PATH="${with_wx_config_path}:${PATH}"
2362 # look for wx-config
2363 AC_PATH_PROG(WX_CONFIG, wx-config, no, ${WXWINDOWS_PATH})
2364 if test "x${WX_CONFIG}" != "xno"
2366 if expr 2.3.0 \> `${WX_CONFIG} --version` >/dev/null
2368 AC_MSG_ERROR([Your development package for wxWindows is too old, you need at least version 2.3.0. Please upgrade and try again. Alternatively you can also configure with --disable-wxwindows.])
2370 CXXFLAGS_wxwindows="${CXXFLAGS_wxwindows} `${WX_CONFIG} --cxxflags`"
2371 LDFLAGS_wxwindows="${LDFLAGS_wxwindows} `${WX_CONFIG} --libs`"
2372 # now look for the wxprec.h header
2373 CPPFLAGS="${CPPFLAGS_save} ${CXXFLAGS_wxwindows}"
2374 ac_cv_wx_headers=yes
2375 AC_CHECK_HEADERS(wx/wxprec.h, , [
2377 echo "Cannot find wxWindows development headers."
2379 if test "x${ac_cv_wx_headers}" = "xyes"
2381 PLUGINS="${PLUGINS} wxwindows"
2382 ALIASES="${ALIASES} wxvlc"
2384 CPPFLAGS="${CPPFLAGS_save}"
2392 [ --enable-qt Qt interface support (default disabled)],
2393 [if test "x${enable_qt}" = "xyes"; then
2394 PLUGINS="${PLUGINS} qt"
2395 ALIASES="${ALIASES} qvlc"
2396 LDFLAGS_qt="${LDFLAGS_qt} -lqt -L${QTDIR}/lib"
2397 CPPFLAGS_qt="${CPPFLAGS_qt} -I/usr/include/qt -I${QTDIR}/include"
2398 if test -x ${QTDIR}/bin/moc
2400 MOC=${QTDIR}/bin/moc
2410 [ --enable-kde KDE interface support (default disabled)],
2411 [if test "x${enable_kde}" = "xyes"; then
2412 PLUGINS="${PLUGINS} kde"
2413 ALIASES="${ALIASES} kvlc"
2414 LDFLAGS_kde="${LDFLAGS_kde} -L${KDEDIR}/lib"
2415 dnl Check for -lkfile (only in KDE 2) or -lkdeui -lkio (KDE 3)
2416 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
2417 AC_CHECK_LIB(kfile,main,[
2418 LDFLAGS_kde="${LDFLAGS_kde} -lkfile"
2420 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
2421 AC_CHECK_LIB(kdeui,main,[
2422 LDFLAGS_kde="${LDFLAGS_kde} -lkdeui"
2424 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
2425 AC_CHECK_LIB(kio,main,[
2426 LDFLAGS_kde="${LDFLAGS_kde} -lkio"
2428 LDFLAGS="${LDFLAGS_save}"
2429 CPPFLAGS_kde="${CPPFLAGS_kde} -I/usr/include/kde -I/usr/include/qt"
2430 CPPFLAGS_kde="${CPPFLAGS_kde} -I${KDEDIR}/include -I${QTDIR}/include"
2431 if test -x ${QTDIR}/bin/moc
2433 MOC=${QTDIR}/bin/moc
2440 dnl Opie QT embedded module
2443 [ --enable-opie Qt embedded interface support (default disabled)],
2444 [if test "x${enable_opie}" = "xyes"; then
2446 [ --with-qte=PATH Qt Embedded headers and libraries])
2447 if test "x${with_qte}" != "xno" -a "x${with_qte}" != "x"
2449 LDFLAGS_qte="-L${with_qte}/lib `echo -L${with_qte}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte"
2450 CPPFLAGS_qte="-I${with_qte}/include `echo -I${with_qte}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti"
2452 LDFLAGS_qte="-L${QTDIR}/lib `echo -L${QTDIR}/lib | sed 's,opt/QtPalmtop,usr,'`"
2453 CPPFLAGS_qte="-I${QTDIR}/include `echo -I${QTDIR}/include | sed 's,opt/QtPalmtop,usr,'`"
2455 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_qte}"
2456 AC_CHECK_HEADERS(qt.h jpeglib.h, ,[
2457 AC_MSG_ERROR([echo "Cannot find QT Embedded development headers."])
2459 CPPFLAGS="${CPPFLAGS_save}"
2461 PLUGINS="${PLUGINS} opie"
2463 LDFLAGS_opie="${LDFLAGS_opie} -lqpe ${LDFLAGS_qte}"
2464 CPPFLAGS_opie="${CPPFLAGS_opie} ${CPPFLAGS_qte}"
2465 if test "x${with_qte}" != "xno" -a "x${with_qte}" != "x"
2467 MOC=${with_qte}/bin/moc
2469 MOC=${QTDIR}/bin/moc
2476 AC_ARG_ENABLE(macosx,
2477 [ --enable-macosx MacOS X support (default enabled on MacOS X)],
2478 [if test "x${enable_macosx}" = "xyes"
2480 BUILTINS="${BUILTINS} macosx"
2481 LDFLAGS_macosx="${LDFLAGS_macosx} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
2483 [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
2484 BUILTINS="${BUILTINS} macosx"
2485 LDFLAGS_macosx="${LDFLAGS_macosx} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
2492 [ --enable-qnx QNX RTOS support (default enabled on QNX RTOS)])
2493 if test "x${enable_qnx}" != "xno"
2495 AC_CHECK_HEADERS(Ph.h, [
2496 PLUGINS="${PLUGINS} qnx"
2497 LDFLAGS_qnx="${LDFLAGS_qnx} -lasound -lph"
2502 dnl Windows native interface module, built with Borland C++ Builder
2504 AC_ARG_ENABLE(intfwin,
2505 [ --enable-intfwin Win32 interface support (default disabled)],
2506 [ if test "x${enable_intfwin}" != "xno"
2508 AC_CHECK_TOOL(BPR2MAK, bpr2mak, AC_ERROR(bpr2mak not found))
2509 AC_CHECK_TOOL(BCMAKE, bcmake, AC_ERROR(bcmake not found))
2510 PLUGINS="${PLUGINS} win32"
2516 AC_ARG_ENABLE(ncurses,
2517 [ --enable-ncurses ncurses interface support (default disabled)],
2518 [if test "x${enable_ncurses}" = "xyes"; then
2519 PLUGINS="${PLUGINS} ncurses"
2520 LDFLAGS_ncurses="${LDFLAGS_ncurses} -lncurses"
2527 [ --enable-xosd xosd interface support (default disabled)])
2528 if test "x${enable_xosd}" = "xyes"
2530 AC_CHECK_HEADER(xosd.h, have_xosd="true", have_xosd="false")
2531 AC_CHECK_LIB(xosd,xosd_set_offset,
2532 AC_DEFINE(HAVE_XOSD_VERSION_1, 1, Define if <xosd.h> is 1.0.x),
2533 AC_CHECK_LIB(xosd,xosd_set_horizontal_offset,
2534 AC_DEFINE(HAVE_XOSD_VERSION_2, 1, Define if <xosd.h> is 2.0.x),
2535 AC_TRY_COMPILE([#include <xosd.h>],
2536 [void foo() { xosd_init("foo","bar",12,XOSD_top,2,12,42); }],,
2537 AC_DEFINE(HAVE_XOSD_VERSION_0, 1, Define if <xosd.h> is pre-1.0.0))))
2538 if test "x${have_xosd}" = "xtrue"
2540 PLUGINS="${PLUGINS} xosd"
2541 LDFLAGS_xosd="${LDFLAGS_xosd} -lxosd"
2546 dnl SLP access plugin
2549 [ --enable-slp SLP service discovery support (default enabled)])
2550 if test "x${enable_slp}" != "xno"
2553 [ --with-slp=PATH libslp headers and libraries])
2554 if test "x${with_slp}" = x
2556 AC_CHECK_HEADER(slp.h, have_slp="true", have_slp="false")
2557 if test "x${have_slp}" = "xtrue"
2559 PLUGINS="${PLUGINS} slp"
2560 LDFLAGS_slp="${LDFLAGS_slp} -lslp"
2563 AC_MSG_CHECKING(for slp headers in ${with_slp})
2564 if test -f ${with_slp}/slp.h
2566 dnl Use ${with_slp}/libslp/slp.h
2568 PLUGINS="${PLUGINS} slp"
2569 LDFLAGS_slp="${LDFLAGS_slp} -L${with_slp} -lslp"
2570 CPPFLAGS_slp="${CPPFLAGS_slp} -I${with_slp}"
2572 dnl No libslp could be found, sorry
2574 AC_MSG_ERROR([cannot find ${with_slp}/slp.h])
2583 [ --enable-lirc lirc support (default disabled)])
2584 if test "x${enable_lirc}" = "xyes"
2586 AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
2587 if test "x${have_lirc}" = "xtrue"
2589 PLUGINS="${PLUGINS} lirc"
2590 LDFLAGS_lirc="${LDFLAGS_lirc} -llirc_client"
2594 AC_ARG_WITH(,[Misc options:])
2597 dnl Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
2599 dnl We give the user the opportunity to specify
2600 dnl --with-words=big or --with-words=little ; otherwise, try to guess
2603 [ --with-words=endianness set endianness (big or little)])
2604 case "x${with_words}" in
2606 ac_cv_c_bigendian=yes
2609 ac_cv_c_bigendian=no
2612 dnl Try to guess endianness by matching patterns on a compiled
2613 dnl binary, by looking for an ASCII or EBCDIC string
2614 AC_CACHE_CHECK([whether the byte order is big-endian],
2615 [ac_cv_c_bigendian],
2616 [ac_cv_c_bigendian="unknown"
2617 [cat >conftest.c <<EOF
2618 short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
2619 short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
2620 void _a(void) { char*s = (char*)am; s = (char *)ai; }
2621 short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
2622 short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
2623 void _e(void) { char*s = (char*)em; s = (char*)ei; }
2624 int main(void) { _a(); _e(); return 0; }
2627 if test -f conftest.c
2629 if ${CC-cc} -c conftest.c -o conftest.o >>config.log 2>&1 \
2630 && test -f conftest.o
2632 if test "`strings conftest.o | grep BIGenDianSyS`"
2634 ac_cv_c_bigendian="yes"
2636 if test "`strings conftest.o | grep LiTTleEnDian`"
2638 ac_cv_c_bigendian="no"
2643 if test "x${ac_cv_c_bigendian}" = "xunknown"
2645 AC_MSG_ERROR([Could not guess endianness, please use --with-words])
2649 dnl Now we know what to use for endianness, just put it in the header
2650 if test "${ac_cv_c_bigendian}" = "yes"
2652 AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system)
2658 AC_ARG_ENABLE(gprof,
2659 [ --enable-gprof gprof profiling (default disabled)])
2660 AC_ARG_ENABLE(cprof,
2661 [ --enable-cprof cprof profiling (default disabled)])
2662 AM_CONDITIONAL(GPROF, test "x${enable_gprof}" = "xyes")
2663 AM_CONDITIONAL(CPROF, test "x${enable_gprof}" = "xyes")
2666 dnl GNU portable threads
2669 [ --enable-pth GNU Pth support (default disabled)],
2670 [ if test "x${enable_pth}" = "xyes"; then
2671 AC_CHECK_LIB(pth,pth_init)
2672 AC_MSG_CHECKING(for pth_init in pth.h)
2673 AC_EGREP_HEADER(pth_init,pth.h,[
2675 AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
2676 Define if <pth.h> defines pth_init)
2688 [ --enable-st State Threads (default disabled)],
2689 [ if test "x${enable_st}" = "xyes"; then
2690 AC_CHECK_LIB(st,st_init)
2691 AC_MSG_CHECKING(for st_init in st.h)
2692 AC_EGREP_HEADER(st_init,st.h,[
2694 AC_DEFINE(ST_INIT_IN_ST_H, 1,
2695 Define if <st.h> defines st_init)
2703 if test "x${SYS}" != "xmingw32"; then
2704 LDFLAGS_vlc="${LDFLAGS_vlc} ${THREAD_LIB}"
2705 LDFLAGS_plugins="${LDFLAGS_plugins} ${THREAD_LIB}"
2712 AC_ARG_ENABLE(mozilla,
2713 [ --enable-mozilla build a vlc-based Mozilla plugin (default disabled)])
2714 if test "x${enable_mozilla}" = "xyes"
2716 AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
2717 if test "x${MOZILLA_CONFIG}" != "xno"
2719 if test "x${SYS}" != "xmingw32"; then
2720 LDFLAGS="${LDFLAGS_save} -L${x_libraries}"
2721 AC_CHECK_LIB(Xt,XtStrings,[
2722 LDFLAGS_mozilla="${LDFLAGS_mozilla} -L${x_libraries} -lXt"
2724 LDFLAGS="${LDFLAGS_save}"
2727 dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490
2728 [CPPFLAGS_mozilla="${CPPFLAGS_mozilla} `${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`"]
2729 #[CPPFLAGS_mozilla="${CPPFLAGS_mozilla} `${MOZILLA_CONFIG} --cflags plugin xpcom java --defines | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`"]
2730 LDFLAGS_mozilla="${LDFLAGS_mozilla} `${MOZILLA_CONFIG} --libs plugin xpcom`"
2731 dnl Not necessarily in ${PATH}
2732 if test "x${XPIDL}" = "x" -o ! -x "${XPIDL}"
2734 XPIDL="/usr/lib/mozilla/xpidl"
2738 AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
2743 AC_ARG_ENABLE(testsuite,
2744 [ --enable-testsuite build test modules (default disabled)])
2745 if test "x${enable_testsuite}" = "xyes"
2747 TESTS="test1 test2 test3 test4"
2749 dnl we define those so that bootstrap sets the right linker
2750 CXXFLAGS_test2="${CXXFLAGS_test2}"
2751 OBJCFLAGS_test3="${OBJCFLAGS_test3}"
2752 dnl this one is needed until automake knows what to do
2753 LDFLAGS_test3="${LDFLAGS_test3} -lobjc"
2755 PLUGINS="${PLUGINS} ${TESTS}"
2756 #BUILTINS="${BUILTINS} ${TESTS}"
2762 if test "x${NEED_GTK_MAIN}" != "xno"
2764 PLUGINS="${PLUGINS} gtk_main"
2765 CFLAGS_gtk="${CFLAGS_gtk} -DNEED_GTK_MAIN"
2766 CFLAGS_familiar="${CFLAGS_familiar} -DNEED_GTK_MAIN"
2767 CFLAGS_gtk_main="${CFLAGS_gtk_main} ${CFLAGS_gtk} ${CFLAGS_familiar}"
2768 LDFLAGS_gtk_main="${LDFLAGS_gtk_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar}"
2771 if test "x${NEED_GNOME_MAIN}" != "xno"
2773 PLUGINS="${PLUGINS} gnome_main"
2774 CFLAGS_gnome_main="${CFLAGS_gnome_main} ${CFLAGS_gtk} ${CFLAGS_familiar} ${CFLAGS_gnome}"
2775 LDFLAGS_gnome_main="${LDFLAGS_gnome_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar} ${LDFLAGS_gnome}"
2781 if test "x${NEED_QTE_MAIN}" != "xno"
2783 PLUGINS="${PLUGINS} qte_main"
2784 CPPFLAGS_qte="${CPPFLAGS_qte} -DNEED_QTE_MAIN"
2785 CPPFLAGS_opie="${CPPFLAGS_opie} -DNEED_QTE_MAIN"
2786 CPPFLAGS_qte_main="${CFLAGS_qte_main} ${CPPFLAGS_qte}"
2787 LDFLAGS_qte_main="${LDFLAGS_qte_main} ${LDFLAGS_qte}"
2792 dnl Plugin and builtin checks
2794 builtin_support=false
2797 dnl Support for plugins - this must be AT THE END
2798 AC_ARG_ENABLE(plugins,
2799 [ --disable-plugins make all plugins built-in (default plugins enabled)],
2800 [if test "x${enable_plugins}" = "xno"
2802 plugin_support=false
2805 dnl Automagically disable plugins if there is no system support for
2806 dnl dynamically loadable files (.so, .dll, .dylib).
2807 dnl don't forget vlc-win32 still can load .dll as plugins
2808 if test "x${ac_cv_header_dlfcn_h}" = "xno" -a "x${ac_cv_header_image_h}" = "xno" -a "x${SYS}" != "xmingw32"
2810 echo "*** Your system doesn't have plugin support. All plugins will be built"
2812 plugin_support=false
2815 dnl Export automake variables
2816 if ${plugin_support}
2818 for plugin in `echo ${PLUGINS}`
2820 eval "${plugin}_plugin=yes"
2823 BUILTINS="${BUILTINS} ${PLUGINS}"
2826 AM_CONDITIONAL(HAVE_PLUGINS, ${plugin_support})
2828 [if echo "${BUILTINS}" | grep '[^ ]' >/dev/null 2>&1
2831 for builtin in `echo ${BUILTINS}`
2833 eval "${builtin}_builtin=yes"
2836 AM_CONDITIONAL(HAVE_BUILTINS, ${builtin_support})
2838 dnl do not touch this line (bootstrap needs it)
2842 dnl Stuff used by the program
2844 AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION} ${CODENAME}", [Simple version string])
2845 AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VLC media player - version ${VERSION} ${CODENAME} - (c) 1996-2003 VideoLAN", [Copyright string])
2846 AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
2848 VLC_SYMBOL="`echo ${VERSION} | sed -e 'y/.-/__/'`"
2849 AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module functions])
2850 AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
2851 AC_DEFINE_UNQUOTED(LIBEXT, "${LIBEXT}", [Dynamic object extension])
2853 DATA_PATH="${ac_tool_prefix}/share/videolan"
2855 PLUGIN_PATH="${ac_tool_prefix}/share/videolan"
2856 AC_SUBST(PLUGIN_PATH)
2861 CPPFLAGS="${CPPFLAGS_save}"
2862 CFLAGS="${CFLAGS_save}"
2863 CXXFLAGS="${CXXFLAGS_save}"
2864 OBJCFLAGS="${OBJCFLAGS_save}"
2865 LDFLAGS="${LDFLAGS_save}"
2868 dnl Fool automake (see Makefile.am)
2870 AUTOMAKE_SUCKS="\$(L_builtin) \$(LDFLAGS_builtin)"
2871 AC_SUBST(AUTOMAKE_SUCKS)
2874 dnl Create the vlc-config script
2876 LDFLAGS_libvlc="${LDFLAGS_vlc} ${LDFLAGS_builtins}"
2877 for i in `echo "${BUILTINS}" | sed -e 's@[^ ]*/@@g'` ; do LDFLAGS_libvlc="${LDFLAGS_libvlc} ${libdir}/vlc/${i}.a `eval echo '$'{LDFLAGS_${i}}`" ; done
2880 dnl Configuration is finished
2894 AC_SUBST(CFLAGS_TUNING)
2895 AC_SUBST(CFLAGS_OPTIM)
2896 AC_SUBST(CFLAGS_OPTIM_NODEBUG)
2897 AC_SUBST(CFLAGS_NOOPTIM)
2900 AC_SUBST(CFLAGS_vlc)
2901 AC_SUBST(CFLAGS_pics)
2902 AC_SUBST(CXXFLAGS_pics)
2903 AC_SUBST(CFLAGS_plugins)
2904 AC_SUBST(CXXFLAGS_plugins)
2905 AC_SUBST(CFLAGS_builtins)
2906 AC_SUBST(CPPFLAGS_mozilla)
2908 AC_SUBST(LDFLAGS_vlc)
2909 AC_SUBST(LDFLAGS_libvlc)
2910 AC_SUBST(LDFLAGS_plugins)
2911 AC_SUBST(LDFLAGS_builtins)
2912 AC_SUBST(LDFLAGS_mozilla)
2928 chmod a+x vlc-config
2933 --------------------
2934 vlc version : ${VERSION}
2936 architecture : ${ARCH}
2938 test "x${DEBUG_TRUE}" = "x" && printf "debug "
2939 test "x${CPROF_TRUE}" = "x" && printf "cprof "
2940 test "x${GPROF_TRUE}" = "x" && printf "gprof "
2941 test "x${OPTIM_TRUE}" = "x" && printf "optim "
2942 test "x${RELEASE_TRUE}" = "x" && printf "release " || printf "devel "
2944 vlc aliases :${ALIASES}
2946 To build vlc and its plugins, type \`make'.