1 dnl Autoconf settings for vlc
9 AC_CONFIG_SRCDIR(src/libvlc.c)
12 dnl XXX: we don't put any flags here, because automake 1.5 doesn't support
13 dnl them. And we need the comma otherwize automake will choke on it.
14 AM_INIT_AUTOMAKE(vlc,0.5.0-cvs)
15 AM_CONFIG_HEADER(config.h)
20 CPPFLAGS_save="${CPPFLAGS}"
21 CFLAGS_save="${CFLAGS}"
22 CXXFLAGS_save="${CXXFLAGS}"
23 OBJCFLAGS_save="${OBJCFLAGS}"
24 LDFLAGS_save="${LDFLAGS}"
36 dnl AC_PROG_OBJC doesn't seem to exist, this is the KDE workaround
37 AC_MSG_CHECKING(for an Objective-C compiler)
40 OBJCFLAGS="${CXXFLAGS} -fgnu-runtime -fconstant-string-class=NSConstantString"
42 dnl _AM_DEPENDENCIES(OBJC) doesn't work, so hard code OBJCDEPMODE here
43 #OBJCDEPMODE="depmode=gcc3"
44 #AC_SUBST(OBJCDEPMODE)
45 _AM_DEPENDENCIES(OBJC)
46 AC_MSG_RESULT(not implemented yet)
48 dnl Find the right ranlib, even when cross-compiling
49 AC_CHECK_TOOL(RANLIB, ranlib, :)
50 AC_CHECK_TOOL(STRIP, strip, :)
55 ALL_LINGUAS="de en_GB fr ja no ru nl pl se"
56 AM_GNU_GETTEXT_VERSION(0.10.40)
58 if test "${nls_cv_force_use_gnu_gettext}" = "yes"; then
59 AC_DEFINE(HAVE_INCLUDED_GETTEXT, 1, Define if we use the local libintl)
60 INCLUDES="${INCLUDES} -I\\\$(top_srcdir)/intl"
62 AM_CONDITIONAL(BUILD_INTL, test "${nls_cv_force_use_gnu_gettext}" = "yes")
67 dnl Check for compiler properties
72 dnl Set default values
74 LDFLAGS_vlc="${LDFLAGS}"
78 dnl Check the operating system
80 case "x${target_os}" in
89 CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
90 LDFLAGS_dvd="${LDFLAGS_dvd} -ldvd"
91 LDFLAGS_vcd="${LDFLAGS_vcd} -ldvd"
95 CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
99 CFLAGS_save="${CFLAGS_save} -no-cpp-precomp"; CFLAGS="${CFLAGS_save}"
100 CXXFLAGS_save="${CXXFLAGS_save} -no-cpp-precomp"; CXXFLAGS="${CXXFLAGS_save}"
101 OBJCFLAGS_save="${OBJCFLAGS_save} -no-cpp-precomp"; OBJCFLAGS="${OBJCFLAGS_save}"
102 LDFLAGS_vlc="${LDFLAGS_vlc} -all_load"
105 x*mingw32* | x*cygwin*)
106 AC_CHECK_TOOL(WINDRES, windres, :)
109 case "x${target_os}" in
114 dnl Check if we are using the mno-cygwin mode in which case we are
115 dnl actually dealing with a mingw32 compiler.
120 SYS=mingw32, SYS=cygwin)
124 if test "x$SYS" = "xmingw32"; then
125 # add ws2_32 for closesocket, select, recv
126 CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"
127 CPPFLAGS="${CPPFLAGS_save}"
128 LDFLAGS_vlc="${LDFLAGS_vlc} -lws2_32 -lnetapi32 -mwindows"
129 LDFLAGS_ipv4="${LDFLAGS_ipv4} -lws2_32"
130 LDFLAGS_ipv6="${LDFLAGS_ipv6} -lws2_32"
131 LDFLAGS_access_http="${LDFLAGS_access_http} -lws2_32"
132 LDFLAGS_access_mms="${LDFLAGS_access_mms} -lws2_32"
133 LDFLAGS_access_rtp="${LDFLAGS_access_rtp} -lws2_32"
134 LDFLAGS_access_udp="${LDFLAGS_access_udp} -lws2_32"
135 LDFLAGS_rc="${LDFLAGS_rc} -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"
157 LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind"
163 AM_CONDITIONAL(HAVE_BEOS, test "x${SYS}" = "xbeos")
164 AM_CONDITIONAL(HAVE_DARWIN, test "x${SYS}" = "xdarwin")
165 AM_CONDITIONAL(HAVE_WIN32, test "x${SYS}" = "xmingw32")
167 AC_MSG_CHECKING(for suffix of libraries)
168 AC_MSG_RESULT(${LIBEXT})
170 dnl Check for the need to include the mingwex lib for mingw32
171 if test x$SYS = xmingw32
173 AC_CHECK_LIB(mingwex,opendir,
174 AC_CHECK_LIB(mingw32,opendir,LDFLAGS_vlc="${LDFLAGS_vlc}",
175 [LDFLAGS_vlc="${LDFLAGS_vlc} -lmingwex"
176 LDFLAGS_gtk="${LDFLAGS_gtk} -lmingwex"])
180 dnl Check for fnative-struct or mms-bitfields support for mingw32
181 if test x$SYS = xmingw32
183 AC_CACHE_CHECK([if \$CC accepts -mms-bitfields],
184 [ac_cv_c_mms_bitfields],
185 [CFLAGS="${CFLAGS_save} -mms-bitfields"
186 AC_TRY_COMPILE([],,ac_cv_c_mms_bitfields=yes, ac_cv_c_mms_bitfields=no)])
187 if test x"$ac_cv_c_mms_bitfields" != x"no"; then
188 CFLAGS_mingw32_special="-mms-bitfields"
190 CFLAGS_mingw32_special="-fnative-struct"
193 CFLAGS_save="${CFLAGS_save} ${CFLAGS_mingw32_special}";
194 CXXFLAGS_save="${CXXFLAGS_save} ${CFLAGS_mingw32_special}";
195 CFLAGS="${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
198 dnl Check for fvtable-thunks support for mingw32
199 if test x$SYS = xmingw32
202 AC_CACHE_CHECK([if \$CXX accepts -fvtable-thunks],
203 [ac_cv_cxx_fvtable_thunks],
204 [CXXFLAGS="${CXXFLAGS_save} -Wall -Werror -fvtable-thunks"
205 AC_TRY_COMPILE([],,ac_cv_cxx_fvtable_thunks=yes,
206 ac_cv_cxx_fvtable_thunks=no)])
207 if test x"$ac_cv_cxx_fvtable_thunks" = x"yes"; then
208 CXXFLAGS_mingw32_special="-fvtable-thunks"
211 CXXFLAGS_save="${CXXFLAGS_save} ${CXXFLAGS_mingw32_special}"
212 CXXFLAGS="${CXXFLAGS_save}"
216 dnl Flags for plugin compilation
219 CFLAGS_pics="${CFLAGS_pics} ${CFLAGS_mingw32_special}"
220 CXXFLAGS_pics="${CXXFLAGS_pics} ${CFLAGS_mingw32_special} ${CXXFLAGS_mingw32_special}"
221 OBJCFLAGS_pics="${OBJCFLAGS_pics} ${CFLAGS_mingw32_special}"
222 CFLAGS_plugins="${CFLAGS_plugins} ${CFLAGS_mingw32_special}"
223 CXXFLAGS_plugins="${CXXFLAGS_plugins} ${CFLAGS_mingw32_special} ${CXXFLAGS_mingw32_special}"
224 OBJCFLAGS_plugins="${OBJCFLAGS_plugins} ${CFLAGS_mingw32_special}"
227 CFLAGS_pics="${CFLAGS_pics} -fPIC"
228 CXXFLAGS_pics="${CXXFLAGS_pics} -fPIC"
229 OBJCFLAGS_pics="${OBJCFLAGS_pics} -fPIC"
230 CFLAGS_plugins="${CFLAGS_plugins} -fPIC"
231 CXXFLAGS_plugins="${CXXFLAGS_plugins} -fPIC"
232 OBJCFLAGS_plugins="${OBJCFLAGS_plugins} -fPIC"
233 LDFLAGS_plugins="${LDFLAGS_plugins} -fPIC"
237 dnl The -DSYS_FOO flag
238 CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"; CPPFLAGS="${CPPFLAGS_save}"
240 dnl Check for system libs needed
243 AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll getenv putenv setenv)
245 dnl Check for usual libc functions
246 AC_CHECK_FUNCS(strdup,,[need_libc=:])
247 AC_CHECK_FUNCS(strndup,,[need_libc=:])
248 AC_CHECK_FUNCS(atof,,[need_libc=:])
249 AC_CHECK_FUNCS(lseek,,[need_libc=:])
250 AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp,,[need_libc=:])])
251 AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp,,[need_libc=:])])
253 AM_CONDITIONAL(BUILD_LIBC, ${need_libc})
255 AC_CHECK_FUNC(connect,,[
256 AC_CHECK_LIB(socket,connect,
257 LDFLAGS_ipv4="${LDFLAGS_ipv4} -lsocket"
258 LDFLAGS_vlc="${LDFLAGS_vlc} -lsocket"
261 AC_CHECK_FUNC(send,,[
262 AC_CHECK_LIB(socket,send,
263 LDFLAGS_access_http="${LDFLAGS_access_http} -lsocket"
264 LDFLAGS_access_mms="${LDFLAGS_access_mms} -lsocket"
265 LDFLAGS_access_rtp="${LDFLAGS_access_rtp} -lsocket"
266 LDFLAGS_access_udp="${LDFLAGS_access_udp} -lsocket"
269 AC_CHECK_FUNC(gethostbyname,,[
270 AC_CHECK_LIB(nsl,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lnsl",[
271 AC_CHECK_LIB(bind,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind")])
275 AC_CHECK_FUNC(nanosleep,have_nanosleep=:,[
276 AC_CHECK_LIB(rt,nanosleep,
277 [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"; have_nanosleep=:],
278 [AC_CHECK_LIB(posix4,nanosleep,
279 [LDFLAGS_vlc="${LDFLAGS_vlc} -lposix4"; have_nanosleep=:])]
282 if ${have_nanosleep}; then
283 AC_DEFINE(HAVE_NANOSLEEP, 1,
284 Define if nanosleep is available.)
287 dnl Check for socklen_t
288 AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
290 [#include <sys/types.h>
291 #include <sys/socket.h>],
292 [socklen_t len = 42; return len;],
293 ac_cv_type_socklen_t=yes,
294 ac_cv_type_socklen_t=no)])
295 if test x$ac_cv_type_socklen_t != xno; then
296 AC_DEFINE(HAVE_SOCKLEN_T, 1,
297 Define if <sys/socket.h> defines socklen_t.)
301 AC_CHECK_LIB(rt,sem_init, [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"])
303 AC_CHECK_FUNC(inet_aton,,[
304 AC_CHECK_LIB(resolv,inet_aton,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lresolv")
306 AC_CHECK_FUNC(textdomain,,[
307 AC_CHECK_LIB(intl,textdomain,
308 LDFLAGS_vlc="${LDFLAGS_vlc} -lintl"
309 LDFLAGS_plugins="${LDFLAGS_plugins} -lintl"
315 AC_CHECK_FUNC(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
316 [ # FreeBSD has a gnugetopt library for this:
317 AC_CHECK_LIB([gnugetopt],[getopt_long],
318 [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) LDFLAGS_vlc="${LDFLAGS_vlc} -lgnugetopt"],
320 AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt})
323 AC_CHECK_LIB(dl,dlopen,LDFLAGS_vlc="${LDFLAGS_vlc} -ldl")
325 LDFLAGS_imdct="${LDFLAGS_imdct} -lm"
326 LDFLAGS_filter_distort="${LDFLAGS_filter_distort} -lm"
327 LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} -lm")
329 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lm"
330 LDFLAGS_imdct="${LDFLAGS_imdct} -lm"
331 LDFLAGS_imdct3dn="${LDFLAGS_imdct3dn} -lm"
332 LDFLAGS_imdctsse="${LDFLAGS_imdctsse} -lm"
333 LDFLAGS_i420_rgb="${LDFLAGS_i420_rgb} -lm"
334 LDFLAGS_faad="${LDFLAGS_faad} -lm"
337 dnl Check for pthreads - borrowed from XMMS
339 if test "x${THREAD_LIB}" = "xerror"; then
340 AC_CHECK_LIB(pthread,main,THREAD_LIB="-lpthread")
342 if test "x${THREAD_LIB}" = "xerror"; then
343 AC_CHECK_LIB(pthreads,main,THREAD_LIB="-lpthreads")
345 if test "x${THREAD_LIB}" = "xerror"; then
346 AC_CHECK_LIB(c_r,main,THREAD_LIB="-lc_r")
348 if test "x${THREAD_LIB}" = "xerror"; then
349 AC_CHECK_FUNC(pthread_mutex_lock)
353 dnl Check for cthreads under GNU/Hurd for instance
354 AC_CHECK_LIB(threads,cthread_fork,THREAD_LIB="-lthreads")
356 dnl Check for misc headers
357 AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
358 AC_DEFINE(PTHREAD_COND_T_IN_PTHREAD_H, 1,
359 Define if <pthread.h> defines pthread_cond_t.)])
360 AC_EGREP_HEADER(pthread_once,pthread.h,[
361 AC_DEFINE(PTHREAD_ONCE_IN_PTHREAD_H, 1,
362 Define if <pthread.h> defines pthread_once.)])
363 AC_EGREP_HEADER(strncasecmp,strings.h,[
364 AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
365 Define if <strings.h> defines strncasecmp.)])
367 dnl Check for headers
368 AC_CHECK_HEADERS(signal.h time.h errno.h stdint.h getopt.h strings.h inttypes.h sys/int_types.h)
369 AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h)
370 AC_CHECK_HEADERS(dlfcn.h image.h)
371 AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
372 AC_CHECK_HEADERS(machine/param.h sys/shm.h)
373 AC_CHECK_HEADERS(linux/version.h)
379 AC_CHECK_HEADERS(dirent.h,,[need_dirent=:])
380 AM_CONDITIONAL(BUILD_DIRENT, ${need_dirent})
382 dnl Mac OS X and other OSes don't have declaration for nanosleep
383 AC_EGREP_HEADER(nanosleep,time.h,[
384 AC_DEFINE(HAVE_DECL_NANOSLEEP, 1,
385 Define if <time.h> defines nanosleep.)
388 dnl Make sure we have timespecs
389 AC_EGREP_HEADER(timespec,sys/time.h,[
390 AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
391 Define if <sys/time.h> defines struct timespec.)
394 dnl Check for threads library
395 AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
397 dnl Default X headers and libraries
398 if test "x${x_includes}" = "xNONE"; then
399 x_includes="/usr/X11R6/include"
401 if test "x${x_libraries}" = "xNONE"; then
402 x_libraries="/usr/X11R6/lib"
405 dnl Build the gtk_main plugins?
410 if test "x${SYS}" != "xmingw32"
412 CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
413 AC_CHECK_HEADERS(X11/extensions/dpms.h, [
414 AC_EGREP_HEADER(DPMSInfo,X11/extensions/dpms.h,[
415 AC_DEFINE(DPMSINFO_IN_DPMS_H, 1,
416 Define if <X11/extensions/dpms.h> defines DPMSInfo.)
419 CPPFLAGS="${CPPFLAGS_save}"
422 dnl Check for ntohl, etc.
423 AC_CACHE_CHECK([for ntohl in sys/param.h],
424 [ac_cv_c_ntohl_sys_param_h],
425 [CFLAGS="${CFLAGS_save} -Wall -Werror"
426 AC_TRY_COMPILE([#include <sys/param.h>],
427 [void foo() { int meuh; ntohl(meuh); }],
428 ac_cv_c_ntohl_sys_param_h=yes, ac_cv_c_ntohl_sys_param_h=no)])
429 if test "x${ac_cv_c_ntohl_sys_param_h}" != "xno"; then
430 AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
433 dnl Check for inline function size limit
434 AC_CACHE_CHECK([if \$CC accepts -finline-limit],
435 [ac_cv_c_inline_limit],
436 [CFLAGS="${CFLAGS_save} -finline-limit-30000"
437 AC_TRY_COMPILE([],,ac_cv_c_inline_limit=yes, ac_cv_c_inline_limit=no)])
438 if test "x${ac_cv_c_inline_limit}" != "xno"; then
439 CFLAGS_save="${CFLAGS_save} -finline-limit-30000"; CFLAGS="${CFLAGS_save}"
440 CXXFLAGS_save="${CXXFLAGS_save} -finline-limit-30000"; CXXFLAGS="${CXXFLAGS_save}"
441 OBJCFLAGS_save="${OBJCFLAGS_save} -finline-limit-30000"; OBJCFLAGS="${OBJCFLAGS_save}"
444 dnl Check for -W or -w flags
445 AC_CACHE_CHECK([if \$CC accepts -Wall -Winline],
446 [ac_cv_c_Wall_Winline],
447 [CFLAGS="-Wall -Winline ${CFLAGS_save}"
448 AC_TRY_COMPILE([],,ac_cv_c_Wall_Winline=yes, ac_cv_c_Wall_Winline=no)])
449 if test "x${ac_cv_c_Wall_Winline}" != "xno"; then
450 CFLAGS_save="-Wall -Winline ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
451 CXXFLAGS_save="-Wall ${CXXFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
452 OBJCFLAGS_save="-Wall -Winline ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
454 AC_CACHE_CHECK([if \$CC accepts -wall -winline],
455 [ac_cv_c_wall_winline],
456 [CFLAGS="-wall -winline ${CFLAGS_save}"
457 AC_TRY_COMPILE([],,ac_cv_c_wall_winline=yes, ac_cv_c_wall_winline=no)])
458 if test "x${ac_cv_c_wall_winline}" != "xno"; then
459 CFLAGS_save="-wall -winline ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
460 CXXFLAGS_save="-wall -winline ${CXXFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
461 OBJCFLAGS_save="-wall -winline ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
466 AC_CACHE_CHECK([if \$CC accepts -pipe],
468 [CFLAGS="${CFLAGS_save} -pipe"
469 AC_TRY_COMPILE([],,ac_cv_c_pipe=yes, ac_cv_c_pipe=no)])
470 if test "x${ac_cv_c_pipe}" != "xno"; then
471 CFLAGS_save="${CFLAGS_save} -pipe"; CFLAGS="${CFLAGS_save}"
472 CXXFLAGS_save="${CXXFLAGS_save} -pipe"; CXXFLAGS="${CXXFLAGS_save}"
473 OBJCFLAGS_save="${OBJCFLAGS_save} -pipe"; OBJCFLAGS="${OBJCFLAGS_save}"
476 dnl Check for various optimization flags
477 AC_CACHE_CHECK([if \$CC accepts -O3],
479 [CFLAGS="${CFLAGS_save} -O3"
480 AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)])
481 if test "x${ac_cv_c_o3}" != "xno"; then
482 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
484 AC_CACHE_CHECK([if \$CC accepts -O2],
486 [CFLAGS="${CFLAGS_save} -O2"
487 AC_TRY_COMPILE([],,ac_cv_c_o2=yes, ac_cv_c_o2=no)])
488 if test "x${ac_cv_c_o2}" != "xno"; then
489 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
491 AC_CACHE_CHECK([if \$CC accepts -O],
493 [CFLAGS="${CFLAGS_save} -O"
494 AC_TRY_COMPILE([],,ac_cv_c_o=yes, ac_cv_c_o=no)])
495 if test "x${ac_cv_c_o}" != "xno"; then
496 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
501 dnl Check for -ffast-math
502 AC_CACHE_CHECK([if \$CC accepts -ffast-math],
504 [CFLAGS="${CFLAGS_save} -ffast-math"
505 AC_TRY_COMPILE([],,ac_cv_c_fast_math=yes, ac_cv_c_fast_math=no)])
506 if test "x${ac_cv_c_fast_math}" != "xno"; then
507 CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
510 dnl Check for -funroll-loops
511 AC_CACHE_CHECK([if \$CC accepts -funroll-loops],
512 [ac_cv_c_unroll_loops],
513 [CFLAGS="${CFLAGS_save} -funroll-loops"
514 AC_TRY_COMPILE([],,ac_cv_c_unroll_loops=yes, ac_cv_c_unroll_loops=no)])
515 if test "x${ac_cv_c_unroll_loops}" != "xno"; then
516 CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
519 dnl Check for -fomit-frame-pointer
520 AC_CACHE_CHECK([if \$CC accepts -fomit-frame-pointer],
521 [ac_cv_c_omit_frame_pointer],
522 [CFLAGS="${CFLAGS_save} -fomit-frame-pointer"
523 AC_TRY_COMPILE([],,ac_cv_c_omit_frame_pointer=yes, ac_cv_c_omit_frame_pointer=no)])
524 if test "x${ac_cv_c_omit_frame_pointer}" != "xno"; then
525 CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
526 # this plugin does not compile without -fomit-frame-pointer, damn gcc!
527 CFLAGS_i420_yuy2_mmx="${CFLAGS_i420_yuy2_mmx} -fomit-frame-pointer"
530 dnl Check for -mdynamic-no-pic
531 AC_CACHE_CHECK([if \$CC accepts -mdynamic-no-pic],
532 [ac_cv_c_dynamic_no_pic],
533 [CFLAGS="${CFLAGS_save} -mdynamic-no-pic"
534 AC_TRY_COMPILE([],,ac_cv_c_dynamic_no_pic=yes, ac_cv_c_dynamic_no_pic=no)])
535 if test "x${ac_cv_c_dynamic_no_pic}" != "xno"; then
536 CFLAGS_builtins="${CFLAGS_builtins} -mdynamic-no-pic"
537 CFLAGS_libvlc="${CFLAGS_libvlc} -mdynamic-no-pic"
540 dnl Check for Darwin plugin linking flags
541 AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error -lcc_dynamic],
543 [CFLAGS="${CFLAGS_save} -bundle -undefined error -lcc_dynamic"
544 AC_TRY_COMPILE([],,ac_cv_ld_darwin=yes, ac_cv_ld_darwin=no)])
545 if test "x${ac_cv_ld_darwin}" != "xno"; then
546 LDFLAGS_plugins="${LDFLAGS_plugins} -bundle -undefined error -lcc_dynamic"
549 dnl Check for standard plugin linking flags
550 AC_CACHE_CHECK([if \$CC accepts -shared],
552 [CFLAGS="${CFLAGS_save} -shared"
553 AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
554 if test "x${ac_cv_ld_plugins}" != "xno"; then
555 LDFLAGS_plugins="${LDFLAGS_plugins} -shared"
558 dnl Check for variadic macros
559 AC_CACHE_CHECK([for variadic cpp macros],
560 [ac_cv_cpp_variadic_macros],
561 [CFLAGS="${CFLAGS_save}"
564 #define a(b,c...) printf(b,##c)],
565 [a("foo");a("%s","bar");a("%s%s","baz","quux");],
566 ac_cv_cpp_variadic_macros=yes,
567 ac_cv_cpp_variadic_macros=no)])
568 if test "x${ac_cv_cpp_variadic_macros}" != "xno"; then
569 AC_DEFINE(HAVE_VARIADIC_MACROS, 1, Support for variadic macros)
572 dnl Checks for __attribute__(aligned()) directive
573 AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
574 [ac_cv_c_attribute_aligned],
575 [ac_cv_c_attribute_aligned=0
576 CFLAGS="${CFLAGS_save} -Werror"
577 for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
579 [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;],
580 [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
582 CFLAGS="${CFLAGS_save}"])
583 if test "x${ac_cv_c_attribute_aligned}" != "x0"; then
584 AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
585 [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
591 case "x${target_cpu}" in
602 CFLAGS_mpeg_video="${CFLAGS_mpeg_video} -ffunction-sections"
609 PLUGINS="${PLUGINS} dummy rc logger access_file memcpy"
610 PLUGINS="${PLUGINS} es audio mpeg_system ps ts"
611 PLUGINS="${PLUGINS} idct idctclassic motion mpeg_video spudec mpeg_audio"
612 #PLUGINS="${PLUGINS} a52old imdct downmix"
613 PLUGINS="${PLUGINS} lpcm a52"
614 PLUGINS="${PLUGINS} deinterlace invert adjust wall transform distort clone crop motionblur"
615 PLUGINS="${PLUGINS} float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif fixed32tofloat32 fixed32tos16 s16tofloat32 s16tofloat32swab s8tofloat32 u8tofixed32 u8tofloat32"
616 PLUGINS="${PLUGINS} trivial_resampler ugly_resampler linear_resampler"
617 PLUGINS="${PLUGINS} trivial_channel_mixer"
618 PLUGINS="${PLUGINS} trivial_mixer spdif_mixer float32_mixer"
619 PLUGINS="${PLUGINS} aout_file"
620 #PLUGINS="${PLUGINS} scope"
621 PLUGINS="${PLUGINS} i420_rgb i420_yuy2 i422_yuy2 i420_ymga"
622 PLUGINS="${PLUGINS} id3 m3u"
623 PLUGINS="${PLUGINS} wav araw demuxdump demuxsub"
628 NETWORK_MODULES="access_udp access_http access_rtp ipv4 access_mms"
631 dnl Accelerated modules
633 MMX_MODULES="memcpymmx idctmmx motionmmx i420_rgb_mmx i420_yuy2_mmx i422_yuy2_mmx i420_ymga_mmx"
634 MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
635 THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
636 SSE_MODULES="imdctsse downmixsse"
637 ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
639 if test x${SYS} != xbeos
641 PLUGINS="${PLUGINS} ${NETWORK_MODULES}"
644 AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
646 [CFLAGS="${CFLAGS_save}"
647 AC_TRY_COMPILE(,[void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));],
648 ac_cv_mmx_inline=yes, ac_cv_mmx_inline=no)])
649 if test "x${ac_cv_mmx_inline}" != "xno"; then
650 ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
653 AC_CACHE_CHECK([if \$CC groks MMX EXT inline assembly],
654 [ac_cv_mmxext_inline],
655 [CFLAGS="${CFLAGS_save}"
656 AC_TRY_COMPILE(,[void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));],
657 ac_cv_mmxext_inline=yes, ac_cv_mmxext_inline=no)])
658 if test "x${ac_cv_mmxext_inline}" != "xno"; then
659 ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
662 AC_CACHE_CHECK([if \$CC groks 3D Now! inline assembly],
663 [ac_cv_3dnow_inline],
664 [CFLAGS="${CFLAGS_save}"
665 AC_TRY_COMPILE(,[void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));],
666 ac_cv_3dnow_inline=yes, ac_cv_3dnow_inline=no)])
667 if test "x${ac_cv_3dnow_inline}" != "xno"; then
668 AC_DEFINE(CAN_COMPILE_3DNOW, 1, Define if \$CC groks 3D Now! inline assembly.)
669 ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
672 AC_CACHE_CHECK([if \$CC groks SSE inline assembly],
674 [CFLAGS="${CFLAGS_save}"
675 AC_TRY_COMPILE(,[void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));],
676 ac_cv_sse_inline=yes, ac_cv_sse_inline=no)])
677 if test "x${ac_cv_sse_inline}" != "xno" -a "x${SYS}" != "xmingw32"; then
678 AC_DEFINE(CAN_COMPILE_SSE, 1, Define if \$CC groks SSE inline assembly.)
679 ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
682 # don't try to grok AltiVec with native mingw32 it doesn't work right now
683 # we should be able to remove this test with future versions of mingw32
684 if test "x${SYS}" != "xmingw32"; then
685 AC_CACHE_CHECK([if \$CC groks AltiVec inline assembly],
686 [ac_cv_altivec_inline],
687 [CFLAGS="${CFLAGS_save}"
688 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
689 ac_cv_altivec_inline=yes,
690 [CFLAGS="${CFLAGS_save} -Wa,-m7400"
691 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
692 [ac_cv_altivec_inline="-Wa,-m7400"],
693 ac_cv_altivec_inline=no)
695 if test "x${ac_cv_altivec_inline}" != "xno"; then
696 AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks AltiVec inline assembly.)
697 if test "x${ac_cv_altivec_inline}" != "xyes"; then
698 CFLAGS_idctaltivec="${CFLAGS_idctaltivec} ${ac_cv_altivec_inline}"
699 CFLAGS_motionaltivec="${CFLAGS_motionaltivec} ${ac_cv_altivec_inline}"
700 CFLAGS_memcpyaltivec="${CFLAGS_memcpyaltivec} ${ac_cv_altivec_inline}"
701 CFLAGS_vlc="${CFLAGS_vlc} ${ac_cv_altivec_inline}"
703 ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
706 AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
708 [CFLAGS="${CFLAGS_save} -faltivec"
710 AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
711 ac_cv_c_altivec=-faltivec, [
713 CFLAGS="${CFLAGS_save} ${CFLAGS_idctaltivec} -fvec"
714 AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
715 [ac_cv_c_altivec="-fvec"], ac_cv_c_altivec=no)
717 CFLAGS="${CFLAGS_save}"])
718 if test "x${ac_cv_c_altivec}" != "xno"; then
719 AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
720 CFLAGS_idctaltivec="${CFLAGS_idctaltivec} ${ac_cv_c_altivec}"
721 CFLAGS_motionaltivec="${CFLAGS_motionaltivec} ${ac_cv_c_altivec}"
722 CFLAGS_memcpyaltivec="${CFLAGS_memcpyaltivec} ${ac_cv_c_altivec}"
723 CFLAGS_vlc="${CFLAGS_vlc} ${ac_cv_c_altivec}"
724 ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
727 AC_CACHE_CHECK([if linker needs -framework vecLib],
729 [LDFLAGS="${LDFLAGS_vlc} -framework vecLib"
730 AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)
731 LDFLAGS="${LDFLAGS_save}"
733 if test "x${ac_cv_ld_altivec}" != "xno"; then
734 LDFLAGS_idctaltivec="${LDFLAGS_idctaltivec} -framework vecLib"
735 LDFLAGS_motionaltivec="${LDFLAGS_motionaltivec} -framework vecLib"
736 LDFLAGS_memcpyaltivec="${LDFLAGS_memcpyaltivec} -framework vecLib"
737 LDFLAGS_vlc="${LDFLAGS_vlc} -framework vecLib"
742 AC_ARG_WITH(,[Optimization options:])
745 dnl Special arch tuning
748 [ --with-tuning=ARCH enable special tuning for an architecture
749 (default i686 on IA-32 and 750 on PPC)])
750 if test "x${with_tuning}" != "x"; then
751 if test "x${target_cpu}" = "xpowerpc"; then
752 CFLAGS_TUNING="-mtune=${with_tuning}"
754 CFLAGS_TUNING="-mcpu=${with_tuning}"
757 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"
759 if test "x${target_cpu}" = "xpowerpc"; then CFLAGS_TUNING="-mtune=750"; fi
764 dnl x86 accelerations
766 if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xx86" -o "x${target_cpu}" = "xi386"
769 PLUGINS="${PLUGINS} ${ACCEL_MODULES}"
773 dnl Enable/disable optimizations
775 AC_ARG_ENABLE(optimizations,
776 [ --disable-optimizations disable compiler optimizations (default enabled)])
777 AM_CONDITIONAL(OPTIM, test "x${enable_optimizations}" != "xno")
780 dnl AltiVec acceleration
782 AC_ARG_ENABLE(altivec,
783 [ --disable-altivec disable AltiVec optimizations (default enabled on PPC)],
784 [ if test "x${enable_altivec}" = "xyes"; then ARCH="${ARCH} altivec";
785 BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ],
786 [ if test "x${target_cpu}" = "xpowerpc"; then ARCH="${ARCH} altivec";
787 BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ])
793 [ --enable-debug debug mode (default disabled)])
794 AM_CONDITIONAL(DEBUG, test "x${enable_debug}" = "xyes")
797 dnl Enable release-specific flags
799 AC_ARG_ENABLE(release,
800 [ --enable-release activate extra optimizations (default disabled)])
801 AM_CONDITIONAL(RELEASE, test "x${enable_release}" = "xyes")
807 AC_ARG_WITH(,[Input plugins:])
810 dnl DVD module: optionally check for installed libdvdcss
813 [ --enable-dvd DVD input module (default enabled)])
814 if test "x${enable_dvd}" != "xno"
817 [ --with-dvdcss=PATH libdvdcss headers and libraries])
818 AC_ARG_WITH(dvdcss-tree,
819 [ --with-dvdcss-tree=PATH libdvdcss tree for static linking])
820 case "x${with_dvdcss}" in
822 if test "x${with_dvdcss_tree}" = x
824 AC_CHECK_HEADERS(dvdcss/dvdcss.h,
825 [ PLUGINS="${PLUGINS} dvd"
826 LDFLAGS_dvd="${LDFLAGS_dvd} -ldvdcss"
827 LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -ldvdcss" ],
828 [ 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.])
829 AC_MSG_ERROR([cannot find libdvdcss headers]) ])
831 AC_MSG_CHECKING(for libdvdcss.a in ${with_dvdcss_tree})
832 real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
833 if test "x${real_dvdcss_tree}" = "x"
835 dnl The given directory can't be found
837 AC_MSG_ERROR([cannot cd to ${with_dvdcss_tree}])
839 if test -f "${real_dvdcss_tree}/src/.libs/libdvdcss.a"
841 dnl Use a custom libdvdcss
842 AC_MSG_RESULT(${real_dvdcss_tree}/src/.libs/libdvdcss.a)
843 BUILTINS="${BUILTINS} dvd"
844 LDFLAGS_dvd="${LDFLAGS_dvd} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
845 LDFLAGS_dvdcss="${LDFLAGS_dvdcss} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
846 CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${real_dvdcss_tree}/src"
848 dnl The given libdvdcss wasn't built
850 AC_MSG_ERROR([cannot find ${real_dvdcss_tree}/src/.libs/libdvdcss.a, make sure you compiled libdvdcss in ${with_dvdcss_tree}])
855 dnl Compile without dvdcss (dlopen version, works only under Linux)
856 PLUGINS="${PLUGINS} dvd"
857 CPPFLAGS_dvd="${CPPFLAGS_dvd} -DGOD_DAMN_DMCA"
858 LDFLAGS_dvd="${LDFLAGS_dvd} -ldl"
861 AC_MSG_CHECKING(for dvdcss headers in ${with_dvdcss})
862 if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
864 dnl Use ${with_dvdcss}/include/dvdcss/dvdcss.h
866 PLUGINS="${PLUGINS} dvd"
867 LDFLAGS_dvd="${LDFLAGS_dvd} -L${with_dvdcss}/lib -ldvdcss"
868 LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -L${with_dvdcss}/lib -ldvdcss"
869 CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${with_dvdcss}/include"
871 dnl No libdvdcss could be found, sorry
873 AC_MSG_ERROR([cannot find ${with_dvdcss}/include/dvdcss/dvdcss.h])
880 dnl dvdread module: check for libdvdread
882 AC_ARG_ENABLE(dvdread,
883 [ --enable-dvdread dvdread input module (default disabled)])
884 if test "x${enable_dvdread}" != "xno"
887 [ --with-dvdread=PATH libdvdread headers and libraries])
888 AC_ARG_WITH(dvdread-tree,
889 [ --with-dvdread-tree=PATH libdvdread tree for static linking])
890 if test "x${with_dvdread}" = x
892 if test "x${with_dvdread_tree}" = x
894 AC_CHECK_HEADERS(dvdread/dvdread.h,
895 [ PLUGINS="${PLUGINS} dvdread"
896 LDFLAGS_dvdread="${LDFLAGS_dvdread} -ldvdread" ],
897 [ if test "x${enable_dvdread}" != "x"
899 AC_MSG_WARN([Please get libdvdread from http://www.dtek.chalmers.se/groups/dvd/downloads.shtml])
900 AC_MSG_ERROR([cannot find libdvdread headers])
903 AC_MSG_CHECKING(for libdvdread.a in ${with_dvdread_tree})
904 real_dvdread_tree="`cd ${with_dvdread_tree} 2>/dev/null && pwd`"
905 if test "x${real_dvdread_tree}" = "x"
907 dnl The given directory can't be found
909 AC_MSG_ERROR([cannot cd to ${with_dvdread_tree}])
911 if test -f "${real_dvdread_tree}/dvdread/.libs/libdvdread.a"
913 dnl Use a custom libdvdread
914 AC_MSG_RESULT(${real_dvdread_tree}/dvdread/.libs/libdvdread.a)
915 BUILTINS="${BUILTINS} dvdread"
916 LDFLAGS_dvdread="${LDFLAGS_dvdread} ${real_dvdread_tree}/dvdread/.libs/libdvdread.a"
917 CPPFLAGS_dvdread="${CPPFLAGS_dvdread} -I${real_dvdread_tree}"
919 dnl The given libdvdread wasn't built
921 AC_MSG_ERROR([cannot find ${real_dvdread_tree}/dvdread/.libs/libdvdread.a, make sure you compiled libdvdread in ${with_dvdread_tree}])
925 AC_MSG_CHECKING(for dvdread headers in ${with_dvdread})
926 if test -f ${with_dvdread}/include/dvdread/dvdread.h
928 dnl Use ${with_dvdread}/include/dvdread/dvdread.h
930 PLUGINS="${PLUGINS} dvdread"
931 LDFLAGS_dvdread="${LDFLAGS_dvdread} -L${with_dvdread}/lib -ldvdread"
932 CPPFLAGS_dvdread="${CPPFLAGS_dvdread} -I${with_dvdread}/include"
934 dnl No libdvdread could be found, sorry
936 AC_MSG_ERROR([cannot find ${with_dvdread}/include/dvdread/dvdread.h])
942 dnl dvdplay module: check for libdvdplay
944 AC_ARG_ENABLE(dvdplay,
945 [ --enable-dvdplay dvdplay input module (default disabled)])
946 if test "x${enable_dvdplay}" != "xno"
949 [ --with-dvdplay=PATH libdvdplay headers and libraries])
950 AC_ARG_WITH(dvdplay-tree,
951 [ --with-dvdplay-tree=PATH libdvdplay tree for static linking])
952 if test "x${with_dvdplay}" = x
954 if test "x${with_dvdplay_tree}" = x
956 AC_CHECK_HEADERS(dvdplay/dvdplay.h,
957 [ PLUGINS="${PLUGINS} dvdplay"
958 LDFLAGS_dvdplay="${LDFLAGS_dvdplay} ${LDFLAGS_dvd} ${LDFLAGS_dvdread} -ldvdplay"
959 CPPFLAGS_dvdplay = "${CPPFLAGS_dvdplay} ${CPPFLAGS_dvdread}" ],
960 [ if test "x${enable_dvdplay}" != "x"
962 AC_MSG_WARN([Please get libdvdplay from http://www.videolan.org/.])
963 AC_MSG_ERROR([cannot find libdvdplay headers])
966 AC_MSG_CHECKING(for libdvdplay.a in ${with_dvdplay_tree})
967 real_dvdplay_tree="`cd ${with_dvdplay_tree} 2>/dev/null && pwd`"
968 if test "x${real_dvdplay_tree}" = "x"
970 dnl The given directory can't be found
972 AC_MSG_ERROR([cannot cd to ${with_dvdplay_tree}])
974 if test -f "${real_dvdplay_tree}/src/.libs/libdvdplay.a"
976 dnl Use a custom libdvdplay
977 AC_MSG_RESULT(${real_dvdplay_tree}/src/.libs/libdvdplay.a)
978 BUILTINS="${BUILTINS} dvdplay"
979 LDFLAGS_dvdplay="${LDFLAGS_dvdplay} ${LDFLAGS_dvd} ${LDFLAGS_dvdread} ${real_dvdplay_tree}/src/.libs/libdvdplay.a"
980 CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_dvdread} -I${real_dvdplay_tree}/src"
982 dnl The given libdvdplay wasn't built
984 AC_MSG_ERROR([cannot find ${real_dvdplay_tree}/src/.libs/libdvdplay.a, make sure you compiled libdvdplay in ${with_dvdplay_tree}])
988 AC_MSG_CHECKING(for dvdplay headers in ${with_dvdplay})
989 if test -f ${with_dvdplay}/include/dvdplay/dvdplay.h
991 dnl Use ${with_dvdplay}/include/dvdplay/dvdplay.h
993 PLUGINS="${PLUGINS} dvdplay"
994 LDFLAGS_dvdplay="${LDFLAGS_dvdplay} ${LDFLAGS_dvd} ${LDFLAGS_dvdread} -L${with_dvdplay}/lib -ldvdplay"
995 CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_dvdread} -I${with_dvdplay}/include"
997 dnl No libdvdplay could be found, sorry
999 AC_MSG_ERROR([cannot find ${with_dvdplay}/include/dvdplay/dvdplay.h])
1005 dnl libdvbpsi ts demux
1007 AC_ARG_ENABLE(dvbpsi,
1008 [ --enable-dvbpsi dvbpsi ts demux module (default enabled)])
1009 if test "x${enable_dvbpsi}" != "xno"
1012 [ --with-dvbpsi=PATH libdvbpsi headers and libraries])
1014 [ --with-dvbpsi-tree=PATH libdvbpsi tree for static linking])
1015 case "x${with_dvbpsi}" in
1017 if test "x${with_dvbpsi_tree}" = "x"
1019 AC_CHECK_HEADERS(dvbpsi/dr.h,
1020 [ PLUGINS="${PLUGINS} ts_dvbpsi"
1021 LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} -ldvbpsi" ],
1022 [ AC_MSG_WARN([cannot find libdvbpsi headers]) ],
1023 [#include <stdint.h>
1024 #include <dvbpsi/dvbpsi.h>
1025 #include <dvbpsi/descriptor.h>
1026 #include <dvbpsi/pat.h>
1027 #include <dvbpsi/pmt.h>])
1029 AC_MSG_CHECKING(for libdvbpsi.a in ${with_dvbpsi_tree})
1030 real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
1031 if test "x${real_dvbpsi_tree}" = "x"
1033 dnl The given directory can't be found
1035 AC_MSG_ERROR([cannot cd to ${with_dvbpsi_tree}])
1037 if test -f "${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
1039 dnl Use a custom libdvbpsi
1040 AC_MSG_RESULT(${real_dvbpsi_tree}/src/.libs/libdvbpsi.a)
1041 BUILTINS="${BUILTINS} ts_dvbpsi"
1042 LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
1043 CPPFLAGS_ts_dvbpsi="${CPPFLAGS_ts_dvbpsi} -I${real_dvbpsi_tree}/src"
1045 dnl The given libdvbpsi wasn't built
1047 AC_MSG_ERROR([cannot find ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a, make sure you compiled libdvbpsi in ${with_dvbpsi_tree}])
1052 dnl Compile without dvbpsi
1055 AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi})
1056 if test "x${with_dvbpsi}" = "x"
1061 LDFLAGS_test="-L${with_dvbpsi}/lib"
1062 CPPFLAGS_test="-I${with_dvbpsi}/include"
1064 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
1065 AC_CHECK_HEADER([dvbpsi/dr.h],[
1066 PLUGINS="${PLUGINS} ts_dvbpsi"
1067 LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} ${LDFLAGS_test} -ldvbpsi"
1068 CPPFLAGS_ts_dvbpsi="${CPPFLAGS_ts_dvbpsi} ${CPPFLAGS_test}"
1070 if test "x${enable_dvbpsi}" != "x"
1072 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])
1075 CPPFLAGS="${CPPFLAGS_save}"
1081 dnl Video4Linux plugin
1084 [ --enable-v4l Video4Linux input support (default disabled)])
1085 if test "x${enable_v4l}" = "xyes"
1087 AC_CHECK_HEADERS(libv4l/v4l.h, [
1088 PLUGINS="${PLUGINS} v4l"
1096 [ --enable-vcd VCD support for Linux, FreeBSD, MacOS X and Win32 (default enabled)])
1098 if test "x${enable_vcd}" != "xno"
1100 AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
1101 PLUGINS="${PLUGINS} vcd"
1104 AC_EGREP_HEADER(scsireq,sys/scsiio.h,[
1105 PLUGINS="${PLUGINS} vcd"
1106 AC_DEFINE(HAVE_SCSIREQ_IN_SYS_SCSIIO_H, 1, For NetBSD VCD support)
1109 AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
1110 PLUGINS="${PLUGINS} vcd"
1111 AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
1114 if test "x${SYS}" = "xbsdi" -o "x${SYS}" = "xmingw32"
1116 PLUGINS="${PLUGINS} vcd"
1119 if test "x${SYS}" = "xdarwin"
1121 PLUGINS="${PLUGINS} vcd"
1122 LDFLAGS_vcd="${LDFLAGS_vcd} -framework IOKit -framework CoreFoundation"
1127 dnl Satellite input module
1129 AC_ARG_ENABLE(satellite,
1130 [ --enable-satellite satellite card support (default disabled)],
1131 [ if test "x${enable_satellite}" = "xyes"
1133 PLUGINS="${PLUGINS} satellite"
1137 dnl ipv6 plugin - not for QNX yet
1139 if test "x${SYS}" != "xnto" && test "x${SYS}" != "xmingw32"
1142 AC_CHECK_FUNC(inet_pton,[have_ipv6=:],[
1143 AC_CHECK_LIB(resolv,inet_pton,
1145 LDFLAGS_ipv6="${LDFLAGS_ipv6} -lresolv"])
1147 AC_MSG_CHECKING(for sockaddr_in6 in netinet/in.h)
1148 AC_EGREP_HEADER(sockaddr_in6,netinet/in.h,
1149 [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); have_ipv6=false])
1150 if ${have_ipv6}; then
1151 PLUGINS="${PLUGINS} ipv6"
1154 if test "x${SYS}" = "xmingw32"
1156 AC_MSG_CHECKING(for getaddrinfo in ws2tcpip.h)
1157 AC_EGREP_HEADER(addrinfo,ws2tcpip.h,[AC_MSG_RESULT(yes)
1158 PLUGINS="${PLUGINS} ipv6"],[AC_MSG_RESULT(no)])
1162 dnl AVI demux plugin
1165 [ --enable-avi AVI demux module (default enabled)])
1166 if test "x${enable_avi}" != "xno"
1168 PLUGINS="${PLUGINS} avi"
1172 dnl ASF demux plugin
1175 [ --enable-asf ASF demux module (default enabled)])
1176 if test "x${enable_asf}" != "xno"
1178 PLUGINS="${PLUGINS} asf"
1182 dnl AAC demux plugin
1185 [ --enable-aac AAC demux module (default enabled)])
1186 if test "x${enable_aac}" != "xno"
1188 PLUGINS="${PLUGINS} aac"
1195 [ --enable-ogg Ogg demux support (default enabled)])
1196 if test "x${enable_ogg}" != "xno"
1198 AC_CHECK_HEADERS(ogg/ogg.h, [
1199 AC_CHECK_LIB( ogg, oggpack_read, [
1200 PLUGINS="${PLUGINS} ogg"
1201 LDFLAGS_ogg="${LDFLAGS_ogg} -logg"
1202 AC_CHECK_LIB( ogg, oggpackB_read, [
1203 CPPFLAGS_ogg="${CPPFLAGS_ogg} -DHAVE_OGGPACKB"])])
1211 AC_ARG_WITH(,[Codec plugins:])
1217 [ --enable-mad libmad module (default disabled)])
1218 if test "x${enable_mad}" = "xyes"
1221 [ --with-mad=PATH path to libmad],[],[])
1222 if test "x${with_mad}" != "xno" -a "x${with_mad}" != "x"
1224 CPPFLAGS_mad="${CPPFLAGS_mad} -I${with_mad}/include"
1225 LDFLAGS_mad="${LDFLAGS_mad} -L${with_mad}/lib"
1228 AC_ARG_WITH(mad-tree,
1229 [ --with-mad-tree=PATH mad tree for static linking],[],[])
1230 if test "x${with_mad_tree}" != "xno" -a "x${with_mad_tree}" != "x"
1232 real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
1233 if test "x${real_mad_tree}" = "x"
1235 dnl The given directory can't be found
1237 AC_MSG_ERROR([${with_mad_tree} directory doesn't exist])
1239 dnl Use a custom libmad
1240 AC_MSG_CHECKING(for mad.h in ${real_mad_tree}/libmad)
1241 if test -f ${real_mad_tree}/libmad/mad.h
1244 CPPFLAGS_mad="${CPPFLAGS_mad} -I${real_mad_tree}/libmad"
1245 LDFLAGS_mad="${LDFLAGS_mad} -L${real_mad_tree}/libmad/.libs"
1246 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mad}"
1247 AC_CHECK_LIB(mad, mad_bit_init, [
1248 BUILTINS="${BUILTINS} mad"
1249 LDFLAGS_mad="${LDFLAGS_mad} -lmad"
1250 ],[ AC_MSG_ERROR([the specified tree hasn't been compiled ])
1252 LDFLAGS="${LDFLAGS_save}"
1255 AC_MSG_ERROR([the specified tree doesn't have mad.h])
1258 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mad}"
1259 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mad}"
1260 AC_CHECK_HEADERS(mad.h, ,
1261 [ AC_MSG_ERROR([Cannot find development headers for libmad...]) ])
1262 AC_CHECK_LIB(mad, mad_bit_init, [
1263 PLUGINS="${PLUGINS} mad"
1264 LDFLAGS_mad="${LDFLAGS_mad} -lmad" ],
1265 [ AC_MSG_ERROR([Cannot find libmad library...]) ])
1266 CPPFLAGS="${CPPFLAGS_save}"
1267 LDFLAGS="${LDFLAGS_save}"
1272 dnl libid3tag support
1274 AC_CHECK_HEADERS(id3tag.h, [
1275 LDFLAGS_id3tag="${LDFLAGS_id3tag} -lz -lid3tag"
1276 PLUGINS="${PLUGINS} id3tag"])
1279 dnl ffmpeg decoder plugin
1281 AC_ARG_ENABLE(ffmpeg,
1282 [ --enable-ffmpeg ffmpeg codec (default disabled)])
1283 if test "x${enable_ffmpeg}" = "xyes"
1286 [ --with-ffmpeg=PATH path to ffmpeg installation],[],[])
1287 if test "x${with_ffmpeg}" != "xno" -a "x${with_ffmpeg}" != "x"
1289 CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${with_ffmpeg}/include/libffmpeg"
1290 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -L${with_ffmpeg}/lib"
1293 dnl Add postprocessing modules
1294 PLUGINS="${PLUGINS} postprocessing_c"
1295 if test "x${ac_cv_mmx_inline}" != "xno"; then
1296 PLUGINS="${PLUGINS} postprocessing_mmx"
1299 if test "x${ac_cv_mmxext_inline}" != "xno"; then
1300 PLUGINS="${PLUGINS} postprocessing_mmxext"
1303 AC_ARG_WITH(ffmpeg-tree,
1304 [ --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
1305 if test "x${with_ffmpeg_tree}" != "x"
1307 AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
1308 real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
1309 if test "x${real_ffmpeg_tree}" = x
1311 dnl The given directory can't be found
1313 AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
1315 if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"
1317 dnl Use a custom libffmpeg
1318 AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
1319 BUILTINS="${BUILTINS} ffmpeg"
1320 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} ${real_ffmpeg_tree}/libavcodec/libavcodec.a"
1321 CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${real_ffmpeg_tree}/libavcodec"
1323 dnl The given libavcodec wasn't built
1325 AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
1328 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
1329 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
1330 AC_CHECK_LIB(avcodec, avcodec_init, [
1331 BUILTINS="${BUILTINS} ffmpeg"
1332 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lavcodec" ],
1333 [ AC_MSG_ERROR([Cannot find libavcodec library...]) ])
1334 LDFLAGS="${LDFLAGS_save}"
1335 CPPFLAGS="${CPPFLAGS_save}"
1340 dnl faad decoder plugin
1343 [ --enable-faad faad codec (default disabled)])
1344 if test "x${enable_faad}" = "xyes"
1347 [ --with-faad=PATH path to faad installation],[],[])
1348 if test "x${with_faad}" != "xno" -a "x${with_faad}" != "x"
1350 CPPFLAGS_faad="${CPPFLAGS_faad} -I${with_faad}/include"
1351 LDFLAGS_faad="${LDFLAGS_faad} -L${with_faad}/lib"
1353 LDFLAGS_faad="${LDFLAGS_faad}"
1355 AC_ARG_WITH(faad-tree,
1356 [ --with-faad-tree=PATH faad tree for static linking])
1357 if test "x${with_faad_tree}" != "x"
1359 AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
1360 real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
1361 if test "x${real_faad_tree}" = x
1363 dnl The given directory can't be found
1365 AC_MSG_ERROR([cannot cd to ${with_faad_tree}])
1367 if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a"
1369 dnl Use a custom faad
1370 AC_MSG_RESULT(${real_faad_tree}/libfaad/.libs/libfaad.a)
1371 BUILTINS="${BUILTINS} faad"
1372 LDFLAGS_faad="${LDFLAGS_faad} ${real_faad_tree}/libfaad/.libs/libfaad.a"
1373 CPPFLAGS_faad="${CPPFLAGS_faad} -I${real_faad_tree}/include"
1375 dnl The given libfaad wasn't built
1377 AC_MSG_ERROR([cannot find ${real_faad_tree}/libfaad/.libs/libfaad.a, make sure you compiled libfaad in ${with_faad_tree}])
1380 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_faad}"
1381 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_faad}"
1382 AC_CHECK_HEADERS(faad.h, ,
1383 [ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ])
1384 AC_CHECK_LIB(faad, faacDecOpen, [
1385 PLUGINS="${PLUGINS} faad"
1386 LDFLAGS_faad="${LDFLAGS_faad} -lfaad" ],
1387 [ AC_MSG_ERROR([Cannot find libfaad library...]) ])
1388 LDFLAGS="${LDFLAGS_save}"
1389 CPPFLAGS="${CPPFLAGS_save}"
1395 dnl xvid decoder plugin
1398 [ --enable-xvid xvid codec (default disabled)])
1399 if test "x${enable_xvid}" = "xyes"
1402 [ --with-xvid=PATH path to xvid installation],[],[])
1403 if test "x${with_xvid}" != "xno" -a "x${with_xvid}" != "x"
1405 CPPFLAGS_xvid="${CPPFLAGS_xvid} -I${with_xvid}/include"
1406 LDFLAGS_xvid="${LDFLAGS_xvid} -L${with_xvid}/lib"
1408 LDFLAGS_xvid="${LDFLAGS_xvid}"
1410 AC_ARG_WITH(xvid-tree,
1411 [ --with-xvid-tree=PATH xvid tree for static linking])
1412 if test "x${with_xvid_tree}" != "x"
1414 AC_MSG_CHECKING(for libxvidcore.a in ${with_xvid_tree})
1415 real_xvid_tree="`cd ${with_xvid_tree} 2>/dev/null && pwd`"
1416 if test "x${real_xvid_tree}" = x
1418 dnl The given directory can't be found
1420 AC_MSG_ERROR([cannot cd to ${with_xvid_tree}])
1422 if test -f "${real_xvid_tree}/build/generic/libxvidcore.a"
1424 dnl Use a custom xvid
1425 AC_MSG_RESULT(${real_xvid_tree}/build/generic/libxvidcore.a)
1426 BUILTINS="${BUILTINS} xvid"
1427 LDFLAGS_xvid="${LDFLAGS_xvid} ${real_xvid_tree}/build/generic/libxvidcore.a"
1428 CPPFLAGS_xvid="${CPPFLAGS_xvid} -I${real_xvid_tree}/src"
1430 dnl The given libxvidcore wasn't built
1432 AC_MSG_ERROR([cannot find ${real_xvid_tree}/build/generic/libxvidcore.a, make sure you compiled libxvidcore in ${with_xvid_tree}])
1435 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_xvid}"
1436 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_xvid}"
1437 AC_CHECK_HEADERS(xvid.h, ,
1438 [ AC_MSG_ERROR([Cannot find development headers for libxvidcore...]) ])
1439 AC_CHECK_LIB(xvid, xvid_init, [
1440 PLUGINS="${PLUGINS} xvid"
1441 LDFLAGS_xvid="${LDFLAGS_xvid} -lxvid" ],
1442 [ AC_MSG_ERROR([Cannot find libxvidcore library...]) ])
1443 LDFLAGS="${LDFLAGS_save}"
1444 CPPFLAGS="${CPPFLAGS_save}"
1454 [ --enable-mp4 MP4 demux module (default enabled)])
1455 if test "x${enable_mp4}" != "xno"
1458 PLUGINS="${PLUGINS} mp4"
1459 AC_CHECK_HEADERS(zlib.h,
1460 [ LDFLAGS_mp4="${LDFLAGS_mp4} -lz" ] )
1464 dnl a52 AC3 decoder plugin
1467 [ --enable-a52 A/52 support with liba52 (default enabled)])
1468 if test "x${enable_a52}" != "xno"
1471 [ --with-a52=PATH a52 headers and libraries])
1472 AC_ARG_WITH(a52-tree,
1473 [ --with-a52-tree=PATH a52dec tree for static linking ],[],[])
1474 if test "x${with_a52_tree}" != "xno" -a "x${with_a52_tree}" != "x"
1476 real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
1477 if test "x${real_a52_tree}" = "x"
1479 dnl The given directory can't be found
1481 AC_MSG_ERROR([${with_a52_tree} directory doesn't exist])
1483 dnl Use a custom a52dec
1484 AC_MSG_CHECKING(for a52.h in ${real_a52_tree}/include)
1485 if test -f ${real_a52_tree}/include/a52.h
1488 CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} -I${real_a52_tree}"
1489 LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} -L${real_a52_tree}/liba52/.libs"
1490 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_a52tofloat32}"
1491 AC_CHECK_LIB(a52, a52_free, [
1492 BUILTINS="${BUILTINS} a52tofloat32"
1493 LDFLAGS_a52tofloat32="-la52 ${LDFLAGS_a52tofloat32}"
1494 CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} -DUSE_A52DEC_TREE"
1496 if test -f ${real_a52_tree}/liba52/.libs/liba52.a
1498 AC_MSG_ERROR([make sure you have at least a52dec-0.7.3])
1500 AC_MSG_ERROR([the specified tree hasn't been compiled])
1503 LDFLAGS="${LDFLAGS_save}"
1506 AC_MSG_ERROR([the specified tree doesn't have a52.h])
1509 if test "x${with_a52}" = "x"
1514 LDFLAGS_test="-L${with_a52}/lib"
1515 CPPFLAGS_test="-I${with_a52}/include"
1517 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
1518 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_test}"
1519 AC_CHECK_HEADERS(a52dec/a52.h, [
1520 AC_CHECK_LIB(a52, a52_free, [
1521 PLUGINS="${PLUGINS} a52tofloat32"
1522 LDFLAGS_a52tofloat32="${LDFLAGS_test} -la52 ${LDFLAGS_a52tofloat32}"
1523 CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} ${CPPFLAGS_test}"
1525 if test "x${enable_dvbpsi}" != "x"
1527 AC_MSG_ERROR([Could not find a52 on your system: you may get it from http://liba52.sf.net])
1531 CPPFLAGS="${CPPFLAGS_save}"
1532 LDFLAGS="${LDFLAGS_save}"
1539 AC_ARG_ENABLE(cinepak,
1540 [ --enable-cinepak Cinepak decoder (default enabled)])
1541 if test "x${enable_cinepak}" != "xno"
1543 PLUGINS="${PLUGINS} cinepak"
1550 [ --enable-dv DV decoder support (default disabled)])
1551 if test "x${enable_dv}" = "xyes"
1553 AC_CHECK_HEADERS(libdv/dv.h, [
1554 PLUGINS="${PLUGINS} dv"
1555 LDFLAGS_dv="${LDFLAGS_dv} -ldv"
1562 AC_ARG_ENABLE(vorbis,
1563 [ --enable-vorbis Vorbis decoder support (default enabled)])
1564 if test "x${enable_vorbis}" != "xno"
1566 AC_CHECK_HEADERS(vorbis/codec.h, [
1567 PLUGINS="${PLUGINS} vorbis"
1568 LDFLAGS_vorbis="${LDFLAGS_vorbis} -lvorbis -logg"
1575 AC_ARG_ENABLE(tremor,
1576 [ --enable-tremor Tremor decoder support (default disabled)])
1577 if test "x${enable_tremor}" = "xyes"
1579 AC_CHECK_HEADERS(tremor/ivorbiscodec.h, [
1580 PLUGINS="${PLUGINS} tremor"
1581 LDFLAGS_tremor="${LDFLAGS_tremor} -lvorbisidec -logg"
1586 dnl tarkin decoder plugin
1588 AC_ARG_ENABLE(tarkin,
1589 [ --enable-tarkin experimental tarkin codec (default disabled)])
1590 if test "x${enable_tarkin}" = "xyes"
1592 AC_ARG_WITH(tarkin-tree,
1593 [ --with-tarkin-tree=PATH tarkin tree for static linking])
1594 if test "x${with_tarkin_tree}" != "x"
1596 AC_MSG_CHECKING(for tarkin.o in ${with_tarkin_tree})
1597 real_tarkin_tree="`cd ${with_tarkin_tree} 2>/dev/null && pwd`"
1598 if test -f "${real_tarkin_tree}/tarkin.o"
1600 BUILTINS="${BUILTINS} tarkin"
1601 CPPFLAGS_tarkin="${CPPFLAGS_tarkin} -I${real_tarkin_tree}"
1602 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"
1605 dnl The given tarkin tree wasn't built
1607 AC_MSG_ERROR([cannot find ${real_tarkin_tree}/tarkin.o,
1608 make sure you compiled tarkin in ${with_tarkin_tree}])
1614 dnl theora decoder plugin
1616 AC_ARG_ENABLE(theora,
1617 [ --enable-theora experimental theora codec (default disabled)])
1618 if test "x${enable_theora}" = "xyes"
1620 AC_CHECK_HEADERS(theora/theora.h, [
1621 AC_CHECK_LIB(theora, theora_granule_time, [
1622 BUILTINS="${BUILTINS} theora"
1623 LDFLAGS_theora="${LDFLAGS_theora} -ltheora -logg" ],[
1624 AC_MSG_ERROR([libtheora doesn't appear to be installed on you system.
1625 You also need to check that you have a libogg posterior to the 1.0 release.])],
1634 AC_ARG_WITH(,[Video plugins:])
1638 dnl (enabled by default except on win32)
1641 [ --enable-x11 X11 support (default enabled)])
1642 if test "x${enable_x11}" != "xno" &&
1643 (test "x${SYS}" != "xmingw32" || test "x${enable_x11}" = "xyes"); then
1644 CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
1645 AC_CHECK_HEADERS(X11/Xlib.h, [
1646 PLUGINS="${PLUGINS} x11"
1647 LDFLAGS_x11="${LDFLAGS_x11} -L${x_libraries} -lX11 -lXext"
1648 CPPFLAGS_x11="${CPPFLAGS_x11} -I${x_includes}"
1650 CPPFLAGS="${CPPFLAGS_save}"
1655 dnl (enabled by default except on win32)
1657 AC_ARG_ENABLE(xvideo,
1658 [ --enable-xvideo XVideo support (default enabled)])
1659 if test "x${enable_xvideo}" != "xno" &&
1660 (test "x${SYS}" != "xmingw32" || test "x${enable_xvideo}" = "xyes"); then
1661 CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
1662 AC_CHECK_HEADERS(X11/extensions/Xv.h, [
1663 CFLAGS="${CFLAGS_save} -L${x_libraries} -lX11 -lXext"
1664 AC_CHECK_LIB(Xv_pic,XvPutImage,
1665 # We have Xv_pic, that's good, we can build an xvideo.so plugin !
1666 PLUGINS="${PLUGINS} xvideo"
1667 LDFLAGS_xvideo="${LDFLAGS_xvideo} -L${x_libraries} -lX11 -lXext -lXv_pic"
1668 CPPFLAGS_xvideo="${CPPFLAGS_xvideo} -I${x_includes}",
1669 AC_CHECK_LIB(Xv,XvPutImage,
1670 # We don't have Xv_pic, but we have Xv, let's make xvideo.a as builtin
1671 PLUGINS="${PLUGINS} xvideo"
1672 LDFLAGS_xvideo="${LDFLAGS_xvideo} -L${x_libraries} -lX11 -lXext -lXv"
1673 CPPFLAGS_xvideo="${CPPFLAGS_xvideo} -I${x_includes}",
1674 # Otherwise... well, do nothing.
1678 CFLAGS="${CFLAGS_save}"
1680 CPPFLAGS="${CPPFLAGS_save}")
1687 [ --enable-sdl SDL support (default enabled)])
1688 if test "x${enable_sdl}" != "xno"
1691 AC_ARG_WITH(sdl-config-path,
1692 [ --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)],
1693 [ if test "x${with_sdl_config_path}" != "xno"
1695 SDL_PATH="${with_sdl_config_path}:${PATH}"
1697 AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no, ${SDL_PATH})
1698 SDL_CONFIG="${SDL12_CONFIG}"
1699 SDL_HEADER="SDL12/SDL.h"
1700 if test "x${SDL_CONFIG}" = "xno"
1702 AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no, ${SDL_PATH})
1703 SDL_CONFIG=${SDL11_CONFIG}
1704 SDL_HEADER="SDL11/SDL.h"
1706 if test "x${SDL_CONFIG}" = "xno"
1708 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, ${SDL_PATH})
1709 SDL_HEADER="SDL/SDL.h"
1711 if test "x${SDL_CONFIG}" != "xno"
1713 PLUGINS="${PLUGINS} vout_sdl aout_sdl"
1714 CFLAGS_vout_sdl="${CFLAGS_vout_sdl} `${SDL_CONFIG} --cflags`"
1715 LDFLAGS_vout_sdl="${LDFLAGS_vout_sdl} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
1716 CFLAGS_aout_sdl="${CFLAGS_aout_sdl} `${SDL_CONFIG} --cflags`"
1717 LDFLAGS_aout_sdl="${LDFLAGS_aout_sdl} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
1718 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_vout_sdl}"
1719 AC_CHECK_HEADERS(${SDL_HEADER}, AC_DEFINE_UNQUOTED(SDL_INCLUDE_FILE,
1720 <${SDL_HEADER}>, Indicate whether we should use SDL/SDL.h or SDL11/SDL.h),
1721 [ AC_MSG_ERROR([The development package for SDL is not installed.
1722 Please install it and try again. Alternatively you can also configure with
1725 CPPFLAGS="${CPPFLAGS_save}"
1726 if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
1728 AC_MSG_ERROR([The development package for SDL is not installed.
1729 Please install it and try again. Alternatively you can also configure with
1732 elif test "x${enable_sdl}" = "xyes"
1734 AC_MSG_ERROR([I couldn't find the SDL package. You can download libSDL
1735 from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
1741 dnl Qt Embedded module
1742 dnl (disabled by default)
1745 [ --enable-qte QT Embedded support (default disabled)])
1746 if test "x${enable_qte}" != "xno"
1749 [ --with-qte=PATH Qt Embedded headers and libraries])
1750 if test "x${with_qte}" = "x"
1752 LDFLAGS_test="-L${QTDIR}/lib"
1753 CPPFLAGS_test="-I${QTDIR}/include"
1755 LDFLAGS_test="-L${with_qte}/lib"
1756 CPPFLAGS_test="-I${with_qte}/include"
1759 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
1760 AC_CHECK_HEADERS(qt.h, [
1761 CPPFLAGS_qte="${CPPFLAGS_qte} ${CPPFLAGS_test} -DQT_QWS_IPAQ -DQWS"
1762 CXXFLAGS_qte="${CXXFLAGS_qte} -fno-exceptions -fno-rtti"
1763 LDFLAGS_qte="${LDFLAGS_qte} ${LDFLAGS_test} -lqte"
1764 if test "x${with_qte}" = "x"
1766 PLUGINS="${PLUGINS} qte"
1768 BUILTINS="${BUILTINS} qte"
1771 CPPFLAGS="${CPPFLAGS_save}"
1775 dnl Windows DirectX module
1777 AC_ARG_ENABLE(directx,
1778 [ --enable-directx Win32 DirectX support (default enabled on Win32)])
1779 if test "x${enable_directx}" != "xno"
1781 if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"
1783 AC_ARG_WITH(directx,
1784 [ --with-directx=PATH Win32 DirectX headers])
1785 if test "x${with_directx}" = "x"
1787 AC_CHECK_HEADERS(ddraw.h,
1788 [ PLUGINS="${PLUGINS} vout_directx aout_directx"
1789 LDFLAGS_vout_directx="${LDFLAGS_directx} -lgdi32" ])
1791 AC_MSG_CHECKING(for directX headers in ${with_directx})
1792 if test -f ${with_directx}/ddraw.h
1794 PLUGINS="${PLUGINS} vout_directx aout_directx"
1795 LDFLAGS_vout_directx="${LDFLAGS_directx} -lgdi32"
1796 CPPFLAGS_vout_directx="${CPPFLAGS_vout_directx} -I${with_directx}"
1797 CPPFLAGS_aout_directx="${CPPFLAGS_aout_directx} -I${with_directx}"
1801 AC_MSG_ERROR([Cannot find ${with_directx}/ddraw.h!])
1808 dnl Linux framebuffer module
1811 [ --enable-fb Linux framebuffer support (default enabled on Linux)])
1812 if test "x${enable_fb}" != "xno"
1814 AC_CHECK_HEADERS(linux/fb.h, [
1815 PLUGINS="${PLUGINS} fb"
1820 dnl Linux MGA module
1823 [ --enable-mga Linux kernel Matrox support (default disabled)],
1824 [ if test "x${enable_mga}" = "xyes"
1826 PLUGINS="${PLUGINS} mga xmga"
1832 AC_ARG_ENABLE(svgalib,
1833 [ --enable-svgalib SVGAlib support (default disabled)])
1834 if test "x${enable_svgalib}" = "xyes"
1836 PLUGINS="${PLUGINS} svgalib"
1837 LDFLAGS_svgalib="${LDFLAGS_svgalib} -lvgagl -lvga"
1844 [ --enable-ggi GGI support (default disabled)])
1845 if test "x${enable_ggi}" = "xyes"
1847 PLUGINS="${PLUGINS} ggi"
1848 LDFLAGS_ggi="${LDFLAGS_ggi} -lggi"
1850 [ --with-ggi=PATH path to libggi],
1851 [ if test "x${with_ggi}" != "xno" -a "x${with_ggi}" != "x"
1853 CPPFLAGS_ggi="${CPPFLAGS_ggi} -I${with_ggi}/include"
1854 LDFLAGS_ggi="${LDFLAGS_ggi} -L${with_ggi}/lib"
1861 AC_ARG_ENABLE(glide,
1862 [ --enable-glide Glide (3dfx) support (default disabled)])
1863 if test "x${enable_glide}" = "xyes"
1865 PLUGINS="${PLUGINS} glide"
1866 LDFLAGS_glide="${LDFLAGS_glide} -lglide2x -lm"
1867 CPPFLAGS_glide="${CPPFLAGS_glide} -I/usr/include/glide"
1869 [ --with-glide=PATH path to libglide],
1870 [ if test "x${with_glide}" != "xno" -a "x${with_glide}" != "x"
1872 CPPFLAGS_glide="${CPPFLAGS_glide} -I${with_glide}/include"
1873 LDFLAGS_glide="${LDFLAGS_glide} -L${with_glide}/lib"
1881 [ --enable-aa aalib output (default disabled)])
1882 if test "x${enable_aa}" = "xyes"
1884 AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
1885 if test "x${have_aa}" = "xtrue"
1887 PLUGINS="${PLUGINS} aa"
1888 LDFLAGS_aa="${LDFLAGS_aa} -laa"
1893 dnl win32 GDI plugin
1895 AC_ARG_ENABLE(wingdi,
1896 [ --enable-wingdi Win32 GDI module (default enabled on Win32)])
1897 if test "x${enable_wingdi}" != "xno"; then
1898 if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
1899 PLUGINS="${PLUGINS} wingdi"
1900 LDFLAGS_wingdi="${LDFLAGS_wingdi} -lgdi32"
1908 AC_ARG_WITH(,[Audio plugins:])
1911 dnl OSS /dev/dsp module (enabled by default except on win32)
1914 [ --enable-oss Linux OSS /dev/dsp support (enabled on Linux)])
1916 if test "x${enable_oss}" != "xno" &&
1917 (test "x${SYS}" != "xmingw32" || test "x${enable_oss}" = "xyes")
1919 AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h, [
1920 PLUGINS="${PLUGINS} oss"
1921 AC_CHECK_LIB(ossaudio,main,LDFLAGS_oss="${LDFLAGS_oss} -lossaudio")
1929 [ --enable-esd Esound library support (default disabled)],
1930 [if test "x${enable_esd}" = "xyes"
1932 AC_PATH_PROG(ESD_CONFIG, esd-config, no)
1933 if test "x${ESD_CONFIG}" != "xno"
1935 PLUGINS="${PLUGINS} esd"
1936 CFLAGS_esd="${CFLAGS_esd} `${ESD_CONFIG} --cflags`"
1937 LDFLAGS_esd="${LDFLAGS_esd} `${ESD_CONFIG} --libs`"
1945 [ --enable-arts aRts sound server (default disabled)],
1946 [if test "x${enable_arts}" = "xyes"
1948 AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
1949 if test "x${ARTS_CONFIG}" != "xno"
1951 PLUGINS="${PLUGINS} arts"
1952 CFLAGS_arts="${CFLAGS_arts} `${ARTS_CONFIG} --cflags`"
1953 LDFLAGS_arts="${LDFLAGS_arts} `${ARTS_CONFIG} --libs `"
1961 [ --enable-alsa ALSA sound support for Linux (default disabled)],
1962 [if test "x${enable_alsa}" = "xyes"
1964 AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
1965 if test "x${have_alsa}" = "xtrue"
1967 #PLUGINS="${PLUGINS} alsa"
1968 LDFLAGS_alsa="${LDFLAGS_alsa} -lasound -lm -ldl"
1973 dnl win32 waveOut plugin
1975 AC_ARG_ENABLE(waveout,
1976 [ --enable-waveout Win32 waveOut module (default enabled on Win32)])
1977 if test "x${enable_waveout}" != "xno"; then
1978 if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
1979 PLUGINS="${PLUGINS} waveout"
1980 LDFLAGS_waveout="-lwinmm"
1985 dnl Interface plugins
1988 AC_ARG_WITH(,[Interface plugins:])
1990 dnl special case for BeOS
1991 if test "x${SYS}" = "xbeos"
1993 PLUGINS="${PLUGINS} beos"
2000 [ --enable-gtk Gtk+ support (default enabled)])
2001 if test "x${enable_gtk}" != "xno"
2004 AC_ARG_WITH(gtk-config-path,
2005 [ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
2006 [ if test "x${with_gtk_config_path}" != "xno"
2008 GTK_PATH="${with_gtk_config_path}:${PATH}"
2010 # look for gtk-config
2011 AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
2012 GTK_CONFIG=${GTK12_CONFIG}
2013 if test "x${GTK_CONFIG}" = "xno"
2015 AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
2017 if test "x${GTK_CONFIG}" != "xno"
2019 if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
2021 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.])
2023 if test "x${SYS}" != "xmingw32"; then
2024 CFLAGS_gtk="${CFLAGS_gtk} `${GTK_CONFIG} --cflags gtk gthread`"
2025 LDFLAGS_gtk="${LDFLAGS_gtk} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
2027 CFLAGS_gtk="${CFLAGS_gtk} `${GTK_CONFIG} --cflags gtk`"
2028 LDFLAGS_gtk="${LDFLAGS_gtk} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
2030 # now look for the gtk.h header
2031 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gtk}"
2032 ac_cv_gtk_headers=yes
2033 AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
2034 ac_cv_gtk_headers=no
2035 echo "Cannot find gtk development headers."
2037 if test "x${ac_cv_gtk_headers}" = "xyes"
2039 PLUGINS="${PLUGINS} gtk"
2040 if test "x${SYS}" != "xmingw32"; then
2043 ALIASES="${ALIASES} gvlc"
2045 CPPFLAGS="${CPPFLAGS_save}"
2050 dnl Familiar module uses Gtk+ library
2052 AC_ARG_ENABLE(familiar,
2053 [ --enable-familiar Familiar Gtk+ support (default disabled)])
2054 if test "x${enable_familiar}" = "xyes"
2057 AC_ARG_WITH(gtk-config-path,
2058 [ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
2059 [ if test "x${with_gtk_config_path}" != "xno"
2061 GTK_PATH="${with_gtk_config_path}:${PATH}"
2063 # look for gtk-config
2064 AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
2065 GTK_CONFIG=${GTK12_CONFIG}
2066 if test "x${GTK_CONFIG}" = "xno"
2068 AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
2070 if test "x${GTK_CONFIG}" != "xno"
2072 if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
2074 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.])
2076 CFLAGS_familiar="${CFLAGS_familiar} `${GTK_CONFIG} --cflags gtk gthread`"
2077 LDFLAGS_familiar="${LDFLAGS_familiar} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
2078 # now look for the gtk.h header
2079 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_familiar}"
2080 ac_cv_gtk_headers=yes
2081 AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
2082 ac_cv_gtk_headers=no
2083 echo "Cannot find gtk development headers."
2085 if test "x${ac_cv_gtk_headers}" = "xyes"
2087 PLUGINS="${PLUGINS} familiar"
2090 CPPFLAGS="${CPPFLAGS_save}"
2097 AC_ARG_ENABLE(gnome,
2098 [ --enable-gnome Gnome interface support (default disabled)],
2099 [if test "x${enable_gnome}" = "xyes"; then
2100 # look for gnome-config
2101 AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
2102 if test -x ${GNOME_CONFIG}
2104 CFLAGS_gnome="${CFLAGS_gnome} `${GNOME_CONFIG} --cflags gtk gnomeui`"
2105 LDFLAGS_gnome="${LDFLAGS_gnome} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
2107 # now look for the gnome.h header
2108 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gnome}"
2109 AC_CHECK_HEADERS(gnome.h, [
2110 PLUGINS="${PLUGINS} gnome"
2113 ALIASES="${ALIASES} gnome-vlc"
2115 AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
2116 developement tools or remove the --enable-gnome option])
2118 CPPFLAGS="${CPPFLAGS_save}"
2122 dnl wxWindows module
2124 AC_ARG_ENABLE(wxwindows,
2125 [ --enable-wxwindows wxWindows support (default enabled)])
2126 if test "x${enable_wxwindows}" != "xno"
2128 WXWINDOWS_PATH="${PATH}"
2129 AC_ARG_WITH(wx-config-path,
2130 [ --with-wx-config-path=PATH wx-config path (default search in \$PATH)],
2131 [ if test "x${with_wx_config_path}" != "xno"
2133 WXWINDOWS_PATH="${with_wx_config_path}:${PATH}"
2135 # look for wx-config
2136 AC_PATH_PROG(WX_CONFIG, wx-config, no, ${WXWINDOWS_PATH})
2137 if test "x${WX_CONFIG}" != "xno"
2139 if expr 2.3.0 \> `${WX_CONFIG} --version` >/dev/null
2141 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.])
2143 CXXFLAGS_wxwindows="${CXXFLAGS_wxwindows} `${WX_CONFIG} --cflags`"
2144 LDFLAGS_wxwindows="${LDFLAGS_wxwindows} `${WX_CONFIG} --libs`"
2145 # now look for the wxprec.h header
2146 CPPFLAGS="${save_CPPFLAGS} ${CXXFLAGS_wxwindows}"
2147 ac_cv_wx_headers=yes
2148 AC_CHECK_HEADERS(wx/wxprec.h, , [
2150 echo "Cannot find wxWindows development headers."
2152 if test "x${ac_cv_wx_headers}" = "xyes"
2154 PLUGINS="${PLUGINS} wxwindows"
2155 ALIASES="${ALIASES} wxvlc"
2157 CPPFLAGS="${save_CPPFLAGS}"
2165 [ --enable-qt Qt interface support (default disabled)],
2166 [if test "x${enable_qt}" = "xyes"; then
2167 PLUGINS="${PLUGINS} qt"
2168 ALIASES="${ALIASES} qvlc"
2169 LDFLAGS_qt="${LDFLAGS_qt} -lqt -L${QTDIR}/lib"
2170 CPPFLAGS_qt="${CPPFLAGS_qt} -I/usr/include/qt -I${QTDIR}/include"
2171 if test -x ${QTDIR}/bin/moc
2173 MOC=${QTDIR}/bin/moc
2183 [ --enable-kde KDE interface support (default disabled)],
2184 [if test "x${enable_kde}" = "xyes"; then
2185 PLUGINS="${PLUGINS} kde"
2186 ALIASES="${ALIASES} kvlc"
2187 LDFLAGS_kde="${LDFLAGS_kde} -L${KDEDIR}/lib -lkfile"
2188 CPPFLAGS_kde="${CPPFLAGS_kde} -I/usr/include/kde -I/usr/include/qt"
2189 CPPFLAGS_kde="${CPPFLAGS_kde} -I${KDEDIR}/include -I${QTDIR}/include"
2190 if test -x ${QTDIR}/bin/moc
2192 MOC=${QTDIR}/bin/moc
2199 dnl Opie QT embedded module
2202 [ --enable-opie Qt embedded interface support (default disabled)],
2203 [if test "x${enable_opie}" = "xyes"; then
2205 [ --with-qte=PATH Qt Embedded headers and libraries])
2206 if test "x${with_qte}" = "x"
2208 LDFLAGS_test="-L${QTDIR}/lib"
2209 CPPFLAGS_test="-I${QTDIR}/include"
2211 LDFLAGS_test="-L${with_qte}/lib"
2212 CPPFLAGS_test="-I${with_qte}/include"
2215 PLUGINS="${PLUGINS} opie"
2216 LDFLAGS_opie="${LDFLAGS_opie} ${LDFLAGS_test} -lqte"
2217 CPPFLAGS_opie="${CPPFLAGS_opie} ${CPPFLAGS_test}"
2218 if test -x ${QTEDIR}/bin/moc
2220 MOC=${QTEDIR}/bin/moc
2229 AC_ARG_ENABLE(macosx,
2230 [ --enable-macosx MacOS X support (default enabled on MacOS X)],
2231 [if test "x${enable_macosx}" = "xyes"
2233 BUILTINS="${BUILTINS} macosx"
2234 LDFLAGS_macosx="${LDFLAGS_macosx} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
2236 [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
2237 BUILTINS="${BUILTINS} macosx"
2238 LDFLAGS_macosx="${LDFLAGS_macosx} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
2245 [ --enable-qnx QNX RTOS support (default enabled on QNX RTOS)])
2246 if test "x${enable_qnx}" != "xno"
2248 AC_CHECK_HEADERS(Ph.h, [
2249 PLUGINS="${PLUGINS} qnx"
2250 LDFLAGS_qnx="${LDFLAGS_qnx} -lasound -lph"
2255 dnl Windows native interface module, built with Borland C++ Builder
2257 AC_ARG_ENABLE(intfwin,
2258 [ --enable-intfwin Win32 interface support (default disabled)],
2259 [ if test "x${enable_intfwin}" != "xno"
2261 AC_ARG_WITH(bcbuilder,
2262 [ --with-bcbuilder=PATH Borland C++ Builder installation path])
2263 if test "x${with_bcbuilder}" != "x"
2265 BCBUILDER="${with_bcbuilder}"
2267 PLUGINS="${PLUGINS} win32"
2273 AC_ARG_ENABLE(ncurses,
2274 [ --enable-ncurses ncurses interface support (default disabled)],
2275 [if test "x${enable_ncurses}" = "xyes"; then
2276 PLUGINS="${PLUGINS} ncurses"
2277 LDFLAGS_ncurses="${LDFLAGS_ncurses} -lncurses"
2284 [ --enable-xosd xosd interface support (default disabled)])
2285 if test "x${enable_xosd}" = "xyes"
2287 AC_CHECK_HEADER(xosd.h, have_xosd="true", have_xosd="false")
2288 AC_TRY_COMPILE([#include <xosd.h>],
2289 [void foo() { xosd_init("foo","bar",12,XOSD_top,2,12,42); }],,
2290 AC_DEFINE(HAVE_OLD_XOSD_H, 1, Define if <xosd.h> is pre-1.0.0))
2291 if test "x${have_xosd}" = "xtrue"
2293 PLUGINS="${PLUGINS} xosd"
2294 LDFLAGS_xosd="${LDFLAGS_xosd} -lxosd"
2302 [ --enable-lirc lirc support (default disabled)])
2303 if test "x${enable_lirc}" = "xyes"
2305 AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
2306 if test "x${have_lirc}" = "xtrue"
2308 PLUGINS="${PLUGINS} lirc"
2309 LDFLAGS_lirc="${LDFLAGS_lirc} -llirc_client"
2313 AC_ARG_WITH(,[Misc options:])
2316 dnl Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
2318 dnl We give the user the opportunity to specify
2319 dnl --with-words=big or --with-words=little ; otherwise, try to guess
2322 [ --with-words=endianness set endianness (big or little)])
2323 case "x${with_words}" in
2325 ac_cv_c_bigendian=yes
2328 ac_cv_c_bigendian=no
2331 dnl Try to guess endianness by matching patterns on a compiled
2332 dnl binary, by looking for an ASCII or EBCDIC string
2333 AC_CACHE_CHECK([whether the byte order is big-endian],
2334 [ac_cv_c_bigendian],
2335 [ac_cv_c_bigendian="unknown"
2336 [cat >conftest.c <<EOF
2337 short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
2338 short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
2339 void _a(void) { char*s = (char*)am; s = (char *)ai; }
2340 short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
2341 short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
2342 void _e(void) { char*s = (char*)em; s = (char*)ei; }
2343 int main(void) { _a(); _e(); return 0; }
2346 if test -f conftest.c
2348 if ${CC-cc} -c conftest.c -o conftest.o >>config.log 2>&1 \
2349 && test -f conftest.o
2351 if test "`strings conftest.o | grep BIGenDianSyS`"
2353 ac_cv_c_bigendian="yes"
2355 if test "`strings conftest.o | grep LiTTleEnDian`"
2357 ac_cv_c_bigendian="no"
2362 if test "x${ac_cv_c_bigendian}" = "xunknown"
2364 AC_MSG_ERROR([Could not guess endianness, please use --with-words])
2368 dnl Now we know what to use for endianness, just put it in the header
2369 if test "${ac_cv_c_bigendian}" = "yes"
2371 AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system)
2377 AC_ARG_ENABLE(gprof,
2378 [ --enable-gprof gprof profiling (default disabled)])
2379 AC_ARG_ENABLE(cprof,
2380 [ --enable-cprof cprof profiling (default disabled)])
2381 AM_CONDITIONAL(GPROF, test "x${enable_gprof}" = "xyes")
2382 AM_CONDITIONAL(CPROF, test "x${enable_gprof}" = "xyes")
2385 dnl GNU portable threads
2388 [ --enable-pth GNU Pth support (default disabled)],
2389 [ if test "x${enable_pth}" = "xyes"; then
2390 AC_CHECK_LIB(pth,pth_init)
2391 AC_EGREP_HEADER(pth_init,pth.h,[
2392 AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
2393 Define if <pth.h> defines pth_init)
2402 [ --enable-st State Threads (default disabled)],
2403 [ if test "x${enable_st}" = "xyes"; then
2404 AC_CHECK_LIB(st,st_init)
2405 AC_EGREP_HEADER(st_init,st.h,[
2406 AC_DEFINE(ST_INIT_IN_ST_H, 1,
2407 Define if <st.h> defines st_init)
2412 if test "x${SYS}" != "xmingw32"; then
2413 LDFLAGS_vlc="${LDFLAGS_vlc} ${THREAD_LIB}"
2414 LDFLAGS_plugins="${LDFLAGS_plugins} ${THREAD_LIB}"
2421 AC_ARG_ENABLE(mozilla,
2422 [ --enable-mozilla build a vlc-based Mozilla plugin (default disabled)])
2423 if test "x${enable_mozilla}" = "xyes"
2425 AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
2426 if test "x${MOZILLA_CONFIG}" != "xno"
2428 if test "x${SYS}" != "xmingw32"; then
2429 LDFLAGS="${LDFLAGS_save} -L${x_libraries}"
2430 AC_CHECK_LIB(Xt,XtStrings,[
2431 LDFLAGS_mozilla="${LDFLAGS_mozilla} -L${x_libraries} -lXt"
2433 LDFLAGS="${LDFLAGS_save}"
2436 dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490
2437 [CPPFLAGS_mozilla="${CPPFLAGS_mozilla} `${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`"]
2438 #[CPPFLAGS_mozilla="${CPPFLAGS_mozilla} `${MOZILLA_CONFIG} --cflags plugin xpcom java --defines | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`"]
2439 LDFLAGS_mozilla="${LDFLAGS_mozilla} `${MOZILLA_CONFIG} --libs plugin xpcom`"
2440 dnl Not necessarily in ${PATH}
2441 if test "x${XPIDL}" = "x" -o ! -x "${XPIDL}"
2443 XPIDL="/usr/lib/mozilla/xpidl"
2447 AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
2452 AC_ARG_ENABLE(testsuite,
2453 [ --enable-testsuite build test modules (default disabled)])
2454 if test "x${enable_testsuite}" = "xyes"
2456 TESTS="test1 test2 test3 test4"
2458 dnl we define those so that bootstrap sets the right linker
2459 CXXFLAGS_test2="${CXXFLAGS_test2}"
2460 OBJCFLAGS_test3="${OBJCFLAGS_test3}"
2461 dnl this one is needed until automake knows what to do
2462 LDFLAGS_test3="${LDFLAGS_test3} -lobjc"
2464 PLUGINS="${PLUGINS} ${TESTS}"
2465 #BUILTINS="${BUILTINS} ${TESTS}"
2471 if test "x${NEED_GTK_MAIN}" != "xno"
2473 PLUGINS="${PLUGINS} gtk_main"
2474 CFLAGS_gtk="${CFLAGS_gtk} -DNEED_GTK_MAIN"
2475 CFLAGS_gtk_main="${CFLAGS_gtk_main} ${CFLAGS_gtk} ${CFLAGS_familiar}"
2476 LDFLAGS_gtk_main="${LDFLAGS_gtk_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar}"
2479 if test "x${NEED_GNOME_MAIN}" != "xno"
2481 PLUGINS="${PLUGINS} gnome_main"
2482 CFLAGS_gnome_main="${CFLAGS_gnome_main} ${CFLAGS_gtk} ${CFLAGS_familiar} ${CFLAGS_gnome}"
2483 LDFLAGS_gnome_main="${LDFLAGS_gnome_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar} ${LDFLAGS_gnome}"
2487 dnl Plugin and builtin checks
2489 builtin_support=false
2492 dnl Support for plugins - this must be AT THE END
2493 AC_ARG_ENABLE(plugins,
2494 [ --disable-plugins make all plugins built-in (default plugins enabled)],
2495 [if test "x${enable_plugins}" = "xno"
2497 plugin_support=false
2500 dnl Automagically disable plugins if there is no system support for
2501 dnl dynamically loadable files (.so, .dll, .dylib).
2502 dnl don't forget vlc-win32 still can load .dll as plugins
2503 if test "x${ac_cv_header_dlfcn_h}" = "xno" -a "x${ac_cv_header_image_h}" = "xno" -a "x${SYS}" != "xmingw32"
2505 echo "*** Your system doesn't have plugin support. All plugins will be built"
2507 plugin_support=false
2510 dnl Export automake variables
2511 if ${plugin_support}
2513 for plugin in `echo ${PLUGINS}`
2515 eval "${plugin}_plugin=yes"
2518 BUILTINS="${BUILTINS} ${PLUGINS}"
2521 AM_CONDITIONAL(HAVE_PLUGINS, ${plugin_support})
2523 [if echo "${BUILTINS}" | grep '[^ ]' >/dev/null 2>&1
2526 for builtin in `echo ${BUILTINS}`
2528 eval "${builtin}_builtin=yes"
2531 AM_CONDITIONAL(HAVE_BUILTINS, ${builtin_support})
2533 dnl do not touch this line (bootstrap needs it)
2537 dnl Stuff used by the program
2539 AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION} ${CODENAME}", [Simple version string])
2540 AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VideoLAN Client - version ${VERSION} ${CODENAME} - (c) 1996-2002 VideoLAN", [Copyright string])
2541 AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
2543 VLC_SYMBOL="`echo ${VERSION} | tr .- __`"
2544 AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module functions])
2545 AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
2546 AC_DEFINE_UNQUOTED(LIBEXT, "${LIBEXT}", [Dynamic object extension])
2548 DATA_PATH="${ac_tool_prefix}/share/videolan"
2550 PLUGIN_PATH="${ac_tool_prefix}/share/videolan"
2551 AC_SUBST(PLUGIN_PATH)
2556 CPPFLAGS="${CPPFLAGS_save}"
2557 CFLAGS="${CFLAGS_save}"
2558 CXXFLAGS="${CXXFLAGS_save}"
2559 OBJCFLAGS="${OBJCFLAGS_save}"
2560 LDFLAGS="${LDFLAGS_save}"
2563 dnl Fool automake (see Makefile.am)
2565 AUTOMAKE_SUCKS="\$(L_builtin) \$(LDFLAGS_builtin)"
2566 AC_SUBST(AUTOMAKE_SUCKS)
2569 dnl Create the vlc-config script
2571 LDFLAGS_libvlc="${LDFLAGS_vlc} ${LDFLAGS_builtins}"
2572 for i in `echo "${BUILTINS}" | sed -e 's@[^ ]*/@@g'` ; do LDFLAGS_libvlc="${LDFLAGS_libvlc} ${libdir}/vlc/${i}.a `eval echo '$'{LDFLAGS_${i}}`" ; done
2575 dnl Configuration is finished
2590 AC_SUBST(CFLAGS_TUNING)
2591 AC_SUBST(CFLAGS_OPTIM)
2592 AC_SUBST(CFLAGS_OPTIM_NODEBUG)
2595 AC_SUBST(CFLAGS_vlc)
2596 AC_SUBST(CFLAGS_pics)
2597 AC_SUBST(CXXFLAGS_pics)
2598 AC_SUBST(CFLAGS_plugins)
2599 AC_SUBST(CXXFLAGS_plugins)
2600 AC_SUBST(CFLAGS_builtins)
2601 AC_SUBST(CPPFLAGS_mozilla)
2603 AC_SUBST(LDFLAGS_vlc)
2604 AC_SUBST(LDFLAGS_libvlc)
2605 AC_SUBST(LDFLAGS_plugins)
2606 AC_SUBST(LDFLAGS_builtins)
2607 AC_SUBST(LDFLAGS_mozilla)
2623 chmod a+x vlc-config
2628 --------------------
2629 vlc version : ${VERSION}
2631 architecture : ${ARCH}
2633 test "x${DEBUG_TRUE}" = "x" && printf "debug "
2634 test "x${CPROF_TRUE}" = "x" && printf "cprof "
2635 test "x${GPROF_TRUE}" = "x" && printf "gprof "
2636 test "x${OPTIM_TRUE}" = "x" && printf "optim "
2637 test "x${RELEASE_TRUE}" = "x" && printf "release " || printf "devel "
2639 vlc aliases :${ALIASES}
2641 To build vlc and its plugins, type \`make'.