1 dnl Autoconf settings for vlc
9 AC_CONFIG_SRCDIR(src/libvlc.c)
10 AC_CONFIG_AUX_DIR(autotools)
13 dnl XXX: we don't put any flags here, because automake 1.5 doesn't support
14 dnl them. And we need the comma otherwize automake will choke on it.
15 AM_INIT_AUTOMAKE(vlc,0.5.4-cvs)
16 AM_CONFIG_HEADER(config.h)
21 CPPFLAGS_save="${CPPFLAGS}"
22 CFLAGS_save="${CFLAGS}"
23 CXXFLAGS_save="${CXXFLAGS}"
24 OBJCFLAGS_save="${OBJCFLAGS}"
25 LDFLAGS_save="${LDFLAGS}"
37 dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right
38 dnl now otherwise it might be set in an obscure if statement.
41 dnl AC_PROG_OBJC doesn't seem to exist, this is the KDE workaround
42 AC_MSG_CHECKING(for an Objective-C compiler)
45 OBJCFLAGS="${CXXFLAGS} -fgnu-runtime -fconstant-string-class=NSConstantString"
47 dnl _AM_DEPENDENCIES(OBJC) doesn't work, so hard code OBJCDEPMODE here
48 #OBJCDEPMODE="depmode=gcc3"
49 #AC_SUBST(OBJCDEPMODE)
50 _AM_DEPENDENCIES(OBJC)
51 AC_MSG_RESULT(not implemented yet)
53 dnl Find the right ranlib, even when cross-compiling
54 AC_CHECK_TOOL(RANLIB, ranlib, :)
55 AC_CHECK_TOOL(STRIP, strip, :)
56 AC_CHECK_TOOL(AR, ar, :)
57 AC_CHECK_TOOL(LD, ld, :)
62 dnl Check for compiler properties
67 dnl Set default values
69 LDFLAGS_vlc="${LDFLAGS}"
73 dnl Check the operating system
75 case "x${target_os}" in
84 CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
85 LDFLAGS_dvd="${LDFLAGS_dvd} -ldvd"
86 LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -ldvd"
87 LDFLAGS_vcd="${LDFLAGS_vcd} -ldvd"
91 CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
95 CFLAGS_save="${CFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; CFLAGS="${CFLAGS_save}"
96 CXXFLAGS_save="${CXXFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; CXXFLAGS="${CXXFLAGS_save}"
97 OBJCFLAGS_save="${OBJCFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; OBJCFLAGS="${OBJCFLAGS_save}"
98 LDFLAGS_vlc="${LDFLAGS_vlc} -all_load"
99 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -all_load"
102 x*mingw32* | x*cygwin*)
103 AC_CHECK_TOOL(WINDRES, windres, :)
106 case "x${target_os}" in
111 dnl Check if we are using the mno-cygwin mode in which case we are
112 dnl actually dealing with a mingw32 compiler.
117 SYS=mingw32, SYS=cygwin)
121 if test "x$SYS" = "xmingw32"; then
122 # add ws2_32 for closesocket, select, recv
123 CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"
124 CPPFLAGS="${CPPFLAGS_save}"
125 LDFLAGS_vlc="${LDFLAGS_vlc} -lws2_32 -lnetapi32 -lwinmm -mwindows"
126 LDFLAGS_ipv4="${LDFLAGS_ipv4} -lws2_32"
127 LDFLAGS_ipv6="${LDFLAGS_ipv6} -lws2_32"
128 LDFLAGS_access_http="${LDFLAGS_access_http} -lws2_32"
129 LDFLAGS_access_mms="${LDFLAGS_access_mms} -lws2_32"
130 LDFLAGS_access_udp="${LDFLAGS_access_udp} -lws2_32"
131 LDFLAGS_access_ftp="${LDFLAGS_access_ftp} -lws2_32"
132 LDFLAGS_access_output_udp="${LDFLAGS_access_output_udp} -lws2_32"
133 LDFLAGS_sap="${LDFLAGS_sap} -lws2_32"
134 LDFLAGS_slp="${LDFLAGS_slp} -lws2_32"
135 LDFLAGS_httpd="${LDFLAGS_httpd} -lws2_32"
140 LDFLAGS_x11="${LDFLAGS_x11} -lsocket"
141 LDFLAGS_xvideo="${LDFLAGS_xvideo} -lsocket"
152 CFLAGS_save="${CFLAGS_save} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CFLAGS="${CFLAGS_save}"
153 CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CXXFLAGS="${CXXFLAGS_save}"
154 LDFLAGS_vlc="${LDFLAGS_vlc} -lbe"
155 LDFLAGS_plugins="${LDFLAGS_plugins} -nostart"
156 LDFLAGS_beos="${LDFLAGS_beos} -lbe -lmedia -lroot -ltracker -lstdc++.r4 -ltranslation -lgame"
157 dnl BONE or not BONE ? only BONE has libbind.so
158 AC_CHECK_LIB( bind, inet_ntoa,
159 [ LDFLAGS_access_mms="${LDFLAGS_access_mms} -lsocket -lbind"
160 LDFLAGS_ipv4="${LDFLAGS_ipv4} -lsocket -lbind"
161 LDFLAGS_httpd="${LDFLAGS_httpd} -lsocket -lbind"],
168 AM_CONDITIONAL(HAVE_BEOS, test "x${SYS}" = "xbeos")
169 AM_CONDITIONAL(HAVE_DARWIN, test "x${SYS}" = "xdarwin")
170 AM_CONDITIONAL(HAVE_WIN32, test "x${SYS}" = "xmingw32")
175 ALL_LINGUAS="de en_GB fr it ja no ru nl pl sv"
176 AM_GNU_GETTEXT_VERSION(0.11.5)
178 if test "${nls_cv_force_use_gnu_gettext}" = "yes"; then
179 AC_DEFINE(HAVE_INCLUDED_GETTEXT, 1, Define if we use the local libintl)
180 INCLUDES="${INCLUDES} -I\\\$(top_srcdir)/intl"
182 AC_CHECK_FUNCS(textdomain,,[
183 AC_CHECK_LIB(intl,textdomain,
184 LDFLAGS_vlc="${LDFLAGS_vlc} -lintl"
185 LDFLAGS_plugins="${LDFLAGS_plugins} -lintl"
189 AM_CONDITIONAL(BUILD_INTL, test "${nls_cv_force_use_gnu_gettext}" = "yes")
190 XGETTEXT="${XGETTEXT} --keyword=_NS --keyword=_ANS"
192 AC_MSG_CHECKING(for suffix of libraries)
193 AC_MSG_RESULT(${LIBEXT})
195 dnl Check for the need to include the mingwex lib for mingw32
196 if test x$SYS = xmingw32
198 AC_CHECK_LIB(mingwex,opendir,
199 AC_CHECK_LIB(mingw32,opendir,LDFLAGS_vlc="${LDFLAGS_vlc}",
200 [LDFLAGS_vlc="${LDFLAGS_vlc} -lmingwex"
201 LDFLAGS_gtk="${LDFLAGS_gtk} -lmingwex"])
205 dnl Check for fnative-struct or mms-bitfields support for mingw32
206 if test x$SYS = xmingw32
208 AC_CACHE_CHECK([if \$CC accepts -mms-bitfields],
209 [ac_cv_c_mms_bitfields],
210 [CFLAGS="${CFLAGS_save} -mms-bitfields"
211 AC_TRY_COMPILE([],,ac_cv_c_mms_bitfields=yes, ac_cv_c_mms_bitfields=no)])
212 if test x"$ac_cv_c_mms_bitfields" != x"no"; then
213 CFLAGS_save="${CFLAGS_save} -mms-bitfields";
214 CXXFLAGS_save="${CXXFLAGS_save} -mms-bitfields";
216 AC_CACHE_CHECK([if \$CC accepts -fnative-struct],
217 [ac_cv_c_fnative_struct],
218 [CFLAGS="${CFLAGS_save} -fnative-struct"
219 AC_TRY_COMPILE([],,ac_cv_c_fnative_struct=yes, ac_cv_c_fnative_struct=no)])
220 if test x"$ac_cv_c_fnative_struct" != x"no"; then
221 CFLAGS_save="${CFLAGS_save} -fnative-struct";
222 CXXFLAGS_save="${CXXFLAGS_save} -fnative-struct";
226 CFLAGS="${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
229 dnl Check for fvtable-thunks support for mingw32
230 if test x$SYS = xmingw32
233 AC_CACHE_CHECK([if \$CXX accepts -fvtable-thunks],
234 [ac_cv_cxx_fvtable_thunks],
235 [CXXFLAGS="${CXXFLAGS_save} -Wall -Werror -fvtable-thunks"
236 AC_TRY_COMPILE([],,ac_cv_cxx_fvtable_thunks=yes,
237 ac_cv_cxx_fvtable_thunks=no)])
238 if test x"$ac_cv_cxx_fvtable_thunks" = x"yes"; then
239 CXXFLAGS_mingw32_special="-fvtable-thunks"
242 CXXFLAGS_save="${CXXFLAGS_save} ${CXXFLAGS_mingw32_special}"
243 CXXFLAGS="${CXXFLAGS_save}"
247 dnl Flags for plugin compilation
250 CFLAGS_pics="${CFLAGS_pics} ${CFLAGS_mingw32_special}"
251 CXXFLAGS_pics="${CXXFLAGS_pics} ${CFLAGS_mingw32_special} ${CXXFLAGS_mingw32_special}"
252 OBJCFLAGS_pics="${OBJCFLAGS_pics} ${CFLAGS_mingw32_special}"
253 CFLAGS_plugins="${CFLAGS_plugins} ${CFLAGS_mingw32_special}"
254 CXXFLAGS_plugins="${CXXFLAGS_plugins} ${CFLAGS_mingw32_special} ${CXXFLAGS_mingw32_special}"
255 OBJCFLAGS_plugins="${OBJCFLAGS_plugins} ${CFLAGS_mingw32_special}"
258 CFLAGS_pics="${CFLAGS_pics} -fPIC"
259 CXXFLAGS_pics="${CXXFLAGS_pics} -fPIC"
260 OBJCFLAGS_pics="${OBJCFLAGS_pics} -fPIC"
261 CFLAGS_plugins="${CFLAGS_plugins} -fPIC"
262 CXXFLAGS_plugins="${CXXFLAGS_plugins} -fPIC"
263 OBJCFLAGS_plugins="${OBJCFLAGS_plugins} -fPIC"
264 LDFLAGS_plugins="${LDFLAGS_plugins} -fPIC"
268 dnl The -DSYS_FOO flag
269 CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"; CPPFLAGS="${CPPFLAGS_save}"
271 dnl Check for system libs needed
274 AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll getenv putenv setenv)
276 dnl Check for usual libc functions
277 AC_CHECK_FUNCS(strdup strndup atof lseek)
278 AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)])
279 AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)])
281 AC_CHECK_FUNCS(connect,,[
282 AC_CHECK_LIB(socket,connect,
283 LDFLAGS_ipv4="${LDFLAGS_ipv4} -lsocket"
284 LDFLAGS_vlc="${LDFLAGS_vlc} -lsocket"
287 AC_CHECK_FUNCS(send,,[
288 AC_CHECK_LIB(socket,send,
289 LDFLAGS_access_http="${LDFLAGS_access_http} -lsocket"
290 LDFLAGS_access_mms="${LDFLAGS_access_mms} -lsocket"
291 LDFLAGS_access_udp="${LDFLAGS_access_udp} -lsocket"
292 LDFLAGS_access_ftp="${LDFLAGS_access_ftp} -lsocket"
293 LDFLAGS_sap="${LDFLAGS_sap} -lsocket"
294 LDFLAGS_access_output_udp="${LDFLAGS_access_output_udp} -lsocket"
297 AC_CHECK_FUNCS(gethostbyname,,[
298 AC_CHECK_LIB(nsl,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lnsl" LDFLAGS_httpd="${LDFLAGS_httpd} -lnsl",[
299 AC_CHECK_LIB(bind,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind" LDFLAGS_httpd="${LDFLAGS_httpd} -lbind")])
302 dnl Check for socklen_t
303 AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
305 [#include <sys/types.h>
306 #include <sys/socket.h>],
307 [socklen_t len = 42; return len;],
308 ac_cv_type_socklen_t=yes,
309 ac_cv_type_socklen_t=no)])
310 if test x$ac_cv_type_socklen_t != xno; then
311 AC_DEFINE(HAVE_SOCKLEN_T, 1,
312 Define if <sys/socket.h> defines socklen_t.)
315 AC_CHECK_FUNCS(inet_aton,,[
316 AC_CHECK_LIB(resolv,inet_aton,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lresolv" LDFLAGS_httpd="${LDFLAGS_httpd} -lresolv")
321 AC_CHECK_FUNCS(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
322 [ # FreeBSD has a gnugetopt library for this:
323 AC_CHECK_LIB([gnugetopt],[getopt_long],
324 [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) LDFLAGS_vlc="${LDFLAGS_vlc} -lgnugetopt"],
326 AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt})
329 AC_CHECK_LIB(dl,dlopen,LDFLAGS_vlc="${LDFLAGS_vlc} -ldl")
331 LDFLAGS_imdct="${LDFLAGS_imdct} -lm"
332 LDFLAGS_adjust="${LDFLAGS_adjust} -lm"
333 LDFLAGS_distort="${LDFLAGS_distort} -lm"
334 LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} -lm")
336 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lm"
337 LDFLAGS_stream_out_transcode="${LDFLAGS_stream_out_transcode} -lm"
338 LDFLAGS_imdct="${LDFLAGS_imdct} -lm"
339 LDFLAGS_imdct3dn="${LDFLAGS_imdct3dn} -lm"
340 LDFLAGS_imdctsse="${LDFLAGS_imdctsse} -lm"
341 LDFLAGS_i420_rgb="${LDFLAGS_i420_rgb} -lm"
342 LDFLAGS_faad="${LDFLAGS_faad} -lm"
345 LDFLAGS_headphone_channel_mixer="${LDFLAGS_headphone_channel_mixer} -lm"
348 dnl Check for pthreads - borrowed from XMMS
350 if test "x${THREAD_LIB}" = "xerror"; then
351 AC_CHECK_LIB(pthread,main,THREAD_LIB="-lpthread")
353 if test "x${THREAD_LIB}" = "xerror"; then
354 AC_CHECK_LIB(pthreads,main,THREAD_LIB="-lpthreads")
356 if test "x${THREAD_LIB}" = "xerror"; then
357 AC_CHECK_LIB(c_r,main,THREAD_LIB="-lc_r")
359 if test "x${THREAD_LIB}" = "xerror"; then
360 AC_CHECK_FUNCS(pthread_mutex_lock)
364 dnl Check for cthreads under GNU/Hurd for instance
365 AC_CHECK_LIB(threads,cthread_fork,THREAD_LIB="-lthreads")
368 dnl GNU portable threads
371 [ --enable-pth GNU Pth support (default disabled)],
372 [ if test "x${enable_pth}" = "xyes"; then
373 AC_CHECK_LIB(pth,pth_init)
374 AC_MSG_CHECKING(for pth_init in pth.h)
375 AC_EGREP_HEADER(pth_init,pth.h,[
377 AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
378 Define if <pth.h> defines pth_init)
390 [ --enable-st State Threads (default disabled)],
391 [ if test "x${enable_st}" = "xyes"; then
392 AC_CHECK_LIB(st,st_init)
393 AC_MSG_CHECKING(for st_init in st.h)
394 AC_EGREP_HEADER(st_init,st.h,[
396 AC_DEFINE(ST_INIT_IN_ST_H, 1,
397 Define if <st.h> defines st_init)
405 if test "x${SYS}" != "xmingw32"; then
406 LDFLAGS_vlc="${LDFLAGS_vlc} ${THREAD_LIB}"
407 LDFLAGS_plugins="${LDFLAGS_plugins} ${THREAD_LIB}"
410 dnl Don't link with rt when using GNU-pth
411 if test "x${THREAD_LIB}" != "x-lpth" && test "x${THREAD_LIB}" != "x-lst"; then
413 AC_CHECK_LIB(rt,sem_init, [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"])
416 AC_CHECK_FUNCS(nanosleep,have_nanosleep=:,[
417 AC_CHECK_LIB(rt,nanosleep,
418 [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"; have_nanosleep=:],
419 [AC_CHECK_LIB(posix4,nanosleep,
420 [LDFLAGS_vlc="${LDFLAGS_vlc} -lposix4"; have_nanosleep=:])]
423 if ${have_nanosleep}; then
424 AC_DEFINE(HAVE_NANOSLEEP, 1,
425 Define if nanosleep is available.)
429 dnl Check for misc headers
430 AC_MSG_CHECKING(for pthread_cond_t in pthread.h)
431 AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
433 AC_DEFINE(PTHREAD_COND_T_IN_PTHREAD_H, 1,
434 Define if <pthread.h> defines pthread_cond_t.)],[
437 AC_MSG_CHECKING(for pthread_once in pthread.h)
438 AC_EGREP_HEADER(pthread_once,pthread.h,[
440 AC_DEFINE(PTHREAD_ONCE_IN_PTHREAD_H, 1,
441 Define if <pthread.h> defines pthread_once.)],[
444 AC_MSG_CHECKING(for strncasecmp in strings.h)
445 AC_EGREP_HEADER(strncasecmp,strings.h,[
447 AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
448 Define if <strings.h> defines strncasecmp.)],[
451 dnl Check for headers
452 AC_CHECK_HEADERS(signal.h time.h errno.h stdint.h getopt.h strings.h inttypes.h sys/int_types.h)
453 AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h)
454 AC_CHECK_HEADERS(dlfcn.h image.h)
455 AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
456 AC_CHECK_HEADERS(machine/param.h sys/shm.h)
457 AC_CHECK_HEADERS(linux/version.h)
463 AC_CHECK_HEADERS(dirent.h,,[need_dirent=:])
464 AM_CONDITIONAL(BUILD_DIRENT, ${need_dirent})
466 dnl Mac OS X and other OSes don't have declaration for nanosleep
467 AC_MSG_CHECKING(for nanosleep in time.h)
468 AC_EGREP_HEADER(nanosleep,time.h,[
470 AC_DEFINE(HAVE_DECL_NANOSLEEP, 1,
471 Define if <time.h> defines nanosleep.)
476 dnl Make sure we have timespecs
477 AC_MSG_CHECKING(for timespec in sys/time.h)
478 AC_EGREP_HEADER(timespec,sys/time.h,[
480 AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
481 Define if <sys/time.h> defines struct timespec.)
486 dnl Check for threads library
487 AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
489 dnl Default X headers and libraries
490 if test "x${x_includes}" = "xNONE"; then
491 x_includes="/usr/X11R6/include"
493 if test "x${x_libraries}" = "xNONE"; then
494 x_libraries="/usr/X11R6/lib"
497 dnl Build the gtk_main plugins?
503 dnl build the qte plugin ?
507 if test "x${SYS}" != "xmingw32"
509 CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
510 AC_CHECK_HEADERS(X11/extensions/dpms.h, [
511 AC_MSG_CHECKING(for DPMSInfo in X11/extensions/dpms.h)
512 AC_EGREP_HEADER(DPMSInfo,X11/extensions/dpms.h,[
514 AC_DEFINE(DPMSINFO_IN_DPMS_H, 1,
515 Define if <X11/extensions/dpms.h> defines DPMSInfo.)
520 #include <X11/Xlib.h>
522 CPPFLAGS="${CPPFLAGS_save}"
525 dnl Check for ntohl, etc.
526 AC_CACHE_CHECK([for ntohl in sys/param.h],
527 [ac_cv_c_ntohl_sys_param_h],
528 [CFLAGS="${CFLAGS_save} -Wall -Werror"
529 AC_TRY_COMPILE([#include <sys/param.h>],
530 [void foo() { int meuh; ntohl(meuh); }],
531 ac_cv_c_ntohl_sys_param_h=yes, ac_cv_c_ntohl_sys_param_h=no)])
532 if test "x${ac_cv_c_ntohl_sys_param_h}" != "xno"; then
533 AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
536 dnl Check for inline function size limit
537 AC_CACHE_CHECK([if \$CC accepts -finline-limit],
538 [ac_cv_c_inline_limit],
539 [CFLAGS="${CFLAGS_save} -finline-limit-30000"
540 AC_TRY_COMPILE([],,ac_cv_c_inline_limit=yes, ac_cv_c_inline_limit=no)])
541 if test "x${ac_cv_c_inline_limit}" != "xno"; then
542 CFLAGS_save="${CFLAGS_save} -finline-limit-30000"; CFLAGS="${CFLAGS_save}"
543 CXXFLAGS_save="${CXXFLAGS_save} -finline-limit-30000"; CXXFLAGS="${CXXFLAGS_save}"
544 OBJCFLAGS_save="${OBJCFLAGS_save} -finline-limit-30000"; OBJCFLAGS="${OBJCFLAGS_save}"
547 # XXX: do this with an M4 macro?
548 #dnl Check for various -W flags
549 #for flag in "" all unreachable-code conversion sign-compare disabled-optimization
551 # AC_CACHE_CHECK([if \$CC accepts -W${flag}],
552 # [ac_cv_c_W${flag}],
553 # [CFLAGS="-W${flag} ${CFLAGS_save}"
554 # AC_TRY_COMPILE([],,ac_cv_c_W${flag}=yes, ac_cv_c_W${flag}=no)])
555 # if test "x${ac_cv_c_W${flag}}" != "xno"; then
556 # CFLAGS_save="-W${flag} ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
557 # CXXFLAGS_save="-W${flag} ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
558 # OBJCFLAGS_save="-W${flag} ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
562 AC_CACHE_CHECK([if \$CC accepts -Wall],
564 [CFLAGS="-Wall ${CFLAGS_save}"
565 AC_TRY_COMPILE([],,ac_cv_c_Wall=yes, ac_cv_c_Wall=no)])
567 AC_CACHE_CHECK([if \$CC accepts -Wconversion],
568 [ac_cv_c_Wconversion],
569 [CFLAGS="-Wconversion ${CFLAGS_save}"
570 AC_TRY_COMPILE([],,ac_cv_c_Wconversion=yes, ac_cv_c_Wconversion=no)])
572 AC_CACHE_CHECK([if \$CC accepts -Wunreachable-code],
573 [ac_cv_c_Wunreachable_code],
574 [CFLAGS="-Wunreachable-code ${CFLAGS_save}"
575 AC_TRY_COMPILE([],,ac_cv_c_Wunreachable_code=yes, ac_cv_c_Wunreachable_code=no)])
577 AC_CACHE_CHECK([if \$CC accepts -Wsign-compare],
578 [ac_cv_c_Wsign_compare],
579 [CFLAGS="-Wsign-compare ${CFLAGS_save}"
580 AC_TRY_COMPILE([],,ac_cv_c_Wsign_compare=yes, ac_cv_c_Wsign_compare=no)])
582 AC_CACHE_CHECK([if \$CC accepts -Wdisabled-optimization],
583 [ac_cv_c_Wdisabled_optimization],
584 [CFLAGS="-Wdisabled-optimization ${CFLAGS_save}"
585 AC_TRY_COMPILE([],,ac_cv_c_Wdisabled_optimization=yes, ac_cv_c_Wdisabled_optimization=no)])
587 AC_CACHE_CHECK([if \$CC accepts -Winline],
589 [CFLAGS="-Winline ${CFLAGS_save}"
590 AC_TRY_COMPILE([],,ac_cv_c_Winline=yes, ac_cv_c_Winline=no)])
592 if test "x${ac_cv_c_Wall}" != "xno"; then
593 CFLAGS_save="-Wall ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
594 CXXFLAGS_save="-Wall ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
595 OBJCFLAGS_save="-Wall ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
598 if test "x${ac_cv_c_Wunreachable_code}" != "xno"; then
599 # CFLAGS_save="-Wunreachable-code ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
600 # CXXFLAGS_save="-Wunreachable-code ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
601 # OBJCFLAGS_save="-Wunreachable-code ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
603 dnl -Wunreachable-code means gcc-3.x, we can use -Wconversion and we can
604 dnl activate -Winline for C++, it won't choke on system headers.
605 # if test "x${ac_cv_c_Wconversion}" != "xno"; then
606 # CFLAGS_save="-Wconversion ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
607 # CXXFLAGS_save="-Wconversion ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
608 # OBJCFLAGS_save="-Wconversion ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
610 if test "x${ac_cv_c_Winline}" != "xno"; then
611 CXXFLAGS_save="-Winline ${CXXFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
616 if test "x${ac_cv_c_Wsign_compare}" != "xno"; then
617 CFLAGS_save="-Wsign-compare ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
618 CXXFLAGS_save="-Wsign-compare ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
619 OBJCFLAGS_save="-Wsign-compare ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
622 if test "x${ac_cv_c_Wdisabled_optimization}" != "xno"; then
623 CFLAGS_save="-Wdisabled-optimization ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
624 CXXFLAGS_save="-Wdisabled-optimization ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
625 OBJCFLAGS_save="-Wdisabled-optimization ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
628 if test "x${ac_cv_c_Winline}" != "xno"; then
629 CFLAGS_save="-Winline ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
630 OBJCFLAGS_save="-Winline ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
634 AC_CACHE_CHECK([if \$CC accepts -pipe],
636 [CFLAGS="${CFLAGS_save} -pipe"
637 AC_TRY_COMPILE([],,ac_cv_c_pipe=yes, ac_cv_c_pipe=no)])
638 if test "x${ac_cv_c_pipe}" != "xno"; then
639 CFLAGS_save="${CFLAGS_save} -pipe"; CFLAGS="${CFLAGS_save}"
640 CXXFLAGS_save="${CXXFLAGS_save} -pipe"; CXXFLAGS="${CXXFLAGS_save}"
641 OBJCFLAGS_save="${OBJCFLAGS_save} -pipe"; OBJCFLAGS="${OBJCFLAGS_save}"
644 dnl Check for various optimization flags
645 AC_CACHE_CHECK([if \$CC accepts -O3],
647 [CFLAGS="${CFLAGS_save} -O3"
648 AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)])
649 if test "x${ac_cv_c_o3}" != "xno"; then
650 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
653 AC_CACHE_CHECK([if \$CC accepts -O2],
655 [CFLAGS="${CFLAGS_save} -O2"
656 AC_TRY_COMPILE([],,ac_cv_c_o2=yes, ac_cv_c_o2=no)])
657 if test "x${ac_cv_c_o2}" != "xno"; then
658 if test "x${ac_cv_c_o3}" = "xno"; then
659 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
661 CFLAGS_NOOPTIM="${CFLAGS_NOOPTIM} -O2"
663 AC_CACHE_CHECK([if \$CC accepts -O],
665 [CFLAGS="${CFLAGS_save} -O"
666 AC_TRY_COMPILE([],,ac_cv_c_o=yes, ac_cv_c_o=no)])
667 if test "x${ac_cv_c_o}" != "xno"; then
668 if test "x${ac_cv_c_o3}" = "xno"; then
669 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
671 CFLAGS_NOOPTIM="${CFLAGS_NOOPTIM} -O"
675 dnl Check for -ffast-math
676 AC_CACHE_CHECK([if \$CC accepts -ffast-math],
678 [CFLAGS="${CFLAGS_save} -ffast-math"
679 AC_TRY_COMPILE([],,ac_cv_c_fast_math=yes, ac_cv_c_fast_math=no)])
680 if test "x${ac_cv_c_fast_math}" != "xno"; then
681 CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
684 dnl Check for -funroll-loops
685 dnl Disabled on BeOS because BeOS' gcc is buggy and may crash with it
686 if test "x${SYS}" != "xbeos"
688 AC_CACHE_CHECK([if \$CC accepts -funroll-loops],
689 [ac_cv_c_unroll_loops],
690 [CFLAGS="${CFLAGS_save} -funroll-loops"
691 AC_TRY_COMPILE([],,ac_cv_c_unroll_loops=yes, ac_cv_c_unroll_loops=no)])
692 if test "x${ac_cv_c_unroll_loops}" != "xno"; then
693 CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
697 dnl Check for -fomit-frame-pointer
698 AC_CACHE_CHECK([if \$CC accepts -fomit-frame-pointer],
699 [ac_cv_c_omit_frame_pointer],
700 [CFLAGS="${CFLAGS_save} -fomit-frame-pointer"
701 AC_TRY_COMPILE([],,ac_cv_c_omit_frame_pointer=yes, ac_cv_c_omit_frame_pointer=no)])
702 if test "x${ac_cv_c_omit_frame_pointer}" != "xno"; then
703 CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
704 # this plugin does not compile without -fomit-frame-pointer, damn gcc!
705 CFLAGS_i420_yuy2_mmx="${CFLAGS_i420_yuy2_mmx} -fomit-frame-pointer"
708 dnl Check for -mdynamic-no-pic
709 AC_CACHE_CHECK([if \$CC accepts -mdynamic-no-pic],
710 [ac_cv_c_dynamic_no_pic],
711 [CFLAGS="${CFLAGS_save} -mdynamic-no-pic"
712 AC_TRY_COMPILE([],,ac_cv_c_dynamic_no_pic=yes, ac_cv_c_dynamic_no_pic=no)])
713 if test "x${ac_cv_c_dynamic_no_pic}" != "xno"; then
714 CFLAGS_builtins="${CFLAGS_builtins} -mdynamic-no-pic"
715 CFLAGS_libvlc="${CFLAGS_libvlc} -mdynamic-no-pic"
718 dnl Check for Darwin plugin linking flags
719 AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error -lcc_dynamic],
721 [CFLAGS="${CFLAGS_save} -bundle -undefined error -lcc_dynamic"
722 AC_TRY_COMPILE([],,ac_cv_ld_darwin=yes, ac_cv_ld_darwin=no)])
723 if test "x${ac_cv_ld_darwin}" != "xno"; then
724 LDFLAGS_plugins="${LDFLAGS_plugins} -bundle -undefined error -lcc_dynamic"
727 dnl Check for standard plugin linking flags
728 AC_CACHE_CHECK([if \$CC accepts -shared],
730 [CFLAGS="${CFLAGS_save} -shared"
731 AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
732 if test "x${ac_cv_ld_plugins}" != "xno"; then
733 LDFLAGS_plugins="${LDFLAGS_plugins} -shared"
736 dnl Check for variadic macros
737 AC_CACHE_CHECK([for variadic cpp macros],
738 [ac_cv_cpp_variadic_macros],
739 [CFLAGS="${CFLAGS_save}"
742 #define a(b,c...) printf(b,##c)],
743 [a("foo");a("%s","bar");a("%s%s","baz","quux");],
744 ac_cv_cpp_variadic_macros=yes,
745 ac_cv_cpp_variadic_macros=no)])
746 if test "x${ac_cv_cpp_variadic_macros}" != "xno"; then
747 AC_DEFINE(HAVE_VARIADIC_MACROS, 1, Support for variadic macros)
750 dnl Checks for __attribute__(aligned()) directive
751 AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
752 [ac_cv_c_attribute_aligned],
753 [ac_cv_c_attribute_aligned=0
754 CFLAGS="${CFLAGS_save} -Werror"
755 for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
757 [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;],
758 [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
760 CFLAGS="${CFLAGS_save}"])
761 if test "x${ac_cv_c_attribute_aligned}" != "x0"; then
762 AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
763 [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
766 dnl Checks for __attribute__(format()) directive
767 AC_CACHE_CHECK([__attribute__ ((format ())) support with function pointers],
768 [ac_cv_c_attribute_format],
769 [ac_cv_c_attribute_format=no
770 CFLAGS="${CFLAGS_save} -Werror"
772 [static void (*pf_printf)(const char *, ...) __attribute__ ((format(printf,1,2)));(void)pf_printf;],
773 [ac_cv_c_attribute_format=yes])
774 CFLAGS="${CFLAGS_save}"])
775 if test "x${ac_cv_c_attribute_format}" != "xno"; then
776 AC_DEFINE(HAVE_ATTRIBUTE_FORMAT, 1, Support for __attribute__((format())) with function pointers)
782 case "x${target_cpu}" in
793 CFLAGS_mpeg_video="${CFLAGS_mpeg_video} -ffunction-sections"
801 [ --enable-gprof gprof profiling (default disabled)])
803 [ --enable-cprof cprof profiling (default disabled)])
804 AM_CONDITIONAL(GPROF, test "${enable_gprof}" = "yes")
805 AM_CONDITIONAL(CPROF, test "${enable_gprof}" = "yes")
810 #BUILTINS="${BUILTINS} mpeg_video idct idctclassic motion"
811 PLUGINS="${PLUGINS} dummy rc logger gestures memcpy"
812 PLUGINS="${PLUGINS} es audio m4v mpeg_system ps ts avi asf aac mp4 rawdv"
813 PLUGINS="${PLUGINS} spudec mpeg_audio lpcm a52 dts cinepak"
814 PLUGINS="${PLUGINS} deinterlace invert adjust wall transform distort clone crop motionblur"
815 PLUGINS="${PLUGINS} float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif dtstospdif fixed32tofloat32 fixed32tos16 s16tofixed32 s16tofloat32 s16tofloat32swab s8tofloat32 u8tofixed32 u8tofloat32"
816 PLUGINS="${PLUGINS} trivial_resampler ugly_resampler linear_resampler bandlimited_resampler"
817 PLUGINS="${PLUGINS} trivial_channel_mixer headphone_channel_mixer"
818 PLUGINS="${PLUGINS} trivial_mixer spdif_mixer float32_mixer"
819 PLUGINS="${PLUGINS} aout_file"
820 #PLUGINS="${PLUGINS} scope"
821 PLUGINS="${PLUGINS} i420_rgb i420_yuy2 i422_yuy2 i420_ymga"
822 PLUGINS="${PLUGINS} id3 m3u"
823 PLUGINS="${PLUGINS} rawvideo"
824 PLUGINS="${PLUGINS} wav araw demuxdump demuxsub adpcm a52sys au"
825 PLUGINS="${PLUGINS} access_file access_udp access_http ipv4 access_mms"
826 PLUGINS="${PLUGINS} access_ftp access_directory sap httpd"
829 dnl Some plugins aren't useful on some platforms
831 if test "x${SYS}" != "xmingw32"; then
832 PLUGINS="${PLUGINS} screensaver"
836 dnl Accelerated modules
838 MMX_MODULES="memcpymmx idctmmx motionmmx i420_rgb_mmx i422_yuy2_mmx i420_ymga_mmx"
839 MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
840 THREEDNOW_MODULES="memcpy3dn"
842 ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
844 if test "${enable_gprof}" != "yes"
846 MMX_MODULES="${MMX_MODULES} i420_yuy2_mmx"
849 AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
851 [CFLAGS="${CFLAGS_save}"
852 AC_TRY_COMPILE(,[void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));],
853 ac_cv_mmx_inline=yes, ac_cv_mmx_inline=no)])
854 if test "x${ac_cv_mmx_inline}" != "xno"; then
855 ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
858 AC_CACHE_CHECK([if \$CC groks MMX EXT inline assembly],
859 [ac_cv_mmxext_inline],
860 [CFLAGS="${CFLAGS_save}"
861 AC_TRY_COMPILE(,[void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));],
862 ac_cv_mmxext_inline=yes, ac_cv_mmxext_inline=no)])
863 if test "x${ac_cv_mmxext_inline}" != "xno"; then
864 ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
867 AC_CACHE_CHECK([if \$CC groks 3D Now! inline assembly],
868 [ac_cv_3dnow_inline],
869 [CFLAGS="${CFLAGS_save}"
870 AC_TRY_COMPILE(,[void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));],
871 ac_cv_3dnow_inline=yes, ac_cv_3dnow_inline=no)])
872 if test "x${ac_cv_3dnow_inline}" != "xno"; then
873 AC_DEFINE(CAN_COMPILE_3DNOW, 1, Define if \$CC groks 3D Now! inline assembly.)
874 ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
877 AC_CACHE_CHECK([if \$CC groks SSE inline assembly],
879 [CFLAGS="${CFLAGS_save}"
880 AC_TRY_COMPILE(,[void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));],
881 ac_cv_sse_inline=yes, ac_cv_sse_inline=no)])
882 if test "x${ac_cv_sse_inline}" != "xno" -a "x${SYS}" != "xmingw32"; then
883 AC_DEFINE(CAN_COMPILE_SSE, 1, Define if \$CC groks SSE inline assembly.)
884 ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
887 # don't try to grok AltiVec with native mingw32 it doesn't work right now
888 # we should be able to remove this test with future versions of mingw32
889 if test "x${SYS}" != "xmingw32"; then
890 AC_CACHE_CHECK([if \$CC groks AltiVec inline assembly],
891 [ac_cv_altivec_inline],
892 [CFLAGS="${CFLAGS_save}"
893 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
894 ac_cv_altivec_inline=yes,
895 [CFLAGS="${CFLAGS_save} -Wa,-m7400"
896 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
897 [ac_cv_altivec_inline="-Wa,-m7400"],
898 ac_cv_altivec_inline=no)
900 if test "x${ac_cv_altivec_inline}" != "xno"; then
901 AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks AltiVec inline assembly.)
902 if test "x${ac_cv_altivec_inline}" != "xyes"; then
903 CFLAGS_idctaltivec="${CFLAGS_idctaltivec} ${ac_cv_altivec_inline}"
904 CFLAGS_motionaltivec="${CFLAGS_motionaltivec} ${ac_cv_altivec_inline}"
905 CFLAGS_memcpyaltivec="${CFLAGS_memcpyaltivec} ${ac_cv_altivec_inline}"
906 CFLAGS_vlc="${CFLAGS_vlc} ${ac_cv_altivec_inline}"
908 ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
911 AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
913 [CFLAGS="${CFLAGS_save} -faltivec"
915 AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
916 ac_cv_c_altivec=-faltivec, [
918 CFLAGS="${CFLAGS_save} ${CFLAGS_idctaltivec} -fvec"
919 AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
920 [ac_cv_c_altivec="-fvec"], ac_cv_c_altivec=no)
922 CFLAGS="${CFLAGS_save}"])
923 if test "x${ac_cv_c_altivec}" != "xno"; then
924 AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
925 CFLAGS_idctaltivec="${CFLAGS_idctaltivec} ${ac_cv_c_altivec}"
926 CFLAGS_motionaltivec="${CFLAGS_motionaltivec} ${ac_cv_c_altivec}"
927 CFLAGS_memcpyaltivec="${CFLAGS_memcpyaltivec} ${ac_cv_c_altivec}"
928 CFLAGS_vlc="${CFLAGS_vlc} ${ac_cv_c_altivec}"
929 ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
932 AC_CACHE_CHECK([if linker needs -framework vecLib],
934 [LDFLAGS="${LDFLAGS_vlc} -framework vecLib"
935 AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)
936 LDFLAGS="${LDFLAGS_save}"
938 if test "x${ac_cv_ld_altivec}" != "xno"; then
939 LDFLAGS_idctaltivec="${LDFLAGS_idctaltivec} -framework vecLib"
940 LDFLAGS_motionaltivec="${LDFLAGS_motionaltivec} -framework vecLib"
941 LDFLAGS_memcpyaltivec="${LDFLAGS_memcpyaltivec} -framework vecLib"
942 LDFLAGS_vlc="${LDFLAGS_vlc} -framework vecLib"
947 AC_ARG_WITH(,[Optimization options:])
950 dnl Special arch tuning
953 [ --with-tuning=ARCH enable special tuning for an architecture
954 (default i686 on IA-32 and 750 on PPC)])
955 if test "x${with_tuning}" != "x"; then
956 if test "x${target_cpu}" = "xpowerpc"; then
957 CFLAGS_TUNING="-mtune=${with_tuning}"
959 CFLAGS_TUNING="-mcpu=${with_tuning}"
962 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"
964 if test "x${target_cpu}" = "xpowerpc"; then CFLAGS_TUNING="-mtune=750"; fi
969 dnl x86 accelerations
971 if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xx86" -o "x${target_cpu}" = "xi386"
974 BUILTINS="${BUILTINS} ${ACCEL_MODULES}"
978 dnl Enable/disable optimizations
980 AC_ARG_ENABLE(optimizations,
981 [ --disable-optimizations disable compiler optimizations (default enabled)])
982 AM_CONDITIONAL(OPTIM, test "x${enable_optimizations}" != "xno")
985 dnl AltiVec acceleration
987 AC_ARG_ENABLE(altivec,
988 [ --disable-altivec disable AltiVec optimizations (default enabled on PPC)],
989 [ if test "x${enable_altivec}" = "xyes"; then ARCH="${ARCH} altivec";
990 BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ],
991 [ if test "x${target_cpu}" = "xpowerpc"; then ARCH="${ARCH} altivec";
992 BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ])
998 [ --enable-debug debug mode (default disabled)])
999 AM_CONDITIONAL(DEBUG, test "x${enable_debug}" = "xyes")
1002 dnl Enable release-specific flags
1004 AC_ARG_ENABLE(release,
1005 [ --enable-release activate extra optimizations (default disabled)])
1006 AM_CONDITIONAL(RELEASE, test "x${enable_release}" = "xyes")
1012 [ --enable-sout Stream output modules (default enabled)])
1013 if test "x${enable_sout}" != "xno"
1015 PLUGINS="${PLUGINS} access_output_dummy access_output_udp access_output_file access_output_http"
1016 PLUGINS="${PLUGINS} mux_ts mux_ps mux_avi mux_dummy"
1017 PLUGINS="${PLUGINS} packetizer_mpegaudio packetizer_mpegvideo packetizer_a52"
1018 PLUGINS="${PLUGINS} packetizer_mpeg4video packetizer_mpeg4audio"
1019 PLUGINS="${PLUGINS} packetizer_copy"
1021 PLUGINS="${PLUGINS} stream_out_dummy stream_out_standard stream_out_es"
1022 PLUGINS="${PLUGINS} stream_out_duplicate stream_out_display"
1025 AC_CHECK_HEADERS(ogg/ogg.h, [
1026 AC_CHECK_LIB( ogg, ogg_stream_packetin, [
1027 PLUGINS="${PLUGINS} mux_ogg"
1028 LDFLAGS_mux_ogg="${LDFLAGS_mux_ogg} -logg" ])
1037 AC_ARG_WITH(,[Input plugins:])
1040 dnl DVD module: optionally check for installed libdvdcss
1043 [ --enable-dvd DVD input module (default enabled)])
1044 if test "x${enable_dvd}" != "xno"
1047 [ --with-dvdcss=PATH libdvdcss headers and libraries])
1048 AC_ARG_WITH(dvdcss-tree,
1049 [ --with-dvdcss-tree=PATH libdvdcss tree for static linking])
1050 case "x${with_dvdcss}" in
1052 if test "x${with_dvdcss_tree}" = x
1054 AC_CHECK_HEADERS(dvdcss/dvdcss.h,
1055 [ PLUGINS="${PLUGINS} dvd"
1056 LDFLAGS_dvd="${LDFLAGS_dvd} -ldvdcss"
1057 LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -ldvdcss" ],
1058 [ 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.])
1059 AC_MSG_ERROR([cannot find libdvdcss headers]) ])
1061 AC_MSG_CHECKING(for libdvdcss.a in ${with_dvdcss_tree})
1062 real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
1063 if test "x${real_dvdcss_tree}" = "x"
1065 dnl The given directory can't be found
1067 AC_MSG_ERROR([cannot cd to ${with_dvdcss_tree}])
1069 if test -f "${real_dvdcss_tree}/src/.libs/libdvdcss.a"
1071 dnl Use a custom libdvdcss
1072 AC_MSG_RESULT(${real_dvdcss_tree}/src/.libs/libdvdcss.a)
1073 BUILTINS="${BUILTINS} dvd"
1074 LDFLAGS_dvd="${LDFLAGS_dvd} -L${real_dvdcss_tree}/src/.libs -ldvdcss"
1075 LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -L${real_dvdcss_tree}/src/.libs -ldvdcss"
1076 CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${real_dvdcss_tree}/src"
1078 dnl The given libdvdcss wasn't built
1080 AC_MSG_ERROR([cannot find ${real_dvdcss_tree}/src/.libs/libdvdcss.a, make sure you compiled libdvdcss in ${with_dvdcss_tree}])
1085 dnl Compile without dvdcss (dlopen version, works only under Linux)
1086 PLUGINS="${PLUGINS} dvd"
1087 CPPFLAGS_dvd="${CPPFLAGS_dvd} -DGOD_DAMN_DMCA"
1088 LDFLAGS_dvd="${LDFLAGS_dvd} -ldl"
1091 AC_MSG_CHECKING(for dvdcss headers in ${with_dvdcss})
1092 if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
1094 dnl Use ${with_dvdcss}/include/dvdcss/dvdcss.h
1096 PLUGINS="${PLUGINS} dvd"
1097 LDFLAGS_dvd="${LDFLAGS_dvd} -L${with_dvdcss}/lib -ldvdcss"
1098 LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -L${with_dvdcss}/lib -ldvdcss"
1099 CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${with_dvdcss}/include"
1101 dnl No libdvdcss could be found, sorry
1103 AC_MSG_ERROR([cannot find ${with_dvdcss}/include/dvdcss/dvdcss.h])
1110 dnl dvdread module: check for libdvdread
1112 AC_ARG_ENABLE(dvdread,
1113 [ --enable-dvdread dvdread input module (default disabled)])
1114 if test "x${enable_dvdread}" != "xno"
1116 AC_ARG_WITH(dvdread,
1117 [ --with-dvdread=PATH libdvdread headers and libraries])
1118 AC_ARG_WITH(dvdread-tree,
1119 [ --with-dvdread-tree=PATH libdvdread tree for static linking])
1120 if test "x${with_dvdread}" = x
1122 if test "x${with_dvdread_tree}" = x
1124 AC_CHECK_HEADERS(dvdread/dvd_reader.h,
1125 [ PLUGINS="${PLUGINS} dvdread"
1126 LDFLAGS_dvdread="${LDFLAGS_dvdread} -ldvdread ${LDFLAGS_dvdcss}" ],
1127 [ if test "x${enable_dvdread}" != "x"
1129 AC_MSG_WARN([Please get libdvdread from http://www.dtek.chalmers.se/groups/dvd/downloads.shtml])
1130 AC_MSG_ERROR([cannot find libdvdread headers])
1133 AC_MSG_CHECKING(for libdvdread.a in ${with_dvdread_tree})
1134 real_dvdread_tree="`cd ${with_dvdread_tree} 2>/dev/null && pwd`"
1135 if test "x${real_dvdread_tree}" = "x"
1137 dnl The given directory can't be found
1139 AC_MSG_ERROR([cannot cd to ${with_dvdread_tree}])
1141 if test -f "${real_dvdread_tree}/dvdread/.libs/libdvdread.a"
1143 dnl Use a custom libdvdread
1144 AC_MSG_RESULT(${real_dvdread_tree}/dvdread/.libs/libdvdread.a)
1145 BUILTINS="${BUILTINS} dvdread"
1146 LDFLAGS_dvdread="${LDFLAGS_dvdread} -L${real_dvdread_tree}/dvdread/.libs -ldvdread ${LDFLAGS_dvdcss}"
1147 CPPFLAGS_dvdread="${CPPFLAGS_dvdread} -I${real_dvdread_tree}"
1149 dnl The given libdvdread wasn't built
1151 AC_MSG_ERROR([cannot find ${real_dvdread_tree}/dvdread/.libs/libdvdread.a, make sure you compiled libdvdread in ${with_dvdread_tree}])
1155 AC_MSG_CHECKING(for dvdread headers in ${with_dvdread})
1156 if test -f ${with_dvdread}/include/dvdread/dvd_reader.h
1158 dnl Use ${with_dvdread}/include/dvdread/dvd_reader.h
1160 PLUGINS="${PLUGINS} dvdread"
1161 LDFLAGS_dvdread="${LDFLAGS_dvdread} -L${with_dvdread}/lib -ldvdread ${LDFLAGS_dvdcss}"
1162 CPPFLAGS_dvdread="${CPPFLAGS_dvdread} -I${with_dvdread}/include"
1164 dnl No libdvdread could be found, sorry
1166 AC_MSG_ERROR([cannot find ${with_dvdread}/include/dvdread/dvd_reader.h])
1172 dnl dvdplay module: check for libdvdplay
1174 AC_ARG_ENABLE(dvdplay,
1175 [ --enable-dvdplay dvdplay input module (default disabled)])
1176 if test "x${enable_dvdplay}" != "xno"
1178 AC_ARG_WITH(dvdplay,
1179 [ --with-dvdplay=PATH libdvdplay headers and libraries])
1180 AC_ARG_WITH(dvdplay-tree,
1181 [ --with-dvdplay-tree=PATH libdvdplay tree for static linking])
1182 if test "x${with_dvdplay}" = x
1184 if test "x${with_dvdplay_tree}" = x
1186 AC_CHECK_HEADERS(dvdplay/dvdplay.h,
1187 [ PLUGINS="${PLUGINS} dvdplay"
1188 LDFLAGS_dvdplay="${LDFLAGS_dvdplay} -ldvdplay ${LDFLAGS_dvdread} ${LDFLAGS_dvdcss}"
1189 CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_dvdread}" ],
1190 [ if test "x${enable_dvdplay}" != "x"
1192 AC_MSG_WARN([Please get libdvdplay from http://www.videolan.org/.])
1193 AC_MSG_ERROR([cannot find libdvdplay headers])
1196 AC_MSG_CHECKING(for libdvdplay.a in ${with_dvdplay_tree})
1197 real_dvdplay_tree="`cd ${with_dvdplay_tree} 2>/dev/null && pwd`"
1198 if test "x${real_dvdplay_tree}" = "x"
1200 dnl The given directory can't be found
1202 AC_MSG_ERROR([cannot cd to ${with_dvdplay_tree}])
1204 if test -f "${real_dvdplay_tree}/src/.libs/libdvdplay.a"
1206 dnl Use a custom libdvdplay
1207 AC_MSG_RESULT(${real_dvdplay_tree}/src/.libs/libdvdplay.a)
1208 BUILTINS="${BUILTINS} dvdplay"
1209 LDFLAGS_dvdplay="${LDFLAGS_dvdplay} -L${real_dvdplay_tree}/src/.libs -ldvdplay ${LDFLAGS_dvdread} ${LDFLAGS_dvdcss}"
1210 CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_dvdread} -I${real_dvdplay_tree}/src"
1212 dnl The given libdvdplay wasn't built
1214 AC_MSG_ERROR([cannot find ${real_dvdplay_tree}/src/.libs/libdvdplay.a, make sure you compiled libdvdplay in ${with_dvdplay_tree}])
1218 AC_MSG_CHECKING(for dvdplay headers in ${with_dvdplay})
1219 if test -f ${with_dvdplay}/include/dvdplay/dvdplay.h
1221 dnl Use ${with_dvdplay}/include/dvdplay/dvdplay.h
1223 PLUGINS="${PLUGINS} dvdplay"
1224 LDFLAGS_dvdplay="${LDFLAGS_dvdplay} -L${with_dvdplay}/lib -ldvdplay ${LDFLAGS_dvdread} ${LDFLAGS_dvdcss}"
1225 CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_dvdread} -I${with_dvdplay}/include"
1227 dnl No libdvdplay could be found, sorry
1229 AC_MSG_ERROR([cannot find ${with_dvdplay}/include/dvdplay/dvdplay.h])
1235 dnl libdvbpsi ts demux/mux
1237 AC_ARG_ENABLE(dvbpsi,
1238 [ --enable-dvbpsi dvbpsi ts mux and demux module (default enabled)])
1239 if test "x${enable_dvbpsi}" != "xno"
1242 [ --with-dvbpsi=PATH libdvbpsi headers and libraries])
1244 [ --with-dvbpsi-tree=PATH libdvbpsi tree for static linking])
1245 case "x${with_dvbpsi}" in
1247 if test "x${with_dvbpsi_tree}" = "x"
1249 AC_CHECK_HEADERS(dvbpsi/dr.h,
1250 [ PLUGINS="${PLUGINS} ts_dvbpsi"
1251 LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} -ldvbpsi"
1252 PLUGINS="${PLUGINS} mux_ts_dvbpsi"
1253 LDFLAGS_mux_ts_dvbpsi="${LDFLAGS_mux_ts_dvbpsi} -ldvbpsi" ],
1254 [ AC_MSG_WARN([cannot find libdvbpsi headers]) ],
1255 [#include <stdint.h>
1256 #include <dvbpsi/dvbpsi.h>
1257 #include <dvbpsi/descriptor.h>
1258 #include <dvbpsi/pat.h>
1259 #include <dvbpsi/pmt.h>])
1261 AC_MSG_CHECKING(for libdvbpsi.a in ${with_dvbpsi_tree})
1262 real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
1263 if test "x${real_dvbpsi_tree}" = "x"
1265 dnl The given directory can't be found
1267 AC_MSG_ERROR([cannot cd to ${with_dvbpsi_tree}])
1269 if test -f "${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
1271 dnl Use a custom libdvbpsi
1272 AC_MSG_RESULT(${real_dvbpsi_tree}/src/.libs/libdvbpsi.a)
1273 BUILTINS="${BUILTINS} ts_dvbpsi"
1274 LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} -L${real_dvbpsi_tree}/src/.libs -ldvbpsi"
1275 CPPFLAGS_ts_dvbpsi="${CPPFLAGS_ts_dvbpsi} -I${real_dvbpsi_tree}/src"
1277 BUILTINS="${BUILTINS} mux_ts_dvbpsi"
1278 LDFLAGS_mux_ts_dvbpsi="${LDFLAGS_mux_ts_dvbpsi} -L${real_dvbpsi_tree}/src/.libs -ldvbpsi"
1279 CPPFLAGS_mux_ts_dvbpsi="${CPPFLAGS_mux_ts_dvbpsi} -I${real_dvbpsi_tree}/src"
1282 dnl The given libdvbpsi wasn't built
1284 AC_MSG_ERROR([cannot find ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a, make sure you compiled libdvbpsi in ${with_dvbpsi_tree}])
1289 dnl Compile without dvbpsi
1292 AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi})
1293 if test "x${with_dvbpsi}" = "x"
1298 LDFLAGS_test="-L${with_dvbpsi}/lib"
1299 CPPFLAGS_test="-I${with_dvbpsi}/include"
1301 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
1302 AC_CHECK_HEADER([dvbpsi/dr.h],[
1303 PLUGINS="${PLUGINS} ts_dvbpsi"
1304 LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} ${LDFLAGS_test} -ldvbpsi"
1305 CPPFLAGS_ts_dvbpsi="${CPPFLAGS_ts_dvbpsi} ${CPPFLAGS_test}"
1306 PLUGINS="${PLUGINS} mux_ts_dvbpsi"
1307 LDFLAGS_mux_ts_dvbpsi="${LDFLAGS_mux_ts_dvbpsi} ${LDFLAGS_test} -ldvbpsi"
1308 CPPFLAGS_mux_ts_dvbpsi="${CPPFLAGS_mux_ts_dvbpsi} ${CPPFLAGS_test}"
1311 if test "x${enable_dvbpsi}" != "x"
1313 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])
1316 CPPFLAGS="${CPPFLAGS_save}"
1322 dnl Video4Linux plugin
1325 [ --enable-v4l Video4Linux input support (default disabled)])
1326 if test "x${enable_v4l}" = "xyes"
1328 AC_CHECK_HEADERS(linux/videodev.h, [
1329 PLUGINS="${PLUGINS} v4l"
1337 [ --enable-vcd VCD support for Linux, FreeBSD, MacOS X and Win32 (default enabled)])
1339 if test "x${enable_vcd}" != "xno"
1341 AC_MSG_CHECKING(for cdrom_msf0 in linux/cdrom.h)
1342 AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
1344 PLUGINS="${PLUGINS} vcd"
1349 AC_MSG_CHECKING(for scsireq in sys/scsiio.h)
1350 AC_EGREP_HEADER(scsireq,sys/scsiio.h,[
1352 PLUGINS="${PLUGINS} vcd"
1353 AC_DEFINE(HAVE_SCSIREQ_IN_SYS_SCSIIO_H, 1, For NetBSD VCD support)
1358 AC_MSG_CHECKING(for ioc_toc_header in sys/cdio.h)
1359 AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
1361 PLUGINS="${PLUGINS} vcd"
1362 AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
1367 if test "x${SYS}" = "xbsdi" -o "x${SYS}" = "xmingw32"
1369 PLUGINS="${PLUGINS} vcd"
1372 if test "x${SYS}" = "xdarwin"
1374 PLUGINS="${PLUGINS} vcd"
1375 LDFLAGS_vcd="${LDFLAGS_vcd} -framework IOKit -framework CoreFoundation"
1380 dnl Satellite input module
1382 AC_ARG_ENABLE(satellite,
1383 [ --enable-satellite satellite card support (default disabled)],
1384 [ if test "x${enable_satellite}" = "xyes"
1386 PLUGINS="${PLUGINS} satellite"
1390 dnl ipv6 plugin - not for QNX yet
1392 if test "x${SYS}" != "xnto" && test "x${SYS}" != "xmingw32"
1395 AC_CHECK_FUNCS(inet_pton,[have_ipv6=:],[
1396 AC_CHECK_LIB(resolv,inet_pton,
1398 LDFLAGS_ipv6="${LDFLAGS_ipv6} -lresolv"])
1400 AC_MSG_CHECKING(for sockaddr_in6 in netinet/in.h)
1401 AC_EGREP_HEADER(sockaddr_in6,netinet/in.h,
1402 [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); have_ipv6=false])
1403 if ${have_ipv6}; then
1404 PLUGINS="${PLUGINS} ipv6"
1407 if test "x${SYS}" = "xmingw32"
1409 AC_MSG_CHECKING(for getaddrinfo in ws2tcpip.h)
1410 AC_EGREP_HEADER(addrinfo,ws2tcpip.h,[AC_MSG_RESULT(yes)
1411 PLUGINS="${PLUGINS} ipv6"],[AC_MSG_RESULT(no)])
1418 [ --enable-ogg Ogg demux support (default enabled)])
1419 if test "x${enable_ogg}" != "xno"
1421 AC_CHECK_HEADERS(ogg/ogg.h, [
1422 AC_CHECK_LIB( ogg, oggpack_read, [
1423 PLUGINS="${PLUGINS} ogg"
1424 LDFLAGS_ogg="${LDFLAGS_ogg} -logg"
1425 AC_CHECK_LIB( ogg, oggpackB_read, [
1426 CPPFLAGS_ogg="${CPPFLAGS_ogg} -DHAVE_OGGPACKB"])])
1434 AC_ARG_WITH(,[Codec plugins:])
1440 [ --enable-mad libmad module (default disabled)])
1441 if test "x${enable_mad}" != "xno"
1444 [ --with-mad=PATH path to libmad],[],[])
1445 if test "x${with_mad}" != "xno" -a "x${with_mad}" != "x"
1447 CPPFLAGS_mpgatofixed32="${CPPFLAGS_mpgatofixed32} -I${with_mad}/include"
1448 LDFLAGS_mpgatofixed32="${LDFLAGS_mpgatofixed32} -L${with_mad}/lib"
1451 AC_ARG_WITH(mad-tree,
1452 [ --with-mad-tree=PATH mad tree for static linking],[],[])
1453 if test "x${with_mad_tree}" != "xno" -a "x${with_mad_tree}" != "x"
1455 real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
1456 if test "x${real_mad_tree}" = "x"
1458 dnl The given directory can't be found
1460 AC_MSG_ERROR([${with_mad_tree} directory doesn't exist])
1462 dnl Use a custom libmad
1463 AC_MSG_CHECKING(for mad.h in ${real_mad_tree}/libmad)
1464 if test -f ${real_mad_tree}/libmad/mad.h
1467 CPPFLAGS_mpgatofixed32="${CPPFLAGS_mpgatofixed32} -I${real_mad_tree}/libmad"
1468 LDFLAGS_mpgatofixed32="${LDFLAGS_mpgatofixed32} -L${real_mad_tree}/libmad/.libs"
1469 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mpgatofixed32}"
1470 AC_CHECK_LIB(mad, mad_bit_init, [
1471 BUILTINS="${BUILTINS} mpgatofixed32"
1472 LDFLAGS_mpgatofixed32="${LDFLAGS_mpgatofixed32} -lmad"
1473 ],[ AC_MSG_ERROR([the specified tree hasn't been compiled ])
1475 LDFLAGS="${LDFLAGS_save}"
1478 AC_MSG_ERROR([the specified tree doesn't have mad.h])
1481 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mpgatofixed32}"
1482 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mpgatofixed32}"
1483 AC_CHECK_HEADERS(mad.h, ,
1484 [ AC_MSG_ERROR([Cannot find development headers for libmad...]) ])
1485 AC_CHECK_LIB(mad, mad_bit_init, [
1486 PLUGINS="${PLUGINS} mpgatofixed32"
1487 LDFLAGS_mpgatofixed32="${LDFLAGS_mpgatofixed32} -lmad" ],
1488 [ AC_MSG_ERROR([Cannot find libmad library...]) ])
1489 CPPFLAGS="${CPPFLAGS_save}"
1490 LDFLAGS="${LDFLAGS_save}"
1495 dnl libid3tag support
1497 AC_CHECK_HEADERS(id3tag.h, [
1498 AC_CHECK_HEADERS(zlib.h, [
1499 LDFLAGS_id3tag="${LDFLAGS_id3tag} -lid3tag -lz"
1500 PLUGINS="${PLUGINS} id3tag"]) ])
1503 dnl ffmpeg decoder plugin
1505 AC_ARG_ENABLE(ffmpeg,
1506 [ --enable-ffmpeg ffmpeg codec (default disabled)])
1507 if test "x${enable_ffmpeg}" = "xyes"
1509 AC_ARG_WITH(ffmpeg-tree,
1510 [ --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
1513 dnl test for !(--with-ffmpeg-tree)
1515 if test "x${with_ffmpeg_tree}" == "xno" -o "x${with_ffmpeg_tree}" == "x";then
1516 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
1517 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
1518 AC_CHECK_HEADERS(ffmpeg/avcodec.h postproc/postprocess.h)
1519 AC_CHECK_LIB(avcodec, avcodec_init, [
1520 BUILTINS="${BUILTINS} ffmpeg stream_out_transcode"
1521 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lavcodec"
1522 dnl XXX: we don't link with -lavcodec a 2nd time because the OS X
1523 dnl linker would miserably barf on multiple definitions.
1524 LDFLAGS_stream_out_transcode="${LDFLAGS_stream_out_transcode}" ],
1525 [ AC_MSG_ERROR([Cannot find libavcodec library...]) ])
1526 LDFLAGS="${LDFLAGS_save}"
1527 CPPFLAGS="${CPPFLAGS_save}"
1531 dnl test for --with-ffmpeg-tree
1533 if test "x${with_ffmpeg_tree}" != "xno" -a "x${with_ffmpeg_tree}" != "x";then
1534 AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
1535 real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
1536 if test "x${real_ffmpeg_tree}" = x; then
1537 dnl The given directory can't be found
1539 AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
1541 if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"; then
1542 dnl Use a custom libffmpeg
1543 AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
1544 BUILTINS="${BUILTINS} ffmpeg stream_out_transcode"
1545 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -L${real_ffmpeg_tree}/libavcodec -lavcodec"
1546 CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${real_ffmpeg_tree}/libavcodec"
1548 dnl XXX: we don't link with -lavcodec a 2nd time because the OS X
1549 dnl linker would miserably barf on multiple definitions.
1550 LDFLAGS_stream_out_transcode="${LDFLAGS_stream_out_transcode} -L${real_ffmpeg_tree}/libavcodec"
1551 CPPFLAGS_stream_out_transcode="${CPPFLAGS_stream_out_transcode} -I${real_ffmpeg_tree}/libavcodec"
1553 dnl The given libavcodec wasn't built
1555 AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
1559 dnl Add postprocessing modules
1560 PLUGINS="${PLUGINS} postprocessing_c"
1561 if test "x${ac_cv_mmx_inline}" != "xno"; then
1562 PLUGINS="${PLUGINS} postprocessing_mmx"
1565 if test "x${ac_cv_mmxext_inline}" != "xno"; then
1566 PLUGINS="${PLUGINS} postprocessing_mmxext"
1571 dnl faad decoder plugin
1574 [ --enable-faad faad codec (default disabled)])
1575 if test "x${enable_faad}" = "xyes"
1578 [ --with-faad=PATH path to faad installation],[],[])
1579 if test "x${with_faad}" != "xno" -a "x${with_faad}" != "x"
1581 CPPFLAGS_faad="${CPPFLAGS_faad} -I${with_faad}/include"
1582 LDFLAGS_faad="${LDFLAGS_faad} -L${with_faad}/lib"
1584 LDFLAGS_faad="${LDFLAGS_faad}"
1586 AC_ARG_WITH(faad-tree,
1587 [ --with-faad-tree=PATH faad tree for static linking])
1588 if test "x${with_faad_tree}" != "x"
1590 AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
1591 real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
1592 if test "x${real_faad_tree}" = x
1594 dnl The given directory can't be found
1596 AC_MSG_ERROR([cannot cd to ${with_faad_tree}])
1598 if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a"
1600 dnl Use a custom faad
1601 AC_MSG_RESULT(${real_faad_tree}/libfaad/.libs/libfaad.a)
1602 BUILTINS="${BUILTINS} faad"
1603 LDFLAGS_faad="${LDFLAGS_faad} -L${real_faad_tree}/libfaad/.libs -lfaad"
1604 CPPFLAGS_faad="${CPPFLAGS_faad} -I${real_faad_tree}/include"
1606 dnl The given libfaad wasn't built
1608 AC_MSG_ERROR([cannot find ${real_faad_tree}/libfaad/.libs/libfaad.a, make sure you compiled libfaad in ${with_faad_tree}])
1611 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_faad}"
1612 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_faad}"
1613 AC_CHECK_HEADERS(faad.h, ,
1614 [ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ])
1615 AC_CHECK_LIB(faad, faacDecOpen, [
1616 PLUGINS="${PLUGINS} faad"
1617 LDFLAGS_faad="${LDFLAGS_faad} -lfaad" ],
1618 [ AC_MSG_ERROR([Cannot find libfaad library...]) ])
1619 LDFLAGS="${LDFLAGS_save}"
1620 CPPFLAGS="${CPPFLAGS_save}"
1626 dnl xvid decoder plugin
1629 [ --enable-xvid xvid codec (default disabled)])
1630 if test "x${enable_xvid}" = "xyes"
1633 [ --with-xvid=PATH path to xvid installation],[],[])
1634 if test "x${with_xvid}" != "xno" -a "x${with_xvid}" != "x"
1636 CPPFLAGS_xvid="${CPPFLAGS_xvid} -I${with_xvid}/include"
1637 LDFLAGS_xvid="${LDFLAGS_xvid} -L${with_xvid}/lib"
1639 LDFLAGS_xvid="${LDFLAGS_xvid}"
1641 AC_ARG_WITH(xvid-tree,
1642 [ --with-xvid-tree=PATH xvid tree for static linking])
1643 if test "x${with_xvid_tree}" != "x"
1645 AC_MSG_CHECKING(for libxvidcore.a in ${with_xvid_tree})
1646 real_xvid_tree="`cd ${with_xvid_tree} 2>/dev/null && pwd`"
1647 if test "x${real_xvid_tree}" = x
1649 dnl The given directory can't be found
1651 AC_MSG_ERROR([cannot cd to ${with_xvid_tree}])
1653 if test -f "${real_xvid_tree}/build/generic/libxvidcore.a"
1655 dnl Use a custom xvid
1656 AC_MSG_RESULT(${real_xvid_tree}/build/generic/libxvidcore.a)
1657 BUILTINS="${BUILTINS} xvid"
1658 LDFLAGS_xvid="${LDFLAGS_xvid} -L${real_xvid_tree}/build/generic -lxvidcore"
1659 CPPFLAGS_xvid="${CPPFLAGS_xvid} -I${real_xvid_tree}/src"
1661 dnl The given libxvidcore wasn't built
1663 AC_MSG_ERROR([cannot find ${real_xvid_tree}/build/generic/libxvidcore.a, make sure you compiled libxvidcore in ${with_xvid_tree}])
1666 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_xvid}"
1667 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_xvid}"
1668 AC_CHECK_HEADERS(xvid.h, ,
1669 [ AC_MSG_ERROR([Cannot find development headers for libxvidcore...]) ])
1670 AC_CHECK_LIB(xvidcore, xvid_init, [
1671 PLUGINS="${PLUGINS} xvid"
1672 LDFLAGS_xvid="${LDFLAGS_xvid} -lxvidcore" ],
1673 [ AC_MSG_ERROR([Cannot find libxvidcore library...]) ])
1674 LDFLAGS="${LDFLAGS_save}"
1675 CPPFLAGS="${CPPFLAGS_save}"
1684 AC_CHECK_HEADERS(zlib.h, [
1685 LDFLAGS_mp4="${LDFLAGS_mp4} -lz"
1686 LDFLAGS_skins="${LDFLAGS_skins} -lz"
1693 AC_CHECK_HEADERS(libtar.h, [
1694 LDFLAGS_skins="${LDFLAGS_skins} -ltar"
1700 dnl a52 AC3 decoder plugin
1703 [ --enable-a52 A/52 support with liba52 (default enabled)])
1704 if test "x${enable_a52}" != "xno"
1707 [ --with-a52=PATH a52 headers and libraries])
1708 AC_ARG_WITH(a52-tree,
1709 [ --with-a52-tree=PATH a52dec tree for static linking ],[],[])
1710 if test "x${with_a52_tree}" != "xno" -a "x${with_a52_tree}" != "x"
1712 real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
1713 if test "x${real_a52_tree}" = "x"
1715 dnl The given directory can't be found
1717 AC_MSG_ERROR([${with_a52_tree} directory doesn't exist])
1719 dnl Use a custom a52dec
1720 AC_MSG_CHECKING(for a52.h in ${real_a52_tree}/include)
1721 if test -f ${real_a52_tree}/include/a52.h
1724 CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} -I${real_a52_tree}"
1725 LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} -L${real_a52_tree}/liba52/.libs"
1726 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_a52tofloat32}"
1727 AC_CHECK_LIB(a52, a52_free, [
1728 BUILTINS="${BUILTINS} a52tofloat32"
1729 LDFLAGS_a52tofloat32="-la52 ${LDFLAGS_a52tofloat32}"
1730 CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} -DUSE_A52DEC_TREE"
1732 if test -f ${real_a52_tree}/liba52/.libs/liba52.a
1734 AC_MSG_ERROR([make sure you have at least a52dec-0.7.3])
1736 AC_MSG_ERROR([the specified tree hasn't been compiled])
1739 LDFLAGS="${LDFLAGS_save}"
1742 AC_MSG_ERROR([the specified tree doesn't have a52.h])
1745 if test "x${with_a52}" = "x"
1750 LDFLAGS_test="-L${with_a52}/lib"
1751 CPPFLAGS_test="-I${with_a52}/include"
1753 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test} ${CPPFLAGS_a52tofloat32}"
1754 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_test} ${LDFLAGS_a52tofloat32}"
1755 AC_CHECK_HEADERS(a52dec/a52.h, [
1756 AC_CHECK_LIB(a52, a52_free, [
1757 PLUGINS="${PLUGINS} a52tofloat32"
1758 LDFLAGS_a52tofloat32="${LDFLAGS_test} -la52 ${LDFLAGS_a52tofloat32}"
1759 CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} ${CPPFLAGS_test}"
1761 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.])
1764 CPPFLAGS="${CPPFLAGS_save}"
1765 LDFLAGS="${LDFLAGS_save}"
1773 [ --enable-dv DV decoder support (default disabled)])
1774 if test "x${enable_dv}" = "xyes"
1776 AC_CHECK_HEADERS(libdv/dv.h, [
1777 PLUGINS="${PLUGINS} dv"
1778 LDFLAGS_dv="${LDFLAGS_dv} -ldv"
1786 [ --enable-flac flac decoder support (default disabled)])
1787 if test "x${enable_flac}" = "xyes"
1789 AC_CHECK_HEADERS(FLAC/stream_decoder.h, [
1790 PLUGINS="${PLUGINS} flac flacdec"
1791 LDFLAGS_flacdec="${LDFLAGS_flacdec} -lFLAC"
1798 AC_ARG_ENABLE(libmpeg2,
1799 [ --enable-libmpeg2 libmpeg2 decoder support (default disabled)])
1800 if test "x${enable_libmpeg2}" = "xyes"
1802 AC_CHECK_HEADERS(mpeg2dec/mpeg2.h, [
1803 PLUGINS="${PLUGINS} libmpeg2"
1804 LDFLAGS_libmpeg2="${LDFLAGS_libmpeg2} -lmpeg2"
1811 AC_ARG_ENABLE(vorbis,
1812 [ --enable-vorbis Vorbis decoder support (default enabled)])
1813 if test "x${enable_vorbis}" != "xno"
1815 AC_CHECK_HEADERS(vorbis/codec.h, [
1816 PLUGINS="${PLUGINS} vorbis"
1817 LDFLAGS_vorbis="${LDFLAGS_vorbis} -lvorbis -logg"
1824 AC_ARG_ENABLE(tremor,
1825 [ --enable-tremor Tremor decoder support (default disabled)])
1826 if test "x${enable_tremor}" = "xyes"
1828 AC_CHECK_HEADERS(tremor/ivorbiscodec.h, [
1829 PLUGINS="${PLUGINS} tremor"
1830 LDFLAGS_tremor="${LDFLAGS_tremor} -lvorbisidec -logg"
1835 dnl tarkin decoder plugin
1837 AC_ARG_ENABLE(tarkin,
1838 [ --enable-tarkin experimental tarkin codec (default disabled)])
1839 if test "x${enable_tarkin}" = "xyes"
1841 AC_ARG_WITH(tarkin-tree,
1842 [ --with-tarkin-tree=PATH tarkin tree for static linking])
1843 if test "x${with_tarkin_tree}" != "x"
1845 AC_MSG_CHECKING(for tarkin.o in ${with_tarkin_tree})
1846 real_tarkin_tree="`cd ${with_tarkin_tree} 2>/dev/null && pwd`"
1847 if test -f "${real_tarkin_tree}/tarkin.o"
1849 BUILTINS="${BUILTINS} tarkin"
1850 CPPFLAGS_tarkin="${CPPFLAGS_tarkin} -I${real_tarkin_tree}"
1851 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"
1854 dnl The given tarkin tree wasn't built
1856 AC_MSG_ERROR([cannot find ${real_tarkin_tree}/tarkin.o,
1857 make sure you compiled tarkin in ${with_tarkin_tree}])
1863 dnl theora decoder plugin
1865 AC_ARG_ENABLE(theora,
1866 [ --enable-theora experimental theora codec (default disabled)])
1867 if test "x${enable_theora}" = "xyes"
1869 AC_CHECK_HEADERS(theora/theora.h, [
1870 AC_CHECK_LIB(theora, theora_granule_time, [
1871 BUILTINS="${BUILTINS} theora"
1872 LDFLAGS_theora="${LDFLAGS_theora} -ltheora -logg" ],[
1873 AC_MSG_ERROR([libtheora doesn't appear to be installed on you system.
1874 You also need to check that you have a libogg posterior to the 1.0 release.])],
1883 AC_ARG_WITH(,[Video plugins:])
1887 dnl (enabled by default except on win32)
1890 [ --enable-x11 X11 support (default enabled)])
1891 if test "x${enable_x11}" != "xno" &&
1892 (test "x${SYS}" != "xmingw32" || test "x${enable_x11}" = "xyes"); then
1893 CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
1894 AC_CHECK_HEADERS(X11/Xlib.h, [
1895 PLUGINS="${PLUGINS} x11"
1896 LDFLAGS_x11="${LDFLAGS_x11} -L${x_libraries} -lX11 -lXext"
1897 CPPFLAGS_x11="${CPPFLAGS_x11} -I${x_includes}"
1899 CPPFLAGS="${CPPFLAGS_save}"
1904 dnl (enabled by default except on win32)
1906 AC_ARG_ENABLE(xvideo,
1907 [ --enable-xvideo XVideo support (default enabled)])
1908 if test "x${enable_xvideo}" != "xno" &&
1909 (test "x${SYS}" != "xmingw32" || test "x${enable_xvideo}" = "xyes"); then
1910 CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
1911 AC_CHECK_HEADERS(X11/extensions/Xv.h, [
1912 CFLAGS="${CFLAGS_save} -L${x_libraries} -lX11 -lXext"
1913 AC_CHECK_LIB(Xv_pic,XvPutImage,
1914 # We have Xv_pic, that's good, we can build an xvideo.so plugin !
1915 PLUGINS="${PLUGINS} xvideo"
1916 LDFLAGS_xvideo="${LDFLAGS_xvideo} -L${x_libraries} -lX11 -lXext -lXv_pic"
1917 CPPFLAGS_xvideo="${CPPFLAGS_xvideo} -I${x_includes}",
1918 AC_CHECK_LIB(Xv,XvPutImage,
1919 # We don't have Xv_pic, but we have Xv, let's make xvideo.a as builtin
1920 PLUGINS="${PLUGINS} xvideo"
1921 LDFLAGS_xvideo="${LDFLAGS_xvideo} -L${x_libraries} -lX11 -lXext -lXv"
1922 CPPFLAGS_xvideo="${CPPFLAGS_xvideo} -I${x_includes}",
1923 # Otherwise... well, do nothing.
1927 CFLAGS="${CFLAGS_save}"
1929 CPPFLAGS="${CPPFLAGS_save}")
1936 [ --enable-sdl SDL support (default enabled)])
1937 if test "x${enable_sdl}" != "xno"
1940 AC_ARG_WITH(sdl-config-path,
1941 [ --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)],
1942 [ if test "x${with_sdl_config_path}" != "xno"
1944 SDL_PATH="${with_sdl_config_path}:${PATH}"
1946 AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no, ${SDL_PATH})
1947 SDL_CONFIG="${SDL12_CONFIG}"
1948 SDL_HEADER="SDL12/SDL.h"
1949 if test "x${SDL_CONFIG}" = "xno"
1951 AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no, ${SDL_PATH})
1952 SDL_CONFIG=${SDL11_CONFIG}
1953 SDL_HEADER="SDL11/SDL.h"
1955 if test "x${SDL_CONFIG}" = "xno"
1957 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, ${SDL_PATH})
1958 SDL_HEADER="SDL/SDL.h"
1960 # check for cross-compiling
1962 AC_ARG_WITH(sdl-prefix,
1963 [ --with-sdl-prefix=PATH path to libsdl (needed for cross-compiling),
1965 --with-sdl-prefix=/usr/local/arm/2.95.3/arm-linux/usr)],[],[])
1966 if test "x${with_sdl_prefix}" != "xno" -a "x${with_sdl_prefix}" != "x"
1968 SDL_PREFIX="--prefix=${with_sdl_prefix}"
1970 if test "x${SDL_CONFIG}" != "xno"
1972 PLUGINS="${PLUGINS} vout_sdl aout_sdl"
1973 CFLAGS_vout_sdl="${CFLAGS_vout_sdl} `${SDL_CONFIG} ${SDL_PREFIX} --cflags | sed 's,SDL,,'`"
1974 LDFLAGS_vout_sdl="${LDFLAGS_vout_sdl} `${SDL_CONFIG} ${SDL_PREFIX} --libs | sed 's,-rdynamic,,'`"
1975 CFLAGS_aout_sdl="${CFLAGS_aout_sdl} `${SDL_CONFIG} ${SDL_PREFIX} --cflags | sed 's,SDL,,'`"
1976 LDFLAGS_aout_sdl="${LDFLAGS_aout_sdl} `${SDL_CONFIG} ${SDL_PREFIX} --libs | sed 's,-rdynamic,,'`"
1977 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_vout_sdl}"
1978 AC_CHECK_HEADERS(${SDL_HEADER}, AC_DEFINE_UNQUOTED(SDL_INCLUDE_FILE,
1979 <${SDL_HEADER}>, Indicate whether we should use SDL/SDL.h or SDL11/SDL.h),
1980 [ AC_CHECK_HEADERS(SDL.h, AC_DEFINE(SDL_INCLUDE_FILE, <SDL.h>,
1981 As a last resort we also test for SDL.h presence),
1982 [ AC_MSG_ERROR([The development package for SDL is not installed.
1983 Please install it and try again. Alternatively you can also configure with
1986 CPPFLAGS="${CPPFLAGS_save}"
1987 if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
1989 AC_MSG_ERROR([The development package for SDL is not installed.
1990 Please install it and try again. Alternatively you can also configure with
1993 elif test "x${enable_sdl}" = "xyes"
1995 AC_MSG_ERROR([I couldn't find the SDL package. You can download libSDL
1996 from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
2004 AC_ARG_ENABLE(freetype,
2005 [ --enable-freetype freetype support (default enabled)])
2006 if test "x${enable_freetype}" != "xno"
2008 FREETYPE_PATH="${PATH}"
2009 AC_ARG_WITH(freetype-config-path,
2010 [ --with-freetype-config-path=PATH freetype-config path (default search in \$PATH)],
2011 [ if test "x${with_freetype_config_path}" != "xno"
2013 FREETYPE_PATH="${with_freetype_config_path}:${PATH}"
2015 AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no, ${FREETYPE_PATH})
2017 if test "x${FREETYPE_CONFIG}" != "xno" -a "x${have_xosd}" = "xtrue"
2019 PLUGINS="${PLUGINS} osdtext"
2020 CFLAGS_osdtext="${CFLAGS_osdtext} `${FREETYPE_CONFIG} --cflags`"
2021 LDFLAGS_osdtext="${LDFLAGS_osdtext} `${FREETYPE_CONFIG} --libs`"
2022 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_freetype}"
2023 elif test "x${enable_freetype}" = "xyes"
2025 AC_MSG_ERROR([I couldn't find the freetype package. You can download libfreetype2
2026 from http://www.freetype.org/, or configure with --disable-freetype. Have a nice day.
2032 dnl Qt Embedded module
2033 dnl (disabled by default)
2036 [ --enable-qte QT Embedded support (default disabled)])
2037 if test "x${enable_qte}" = "xyes"
2040 [ --with-qte=PATH Qt Embedded headers and libraries])
2041 if test "x${with_qte}" != "xno" -a "x${with_qte}" != "x"
2043 LDFLAGS_qte="${LDFLAGS_qte} -L${with_qte}/lib `echo -L${with_qte}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte"
2044 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"
2046 LDFLAGS_qte="${LDFLAGS_qte} -L${QTDIR}/lib `echo -L${QTDIR}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte"
2047 CPPFLAGS_qte="${CPPFLAGS_qte} -I${QTDIR}/include `echo -I${QTDIR}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti"
2049 PLUGINS="${PLUGINS} qte"
2051 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_qte}"
2052 AC_CHECK_HEADERS(qt.h jpeglib.h, ,[
2053 AC_MSG_ERROR([echo "Cannot find QT Embedded development headers."])
2055 CPPFLAGS="${CPPFLAGS_save}"
2059 dnl Windows DirectX module
2061 AC_ARG_ENABLE(directx,
2062 [ --enable-directx Win32 DirectX support (default enabled on Win32)])
2063 if test "x${enable_directx}" != "xno"
2065 if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"
2067 AC_ARG_WITH(directx,
2068 [ --with-directx=PATH Win32 DirectX headers])
2069 if test "x${with_directx}" = "x"
2071 AC_CHECK_HEADERS(ddraw.h,
2072 [ PLUGINS="${PLUGINS} vout_directx aout_directx"
2073 LDFLAGS_vout_directx="${LDFLAGS_directx} -lgdi32" ])
2075 AC_MSG_CHECKING(for directX headers in ${with_directx})
2076 if test -f ${with_directx}/ddraw.h
2078 PLUGINS="${PLUGINS} vout_directx aout_directx"
2079 LDFLAGS_vout_directx="${LDFLAGS_directx} -lgdi32"
2080 CPPFLAGS_vout_directx="${CPPFLAGS_vout_directx} -I${with_directx}"
2081 CPPFLAGS_aout_directx="${CPPFLAGS_aout_directx} -I${with_directx}"
2085 AC_MSG_ERROR([Cannot find ${with_directx}/ddraw.h!])
2092 dnl Linux framebuffer module
2095 [ --enable-fb Linux framebuffer support (default enabled on Linux)])
2096 if test "x${enable_fb}" != "xno"
2098 AC_CHECK_HEADERS(linux/fb.h, [
2099 PLUGINS="${PLUGINS} fb"
2104 dnl Linux MGA module
2107 [ --enable-mga Linux kernel Matrox support (default disabled)],
2108 [ if test "x${enable_mga}" = "xyes"
2110 PLUGINS="${PLUGINS} mga xmga"
2116 AC_ARG_ENABLE(svgalib,
2117 [ --enable-svgalib SVGAlib support (default disabled)])
2118 if test "x${enable_svgalib}" = "xyes"
2120 PLUGINS="${PLUGINS} svgalib"
2121 LDFLAGS_svgalib="${LDFLAGS_svgalib} -lvgagl -lvga"
2128 [ --enable-ggi GGI support (default disabled)])
2129 if test "x${enable_ggi}" = "xyes"
2131 PLUGINS="${PLUGINS} ggi"
2132 LDFLAGS_ggi="${LDFLAGS_ggi} -lggi"
2134 [ --with-ggi=PATH path to libggi],
2135 [ if test "x${with_ggi}" != "xno" -a "x${with_ggi}" != "x"
2137 CPPFLAGS_ggi="${CPPFLAGS_ggi} -I${with_ggi}/include"
2138 LDFLAGS_ggi="${LDFLAGS_ggi} -L${with_ggi}/lib"
2145 AC_ARG_ENABLE(glide,
2146 [ --enable-glide Glide (3dfx) support (default disabled)])
2147 if test "x${enable_glide}" = "xyes"
2149 PLUGINS="${PLUGINS} glide"
2150 LDFLAGS_glide="${LDFLAGS_glide} -lglide2x -lm"
2151 CPPFLAGS_glide="${CPPFLAGS_glide} -I/usr/include/glide"
2153 [ --with-glide=PATH path to libglide],
2154 [ if test "x${with_glide}" != "xno" -a "x${with_glide}" != "x"
2156 CPPFLAGS_glide="${CPPFLAGS_glide} -I${with_glide}/include"
2157 LDFLAGS_glide="${LDFLAGS_glide} -L${with_glide}/lib"
2165 [ --enable-aa aalib output (default disabled)])
2166 if test "x${enable_aa}" = "xyes"
2168 AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
2169 if test "x${have_aa}" = "xtrue"
2171 PLUGINS="${PLUGINS} aa"
2172 LDFLAGS_aa="${LDFLAGS_aa} -laa"
2177 dnl win32 GDI plugin
2179 AC_ARG_ENABLE(wingdi,
2180 [ --enable-wingdi Win32 GDI module (default enabled on Win32)])
2181 if test "x${enable_wingdi}" != "xno"; then
2182 if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
2183 PLUGINS="${PLUGINS} wingdi"
2184 LDFLAGS_wingdi="${LDFLAGS_wingdi} -lgdi32"
2192 AC_ARG_WITH(,[Audio plugins:])
2195 dnl OSS /dev/dsp module (enabled by default except on win32)
2198 [ --enable-oss Linux OSS /dev/dsp support (enabled on Linux)])
2200 if test "x${enable_oss}" != "xno" &&
2201 (test "x${SYS}" != "xmingw32" || test "x${enable_oss}" = "xyes")
2203 AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h, [
2204 PLUGINS="${PLUGINS} oss"
2205 AC_CHECK_LIB(ossaudio,main,LDFLAGS_oss="${LDFLAGS_oss} -lossaudio")
2213 [ --enable-esd Esound library support (default disabled)],
2214 [if test "x${enable_esd}" = "xyes"
2216 AC_PATH_PROG(ESD_CONFIG, esd-config, no)
2217 if test "x${ESD_CONFIG}" != "xno"
2219 PLUGINS="${PLUGINS} esd"
2220 CFLAGS_esd="${CFLAGS_esd} `${ESD_CONFIG} --cflags`"
2221 LDFLAGS_esd="${LDFLAGS_esd} `${ESD_CONFIG} --libs`"
2229 [ --enable-arts aRts sound server (default disabled)],
2230 [if test "x${enable_arts}" = "xyes"
2232 AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
2233 if test "x${ARTS_CONFIG}" != "xno"
2235 PLUGINS="${PLUGINS} arts"
2236 CFLAGS_arts="${CFLAGS_arts} `${ARTS_CONFIG} --cflags`"
2237 LDFLAGS_arts="${LDFLAGS_arts} `${ARTS_CONFIG} --libs `"
2245 [ --enable-alsa ALSA sound support for Linux (default disabled)],
2246 [if test "x${enable_alsa}" = "xyes"
2248 AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
2249 if test "x${have_alsa}" = "xtrue"
2251 AC_TRY_COMPILE([#define ALSA_PCM_NEW_HW_PARAMS_API
2252 #define ALSA_PCM_NEW_SW_PARAMS_API
2253 #include <alsa/asoundlib.h>],
2254 [void foo() { snd_pcm_hw_params_get_period_time(0,0,0); }],
2255 AC_DEFINE(HAVE_ALSA_NEW_API, 1, Define if ALSA is at least rc4))
2256 PLUGINS="${PLUGINS} alsa"
2257 LDFLAGS_alsa="${LDFLAGS_alsa} -lasound -lm -ldl"
2259 AC_MSG_ERROR([Could not find ALSA development headers])
2264 dnl win32 waveOut plugin
2266 AC_ARG_ENABLE(waveout,
2267 [ --enable-waveout Win32 waveOut module (default enabled on Win32)])
2268 if test "x${enable_waveout}" != "xno"; then
2269 if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
2270 PLUGINS="${PLUGINS} waveout"
2271 LDFLAGS_waveout="-lwinmm"
2276 dnl CoreAudio plugin
2278 AC_ARG_ENABLE(coreaudio,
2279 [ --enable-coreaudio CoreAudio module (default enabled on MacOS X)])
2280 if test "x${enable_coreaudio}" != "xno" &&
2281 (test "x${SYS}" = "xdarwin" || test "x${enable_coreaudio}" = "xyes")
2283 AC_CHECK_HEADERS(CoreAudio/CoreAudio.h,
2284 [ BUILTINS="${BUILTINS} coreaudio"
2285 LDFLAGS_coreaudio="${LDFLAGS_coreaudio} -framework CoreAudio"
2286 AC_MSG_CHECKING(for kAudioConverterPrimeMethod in AudioToolbox/AudioConverter.h)
2287 AC_EGREP_HEADER(kAudioConverterPrimeMethod,AudioToolbox/AudioConverter.h,[
2289 PLUGINS="${PLUGINS} coreaudio_resampler"
2290 LDFLAGS_coreaudio_resampler="${LDFLAGS_coreaudio_resampler} -framework AudioToolbox"
2291 ],[ AC_MSG_RESULT(no) ])
2292 ], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
2296 dnl Interface plugins
2299 AC_ARG_WITH(,[Interface plugins:])
2301 dnl special case for BeOS
2302 if test "x${SYS}" = "xbeos"
2304 PLUGINS="${PLUGINS} beos"
2310 AC_ARG_ENABLE(skins,
2311 [ --enable-skins Win32 skins module (default enabled on Win32)])
2312 if test "x${enable_skins}" != "xno"; then
2313 if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
2314 PLUGINS="${PLUGINS} skins"
2315 CPPFLAGS_skins="${CPPFLAGS_skins} -O2 -fno-rtti -Imodules/gui/skins -Imodules/gui/skins/src -Imodules/gui/skins/win32 -Imodules/gui/skins/controls"
2316 LDFLAGS_skins="${LDFLAGS_skins} -lstdc++ -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32 -lmsimg32"
2318 if test "x${enable_skins}" = "xyes"; then
2319 PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])
2320 PLUGINS="${PLUGINS} skins"
2321 CPPFLAGS_skins="${CPPFLAGS_skins} -O2 -fno-rtti -Imodules/gui/skins -Imodules/gui/skins/src -Imodules/gui/skins/gtk2 -Imodules/gui/skins/controls -Imodules/gui/skins/parser ${GTK2_CFLAGS}"
2322 LDFLAGS_skins="${LDFLAGS_skins} -lstdc++ ${GTK2_LIBS}"
2325 WXWINDOWS_PATH="${PATH}"
2326 AC_ARG_WITH(wx-config-path,
2327 [ --with-wx-config-path=PATH wx-config path (default search in \$PATH)],
2328 [ if test "x${with_wx_config_path}" != "xno"
2330 WXWINDOWS_PATH="${with_wx_config_path}:${PATH}"
2332 # look for wx-config
2333 AC_PATH_PROG(WX_CONFIG, wx-config, no, ${WXWINDOWS_PATH})
2334 if test "x${WX_CONFIG}" != "xno"
2336 if expr 2.3.0 \> `${WX_CONFIG} --version` >/dev/null
2338 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-skins.])
2340 CPPFLAGS_skins="${CPPFLAGS_skins} `${WX_CONFIG} --cxxflags`"
2341 LDFLAGS_skins="${LDFLAGS_skins} `${WX_CONFIG} --libs`"
2349 [ --enable-gtk Gtk+ support (default enabled)])
2350 if test "x${enable_gtk}" != "xno"
2353 AC_ARG_WITH(gtk-config-path,
2354 [ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
2355 [ if test "x${with_gtk_config_path}" != "xno"
2357 GTK_PATH="${with_gtk_config_path}:${PATH}"
2359 # look for gtk-config
2360 AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
2361 GTK_CONFIG=${GTK12_CONFIG}
2362 if test "x${GTK_CONFIG}" = "xno"
2364 AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
2366 if test "x${GTK_CONFIG}" != "xno"
2368 if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
2370 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.])
2372 if test "x${SYS}" != "xmingw32"; then
2373 CFLAGS_gtk="${CFLAGS_gtk} `${GTK_CONFIG} --cflags gtk gthread`"
2374 LDFLAGS_gtk="${LDFLAGS_gtk} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
2376 CFLAGS_gtk="${CFLAGS_gtk} `${GTK_CONFIG} --cflags gtk`"
2377 LDFLAGS_gtk="${LDFLAGS_gtk} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
2379 # now look for the gtk.h header
2380 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gtk}"
2381 ac_cv_gtk_headers=yes
2382 AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
2383 ac_cv_gtk_headers=no
2384 echo "Cannot find gtk development headers."
2386 if test "x${ac_cv_gtk_headers}" = "xyes"
2388 PLUGINS="${PLUGINS} gtk"
2389 if test "x${SYS}" != "xmingw32"; then
2392 ALIASES="${ALIASES} gvlc"
2394 CPPFLAGS="${CPPFLAGS_save}"
2402 [ --enable-gtk2 Gtk2 support (default disabled)])
2403 if test "x${enable_gtk2}" = "xyes"
2405 PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])
2406 CFLAGS_gtk2="${CFLAGS_gtk2} ${GTK2_CFLAGS}"
2407 LDFLAGS_gtk2="${LDFLAGS_gtk2} ${GTK2_LIBS}"
2408 PLUGINS="${PLUGINS} gtk2"
2409 if test "x${SYS}" != "xmingw32"; then
2415 dnl Familiar module uses Gtk+ library
2417 AC_ARG_ENABLE(familiar,
2418 [ --enable-familiar Familiar Gtk+ support (default disabled)])
2419 if test "x${enable_familiar}" = "xyes"
2422 AC_ARG_WITH(gtk-config-path,
2423 [ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
2424 [ if test "x${with_gtk_config_path}" != "xno"
2426 GTK_PATH="${with_gtk_config_path}:${PATH}"
2428 # look for gtk-config
2429 AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
2430 GTK_CONFIG=${GTK12_CONFIG}
2431 if test "x${GTK_CONFIG}" = "xno"
2433 AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
2435 # check for cross-compiling
2437 AC_ARG_WITH(gtk-prefix,
2438 [ --with-gtk-prefix=PATH path to libgtk (needed for cross-compiling),
2440 --with-gtk-prefix=/usr/local/arm/2.95.3/arm-linux/usr)],[],[])
2441 if test "x${with_gtk_prefix}" != "xno" -a "x${with_gtk_prefix}" != "x"
2443 GTK_PREFIX="--prefix=$with_gtk_prefix"
2445 if test "x${GTK_CONFIG}" != "xno"
2447 if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
2449 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.])
2451 CFLAGS_familiar="${CFLAGS_familiar} `${GTK_CONFIG} ${GTK_PREFIX} --cflags gtk gthread`"
2452 LDFLAGS_familiar="${LDFLAGS_familiar} `${GTK_CONFIG} ${GTK_PREFIX} --libs gtk gthread | sed 's,-rdynamic,,'`"
2453 # now look for the gtk.h header
2454 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_familiar}"
2455 ac_cv_gtk_headers=yes
2456 AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
2457 ac_cv_gtk_headers=no
2458 echo "Cannot find gtk development headers."
2460 if test "x${ac_cv_gtk_headers}" = "xyes"
2462 PLUGINS="${PLUGINS} familiar"
2464 CPPFLAGS="${CPPFLAGS_save}"
2466 # now look for gpe support
2467 AC_ARG_WITH(gpe-prefix,
2468 [ --with-gpe-prefix=PATH gpe installation path prefix (default search in \$PATH)],[],[])
2469 if test "x$with_gpe_prefix" != "xno" -a "x$with_gpe_prefix" != "x"
2471 CFLAGS_gpe="-I$with_gpe_prefix/include"
2472 LDFLAGS_gpe="-lXi -lgdk_pixbuf -L$with_gpe_prefix/lib -lgpewidget"
2473 # now look for gpe/init.h header file
2475 LDFLAGS_save=$LDFLAGS
2476 CFLAGS="${CFLAGS_familiar} ${CFLAGS_gpe}"
2477 LDFLAGS="${LDFLAGS_familiar} ${LDFLAGS_gpe}"
2478 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_familiar} ${CFLAGS_gpe}"
2479 ac_cv_gpe_headers=yes
2480 AC_CHECK_HEADERS(gpe/init.h, ,
2481 [ ac_cv_gpe_headers=no
2482 AC_MSG_ERROR([Cannot find development headers for libgpewidget...]) ])
2484 LDFLAGS=$LDFLAG_save
2485 if test "x${ac_cv_gpe_headers}" = "xyes"
2487 CFLAGS_familiar="${CFLAGS_familiar} ${CFLAGS_gpe}"
2488 LDFLAGS_familiar="${LDFLAGS_familiar} ${LDFLAGS_gpe}"
2492 fi # end gpe support
2493 fi # end gtk+ support
2499 AC_ARG_ENABLE(gnome,
2500 [ --enable-gnome Gnome interface support (default disabled)],
2501 [if test "x${enable_gnome}" = "xyes"; then
2502 # look for gnome-config
2503 AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
2504 if test -x ${GNOME_CONFIG}
2506 CFLAGS_gnome="${CFLAGS_gnome} `${GNOME_CONFIG} --cflags gtk gnomeui`"
2507 LDFLAGS_gnome="${LDFLAGS_gnome} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
2509 # now look for the gnome.h header
2510 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gnome}"
2511 AC_CHECK_HEADERS(gnome.h, [
2512 PLUGINS="${PLUGINS} gnome"
2515 ALIASES="${ALIASES} gnome-vlc"
2516 dnl We need this because of some moronic gnomesupport.h flavours
2517 AC_MSG_CHECKING(for strndup in gnome.h)
2518 AC_EGREP_HEADER(strndup,gnome.h,[
2520 AC_DEFINE(STRNDUP_IN_GNOME_H, 1,
2521 Define if <gnome.h> defines strndup.)],[
2524 AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
2525 developement tools or remove the --enable-gnome option])
2527 CPPFLAGS="${CPPFLAGS_save}"
2533 AC_ARG_ENABLE(gnome2,
2534 [ --enable-gnome2 Gnome2 support (default disabled)])
2535 if test "x${enable_gnome2}" = "xyes"
2537 PKG_CHECK_MODULES(GNOME2, [libgnomeui-2.0])
2538 CFLAGS_gnome2="${CFLAGS_gnome2} ${GNOME2_CFLAGS}"
2539 LDFLAGS_gnome2="${LDFLAGS_gnome2} ${GNOME2_LIBS}"
2540 PLUGINS="${PLUGINS} gnome2"
2541 if test "x${SYS}" != "xmingw32"; then
2542 NEED_GNOME2_MAIN=yes
2547 dnl wxWindows module
2549 AC_ARG_ENABLE(wxwindows,
2550 [ --enable-wxwindows wxWindows support (default enabled)])
2551 if test "x${enable_wxwindows}" != "xno"
2553 WXWINDOWS_PATH="${PATH}"
2554 AC_ARG_WITH(wx-config-path,
2555 [ --with-wx-config-path=PATH wx-config path (default search in \$PATH)],
2556 [ if test "x${with_wx_config_path}" != "xno"
2558 WXWINDOWS_PATH="${with_wx_config_path}:${PATH}"
2560 # look for wx-config
2561 AC_PATH_PROG(WX_CONFIG, wx-config, no, ${WXWINDOWS_PATH})
2562 if test "x${WX_CONFIG}" != "xno"
2564 if expr 2.3.0 \> `${WX_CONFIG} --version` >/dev/null
2566 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.])
2568 CXXFLAGS_wxwindows="${CXXFLAGS_wxwindows} `${WX_CONFIG} --cxxflags`"
2569 LDFLAGS_wxwindows="${LDFLAGS_wxwindows} `${WX_CONFIG} --libs`"
2570 # now look for the wxprec.h header
2571 CPPFLAGS="${CPPFLAGS_save} ${CXXFLAGS_wxwindows}"
2572 ac_cv_wx_headers=yes
2573 AC_CHECK_HEADERS(wx/wxprec.h, , [
2575 echo "Cannot find wxWindows development headers."
2577 if test "x${ac_cv_wx_headers}" = "xyes"
2579 PLUGINS="${PLUGINS} wxwindows"
2580 ALIASES="${ALIASES} wxvlc"
2582 CPPFLAGS="${CPPFLAGS_save}"
2590 [ --enable-qt Qt interface support (default disabled)],
2591 [if test "x${enable_qt}" = "xyes"; then
2592 PLUGINS="${PLUGINS} qt"
2593 ALIASES="${ALIASES} qvlc"
2594 LDFLAGS_qt="${LDFLAGS_qt} -L${QTDIR}/lib"
2595 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_qt}"
2596 AC_CHECK_LIB(qt-mt,main,[
2597 LDFLAGS_qt="${LDFLAGS_qt} -lqt-mt"
2599 AC_CHECK_LIB(qt,main,[
2600 LDFLAGS_qt="${LDFLAGS_qt} -lqt"
2603 LDFLAGS="${LDFLAGS_save}"
2604 CPPFLAGS_qt="${CPPFLAGS_qt} -I/usr/include/qt3 -I/usr/include/qt -I${QTDIR}/include"
2605 if test -x ${QTDIR}/bin/moc
2607 MOC=${QTDIR}/bin/moc
2617 [ --enable-kde KDE interface support (default disabled)],
2618 [if test "x${enable_kde}" = "xyes"; then
2619 PLUGINS="${PLUGINS} kde"
2620 ALIASES="${ALIASES} kvlc"
2621 LDFLAGS_kde="${LDFLAGS_kde} -L${KDEDIR}/lib"
2622 dnl Check for -lkfile (only in KDE 2) or -lkdeui -lkio (KDE 3)
2623 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
2624 AC_CHECK_LIB(kfile,main,[
2625 LDFLAGS_kde="${LDFLAGS_kde} -lkfile"
2627 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
2628 AC_CHECK_LIB(kdeui,main,[
2629 LDFLAGS_kde="${LDFLAGS_kde} -lkdeui"
2631 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
2632 AC_CHECK_LIB(kio,main,[
2633 LDFLAGS_kde="${LDFLAGS_kde} -lkio"
2635 LDFLAGS="${LDFLAGS_save}"
2636 CPPFLAGS_kde="${CPPFLAGS_kde} -I/usr/include/kde -I/usr/include/qt3 -I/usr/include/qt"
2637 CPPFLAGS_kde="${CPPFLAGS_kde} -I${KDEDIR}/include -I${QTDIR}/include"
2638 if test -x ${QTDIR}/bin/moc
2640 MOC=${QTDIR}/bin/moc
2647 dnl Opie QT embedded module
2650 [ --enable-opie Qt embedded interface support (default disabled)],
2651 [if test "x${enable_opie}" = "xyes"; then
2653 [ --with-qte=PATH Qt Embedded headers and libraries])
2654 if test "x${with_qte}" != "xno" -a "x${with_qte}" != "x"
2656 LDFLAGS_qte="-L${with_qte}/lib `echo -L${with_qte}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte"
2657 CPPFLAGS_qte="-I${with_qte}/include `echo -I${with_qte}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti"
2659 LDFLAGS_qte="-L${QTDIR}/lib `echo -L${QTDIR}/lib | sed 's,opt/QtPalmtop,usr,'`"
2660 CPPFLAGS_qte="-I${QTDIR}/include `echo -I${QTDIR}/include | sed 's,opt/QtPalmtop,usr,'`"
2662 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_qte}"
2663 AC_CHECK_HEADERS(qt.h jpeglib.h, ,[
2664 AC_MSG_ERROR([echo "Cannot find QT Embedded development headers."])
2666 CPPFLAGS="${CPPFLAGS_save}"
2668 PLUGINS="${PLUGINS} opie"
2670 LDFLAGS_opie="${LDFLAGS_opie} -lqpe ${LDFLAGS_qte}"
2671 CPPFLAGS_opie="${CPPFLAGS_opie} ${CPPFLAGS_qte}"
2672 if test "x${with_qte}" != "xno" -a "x${with_qte}" != "x"
2674 MOC=${with_qte}/bin/moc
2676 MOC=${QTDIR}/bin/moc
2683 AC_ARG_ENABLE(macosx,
2684 [ --enable-macosx MacOS X support (default enabled on MacOS X)],
2685 [if test "x${enable_macosx}" = "xyes"
2687 BUILTINS="${BUILTINS} macosx"
2688 LDFLAGS_macosx="${LDFLAGS_macosx} -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
2690 [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
2691 BUILTINS="${BUILTINS} macosx"
2692 LDFLAGS_macosx="${LDFLAGS_macosx} -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
2699 [ --enable-qnx QNX RTOS support (default enabled on QNX RTOS)])
2700 if test "x${enable_qnx}" != "xno"
2702 AC_CHECK_HEADERS(Ph.h, [
2703 PLUGINS="${PLUGINS} qnx"
2704 LDFLAGS_qnx="${LDFLAGS_qnx} -lasound -lph"
2709 dnl Windows native interface module, built with Borland C++ Builder
2711 AC_ARG_ENABLE(intfwin,
2712 [ --enable-intfwin Win32 interface support (default disabled)],
2713 [ if test "x${enable_intfwin}" != "xno"
2715 AC_CHECK_TOOL(BPR2MAK, bpr2mak, AC_ERROR(bpr2mak not found))
2716 AC_CHECK_TOOL(BCMAKE, bcmake, AC_ERROR(bcmake not found))
2717 PLUGINS="${PLUGINS} win32"
2723 AC_ARG_ENABLE(ncurses,
2724 [ --enable-ncurses ncurses interface support (default disabled)],
2725 [if test "x${enable_ncurses}" = "xyes"; then
2726 PLUGINS="${PLUGINS} ncurses"
2727 LDFLAGS_ncurses="${LDFLAGS_ncurses} -lncurses"
2734 [ --enable-xosd xosd interface support (default disabled)])
2735 if test "x${enable_xosd}" = "xyes"
2737 AC_CHECK_HEADER(xosd.h, have_xosd="true", have_xosd="false")
2738 AC_CHECK_LIB(xosd,xosd_set_offset,
2739 AC_DEFINE(HAVE_XOSD_VERSION_1, 1, Define if <xosd.h> is 1.0.x),
2740 AC_CHECK_LIB(xosd,xosd_set_horizontal_offset,
2741 AC_DEFINE(HAVE_XOSD_VERSION_2, 1, Define if <xosd.h> is 2.0.x),
2742 AC_TRY_COMPILE([#include <xosd.h>],
2743 [void foo() { xosd_init("foo","bar",12,XOSD_top,2,12,42); }],,
2744 AC_DEFINE(HAVE_XOSD_VERSION_0, 1, Define if <xosd.h> is pre-1.0.0))))
2745 if test "x${have_xosd}" = "xtrue"
2747 PLUGINS="${PLUGINS} xosd"
2748 LDFLAGS_xosd="${LDFLAGS_xosd} -lxosd"
2753 dnl SLP access plugin
2756 [ --enable-slp SLP service discovery support (default enabled)])
2757 if test "x${enable_slp}" != "xno"
2760 [ --with-slp=PATH libslp headers and libraries])
2761 if test "x${with_slp}" = x
2763 AC_CHECK_HEADER(slp.h, have_slp="true", have_slp="false")
2764 if test "x${have_slp}" = "xtrue"
2766 PLUGINS="${PLUGINS} slp"
2767 LDFLAGS_slp="-lslp ${LDFLAGS_slp}"
2770 AC_MSG_CHECKING(for slp headers in ${with_slp})
2771 if test -f ${with_slp}/slp.h
2773 dnl Use ${with_slp}/libslp/slp.h
2775 PLUGINS="${PLUGINS} slp"
2776 LDFLAGS_slp="-L${with_slp} -lslp ${LDFLAGS_slp}"
2777 CPPFLAGS_slp="${CPPFLAGS_slp} -I${with_slp}"
2779 dnl No libslp could be found, sorry
2781 AC_MSG_ERROR([cannot find ${with_slp}/slp.h])
2790 [ --enable-lirc lirc support (default disabled)])
2791 if test "x${enable_lirc}" = "xyes"
2793 AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
2794 if test "x${have_lirc}" = "xtrue"
2796 PLUGINS="${PLUGINS} lirc"
2797 LDFLAGS_lirc="${LDFLAGS_lirc} -llirc_client"
2801 AC_ARG_WITH(,[Misc options:])
2804 dnl Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
2806 dnl We give the user the opportunity to specify
2807 dnl --with-words=big or --with-words=little ; otherwise, try to guess
2810 [ --with-words=endianness set endianness (big or little)])
2811 case "x${with_words}" in
2813 ac_cv_c_bigendian=yes
2816 ac_cv_c_bigendian=no
2819 dnl Try to guess endianness by matching patterns on a compiled
2820 dnl binary, by looking for an ASCII or EBCDIC string
2821 AC_CACHE_CHECK([whether the byte order is big-endian],
2822 [ac_cv_c_bigendian],
2823 [ac_cv_c_bigendian="unknown"
2824 [cat >conftest.c <<EOF
2825 short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
2826 short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
2827 void _a(void) { char*s = (char*)am; s = (char *)ai; }
2828 short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
2829 short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
2830 void _e(void) { char*s = (char*)em; s = (char*)ei; }
2831 int main(void) { _a(); _e(); return 0; }
2834 if test -f conftest.c
2836 if ${CC-cc} -c conftest.c -o conftest.o >>config.log 2>&1 \
2837 && test -f conftest.o
2839 if test "`strings conftest.o | grep BIGenDianSyS`"
2841 ac_cv_c_bigendian="yes"
2843 if test "`strings conftest.o | grep LiTTleEnDian`"
2845 ac_cv_c_bigendian="no"
2850 if test "x${ac_cv_c_bigendian}" = "xunknown"
2852 AC_MSG_ERROR([Could not guess endianness, please use --with-words])
2856 dnl Now we know what to use for endianness, just put it in the header
2857 if test "${ac_cv_c_bigendian}" = "yes"
2859 AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system)
2866 AC_ARG_ENABLE(mozilla,
2867 [ --enable-mozilla build a vlc-based Mozilla plugin (default disabled)])
2868 if test "x${enable_mozilla}" = "xyes"
2870 AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
2871 if test "x${MOZILLA_CONFIG}" != "xno"
2873 if test "x${SYS}" != "xmingw32"; then
2874 LDFLAGS="${LDFLAGS_save} -L${x_libraries}"
2875 AC_CHECK_LIB(Xt,XtStrings,[
2876 LDFLAGS_mozilla="${LDFLAGS_mozilla} -L${x_libraries} -lXt"
2878 LDFLAGS="${LDFLAGS_save}"
2881 dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490
2882 [CPPFLAGS_mozilla="${CPPFLAGS_mozilla} `${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`"]
2883 #[CPPFLAGS_mozilla="${CPPFLAGS_mozilla} `${MOZILLA_CONFIG} --cflags plugin xpcom java --defines | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`"]
2884 LDFLAGS_mozilla="${LDFLAGS_mozilla} `${MOZILLA_CONFIG} --libs plugin xpcom`"
2885 dnl Not necessarily in ${PATH}
2886 if test "x${XPIDL}" = "x" -o ! -x "${XPIDL}"
2888 XPIDL="/usr/lib/mozilla/xpidl"
2892 AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
2897 AC_ARG_ENABLE(testsuite,
2898 [ --enable-testsuite build test modules (default disabled)])
2899 if test "x${enable_testsuite}" = "xyes"
2901 TESTS="test1 test2 test3 test4"
2903 dnl we define those so that bootstrap sets the right linker
2904 CXXFLAGS_test2="${CXXFLAGS_test2}"
2905 OBJCFLAGS_test3="${OBJCFLAGS_test3}"
2906 dnl this one is needed until automake knows what to do
2907 LDFLAGS_test3="${LDFLAGS_test3} -lobjc"
2909 PLUGINS="${PLUGINS} ${TESTS}"
2910 #BUILTINS="${BUILTINS} ${TESTS}"
2916 if test "x${NEED_GTK_MAIN}" != "xno"
2918 PLUGINS="${PLUGINS} gtk_main"
2919 CFLAGS_gtk="${CFLAGS_gtk} -DNEED_GTK_MAIN"
2920 CFLAGS_familiar="${CFLAGS_familiar} -DNEED_GTK_MAIN"
2921 CFLAGS_gtk_main="${CFLAGS_gtk_main} ${CFLAGS_gtk} ${CFLAGS_familiar}"
2922 LDFLAGS_gtk_main="${LDFLAGS_gtk_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar}"
2925 if test "x${NEED_GNOME_MAIN}" != "xno"
2927 PLUGINS="${PLUGINS} gnome_main"
2928 CFLAGS_gnome_main="${CFLAGS_gnome_main} ${CFLAGS_gtk} ${CFLAGS_familiar} ${CFLAGS_gnome}"
2929 LDFLAGS_gnome_main="${LDFLAGS_gnome_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar} ${LDFLAGS_gnome}"
2932 if test "x${NEED_GTK2_MAIN}" != "xno"
2934 PLUGINS="${PLUGINS} gtk2_main"
2935 CFLAGS_gtk2="${CFLAGS_gtk2} -DNEED_GTK2_MAIN"
2936 CFLAGS_gtk2_main="${CFLAGS_gtk2_main} ${CFLAGS_gtk2}"
2937 LDFLAGS_gtk2_main="${LDFLAGS_gtk2_main} ${LDFLAGS_gtk2}"
2940 if test "x${NEED_GNOME2_MAIN}" != "xno"
2942 PLUGINS="${PLUGINS} gnome2_main"
2943 CFLAGS_gnome2_main="${CFLAGS_gnome2_main} ${CFLAGS_gtk2} ${CFLAGS_gnome2}"
2944 LDFLAGS_gnome2_main="${LDFLAGS_gnome2_main} ${LDFLAGS_gtk2} ${LDFLAGS_gnome2}"
2950 if test "x${NEED_QTE_MAIN}" != "xno"
2952 PLUGINS="${PLUGINS} qte_main"
2953 CPPFLAGS_qte="${CPPFLAGS_qte} -DNEED_QTE_MAIN"
2954 CPPFLAGS_opie="${CPPFLAGS_opie} -DNEED_QTE_MAIN"
2955 CFLAGS_vout_sdl="${CFLAGS_vout_sdl} -DNEED_QTE_MAIN"
2956 CPPFLAGS_qte_main="${CFLAGS_qte_main} ${CPPFLAGS_qte}"
2957 LDFLAGS_qte_main="${LDFLAGS_qte_main} ${LDFLAGS_qte}"
2962 dnl Plugin and builtin checks
2964 builtin_support=false
2967 dnl Support for plugins - this must be AT THE END
2968 AC_ARG_ENABLE(plugins,
2969 [ --disable-plugins make all plugins built-in (default plugins enabled)],
2970 [if test "x${enable_plugins}" = "xno"
2972 plugin_support=false
2975 dnl Automagically disable plugins if there is no system support for
2976 dnl dynamically loadable files (.so, .dll, .dylib).
2977 dnl don't forget vlc-win32 still can load .dll as plugins
2978 if test "x${ac_cv_header_dlfcn_h}" = "xno" -a "x${ac_cv_header_image_h}" = "xno" -a "x${SYS}" != "xmingw32"
2980 echo "*** Your system doesn't have plugin support. All plugins will be built"
2982 plugin_support=false
2985 dnl Export automake variables
2986 if ${plugin_support}
2988 for plugin in `echo ${PLUGINS}`
2990 eval "${plugin}_plugin=yes"
2993 BUILTINS="${BUILTINS} ${PLUGINS}"
2996 AM_CONDITIONAL(HAVE_PLUGINS, ${plugin_support})
2998 [if echo "${BUILTINS}" | grep '[^ ]' >/dev/null 2>&1
3001 for builtin in `echo ${BUILTINS}`
3003 eval "${builtin}_builtin=yes"
3006 AM_CONDITIONAL(HAVE_BUILTINS, ${builtin_support})
3008 dnl do not touch this line (bootstrap needs it)
3012 dnl Stuff used by the program
3014 AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION} ${CODENAME}", [Simple version string])
3015 AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VLC media player - version ${VERSION} ${CODENAME} - (c) 1996-2003 VideoLAN", [Copyright string])
3016 AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
3018 VLC_SYMBOL="`echo ${VERSION} | sed -e 'y/.-/__/'`"
3019 AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module functions])
3020 AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
3021 AC_DEFINE_UNQUOTED(LIBEXT, "${LIBEXT}", [Dynamic object extension])
3023 DATA_PATH="${ac_tool_prefix}/share/vlc"
3025 PLUGIN_PATH="${ac_tool_prefix}/lib/vlc"
3026 AC_SUBST(PLUGIN_PATH)
3031 CPPFLAGS="${CPPFLAGS_save}"
3032 CFLAGS="${CFLAGS_save}"
3033 CXXFLAGS="${CXXFLAGS_save}"
3034 OBJCFLAGS="${OBJCFLAGS_save}"
3035 LDFLAGS="${LDFLAGS_save}"
3038 dnl Fool automake (see Makefile.am)
3040 AUTOMAKE_SUCKS="\$(L_builtin) \$(LDFLAGS_builtin)"
3041 AC_SUBST(AUTOMAKE_SUCKS)
3044 dnl Create the vlc-config script
3046 LDFLAGS_libvlc="${LDFLAGS_vlc} ${LDFLAGS_builtins}"
3047 for i in `echo "${BUILTINS}" | sed -e 's@[^ ]*/@@g'` ; do LDFLAGS_libvlc="${LDFLAGS_libvlc} ${libdir}/vlc/${i}.a `eval echo '$'{LDFLAGS_${i}}`" ; done
3050 dnl Configuration is finished
3063 AC_SUBST(ALL_LINGUAS)
3065 AC_SUBST(CFLAGS_TUNING)
3066 AC_SUBST(CFLAGS_OPTIM)
3067 AC_SUBST(CFLAGS_OPTIM_NODEBUG)
3068 AC_SUBST(CFLAGS_NOOPTIM)
3071 AC_SUBST(CFLAGS_vlc)
3072 AC_SUBST(CFLAGS_pics)
3073 AC_SUBST(CXXFLAGS_pics)
3074 AC_SUBST(CFLAGS_plugins)
3075 AC_SUBST(CXXFLAGS_plugins)
3076 AC_SUBST(CFLAGS_builtins)
3077 AC_SUBST(CPPFLAGS_mozilla)
3079 AC_SUBST(LDFLAGS_vlc)
3080 AC_SUBST(LDFLAGS_libvlc)
3081 AC_SUBST(LDFLAGS_plugins)
3082 AC_SUBST(LDFLAGS_builtins)
3083 AC_SUBST(LDFLAGS_mozilla)
3100 chmod a+x vlc-config
3105 --------------------
3106 vlc version : ${VERSION}
3108 architecture : ${ARCH}
3110 test "x${DEBUG_TRUE}" = "x" && printf "debug "
3111 test "x${CPROF_TRUE}" = "x" && printf "cprof "
3112 test "x${GPROF_TRUE}" = "x" && printf "gprof "
3113 test "x${OPTIM_TRUE}" = "x" && printf "optim "
3114 test "x${RELEASE_TRUE}" = "x" && printf "release " || printf "devel "
3116 vlc aliases :${ALIASES}
3118 To build vlc and its plugins, type \`make'.