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 dnl BONE or not BONE ?
158 AC_CHECK_LIB( bind, inet_ntoa,
159 [ LDFLAGS_access_mms="${LDFLAGS_access_mms} -lbind"
160 LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind"],
167 AM_CONDITIONAL(HAVE_BEOS, test "x${SYS}" = "xbeos")
168 AM_CONDITIONAL(HAVE_DARWIN, test "x${SYS}" = "xdarwin")
169 AM_CONDITIONAL(HAVE_WIN32, test "x${SYS}" = "xmingw32")
171 AC_MSG_CHECKING(for suffix of libraries)
172 AC_MSG_RESULT(${LIBEXT})
174 dnl Check for the need to include the mingwex lib for mingw32
175 if test x$SYS = xmingw32
177 AC_CHECK_LIB(mingwex,opendir,
178 AC_CHECK_LIB(mingw32,opendir,LDFLAGS_vlc="${LDFLAGS_vlc}",
179 [LDFLAGS_vlc="${LDFLAGS_vlc} -lmingwex"
180 LDFLAGS_gtk="${LDFLAGS_gtk} -lmingwex"])
184 dnl Check for fnative-struct or mms-bitfields support for mingw32
185 if test x$SYS = xmingw32
187 AC_CACHE_CHECK([if \$CC accepts -mms-bitfields],
188 [ac_cv_c_mms_bitfields],
189 [CFLAGS="${CFLAGS_save} -mms-bitfields"
190 AC_TRY_COMPILE([],,ac_cv_c_mms_bitfields=yes, ac_cv_c_mms_bitfields=no)])
191 if test x"$ac_cv_c_mms_bitfields" != x"no"; then
192 CFLAGS_mingw32_special="-mms-bitfields"
194 CFLAGS_mingw32_special="-fnative-struct"
197 CFLAGS_save="${CFLAGS_save} ${CFLAGS_mingw32_special}";
198 CXXFLAGS_save="${CXXFLAGS_save} ${CFLAGS_mingw32_special}";
199 CFLAGS="${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
202 dnl Check for fvtable-thunks support for mingw32
203 if test x$SYS = xmingw32
206 AC_CACHE_CHECK([if \$CXX accepts -fvtable-thunks],
207 [ac_cv_cxx_fvtable_thunks],
208 [CXXFLAGS="${CXXFLAGS_save} -Wall -Werror -fvtable-thunks"
209 AC_TRY_COMPILE([],,ac_cv_cxx_fvtable_thunks=yes,
210 ac_cv_cxx_fvtable_thunks=no)])
211 if test x"$ac_cv_cxx_fvtable_thunks" = x"yes"; then
212 CXXFLAGS_mingw32_special="-fvtable-thunks"
215 CXXFLAGS_save="${CXXFLAGS_save} ${CXXFLAGS_mingw32_special}"
216 CXXFLAGS="${CXXFLAGS_save}"
220 dnl Flags for plugin compilation
223 CFLAGS_pics="${CFLAGS_pics} ${CFLAGS_mingw32_special}"
224 CXXFLAGS_pics="${CXXFLAGS_pics} ${CFLAGS_mingw32_special} ${CXXFLAGS_mingw32_special}"
225 OBJCFLAGS_pics="${OBJCFLAGS_pics} ${CFLAGS_mingw32_special}"
226 CFLAGS_plugins="${CFLAGS_plugins} ${CFLAGS_mingw32_special}"
227 CXXFLAGS_plugins="${CXXFLAGS_plugins} ${CFLAGS_mingw32_special} ${CXXFLAGS_mingw32_special}"
228 OBJCFLAGS_plugins="${OBJCFLAGS_plugins} ${CFLAGS_mingw32_special}"
231 CFLAGS_pics="${CFLAGS_pics} -fPIC"
232 CXXFLAGS_pics="${CXXFLAGS_pics} -fPIC"
233 OBJCFLAGS_pics="${OBJCFLAGS_pics} -fPIC"
234 CFLAGS_plugins="${CFLAGS_plugins} -fPIC"
235 CXXFLAGS_plugins="${CXXFLAGS_plugins} -fPIC"
236 OBJCFLAGS_plugins="${OBJCFLAGS_plugins} -fPIC"
237 LDFLAGS_plugins="${LDFLAGS_plugins} -fPIC"
241 dnl The -DSYS_FOO flag
242 CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"; CPPFLAGS="${CPPFLAGS_save}"
244 dnl Check for system libs needed
247 AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll getenv putenv setenv)
249 dnl Check for usual libc functions
250 AC_CHECK_FUNCS(strdup,,[need_libc=:])
251 AC_CHECK_FUNCS(strndup,,[need_libc=:])
252 AC_CHECK_FUNCS(atof,,[need_libc=:])
253 AC_CHECK_FUNCS(lseek,,[need_libc=:])
254 AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp,,[need_libc=:])])
255 AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp,,[need_libc=:])])
257 AM_CONDITIONAL(BUILD_LIBC, ${need_libc})
259 AC_CHECK_FUNC(connect,,[
260 AC_CHECK_LIB(socket,connect,
261 LDFLAGS_ipv4="${LDFLAGS_ipv4} -lsocket"
262 LDFLAGS_vlc="${LDFLAGS_vlc} -lsocket"
265 AC_CHECK_FUNC(send,,[
266 AC_CHECK_LIB(socket,send,
267 LDFLAGS_access_http="${LDFLAGS_access_http} -lsocket"
268 LDFLAGS_access_mms="${LDFLAGS_access_mms} -lsocket"
269 LDFLAGS_access_rtp="${LDFLAGS_access_rtp} -lsocket"
270 LDFLAGS_access_udp="${LDFLAGS_access_udp} -lsocket"
273 AC_CHECK_FUNC(gethostbyname,,[
274 AC_CHECK_LIB(nsl,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lnsl",[
275 AC_CHECK_LIB(bind,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind")])
279 AC_CHECK_FUNC(nanosleep,have_nanosleep=:,[
280 AC_CHECK_LIB(rt,nanosleep,
281 [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"; have_nanosleep=:],
282 [AC_CHECK_LIB(posix4,nanosleep,
283 [LDFLAGS_vlc="${LDFLAGS_vlc} -lposix4"; have_nanosleep=:])]
286 if ${have_nanosleep}; then
287 AC_DEFINE(HAVE_NANOSLEEP, 1,
288 Define if nanosleep is available.)
291 dnl Check for socklen_t
292 AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
294 [#include <sys/types.h>
295 #include <sys/socket.h>],
296 [socklen_t len = 42; return len;],
297 ac_cv_type_socklen_t=yes,
298 ac_cv_type_socklen_t=no)])
299 if test x$ac_cv_type_socklen_t != xno; then
300 AC_DEFINE(HAVE_SOCKLEN_T, 1,
301 Define if <sys/socket.h> defines socklen_t.)
305 AC_CHECK_LIB(rt,sem_init, [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"])
307 AC_CHECK_FUNC(inet_aton,,[
308 AC_CHECK_LIB(resolv,inet_aton,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lresolv")
310 AC_CHECK_FUNC(textdomain,,[
311 AC_CHECK_LIB(intl,textdomain,
312 LDFLAGS_vlc="${LDFLAGS_vlc} -lintl"
313 LDFLAGS_plugins="${LDFLAGS_plugins} -lintl"
319 AC_CHECK_FUNC(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
320 [ # FreeBSD has a gnugetopt library for this:
321 AC_CHECK_LIB([gnugetopt],[getopt_long],
322 [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) LDFLAGS_vlc="${LDFLAGS_vlc} -lgnugetopt"],
324 AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt})
327 AC_CHECK_LIB(dl,dlopen,LDFLAGS_vlc="${LDFLAGS_vlc} -ldl")
329 LDFLAGS_imdct="${LDFLAGS_imdct} -lm"
330 LDFLAGS_filter_distort="${LDFLAGS_filter_distort} -lm"
331 LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} -lm")
333 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lm"
334 LDFLAGS_imdct="${LDFLAGS_imdct} -lm"
335 LDFLAGS_imdct3dn="${LDFLAGS_imdct3dn} -lm"
336 LDFLAGS_imdctsse="${LDFLAGS_imdctsse} -lm"
337 LDFLAGS_i420_rgb="${LDFLAGS_i420_rgb} -lm"
338 LDFLAGS_faad="${LDFLAGS_faad} -lm"
341 dnl Check for pthreads - borrowed from XMMS
343 if test "x${THREAD_LIB}" = "xerror"; then
344 AC_CHECK_LIB(pthread,main,THREAD_LIB="-lpthread")
346 if test "x${THREAD_LIB}" = "xerror"; then
347 AC_CHECK_LIB(pthreads,main,THREAD_LIB="-lpthreads")
349 if test "x${THREAD_LIB}" = "xerror"; then
350 AC_CHECK_LIB(c_r,main,THREAD_LIB="-lc_r")
352 if test "x${THREAD_LIB}" = "xerror"; then
353 AC_CHECK_FUNC(pthread_mutex_lock)
357 dnl Check for cthreads under GNU/Hurd for instance
358 AC_CHECK_LIB(threads,cthread_fork,THREAD_LIB="-lthreads")
360 dnl Check for misc headers
361 AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
362 AC_DEFINE(PTHREAD_COND_T_IN_PTHREAD_H, 1,
363 Define if <pthread.h> defines pthread_cond_t.)])
364 AC_EGREP_HEADER(pthread_once,pthread.h,[
365 AC_DEFINE(PTHREAD_ONCE_IN_PTHREAD_H, 1,
366 Define if <pthread.h> defines pthread_once.)])
367 AC_EGREP_HEADER(strncasecmp,strings.h,[
368 AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
369 Define if <strings.h> defines strncasecmp.)])
371 dnl Check for headers
372 AC_CHECK_HEADERS(signal.h time.h errno.h stdint.h getopt.h strings.h inttypes.h sys/int_types.h)
373 AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h)
374 AC_CHECK_HEADERS(dlfcn.h image.h)
375 AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
376 AC_CHECK_HEADERS(machine/param.h sys/shm.h)
377 AC_CHECK_HEADERS(linux/version.h)
383 AC_CHECK_HEADERS(dirent.h,,[need_dirent=:])
384 AM_CONDITIONAL(BUILD_DIRENT, ${need_dirent})
386 dnl Mac OS X and other OSes don't have declaration for nanosleep
387 AC_EGREP_HEADER(nanosleep,time.h,[
388 AC_DEFINE(HAVE_DECL_NANOSLEEP, 1,
389 Define if <time.h> defines nanosleep.)
392 dnl Make sure we have timespecs
393 AC_EGREP_HEADER(timespec,sys/time.h,[
394 AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
395 Define if <sys/time.h> defines struct timespec.)
398 dnl Check for threads library
399 AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
401 dnl Default X headers and libraries
402 if test "x${x_includes}" = "xNONE"; then
403 x_includes="/usr/X11R6/include"
405 if test "x${x_libraries}" = "xNONE"; then
406 x_libraries="/usr/X11R6/lib"
409 dnl Build the gtk_main plugins?
414 if test "x${SYS}" != "xmingw32"
416 CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
417 AC_CHECK_HEADERS(X11/extensions/dpms.h, [
418 AC_EGREP_HEADER(DPMSInfo,X11/extensions/dpms.h,[
419 AC_DEFINE(DPMSINFO_IN_DPMS_H, 1,
420 Define if <X11/extensions/dpms.h> defines DPMSInfo.)
423 CPPFLAGS="${CPPFLAGS_save}"
426 dnl Check for ntohl, etc.
427 AC_CACHE_CHECK([for ntohl in sys/param.h],
428 [ac_cv_c_ntohl_sys_param_h],
429 [CFLAGS="${CFLAGS_save} -Wall -Werror"
430 AC_TRY_COMPILE([#include <sys/param.h>],
431 [void foo() { int meuh; ntohl(meuh); }],
432 ac_cv_c_ntohl_sys_param_h=yes, ac_cv_c_ntohl_sys_param_h=no)])
433 if test "x${ac_cv_c_ntohl_sys_param_h}" != "xno"; then
434 AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
437 dnl Check for inline function size limit
438 AC_CACHE_CHECK([if \$CC accepts -finline-limit],
439 [ac_cv_c_inline_limit],
440 [CFLAGS="${CFLAGS_save} -finline-limit-30000"
441 AC_TRY_COMPILE([],,ac_cv_c_inline_limit=yes, ac_cv_c_inline_limit=no)])
442 if test "x${ac_cv_c_inline_limit}" != "xno"; then
443 CFLAGS_save="${CFLAGS_save} -finline-limit-30000"; CFLAGS="${CFLAGS_save}"
444 CXXFLAGS_save="${CXXFLAGS_save} -finline-limit-30000"; CXXFLAGS="${CXXFLAGS_save}"
445 OBJCFLAGS_save="${OBJCFLAGS_save} -finline-limit-30000"; OBJCFLAGS="${OBJCFLAGS_save}"
448 dnl Check for -W or -w flags
449 AC_CACHE_CHECK([if \$CC accepts -Wall -Winline],
450 [ac_cv_c_Wall_Winline],
451 [CFLAGS="-Wall -Winline ${CFLAGS_save}"
452 AC_TRY_COMPILE([],,ac_cv_c_Wall_Winline=yes, ac_cv_c_Wall_Winline=no)])
453 if test "x${ac_cv_c_Wall_Winline}" != "xno"; then
454 CFLAGS_save="-Wall -Winline ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
455 CXXFLAGS_save="-Wall ${CXXFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
456 OBJCFLAGS_save="-Wall -Winline ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
458 AC_CACHE_CHECK([if \$CC accepts -wall -winline],
459 [ac_cv_c_wall_winline],
460 [CFLAGS="-wall -winline ${CFLAGS_save}"
461 AC_TRY_COMPILE([],,ac_cv_c_wall_winline=yes, ac_cv_c_wall_winline=no)])
462 if test "x${ac_cv_c_wall_winline}" != "xno"; then
463 CFLAGS_save="-wall -winline ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
464 CXXFLAGS_save="-wall -winline ${CXXFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
465 OBJCFLAGS_save="-wall -winline ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
470 AC_CACHE_CHECK([if \$CC accepts -pipe],
472 [CFLAGS="${CFLAGS_save} -pipe"
473 AC_TRY_COMPILE([],,ac_cv_c_pipe=yes, ac_cv_c_pipe=no)])
474 if test "x${ac_cv_c_pipe}" != "xno"; then
475 CFLAGS_save="${CFLAGS_save} -pipe"; CFLAGS="${CFLAGS_save}"
476 CXXFLAGS_save="${CXXFLAGS_save} -pipe"; CXXFLAGS="${CXXFLAGS_save}"
477 OBJCFLAGS_save="${OBJCFLAGS_save} -pipe"; OBJCFLAGS="${OBJCFLAGS_save}"
480 dnl Check for various optimization flags
481 AC_CACHE_CHECK([if \$CC accepts -O3],
483 [CFLAGS="${CFLAGS_save} -O3"
484 AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)])
485 if test "x${ac_cv_c_o3}" != "xno"; then
486 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
488 AC_CACHE_CHECK([if \$CC accepts -O2],
490 [CFLAGS="${CFLAGS_save} -O2"
491 AC_TRY_COMPILE([],,ac_cv_c_o2=yes, ac_cv_c_o2=no)])
492 if test "x${ac_cv_c_o2}" != "xno"; then
493 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
495 AC_CACHE_CHECK([if \$CC accepts -O],
497 [CFLAGS="${CFLAGS_save} -O"
498 AC_TRY_COMPILE([],,ac_cv_c_o=yes, ac_cv_c_o=no)])
499 if test "x${ac_cv_c_o}" != "xno"; then
500 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
505 dnl Check for -ffast-math
506 AC_CACHE_CHECK([if \$CC accepts -ffast-math],
508 [CFLAGS="${CFLAGS_save} -ffast-math"
509 AC_TRY_COMPILE([],,ac_cv_c_fast_math=yes, ac_cv_c_fast_math=no)])
510 if test "x${ac_cv_c_fast_math}" != "xno"; then
511 CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
514 dnl Check for -funroll-loops
515 AC_CACHE_CHECK([if \$CC accepts -funroll-loops],
516 [ac_cv_c_unroll_loops],
517 [CFLAGS="${CFLAGS_save} -funroll-loops"
518 AC_TRY_COMPILE([],,ac_cv_c_unroll_loops=yes, ac_cv_c_unroll_loops=no)])
519 if test "x${ac_cv_c_unroll_loops}" != "xno"; then
520 CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
523 dnl Check for -fomit-frame-pointer
524 AC_CACHE_CHECK([if \$CC accepts -fomit-frame-pointer],
525 [ac_cv_c_omit_frame_pointer],
526 [CFLAGS="${CFLAGS_save} -fomit-frame-pointer"
527 AC_TRY_COMPILE([],,ac_cv_c_omit_frame_pointer=yes, ac_cv_c_omit_frame_pointer=no)])
528 if test "x${ac_cv_c_omit_frame_pointer}" != "xno"; then
529 CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
530 # this plugin does not compile without -fomit-frame-pointer, damn gcc!
531 CFLAGS_i420_yuy2_mmx="${CFLAGS_i420_yuy2_mmx} -fomit-frame-pointer"
534 dnl Check for -mdynamic-no-pic
535 AC_CACHE_CHECK([if \$CC accepts -mdynamic-no-pic],
536 [ac_cv_c_dynamic_no_pic],
537 [CFLAGS="${CFLAGS_save} -mdynamic-no-pic"
538 AC_TRY_COMPILE([],,ac_cv_c_dynamic_no_pic=yes, ac_cv_c_dynamic_no_pic=no)])
539 if test "x${ac_cv_c_dynamic_no_pic}" != "xno"; then
540 CFLAGS_builtins="${CFLAGS_builtins} -mdynamic-no-pic"
541 CFLAGS_libvlc="${CFLAGS_libvlc} -mdynamic-no-pic"
544 dnl Check for Darwin plugin linking flags
545 AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error -lcc_dynamic],
547 [CFLAGS="${CFLAGS_save} -bundle -undefined error -lcc_dynamic"
548 AC_TRY_COMPILE([],,ac_cv_ld_darwin=yes, ac_cv_ld_darwin=no)])
549 if test "x${ac_cv_ld_darwin}" != "xno"; then
550 LDFLAGS_plugins="${LDFLAGS_plugins} -bundle -undefined error -lcc_dynamic"
553 dnl Check for standard plugin linking flags
554 AC_CACHE_CHECK([if \$CC accepts -shared],
556 [CFLAGS="${CFLAGS_save} -shared"
557 AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
558 if test "x${ac_cv_ld_plugins}" != "xno"; then
559 LDFLAGS_plugins="${LDFLAGS_plugins} -shared"
562 dnl Check for variadic macros
563 AC_CACHE_CHECK([for variadic cpp macros],
564 [ac_cv_cpp_variadic_macros],
565 [CFLAGS="${CFLAGS_save}"
568 #define a(b,c...) printf(b,##c)],
569 [a("foo");a("%s","bar");a("%s%s","baz","quux");],
570 ac_cv_cpp_variadic_macros=yes,
571 ac_cv_cpp_variadic_macros=no)])
572 if test "x${ac_cv_cpp_variadic_macros}" != "xno"; then
573 AC_DEFINE(HAVE_VARIADIC_MACROS, 1, Support for variadic macros)
576 dnl Checks for __attribute__(aligned()) directive
577 AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
578 [ac_cv_c_attribute_aligned],
579 [ac_cv_c_attribute_aligned=0
580 CFLAGS="${CFLAGS_save} -Werror"
581 for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
583 [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;],
584 [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
586 CFLAGS="${CFLAGS_save}"])
587 if test "x${ac_cv_c_attribute_aligned}" != "x0"; then
588 AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
589 [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
595 case "x${target_cpu}" in
606 CFLAGS_mpeg_video="${CFLAGS_mpeg_video} -ffunction-sections"
613 PLUGINS="${PLUGINS} dummy rc logger access_file memcpy"
614 PLUGINS="${PLUGINS} es audio mpeg_system ps ts"
615 PLUGINS="${PLUGINS} idct idctclassic motion mpeg_video spudec mpeg_audio"
616 #PLUGINS="${PLUGINS} a52old imdct downmix"
617 PLUGINS="${PLUGINS} lpcm a52"
618 PLUGINS="${PLUGINS} deinterlace invert adjust wall transform distort clone crop motionblur"
619 PLUGINS="${PLUGINS} float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif fixed32tofloat32 fixed32tos16 s16tofloat32 s16tofloat32swab s8tofloat32 u8tofixed32 u8tofloat32"
620 PLUGINS="${PLUGINS} trivial_resampler ugly_resampler linear_resampler"
621 PLUGINS="${PLUGINS} trivial_channel_mixer"
622 PLUGINS="${PLUGINS} trivial_mixer spdif_mixer float32_mixer"
623 PLUGINS="${PLUGINS} aout_file"
624 #PLUGINS="${PLUGINS} scope"
625 PLUGINS="${PLUGINS} i420_rgb i420_yuy2 i422_yuy2 i420_ymga"
626 PLUGINS="${PLUGINS} id3 m3u"
627 PLUGINS="${PLUGINS} wav araw demuxdump demuxsub adpcm"
628 PLUGINS="${PLUGINS} access_udp access_http access_rtp ipv4 access_mms sap"
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 AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
641 [CFLAGS="${CFLAGS_save}"
642 AC_TRY_COMPILE(,[void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));],
643 ac_cv_mmx_inline=yes, ac_cv_mmx_inline=no)])
644 if test "x${ac_cv_mmx_inline}" != "xno"; then
645 ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
648 AC_CACHE_CHECK([if \$CC groks MMX EXT inline assembly],
649 [ac_cv_mmxext_inline],
650 [CFLAGS="${CFLAGS_save}"
651 AC_TRY_COMPILE(,[void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));],
652 ac_cv_mmxext_inline=yes, ac_cv_mmxext_inline=no)])
653 if test "x${ac_cv_mmxext_inline}" != "xno"; then
654 ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
657 AC_CACHE_CHECK([if \$CC groks 3D Now! inline assembly],
658 [ac_cv_3dnow_inline],
659 [CFLAGS="${CFLAGS_save}"
660 AC_TRY_COMPILE(,[void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));],
661 ac_cv_3dnow_inline=yes, ac_cv_3dnow_inline=no)])
662 if test "x${ac_cv_3dnow_inline}" != "xno"; then
663 AC_DEFINE(CAN_COMPILE_3DNOW, 1, Define if \$CC groks 3D Now! inline assembly.)
664 ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
667 AC_CACHE_CHECK([if \$CC groks SSE inline assembly],
669 [CFLAGS="${CFLAGS_save}"
670 AC_TRY_COMPILE(,[void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));],
671 ac_cv_sse_inline=yes, ac_cv_sse_inline=no)])
672 if test "x${ac_cv_sse_inline}" != "xno" -a "x${SYS}" != "xmingw32"; then
673 AC_DEFINE(CAN_COMPILE_SSE, 1, Define if \$CC groks SSE inline assembly.)
674 ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
677 # don't try to grok AltiVec with native mingw32 it doesn't work right now
678 # we should be able to remove this test with future versions of mingw32
679 if test "x${SYS}" != "xmingw32"; then
680 AC_CACHE_CHECK([if \$CC groks AltiVec inline assembly],
681 [ac_cv_altivec_inline],
682 [CFLAGS="${CFLAGS_save}"
683 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
684 ac_cv_altivec_inline=yes,
685 [CFLAGS="${CFLAGS_save} -Wa,-m7400"
686 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
687 [ac_cv_altivec_inline="-Wa,-m7400"],
688 ac_cv_altivec_inline=no)
690 if test "x${ac_cv_altivec_inline}" != "xno"; then
691 AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks AltiVec inline assembly.)
692 if test "x${ac_cv_altivec_inline}" != "xyes"; then
693 CFLAGS_idctaltivec="${CFLAGS_idctaltivec} ${ac_cv_altivec_inline}"
694 CFLAGS_motionaltivec="${CFLAGS_motionaltivec} ${ac_cv_altivec_inline}"
695 CFLAGS_memcpyaltivec="${CFLAGS_memcpyaltivec} ${ac_cv_altivec_inline}"
696 CFLAGS_vlc="${CFLAGS_vlc} ${ac_cv_altivec_inline}"
698 ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
701 AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
703 [CFLAGS="${CFLAGS_save} -faltivec"
705 AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
706 ac_cv_c_altivec=-faltivec, [
708 CFLAGS="${CFLAGS_save} ${CFLAGS_idctaltivec} -fvec"
709 AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
710 [ac_cv_c_altivec="-fvec"], ac_cv_c_altivec=no)
712 CFLAGS="${CFLAGS_save}"])
713 if test "x${ac_cv_c_altivec}" != "xno"; then
714 AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
715 CFLAGS_idctaltivec="${CFLAGS_idctaltivec} ${ac_cv_c_altivec}"
716 CFLAGS_motionaltivec="${CFLAGS_motionaltivec} ${ac_cv_c_altivec}"
717 CFLAGS_memcpyaltivec="${CFLAGS_memcpyaltivec} ${ac_cv_c_altivec}"
718 CFLAGS_vlc="${CFLAGS_vlc} ${ac_cv_c_altivec}"
719 ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
722 AC_CACHE_CHECK([if linker needs -framework vecLib],
724 [LDFLAGS="${LDFLAGS_vlc} -framework vecLib"
725 AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)
726 LDFLAGS="${LDFLAGS_save}"
728 if test "x${ac_cv_ld_altivec}" != "xno"; then
729 LDFLAGS_idctaltivec="${LDFLAGS_idctaltivec} -framework vecLib"
730 LDFLAGS_motionaltivec="${LDFLAGS_motionaltivec} -framework vecLib"
731 LDFLAGS_memcpyaltivec="${LDFLAGS_memcpyaltivec} -framework vecLib"
732 LDFLAGS_vlc="${LDFLAGS_vlc} -framework vecLib"
737 AC_ARG_WITH(,[Optimization options:])
740 dnl Special arch tuning
743 [ --with-tuning=ARCH enable special tuning for an architecture
744 (default i686 on IA-32 and 750 on PPC)])
745 if test "x${with_tuning}" != "x"; then
746 if test "x${target_cpu}" = "xpowerpc"; then
747 CFLAGS_TUNING="-mtune=${with_tuning}"
749 CFLAGS_TUNING="-mcpu=${with_tuning}"
752 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"
754 if test "x${target_cpu}" = "xpowerpc"; then CFLAGS_TUNING="-mtune=750"; fi
759 dnl x86 accelerations
761 if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xx86" -o "x${target_cpu}" = "xi386"
764 PLUGINS="${PLUGINS} ${ACCEL_MODULES}"
768 dnl Enable/disable optimizations
770 AC_ARG_ENABLE(optimizations,
771 [ --disable-optimizations disable compiler optimizations (default enabled)])
772 AM_CONDITIONAL(OPTIM, test "x${enable_optimizations}" != "xno")
775 dnl AltiVec acceleration
777 AC_ARG_ENABLE(altivec,
778 [ --disable-altivec disable AltiVec optimizations (default enabled on PPC)],
779 [ if test "x${enable_altivec}" = "xyes"; then ARCH="${ARCH} altivec";
780 BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ],
781 [ if test "x${target_cpu}" = "xpowerpc"; then ARCH="${ARCH} altivec";
782 BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ])
788 [ --enable-debug debug mode (default disabled)])
789 AM_CONDITIONAL(DEBUG, test "x${enable_debug}" = "xyes")
792 dnl Enable release-specific flags
794 AC_ARG_ENABLE(release,
795 [ --enable-release activate extra optimizations (default disabled)])
796 AM_CONDITIONAL(RELEASE, test "x${enable_release}" = "xyes")
802 AC_ARG_WITH(,[Input plugins:])
805 dnl DVD module: optionally check for installed libdvdcss
808 [ --enable-dvd DVD input module (default enabled)])
809 if test "x${enable_dvd}" != "xno"
812 [ --with-dvdcss=PATH libdvdcss headers and libraries])
813 AC_ARG_WITH(dvdcss-tree,
814 [ --with-dvdcss-tree=PATH libdvdcss tree for static linking])
815 case "x${with_dvdcss}" in
817 if test "x${with_dvdcss_tree}" = x
819 AC_CHECK_HEADERS(dvdcss/dvdcss.h,
820 [ PLUGINS="${PLUGINS} dvd"
821 LDFLAGS_dvd="${LDFLAGS_dvd} -ldvdcss"
822 LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -ldvdcss" ],
823 [ 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.])
824 AC_MSG_ERROR([cannot find libdvdcss headers]) ])
826 AC_MSG_CHECKING(for libdvdcss.a in ${with_dvdcss_tree})
827 real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
828 if test "x${real_dvdcss_tree}" = "x"
830 dnl The given directory can't be found
832 AC_MSG_ERROR([cannot cd to ${with_dvdcss_tree}])
834 if test -f "${real_dvdcss_tree}/src/.libs/libdvdcss.a"
836 dnl Use a custom libdvdcss
837 AC_MSG_RESULT(${real_dvdcss_tree}/src/.libs/libdvdcss.a)
838 BUILTINS="${BUILTINS} dvd"
839 LDFLAGS_dvd="${LDFLAGS_dvd} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
840 LDFLAGS_dvdcss="${LDFLAGS_dvdcss} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
841 CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${real_dvdcss_tree}/src"
843 dnl The given libdvdcss wasn't built
845 AC_MSG_ERROR([cannot find ${real_dvdcss_tree}/src/.libs/libdvdcss.a, make sure you compiled libdvdcss in ${with_dvdcss_tree}])
850 dnl Compile without dvdcss (dlopen version, works only under Linux)
851 PLUGINS="${PLUGINS} dvd"
852 CPPFLAGS_dvd="${CPPFLAGS_dvd} -DGOD_DAMN_DMCA"
853 LDFLAGS_dvd="${LDFLAGS_dvd} -ldl"
856 AC_MSG_CHECKING(for dvdcss headers in ${with_dvdcss})
857 if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
859 dnl Use ${with_dvdcss}/include/dvdcss/dvdcss.h
861 PLUGINS="${PLUGINS} dvd"
862 LDFLAGS_dvd="${LDFLAGS_dvd} -L${with_dvdcss}/lib -ldvdcss"
863 LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -L${with_dvdcss}/lib -ldvdcss"
864 CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${with_dvdcss}/include"
866 dnl No libdvdcss could be found, sorry
868 AC_MSG_ERROR([cannot find ${with_dvdcss}/include/dvdcss/dvdcss.h])
875 dnl dvdread module: check for libdvdread
877 AC_ARG_ENABLE(dvdread,
878 [ --enable-dvdread dvdread input module (default disabled)])
879 if test "x${enable_dvdread}" != "xno"
882 [ --with-dvdread=PATH libdvdread headers and libraries])
883 AC_ARG_WITH(dvdread-tree,
884 [ --with-dvdread-tree=PATH libdvdread tree for static linking])
885 if test "x${with_dvdread}" = x
887 if test "x${with_dvdread_tree}" = x
889 AC_CHECK_HEADERS(dvdread/dvdread.h,
890 [ PLUGINS="${PLUGINS} dvdread"
891 LDFLAGS_dvdread="${LDFLAGS_dvdread} -ldvdread" ],
892 [ if test "x${enable_dvdread}" != "x"
894 AC_MSG_WARN([Please get libdvdread from http://www.dtek.chalmers.se/groups/dvd/downloads.shtml])
895 AC_MSG_ERROR([cannot find libdvdread headers])
898 AC_MSG_CHECKING(for libdvdread.a in ${with_dvdread_tree})
899 real_dvdread_tree="`cd ${with_dvdread_tree} 2>/dev/null && pwd`"
900 if test "x${real_dvdread_tree}" = "x"
902 dnl The given directory can't be found
904 AC_MSG_ERROR([cannot cd to ${with_dvdread_tree}])
906 if test -f "${real_dvdread_tree}/dvdread/.libs/libdvdread.a"
908 dnl Use a custom libdvdread
909 AC_MSG_RESULT(${real_dvdread_tree}/dvdread/.libs/libdvdread.a)
910 BUILTINS="${BUILTINS} dvdread"
911 LDFLAGS_dvdread="${LDFLAGS_dvdread} ${real_dvdread_tree}/dvdread/.libs/libdvdread.a"
912 CPPFLAGS_dvdread="${CPPFLAGS_dvdread} -I${real_dvdread_tree}"
914 dnl The given libdvdread wasn't built
916 AC_MSG_ERROR([cannot find ${real_dvdread_tree}/dvdread/.libs/libdvdread.a, make sure you compiled libdvdread in ${with_dvdread_tree}])
920 AC_MSG_CHECKING(for dvdread headers in ${with_dvdread})
921 if test -f ${with_dvdread}/include/dvdread/dvdread.h
923 dnl Use ${with_dvdread}/include/dvdread/dvdread.h
925 PLUGINS="${PLUGINS} dvdread"
926 LDFLAGS_dvdread="${LDFLAGS_dvdread} -L${with_dvdread}/lib -ldvdread"
927 CPPFLAGS_dvdread="${CPPFLAGS_dvdread} -I${with_dvdread}/include"
929 dnl No libdvdread could be found, sorry
931 AC_MSG_ERROR([cannot find ${with_dvdread}/include/dvdread/dvdread.h])
937 dnl dvdplay module: check for libdvdplay
939 AC_ARG_ENABLE(dvdplay,
940 [ --enable-dvdplay dvdplay input module (default disabled)])
941 if test "x${enable_dvdplay}" != "xno"
944 [ --with-dvdplay=PATH libdvdplay headers and libraries])
945 AC_ARG_WITH(dvdplay-tree,
946 [ --with-dvdplay-tree=PATH libdvdplay tree for static linking])
947 if test "x${with_dvdplay}" = x
949 if test "x${with_dvdplay_tree}" = x
951 AC_CHECK_HEADERS(dvdplay/dvdplay.h,
952 [ PLUGINS="${PLUGINS} dvdplay"
953 LDFLAGS_dvdplay="${LDFLAGS_dvdplay} ${LDFLAGS_dvd} ${LDFLAGS_dvdread} -ldvdplay"
954 CPPFLAGS_dvdplay = "${CPPFLAGS_dvdplay} ${CPPFLAGS_dvdread}" ],
955 [ if test "x${enable_dvdplay}" != "x"
957 AC_MSG_WARN([Please get libdvdplay from http://www.videolan.org/.])
958 AC_MSG_ERROR([cannot find libdvdplay headers])
961 AC_MSG_CHECKING(for libdvdplay.a in ${with_dvdplay_tree})
962 real_dvdplay_tree="`cd ${with_dvdplay_tree} 2>/dev/null && pwd`"
963 if test "x${real_dvdplay_tree}" = "x"
965 dnl The given directory can't be found
967 AC_MSG_ERROR([cannot cd to ${with_dvdplay_tree}])
969 if test -f "${real_dvdplay_tree}/src/.libs/libdvdplay.a"
971 dnl Use a custom libdvdplay
972 AC_MSG_RESULT(${real_dvdplay_tree}/src/.libs/libdvdplay.a)
973 BUILTINS="${BUILTINS} dvdplay"
974 LDFLAGS_dvdplay="${LDFLAGS_dvdplay} ${LDFLAGS_dvd} ${LDFLAGS_dvdread} ${real_dvdplay_tree}/src/.libs/libdvdplay.a"
975 CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_dvdread} -I${real_dvdplay_tree}/src"
977 dnl The given libdvdplay wasn't built
979 AC_MSG_ERROR([cannot find ${real_dvdplay_tree}/src/.libs/libdvdplay.a, make sure you compiled libdvdplay in ${with_dvdplay_tree}])
983 AC_MSG_CHECKING(for dvdplay headers in ${with_dvdplay})
984 if test -f ${with_dvdplay}/include/dvdplay/dvdplay.h
986 dnl Use ${with_dvdplay}/include/dvdplay/dvdplay.h
988 PLUGINS="${PLUGINS} dvdplay"
989 LDFLAGS_dvdplay="${LDFLAGS_dvdplay} ${LDFLAGS_dvd} ${LDFLAGS_dvdread} -L${with_dvdplay}/lib -ldvdplay"
990 CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_dvdread} -I${with_dvdplay}/include"
992 dnl No libdvdplay could be found, sorry
994 AC_MSG_ERROR([cannot find ${with_dvdplay}/include/dvdplay/dvdplay.h])
1000 dnl libdvbpsi ts demux
1002 AC_ARG_ENABLE(dvbpsi,
1003 [ --enable-dvbpsi dvbpsi ts demux module (default enabled)])
1004 if test "x${enable_dvbpsi}" != "xno"
1007 [ --with-dvbpsi=PATH libdvbpsi headers and libraries])
1009 [ --with-dvbpsi-tree=PATH libdvbpsi tree for static linking])
1010 case "x${with_dvbpsi}" in
1012 if test "x${with_dvbpsi_tree}" = "x"
1014 AC_CHECK_HEADERS(dvbpsi/dr.h,
1015 [ PLUGINS="${PLUGINS} ts_dvbpsi"
1016 LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} -ldvbpsi" ],
1017 [ AC_MSG_WARN([cannot find libdvbpsi headers]) ],
1018 [#include <stdint.h>
1019 #include <dvbpsi/dvbpsi.h>
1020 #include <dvbpsi/descriptor.h>
1021 #include <dvbpsi/pat.h>
1022 #include <dvbpsi/pmt.h>])
1024 AC_MSG_CHECKING(for libdvbpsi.a in ${with_dvbpsi_tree})
1025 real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
1026 if test "x${real_dvbpsi_tree}" = "x"
1028 dnl The given directory can't be found
1030 AC_MSG_ERROR([cannot cd to ${with_dvbpsi_tree}])
1032 if test -f "${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
1034 dnl Use a custom libdvbpsi
1035 AC_MSG_RESULT(${real_dvbpsi_tree}/src/.libs/libdvbpsi.a)
1036 BUILTINS="${BUILTINS} ts_dvbpsi"
1037 LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
1038 CPPFLAGS_ts_dvbpsi="${CPPFLAGS_ts_dvbpsi} -I${real_dvbpsi_tree}/src"
1040 dnl The given libdvbpsi wasn't built
1042 AC_MSG_ERROR([cannot find ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a, make sure you compiled libdvbpsi in ${with_dvbpsi_tree}])
1047 dnl Compile without dvbpsi
1050 AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi})
1051 if test "x${with_dvbpsi}" = "x"
1056 LDFLAGS_test="-L${with_dvbpsi}/lib"
1057 CPPFLAGS_test="-I${with_dvbpsi}/include"
1059 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
1060 AC_CHECK_HEADER([dvbpsi/dr.h],[
1061 PLUGINS="${PLUGINS} ts_dvbpsi"
1062 LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} ${LDFLAGS_test} -ldvbpsi"
1063 CPPFLAGS_ts_dvbpsi="${CPPFLAGS_ts_dvbpsi} ${CPPFLAGS_test}"
1065 if test "x${enable_dvbpsi}" != "x"
1067 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])
1070 CPPFLAGS="${CPPFLAGS_save}"
1076 dnl Video4Linux plugin
1079 [ --enable-v4l Video4Linux input support (default disabled)])
1080 if test "x${enable_v4l}" = "xyes"
1082 AC_CHECK_HEADERS(libv4l/v4l.h, [
1083 PLUGINS="${PLUGINS} v4l"
1091 [ --enable-vcd VCD support for Linux, FreeBSD, MacOS X and Win32 (default enabled)])
1093 if test "x${enable_vcd}" != "xno"
1095 AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
1096 PLUGINS="${PLUGINS} vcd"
1099 AC_EGREP_HEADER(scsireq,sys/scsiio.h,[
1100 PLUGINS="${PLUGINS} vcd"
1101 AC_DEFINE(HAVE_SCSIREQ_IN_SYS_SCSIIO_H, 1, For NetBSD VCD support)
1104 AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
1105 PLUGINS="${PLUGINS} vcd"
1106 AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
1109 if test "x${SYS}" = "xbsdi" -o "x${SYS}" = "xmingw32"
1111 PLUGINS="${PLUGINS} vcd"
1114 if test "x${SYS}" = "xdarwin"
1116 PLUGINS="${PLUGINS} vcd"
1117 LDFLAGS_vcd="${LDFLAGS_vcd} -framework IOKit -framework CoreFoundation"
1122 dnl Satellite input module
1124 AC_ARG_ENABLE(satellite,
1125 [ --enable-satellite satellite card support (default disabled)],
1126 [ if test "x${enable_satellite}" = "xyes"
1128 PLUGINS="${PLUGINS} satellite"
1132 dnl ipv6 plugin - not for QNX yet
1134 if test "x${SYS}" != "xnto" && test "x${SYS}" != "xmingw32"
1137 AC_CHECK_FUNC(inet_pton,[have_ipv6=:],[
1138 AC_CHECK_LIB(resolv,inet_pton,
1140 LDFLAGS_ipv6="${LDFLAGS_ipv6} -lresolv"])
1142 AC_MSG_CHECKING(for sockaddr_in6 in netinet/in.h)
1143 AC_EGREP_HEADER(sockaddr_in6,netinet/in.h,
1144 [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); have_ipv6=false])
1145 if ${have_ipv6}; then
1146 PLUGINS="${PLUGINS} ipv6"
1149 if test "x${SYS}" = "xmingw32"
1151 AC_MSG_CHECKING(for getaddrinfo in ws2tcpip.h)
1152 AC_EGREP_HEADER(addrinfo,ws2tcpip.h,[AC_MSG_RESULT(yes)
1153 PLUGINS="${PLUGINS} ipv6"],[AC_MSG_RESULT(no)])
1157 dnl AVI demux plugin
1160 [ --enable-avi AVI demux module (default enabled)])
1161 if test "x${enable_avi}" != "xno"
1163 PLUGINS="${PLUGINS} avi"
1167 dnl ASF demux plugin
1170 [ --enable-asf ASF demux module (default enabled)])
1171 if test "x${enable_asf}" != "xno"
1173 PLUGINS="${PLUGINS} asf"
1177 dnl AAC demux plugin
1180 [ --enable-aac AAC demux module (default enabled)])
1181 if test "x${enable_aac}" != "xno"
1183 PLUGINS="${PLUGINS} aac"
1190 [ --enable-ogg Ogg demux support (default enabled)])
1191 if test "x${enable_ogg}" != "xno"
1193 AC_CHECK_HEADERS(ogg/ogg.h, [
1194 AC_CHECK_LIB( ogg, oggpack_read, [
1195 PLUGINS="${PLUGINS} ogg"
1196 LDFLAGS_ogg="${LDFLAGS_ogg} -logg"
1197 AC_CHECK_LIB( ogg, oggpackB_read, [
1198 CPPFLAGS_ogg="${CPPFLAGS_ogg} -DHAVE_OGGPACKB"])])
1206 AC_ARG_WITH(,[Codec plugins:])
1212 [ --enable-mad libmad module (default disabled)])
1213 if test "x${enable_mad}" = "xyes"
1216 [ --with-mad=PATH path to libmad],[],[])
1217 if test "x${with_mad}" != "xno" -a "x${with_mad}" != "x"
1219 CPPFLAGS_mad="${CPPFLAGS_mad} -I${with_mad}/include"
1220 LDFLAGS_mad="${LDFLAGS_mad} -L${with_mad}/lib"
1223 AC_ARG_WITH(mad-tree,
1224 [ --with-mad-tree=PATH mad tree for static linking],[],[])
1225 if test "x${with_mad_tree}" != "xno" -a "x${with_mad_tree}" != "x"
1227 real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
1228 if test "x${real_mad_tree}" = "x"
1230 dnl The given directory can't be found
1232 AC_MSG_ERROR([${with_mad_tree} directory doesn't exist])
1234 dnl Use a custom libmad
1235 AC_MSG_CHECKING(for mad.h in ${real_mad_tree}/libmad)
1236 if test -f ${real_mad_tree}/libmad/mad.h
1239 CPPFLAGS_mad="${CPPFLAGS_mad} -I${real_mad_tree}/libmad"
1240 LDFLAGS_mad="${LDFLAGS_mad} -L${real_mad_tree}/libmad/.libs"
1241 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mad}"
1242 AC_CHECK_LIB(mad, mad_bit_init, [
1243 BUILTINS="${BUILTINS} mad"
1244 LDFLAGS_mad="${LDFLAGS_mad} -lmad"
1245 ],[ AC_MSG_ERROR([the specified tree hasn't been compiled ])
1247 LDFLAGS="${LDFLAGS_save}"
1250 AC_MSG_ERROR([the specified tree doesn't have mad.h])
1253 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mad}"
1254 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mad}"
1255 AC_CHECK_HEADERS(mad.h, ,
1256 [ AC_MSG_ERROR([Cannot find development headers for libmad...]) ])
1257 AC_CHECK_LIB(mad, mad_bit_init, [
1258 PLUGINS="${PLUGINS} mad"
1259 LDFLAGS_mad="${LDFLAGS_mad} -lmad" ],
1260 [ AC_MSG_ERROR([Cannot find libmad library...]) ])
1261 CPPFLAGS="${CPPFLAGS_save}"
1262 LDFLAGS="${LDFLAGS_save}"
1267 dnl libid3tag support
1269 AC_CHECK_HEADERS(id3tag.h, [
1270 LDFLAGS_id3tag="${LDFLAGS_id3tag} -lz -lid3tag"
1271 PLUGINS="${PLUGINS} id3tag"])
1274 dnl ffmpeg decoder plugin
1276 AC_ARG_ENABLE(ffmpeg,
1277 [ --enable-ffmpeg ffmpeg codec (default disabled)])
1278 if test "x${enable_ffmpeg}" = "xyes"
1281 [ --with-ffmpeg=PATH path to ffmpeg installation],[],[])
1282 if test "x${with_ffmpeg}" != "xno" -a "x${with_ffmpeg}" != "x"
1284 CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${with_ffmpeg}/include/libffmpeg"
1285 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -L${with_ffmpeg}/lib"
1288 dnl Add postprocessing modules
1289 PLUGINS="${PLUGINS} postprocessing_c"
1290 if test "x${ac_cv_mmx_inline}" != "xno"; then
1291 PLUGINS="${PLUGINS} postprocessing_mmx"
1294 if test "x${ac_cv_mmxext_inline}" != "xno"; then
1295 PLUGINS="${PLUGINS} postprocessing_mmxext"
1298 AC_ARG_WITH(ffmpeg-tree,
1299 [ --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
1300 if test "x${with_ffmpeg_tree}" != "x"
1302 AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
1303 real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
1304 if test "x${real_ffmpeg_tree}" = x
1306 dnl The given directory can't be found
1308 AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
1310 if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"
1312 dnl Use a custom libffmpeg
1313 AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
1314 BUILTINS="${BUILTINS} ffmpeg"
1315 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} ${real_ffmpeg_tree}/libavcodec/libavcodec.a"
1316 CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${real_ffmpeg_tree}/libavcodec"
1318 dnl The given libavcodec wasn't built
1320 AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
1323 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
1324 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
1325 AC_CHECK_LIB(avcodec, avcodec_init, [
1326 BUILTINS="${BUILTINS} ffmpeg"
1327 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lavcodec" ],
1328 [ AC_MSG_ERROR([Cannot find libavcodec library...]) ])
1329 LDFLAGS="${LDFLAGS_save}"
1330 CPPFLAGS="${CPPFLAGS_save}"
1335 dnl faad decoder plugin
1338 [ --enable-faad faad codec (default disabled)])
1339 if test "x${enable_faad}" = "xyes"
1342 [ --with-faad=PATH path to faad installation],[],[])
1343 if test "x${with_faad}" != "xno" -a "x${with_faad}" != "x"
1345 CPPFLAGS_faad="${CPPFLAGS_faad} -I${with_faad}/include"
1346 LDFLAGS_faad="${LDFLAGS_faad} -L${with_faad}/lib"
1348 LDFLAGS_faad="${LDFLAGS_faad}"
1350 AC_ARG_WITH(faad-tree,
1351 [ --with-faad-tree=PATH faad tree for static linking])
1352 if test "x${with_faad_tree}" != "x"
1354 AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
1355 real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
1356 if test "x${real_faad_tree}" = x
1358 dnl The given directory can't be found
1360 AC_MSG_ERROR([cannot cd to ${with_faad_tree}])
1362 if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a"
1364 dnl Use a custom faad
1365 AC_MSG_RESULT(${real_faad_tree}/libfaad/.libs/libfaad.a)
1366 BUILTINS="${BUILTINS} faad"
1367 LDFLAGS_faad="${LDFLAGS_faad} ${real_faad_tree}/libfaad/.libs/libfaad.a"
1368 CPPFLAGS_faad="${CPPFLAGS_faad} -I${real_faad_tree}/include"
1370 dnl The given libfaad wasn't built
1372 AC_MSG_ERROR([cannot find ${real_faad_tree}/libfaad/.libs/libfaad.a, make sure you compiled libfaad in ${with_faad_tree}])
1375 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_faad}"
1376 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_faad}"
1377 AC_CHECK_HEADERS(faad.h, ,
1378 [ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ])
1379 AC_CHECK_LIB(faad, faacDecOpen, [
1380 PLUGINS="${PLUGINS} faad"
1381 LDFLAGS_faad="${LDFLAGS_faad} -lfaad" ],
1382 [ AC_MSG_ERROR([Cannot find libfaad library...]) ])
1383 LDFLAGS="${LDFLAGS_save}"
1384 CPPFLAGS="${CPPFLAGS_save}"
1390 dnl xvid decoder plugin
1393 [ --enable-xvid xvid codec (default disabled)])
1394 if test "x${enable_xvid}" = "xyes"
1397 [ --with-xvid=PATH path to xvid installation],[],[])
1398 if test "x${with_xvid}" != "xno" -a "x${with_xvid}" != "x"
1400 CPPFLAGS_xvid="${CPPFLAGS_xvid} -I${with_xvid}/include"
1401 LDFLAGS_xvid="${LDFLAGS_xvid} -L${with_xvid}/lib"
1403 LDFLAGS_xvid="${LDFLAGS_xvid}"
1405 AC_ARG_WITH(xvid-tree,
1406 [ --with-xvid-tree=PATH xvid tree for static linking])
1407 if test "x${with_xvid_tree}" != "x"
1409 AC_MSG_CHECKING(for libxvidcore.a in ${with_xvid_tree})
1410 real_xvid_tree="`cd ${with_xvid_tree} 2>/dev/null && pwd`"
1411 if test "x${real_xvid_tree}" = x
1413 dnl The given directory can't be found
1415 AC_MSG_ERROR([cannot cd to ${with_xvid_tree}])
1417 if test -f "${real_xvid_tree}/build/generic/libxvidcore.a"
1419 dnl Use a custom xvid
1420 AC_MSG_RESULT(${real_xvid_tree}/build/generic/libxvidcore.a)
1421 BUILTINS="${BUILTINS} xvid"
1422 LDFLAGS_xvid="${LDFLAGS_xvid} ${real_xvid_tree}/build/generic/libxvidcore.a"
1423 CPPFLAGS_xvid="${CPPFLAGS_xvid} -I${real_xvid_tree}/src"
1425 dnl The given libxvidcore wasn't built
1427 AC_MSG_ERROR([cannot find ${real_xvid_tree}/build/generic/libxvidcore.a, make sure you compiled libxvidcore in ${with_xvid_tree}])
1430 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_xvid}"
1431 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_xvid}"
1432 AC_CHECK_HEADERS(xvid.h, ,
1433 [ AC_MSG_ERROR([Cannot find development headers for libxvidcore...]) ])
1434 AC_CHECK_LIB(xvid, xvid_init, [
1435 PLUGINS="${PLUGINS} xvid"
1436 LDFLAGS_xvid="${LDFLAGS_xvid} -lxvid" ],
1437 [ AC_MSG_ERROR([Cannot find libxvidcore library...]) ])
1438 LDFLAGS="${LDFLAGS_save}"
1439 CPPFLAGS="${CPPFLAGS_save}"
1449 [ --enable-mp4 MP4 demux module (default enabled)])
1450 if test "x${enable_mp4}" != "xno"
1453 PLUGINS="${PLUGINS} mp4"
1454 AC_CHECK_HEADERS(zlib.h,
1455 [ LDFLAGS_mp4="${LDFLAGS_mp4} -lz" ] )
1459 dnl a52 AC3 decoder plugin
1462 [ --enable-a52 A/52 support with liba52 (default enabled)])
1463 if test "x${enable_a52}" != "xno"
1466 [ --with-a52=PATH a52 headers and libraries])
1467 AC_ARG_WITH(a52-tree,
1468 [ --with-a52-tree=PATH a52dec tree for static linking ],[],[])
1469 if test "x${with_a52_tree}" != "xno" -a "x${with_a52_tree}" != "x"
1471 real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
1472 if test "x${real_a52_tree}" = "x"
1474 dnl The given directory can't be found
1476 AC_MSG_ERROR([${with_a52_tree} directory doesn't exist])
1478 dnl Use a custom a52dec
1479 AC_MSG_CHECKING(for a52.h in ${real_a52_tree}/include)
1480 if test -f ${real_a52_tree}/include/a52.h
1483 CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} -I${real_a52_tree}"
1484 LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} -L${real_a52_tree}/liba52/.libs"
1485 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_a52tofloat32}"
1486 AC_CHECK_LIB(a52, a52_free, [
1487 BUILTINS="${BUILTINS} a52tofloat32"
1488 LDFLAGS_a52tofloat32="-la52 ${LDFLAGS_a52tofloat32}"
1489 CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} -DUSE_A52DEC_TREE"
1491 if test -f ${real_a52_tree}/liba52/.libs/liba52.a
1493 AC_MSG_ERROR([make sure you have at least a52dec-0.7.3])
1495 AC_MSG_ERROR([the specified tree hasn't been compiled])
1498 LDFLAGS="${LDFLAGS_save}"
1501 AC_MSG_ERROR([the specified tree doesn't have a52.h])
1504 if test "x${with_a52}" = "x"
1509 LDFLAGS_test="-L${with_a52}/lib"
1510 CPPFLAGS_test="-I${with_a52}/include"
1512 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
1513 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_test}"
1514 AC_CHECK_HEADERS(a52dec/a52.h, [
1515 AC_CHECK_LIB(a52, a52_free, [
1516 PLUGINS="${PLUGINS} a52tofloat32"
1517 LDFLAGS_a52tofloat32="${LDFLAGS_test} -la52 ${LDFLAGS_a52tofloat32}"
1518 CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} ${CPPFLAGS_test}"
1520 if test "x${enable_dvbpsi}" != "x"
1522 AC_MSG_ERROR([Could not find a52 on your system: you may get it from http://liba52.sf.net])
1526 CPPFLAGS="${CPPFLAGS_save}"
1527 LDFLAGS="${LDFLAGS_save}"
1534 AC_ARG_ENABLE(cinepak,
1535 [ --enable-cinepak Cinepak decoder (default enabled)])
1536 if test "x${enable_cinepak}" != "xno"
1538 PLUGINS="${PLUGINS} cinepak"
1545 [ --enable-dv DV decoder support (default disabled)])
1546 if test "x${enable_dv}" = "xyes"
1548 AC_CHECK_HEADERS(libdv/dv.h, [
1549 PLUGINS="${PLUGINS} dv"
1550 LDFLAGS_dv="${LDFLAGS_dv} -ldv"
1557 AC_ARG_ENABLE(vorbis,
1558 [ --enable-vorbis Vorbis decoder support (default enabled)])
1559 if test "x${enable_vorbis}" != "xno"
1561 AC_CHECK_HEADERS(vorbis/codec.h, [
1562 PLUGINS="${PLUGINS} vorbis"
1563 LDFLAGS_vorbis="${LDFLAGS_vorbis} -lvorbis -logg"
1570 AC_ARG_ENABLE(tremor,
1571 [ --enable-tremor Tremor decoder support (default disabled)])
1572 if test "x${enable_tremor}" = "xyes"
1574 AC_CHECK_HEADERS(tremor/ivorbiscodec.h, [
1575 PLUGINS="${PLUGINS} tremor"
1576 LDFLAGS_tremor="${LDFLAGS_tremor} -lvorbisidec -logg"
1581 dnl tarkin decoder plugin
1583 AC_ARG_ENABLE(tarkin,
1584 [ --enable-tarkin experimental tarkin codec (default disabled)])
1585 if test "x${enable_tarkin}" = "xyes"
1587 AC_ARG_WITH(tarkin-tree,
1588 [ --with-tarkin-tree=PATH tarkin tree for static linking])
1589 if test "x${with_tarkin_tree}" != "x"
1591 AC_MSG_CHECKING(for tarkin.o in ${with_tarkin_tree})
1592 real_tarkin_tree="`cd ${with_tarkin_tree} 2>/dev/null && pwd`"
1593 if test -f "${real_tarkin_tree}/tarkin.o"
1595 BUILTINS="${BUILTINS} tarkin"
1596 CPPFLAGS_tarkin="${CPPFLAGS_tarkin} -I${real_tarkin_tree}"
1597 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"
1600 dnl The given tarkin tree wasn't built
1602 AC_MSG_ERROR([cannot find ${real_tarkin_tree}/tarkin.o,
1603 make sure you compiled tarkin in ${with_tarkin_tree}])
1609 dnl theora decoder plugin
1611 AC_ARG_ENABLE(theora,
1612 [ --enable-theora experimental theora codec (default disabled)])
1613 if test "x${enable_theora}" = "xyes"
1615 AC_CHECK_HEADERS(theora/theora.h, [
1616 AC_CHECK_LIB(theora, theora_granule_time, [
1617 BUILTINS="${BUILTINS} theora"
1618 LDFLAGS_theora="${LDFLAGS_theora} -ltheora -logg" ],[
1619 AC_MSG_ERROR([libtheora doesn't appear to be installed on you system.
1620 You also need to check that you have a libogg posterior to the 1.0 release.])],
1629 AC_ARG_WITH(,[Video plugins:])
1633 dnl (enabled by default except on win32)
1636 [ --enable-x11 X11 support (default enabled)])
1637 if test "x${enable_x11}" != "xno" &&
1638 (test "x${SYS}" != "xmingw32" || test "x${enable_x11}" = "xyes"); then
1639 CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
1640 AC_CHECK_HEADERS(X11/Xlib.h, [
1641 PLUGINS="${PLUGINS} x11"
1642 LDFLAGS_x11="${LDFLAGS_x11} -L${x_libraries} -lX11 -lXext"
1643 CPPFLAGS_x11="${CPPFLAGS_x11} -I${x_includes}"
1645 CPPFLAGS="${CPPFLAGS_save}"
1650 dnl (enabled by default except on win32)
1652 AC_ARG_ENABLE(xvideo,
1653 [ --enable-xvideo XVideo support (default enabled)])
1654 if test "x${enable_xvideo}" != "xno" &&
1655 (test "x${SYS}" != "xmingw32" || test "x${enable_xvideo}" = "xyes"); then
1656 CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
1657 AC_CHECK_HEADERS(X11/extensions/Xv.h, [
1658 CFLAGS="${CFLAGS_save} -L${x_libraries} -lX11 -lXext"
1659 AC_CHECK_LIB(Xv_pic,XvPutImage,
1660 # We have Xv_pic, that's good, we can build an xvideo.so plugin !
1661 PLUGINS="${PLUGINS} xvideo"
1662 LDFLAGS_xvideo="${LDFLAGS_xvideo} -L${x_libraries} -lX11 -lXext -lXv_pic"
1663 CPPFLAGS_xvideo="${CPPFLAGS_xvideo} -I${x_includes}",
1664 AC_CHECK_LIB(Xv,XvPutImage,
1665 # We don't have Xv_pic, but we have Xv, let's make xvideo.a as builtin
1666 PLUGINS="${PLUGINS} xvideo"
1667 LDFLAGS_xvideo="${LDFLAGS_xvideo} -L${x_libraries} -lX11 -lXext -lXv"
1668 CPPFLAGS_xvideo="${CPPFLAGS_xvideo} -I${x_includes}",
1669 # Otherwise... well, do nothing.
1673 CFLAGS="${CFLAGS_save}"
1675 CPPFLAGS="${CPPFLAGS_save}")
1682 [ --enable-sdl SDL support (default enabled)])
1683 if test "x${enable_sdl}" != "xno"
1686 AC_ARG_WITH(sdl-config-path,
1687 [ --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)],
1688 [ if test "x${with_sdl_config_path}" != "xno"
1690 SDL_PATH="${with_sdl_config_path}:${PATH}"
1692 AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no, ${SDL_PATH})
1693 SDL_CONFIG="${SDL12_CONFIG}"
1694 SDL_HEADER="SDL12/SDL.h"
1695 if test "x${SDL_CONFIG}" = "xno"
1697 AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no, ${SDL_PATH})
1698 SDL_CONFIG=${SDL11_CONFIG}
1699 SDL_HEADER="SDL11/SDL.h"
1701 if test "x${SDL_CONFIG}" = "xno"
1703 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, ${SDL_PATH})
1704 SDL_HEADER="SDL/SDL.h"
1706 if test "x${SDL_CONFIG}" != "xno"
1708 PLUGINS="${PLUGINS} vout_sdl aout_sdl"
1709 CFLAGS_vout_sdl="${CFLAGS_vout_sdl} `${SDL_CONFIG} --cflags`"
1710 LDFLAGS_vout_sdl="${LDFLAGS_vout_sdl} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
1711 CFLAGS_aout_sdl="${CFLAGS_aout_sdl} `${SDL_CONFIG} --cflags`"
1712 LDFLAGS_aout_sdl="${LDFLAGS_aout_sdl} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
1713 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_vout_sdl}"
1714 AC_CHECK_HEADERS(${SDL_HEADER}, AC_DEFINE_UNQUOTED(SDL_INCLUDE_FILE,
1715 <${SDL_HEADER}>, Indicate whether we should use SDL/SDL.h or SDL11/SDL.h),
1716 [ AC_MSG_ERROR([The development package for SDL is not installed.
1717 Please install it and try again. Alternatively you can also configure with
1720 CPPFLAGS="${CPPFLAGS_save}"
1721 if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
1723 AC_MSG_ERROR([The development package for SDL is not installed.
1724 Please install it and try again. Alternatively you can also configure with
1727 elif test "x${enable_sdl}" = "xyes"
1729 AC_MSG_ERROR([I couldn't find the SDL package. You can download libSDL
1730 from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
1736 dnl Qt Embedded module
1737 dnl (disabled by default)
1740 [ --enable-qte QT Embedded support (default disabled)])
1741 if test "x${enable_qte}" != "xno"
1744 [ --with-qte=PATH Qt Embedded headers and libraries])
1745 if test "x${with_qte}" = "x"
1747 LDFLAGS_test="-L${QTDIR}/lib"
1748 CPPFLAGS_test="-I${QTDIR}/include"
1750 LDFLAGS_test="-L${with_qte}/lib"
1751 CPPFLAGS_test="-I${with_qte}/include"
1754 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
1755 AC_CHECK_HEADERS(qt.h, [
1756 CPPFLAGS_qte="${CPPFLAGS_qte} ${CPPFLAGS_test} -DQT_QWS_IPAQ -DQWS"
1757 CXXFLAGS_qte="${CXXFLAGS_qte} -fno-exceptions -fno-rtti"
1758 LDFLAGS_qte="${LDFLAGS_qte} ${LDFLAGS_test} -lqte"
1759 if test "x${with_qte}" = "x"
1761 PLUGINS="${PLUGINS} qte"
1763 BUILTINS="${BUILTINS} qte"
1766 CPPFLAGS="${CPPFLAGS_save}"
1770 dnl Windows DirectX module
1772 AC_ARG_ENABLE(directx,
1773 [ --enable-directx Win32 DirectX support (default enabled on Win32)])
1774 if test "x${enable_directx}" != "xno"
1776 if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"
1778 AC_ARG_WITH(directx,
1779 [ --with-directx=PATH Win32 DirectX headers])
1780 if test "x${with_directx}" = "x"
1782 AC_CHECK_HEADERS(ddraw.h,
1783 [ PLUGINS="${PLUGINS} vout_directx aout_directx"
1784 LDFLAGS_vout_directx="${LDFLAGS_directx} -lgdi32" ])
1786 AC_MSG_CHECKING(for directX headers in ${with_directx})
1787 if test -f ${with_directx}/ddraw.h
1789 PLUGINS="${PLUGINS} vout_directx aout_directx"
1790 LDFLAGS_vout_directx="${LDFLAGS_directx} -lgdi32"
1791 CPPFLAGS_vout_directx="${CPPFLAGS_vout_directx} -I${with_directx}"
1792 CPPFLAGS_aout_directx="${CPPFLAGS_aout_directx} -I${with_directx}"
1796 AC_MSG_ERROR([Cannot find ${with_directx}/ddraw.h!])
1803 dnl Linux framebuffer module
1806 [ --enable-fb Linux framebuffer support (default enabled on Linux)])
1807 if test "x${enable_fb}" != "xno"
1809 AC_CHECK_HEADERS(linux/fb.h, [
1810 PLUGINS="${PLUGINS} fb"
1815 dnl Linux MGA module
1818 [ --enable-mga Linux kernel Matrox support (default disabled)],
1819 [ if test "x${enable_mga}" = "xyes"
1821 PLUGINS="${PLUGINS} mga xmga"
1827 AC_ARG_ENABLE(svgalib,
1828 [ --enable-svgalib SVGAlib support (default disabled)])
1829 if test "x${enable_svgalib}" = "xyes"
1831 PLUGINS="${PLUGINS} svgalib"
1832 LDFLAGS_svgalib="${LDFLAGS_svgalib} -lvgagl -lvga"
1839 [ --enable-ggi GGI support (default disabled)])
1840 if test "x${enable_ggi}" = "xyes"
1842 PLUGINS="${PLUGINS} ggi"
1843 LDFLAGS_ggi="${LDFLAGS_ggi} -lggi"
1845 [ --with-ggi=PATH path to libggi],
1846 [ if test "x${with_ggi}" != "xno" -a "x${with_ggi}" != "x"
1848 CPPFLAGS_ggi="${CPPFLAGS_ggi} -I${with_ggi}/include"
1849 LDFLAGS_ggi="${LDFLAGS_ggi} -L${with_ggi}/lib"
1856 AC_ARG_ENABLE(glide,
1857 [ --enable-glide Glide (3dfx) support (default disabled)])
1858 if test "x${enable_glide}" = "xyes"
1860 PLUGINS="${PLUGINS} glide"
1861 LDFLAGS_glide="${LDFLAGS_glide} -lglide2x -lm"
1862 CPPFLAGS_glide="${CPPFLAGS_glide} -I/usr/include/glide"
1864 [ --with-glide=PATH path to libglide],
1865 [ if test "x${with_glide}" != "xno" -a "x${with_glide}" != "x"
1867 CPPFLAGS_glide="${CPPFLAGS_glide} -I${with_glide}/include"
1868 LDFLAGS_glide="${LDFLAGS_glide} -L${with_glide}/lib"
1876 [ --enable-aa aalib output (default disabled)])
1877 if test "x${enable_aa}" = "xyes"
1879 AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
1880 if test "x${have_aa}" = "xtrue"
1882 PLUGINS="${PLUGINS} aa"
1883 LDFLAGS_aa="${LDFLAGS_aa} -laa"
1888 dnl win32 GDI plugin
1890 AC_ARG_ENABLE(wingdi,
1891 [ --enable-wingdi Win32 GDI module (default enabled on Win32)])
1892 if test "x${enable_wingdi}" != "xno"; then
1893 if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
1894 PLUGINS="${PLUGINS} wingdi"
1895 LDFLAGS_wingdi="${LDFLAGS_wingdi} -lgdi32"
1903 AC_ARG_WITH(,[Audio plugins:])
1906 dnl OSS /dev/dsp module (enabled by default except on win32)
1909 [ --enable-oss Linux OSS /dev/dsp support (enabled on Linux)])
1911 if test "x${enable_oss}" != "xno" &&
1912 (test "x${SYS}" != "xmingw32" || test "x${enable_oss}" = "xyes")
1914 AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h, [
1915 PLUGINS="${PLUGINS} oss"
1916 AC_CHECK_LIB(ossaudio,main,LDFLAGS_oss="${LDFLAGS_oss} -lossaudio")
1924 [ --enable-esd Esound library support (default disabled)],
1925 [if test "x${enable_esd}" = "xyes"
1927 AC_PATH_PROG(ESD_CONFIG, esd-config, no)
1928 if test "x${ESD_CONFIG}" != "xno"
1930 PLUGINS="${PLUGINS} esd"
1931 CFLAGS_esd="${CFLAGS_esd} `${ESD_CONFIG} --cflags`"
1932 LDFLAGS_esd="${LDFLAGS_esd} `${ESD_CONFIG} --libs`"
1940 [ --enable-arts aRts sound server (default disabled)],
1941 [if test "x${enable_arts}" = "xyes"
1943 AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
1944 if test "x${ARTS_CONFIG}" != "xno"
1946 PLUGINS="${PLUGINS} arts"
1947 CFLAGS_arts="${CFLAGS_arts} `${ARTS_CONFIG} --cflags`"
1948 LDFLAGS_arts="${LDFLAGS_arts} `${ARTS_CONFIG} --libs `"
1956 [ --enable-alsa ALSA sound support for Linux (default disabled)],
1957 [if test "x${enable_alsa}" = "xyes"
1959 AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
1960 if test "x${have_alsa}" = "xtrue"
1962 #PLUGINS="${PLUGINS} alsa"
1963 LDFLAGS_alsa="${LDFLAGS_alsa} -lasound -lm -ldl"
1968 dnl win32 waveOut plugin
1970 AC_ARG_ENABLE(waveout,
1971 [ --enable-waveout Win32 waveOut module (default enabled on Win32)])
1972 if test "x${enable_waveout}" != "xno"; then
1973 if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
1974 PLUGINS="${PLUGINS} waveout"
1975 LDFLAGS_waveout="-lwinmm"
1980 dnl Interface plugins
1983 AC_ARG_WITH(,[Interface plugins:])
1985 dnl special case for BeOS
1986 if test "x${SYS}" = "xbeos"
1988 PLUGINS="${PLUGINS} beos"
1995 [ --enable-gtk Gtk+ support (default enabled)])
1996 if test "x${enable_gtk}" != "xno"
1999 AC_ARG_WITH(gtk-config-path,
2000 [ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
2001 [ if test "x${with_gtk_config_path}" != "xno"
2003 GTK_PATH="${with_gtk_config_path}:${PATH}"
2005 # look for gtk-config
2006 AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
2007 GTK_CONFIG=${GTK12_CONFIG}
2008 if test "x${GTK_CONFIG}" = "xno"
2010 AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
2012 if test "x${GTK_CONFIG}" != "xno"
2014 if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
2016 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.])
2018 if test "x${SYS}" != "xmingw32"; then
2019 CFLAGS_gtk="${CFLAGS_gtk} `${GTK_CONFIG} --cflags gtk gthread`"
2020 LDFLAGS_gtk="${LDFLAGS_gtk} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
2022 CFLAGS_gtk="${CFLAGS_gtk} `${GTK_CONFIG} --cflags gtk`"
2023 LDFLAGS_gtk="${LDFLAGS_gtk} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
2025 # now look for the gtk.h header
2026 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gtk}"
2027 ac_cv_gtk_headers=yes
2028 AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
2029 ac_cv_gtk_headers=no
2030 echo "Cannot find gtk development headers."
2032 if test "x${ac_cv_gtk_headers}" = "xyes"
2034 PLUGINS="${PLUGINS} gtk"
2035 if test "x${SYS}" != "xmingw32"; then
2038 ALIASES="${ALIASES} gvlc"
2040 CPPFLAGS="${CPPFLAGS_save}"
2045 dnl Familiar module uses Gtk+ library
2047 AC_ARG_ENABLE(familiar,
2048 [ --enable-familiar Familiar Gtk+ support (default disabled)])
2049 if test "x${enable_familiar}" = "xyes"
2052 AC_ARG_WITH(gtk-config-path,
2053 [ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
2054 [ if test "x${with_gtk_config_path}" != "xno"
2056 GTK_PATH="${with_gtk_config_path}:${PATH}"
2058 # look for gtk-config
2059 AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
2060 GTK_CONFIG=${GTK12_CONFIG}
2061 if test "x${GTK_CONFIG}" = "xno"
2063 AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
2065 if test "x${GTK_CONFIG}" != "xno"
2067 if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
2069 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.])
2071 CFLAGS_familiar="${CFLAGS_familiar} `${GTK_CONFIG} --cflags gtk gthread`"
2072 LDFLAGS_familiar="${LDFLAGS_familiar} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
2073 # now look for the gtk.h header
2074 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_familiar}"
2075 ac_cv_gtk_headers=yes
2076 AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
2077 ac_cv_gtk_headers=no
2078 echo "Cannot find gtk development headers."
2080 if test "x${ac_cv_gtk_headers}" = "xyes"
2082 PLUGINS="${PLUGINS} familiar"
2085 CPPFLAGS="${CPPFLAGS_save}"
2092 AC_ARG_ENABLE(gnome,
2093 [ --enable-gnome Gnome interface support (default disabled)],
2094 [if test "x${enable_gnome}" = "xyes"; then
2095 # look for gnome-config
2096 AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
2097 if test -x ${GNOME_CONFIG}
2099 CFLAGS_gnome="${CFLAGS_gnome} `${GNOME_CONFIG} --cflags gtk gnomeui`"
2100 LDFLAGS_gnome="${LDFLAGS_gnome} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
2102 # now look for the gnome.h header
2103 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gnome}"
2104 AC_CHECK_HEADERS(gnome.h, [
2105 PLUGINS="${PLUGINS} gnome"
2108 ALIASES="${ALIASES} gnome-vlc"
2110 AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
2111 developement tools or remove the --enable-gnome option])
2113 CPPFLAGS="${CPPFLAGS_save}"
2117 dnl wxWindows module
2119 AC_ARG_ENABLE(wxwindows,
2120 [ --enable-wxwindows wxWindows support (default enabled)])
2121 if test "x${enable_wxwindows}" != "xno"
2123 WXWINDOWS_PATH="${PATH}"
2124 AC_ARG_WITH(wx-config-path,
2125 [ --with-wx-config-path=PATH wx-config path (default search in \$PATH)],
2126 [ if test "x${with_wx_config_path}" != "xno"
2128 WXWINDOWS_PATH="${with_wx_config_path}:${PATH}"
2130 # look for wx-config
2131 AC_PATH_PROG(WX_CONFIG, wx-config, no, ${WXWINDOWS_PATH})
2132 if test "x${WX_CONFIG}" != "xno"
2134 if expr 2.3.0 \> `${WX_CONFIG} --version` >/dev/null
2136 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.])
2138 CXXFLAGS_wxwindows="${CXXFLAGS_wxwindows} `${WX_CONFIG} --cflags`"
2139 LDFLAGS_wxwindows="${LDFLAGS_wxwindows} `${WX_CONFIG} --libs`"
2140 # now look for the wxprec.h header
2141 CPPFLAGS="${save_CPPFLAGS} ${CXXFLAGS_wxwindows}"
2142 ac_cv_wx_headers=yes
2143 AC_CHECK_HEADERS(wx/wxprec.h, , [
2145 echo "Cannot find wxWindows development headers."
2147 if test "x${ac_cv_wx_headers}" = "xyes"
2149 PLUGINS="${PLUGINS} wxwindows"
2150 ALIASES="${ALIASES} wxvlc"
2152 CPPFLAGS="${save_CPPFLAGS}"
2160 [ --enable-qt Qt interface support (default disabled)],
2161 [if test "x${enable_qt}" = "xyes"; then
2162 PLUGINS="${PLUGINS} qt"
2163 ALIASES="${ALIASES} qvlc"
2164 LDFLAGS_qt="${LDFLAGS_qt} -lqt -L${QTDIR}/lib"
2165 CPPFLAGS_qt="${CPPFLAGS_qt} -I/usr/include/qt -I${QTDIR}/include"
2166 if test -x ${QTDIR}/bin/moc
2168 MOC=${QTDIR}/bin/moc
2178 [ --enable-kde KDE interface support (default disabled)],
2179 [if test "x${enable_kde}" = "xyes"; then
2180 PLUGINS="${PLUGINS} kde"
2181 ALIASES="${ALIASES} kvlc"
2182 LDFLAGS_kde="${LDFLAGS_kde} -L${KDEDIR}/lib -lkfile"
2183 CPPFLAGS_kde="${CPPFLAGS_kde} -I/usr/include/kde -I/usr/include/qt"
2184 CPPFLAGS_kde="${CPPFLAGS_kde} -I${KDEDIR}/include -I${QTDIR}/include"
2185 if test -x ${QTDIR}/bin/moc
2187 MOC=${QTDIR}/bin/moc
2194 dnl Opie QT embedded module
2197 [ --enable-opie Qt embedded interface support (default disabled)],
2198 [if test "x${enable_opie}" = "xyes"; then
2200 [ --with-qte=PATH Qt Embedded headers and libraries])
2201 if test "x${with_qte}" = "x"
2203 LDFLAGS_test="-L${QTDIR}/lib"
2204 CPPFLAGS_test="-I${QTDIR}/include"
2206 LDFLAGS_test="-L${with_qte}/lib"
2207 CPPFLAGS_test="-I${with_qte}/include"
2210 PLUGINS="${PLUGINS} opie"
2211 LDFLAGS_opie="${LDFLAGS_opie} ${LDFLAGS_test} -lqte"
2212 CPPFLAGS_opie="${CPPFLAGS_opie} ${CPPFLAGS_test}"
2213 if test -x ${QTEDIR}/bin/moc
2215 MOC=${QTEDIR}/bin/moc
2224 AC_ARG_ENABLE(macosx,
2225 [ --enable-macosx MacOS X support (default enabled on MacOS X)],
2226 [if test "x${enable_macosx}" = "xyes"
2228 BUILTINS="${BUILTINS} macosx"
2229 LDFLAGS_macosx="${LDFLAGS_macosx} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
2231 [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
2232 BUILTINS="${BUILTINS} macosx"
2233 LDFLAGS_macosx="${LDFLAGS_macosx} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
2240 [ --enable-qnx QNX RTOS support (default enabled on QNX RTOS)])
2241 if test "x${enable_qnx}" != "xno"
2243 AC_CHECK_HEADERS(Ph.h, [
2244 PLUGINS="${PLUGINS} qnx"
2245 LDFLAGS_qnx="${LDFLAGS_qnx} -lasound -lph"
2250 dnl Windows native interface module, built with Borland C++ Builder
2252 AC_ARG_ENABLE(intfwin,
2253 [ --enable-intfwin Win32 interface support (default disabled)],
2254 [ if test "x${enable_intfwin}" != "xno"
2256 AC_ARG_WITH(bcbuilder,
2257 [ --with-bcbuilder=PATH Borland C++ Builder installation path])
2258 if test "x${with_bcbuilder}" != "x"
2260 BCBUILDER="${with_bcbuilder}"
2262 PLUGINS="${PLUGINS} win32"
2268 AC_ARG_ENABLE(ncurses,
2269 [ --enable-ncurses ncurses interface support (default disabled)],
2270 [if test "x${enable_ncurses}" = "xyes"; then
2271 PLUGINS="${PLUGINS} ncurses"
2272 LDFLAGS_ncurses="${LDFLAGS_ncurses} -lncurses"
2279 [ --enable-xosd xosd interface support (default disabled)])
2280 if test "x${enable_xosd}" = "xyes"
2282 AC_CHECK_HEADER(xosd.h, have_xosd="true", have_xosd="false")
2283 AC_TRY_COMPILE([#include <xosd.h>],
2284 [void foo() { xosd_init("foo","bar",12,XOSD_top,2,12,42); }],,
2285 AC_DEFINE(HAVE_OLD_XOSD_H, 1, Define if <xosd.h> is pre-1.0.0))
2286 if test "x${have_xosd}" = "xtrue"
2288 PLUGINS="${PLUGINS} xosd"
2289 LDFLAGS_xosd="${LDFLAGS_xosd} -lxosd"
2297 [ --enable-lirc lirc support (default disabled)])
2298 if test "x${enable_lirc}" = "xyes"
2300 AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
2301 if test "x${have_lirc}" = "xtrue"
2303 PLUGINS="${PLUGINS} lirc"
2304 LDFLAGS_lirc="${LDFLAGS_lirc} -llirc_client"
2308 AC_ARG_WITH(,[Misc options:])
2311 dnl Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
2313 dnl We give the user the opportunity to specify
2314 dnl --with-words=big or --with-words=little ; otherwise, try to guess
2317 [ --with-words=endianness set endianness (big or little)])
2318 case "x${with_words}" in
2320 ac_cv_c_bigendian=yes
2323 ac_cv_c_bigendian=no
2326 dnl Try to guess endianness by matching patterns on a compiled
2327 dnl binary, by looking for an ASCII or EBCDIC string
2328 AC_CACHE_CHECK([whether the byte order is big-endian],
2329 [ac_cv_c_bigendian],
2330 [ac_cv_c_bigendian="unknown"
2331 [cat >conftest.c <<EOF
2332 short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
2333 short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
2334 void _a(void) { char*s = (char*)am; s = (char *)ai; }
2335 short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
2336 short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
2337 void _e(void) { char*s = (char*)em; s = (char*)ei; }
2338 int main(void) { _a(); _e(); return 0; }
2341 if test -f conftest.c
2343 if ${CC-cc} -c conftest.c -o conftest.o >>config.log 2>&1 \
2344 && test -f conftest.o
2346 if test "`strings conftest.o | grep BIGenDianSyS`"
2348 ac_cv_c_bigendian="yes"
2350 if test "`strings conftest.o | grep LiTTleEnDian`"
2352 ac_cv_c_bigendian="no"
2357 if test "x${ac_cv_c_bigendian}" = "xunknown"
2359 AC_MSG_ERROR([Could not guess endianness, please use --with-words])
2363 dnl Now we know what to use for endianness, just put it in the header
2364 if test "${ac_cv_c_bigendian}" = "yes"
2366 AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system)
2372 AC_ARG_ENABLE(gprof,
2373 [ --enable-gprof gprof profiling (default disabled)])
2374 AC_ARG_ENABLE(cprof,
2375 [ --enable-cprof cprof profiling (default disabled)])
2376 AM_CONDITIONAL(GPROF, test "x${enable_gprof}" = "xyes")
2377 AM_CONDITIONAL(CPROF, test "x${enable_gprof}" = "xyes")
2380 dnl GNU portable threads
2383 [ --enable-pth GNU Pth support (default disabled)],
2384 [ if test "x${enable_pth}" = "xyes"; then
2385 AC_CHECK_LIB(pth,pth_init)
2386 AC_EGREP_HEADER(pth_init,pth.h,[
2387 AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
2388 Define if <pth.h> defines pth_init)
2397 [ --enable-st State Threads (default disabled)],
2398 [ if test "x${enable_st}" = "xyes"; then
2399 AC_CHECK_LIB(st,st_init)
2400 AC_EGREP_HEADER(st_init,st.h,[
2401 AC_DEFINE(ST_INIT_IN_ST_H, 1,
2402 Define if <st.h> defines st_init)
2407 if test "x${SYS}" != "xmingw32"; then
2408 LDFLAGS_vlc="${LDFLAGS_vlc} ${THREAD_LIB}"
2409 LDFLAGS_plugins="${LDFLAGS_plugins} ${THREAD_LIB}"
2416 AC_ARG_ENABLE(mozilla,
2417 [ --enable-mozilla build a vlc-based Mozilla plugin (default disabled)])
2418 if test "x${enable_mozilla}" = "xyes"
2420 AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
2421 if test "x${MOZILLA_CONFIG}" != "xno"
2423 if test "x${SYS}" != "xmingw32"; then
2424 LDFLAGS="${LDFLAGS_save} -L${x_libraries}"
2425 AC_CHECK_LIB(Xt,XtStrings,[
2426 LDFLAGS_mozilla="${LDFLAGS_mozilla} -L${x_libraries} -lXt"
2428 LDFLAGS="${LDFLAGS_save}"
2431 dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490
2432 [CPPFLAGS_mozilla="${CPPFLAGS_mozilla} `${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`"]
2433 #[CPPFLAGS_mozilla="${CPPFLAGS_mozilla} `${MOZILLA_CONFIG} --cflags plugin xpcom java --defines | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`"]
2434 LDFLAGS_mozilla="${LDFLAGS_mozilla} `${MOZILLA_CONFIG} --libs plugin xpcom`"
2435 dnl Not necessarily in ${PATH}
2436 if test "x${XPIDL}" = "x" -o ! -x "${XPIDL}"
2438 XPIDL="/usr/lib/mozilla/xpidl"
2442 AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
2447 AC_ARG_ENABLE(testsuite,
2448 [ --enable-testsuite build test modules (default disabled)])
2449 if test "x${enable_testsuite}" = "xyes"
2451 TESTS="test1 test2 test3 test4"
2453 dnl we define those so that bootstrap sets the right linker
2454 CXXFLAGS_test2="${CXXFLAGS_test2}"
2455 OBJCFLAGS_test3="${OBJCFLAGS_test3}"
2456 dnl this one is needed until automake knows what to do
2457 LDFLAGS_test3="${LDFLAGS_test3} -lobjc"
2459 PLUGINS="${PLUGINS} ${TESTS}"
2460 #BUILTINS="${BUILTINS} ${TESTS}"
2466 if test "x${NEED_GTK_MAIN}" != "xno"
2468 PLUGINS="${PLUGINS} gtk_main"
2469 CFLAGS_gtk="${CFLAGS_gtk} -DNEED_GTK_MAIN"
2470 CFLAGS_gtk_main="${CFLAGS_gtk_main} ${CFLAGS_gtk} ${CFLAGS_familiar}"
2471 LDFLAGS_gtk_main="${LDFLAGS_gtk_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar}"
2474 if test "x${NEED_GNOME_MAIN}" != "xno"
2476 PLUGINS="${PLUGINS} gnome_main"
2477 CFLAGS_gnome_main="${CFLAGS_gnome_main} ${CFLAGS_gtk} ${CFLAGS_familiar} ${CFLAGS_gnome}"
2478 LDFLAGS_gnome_main="${LDFLAGS_gnome_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar} ${LDFLAGS_gnome}"
2482 dnl Plugin and builtin checks
2484 builtin_support=false
2487 dnl Support for plugins - this must be AT THE END
2488 AC_ARG_ENABLE(plugins,
2489 [ --disable-plugins make all plugins built-in (default plugins enabled)],
2490 [if test "x${enable_plugins}" = "xno"
2492 plugin_support=false
2495 dnl Automagically disable plugins if there is no system support for
2496 dnl dynamically loadable files (.so, .dll, .dylib).
2497 dnl don't forget vlc-win32 still can load .dll as plugins
2498 if test "x${ac_cv_header_dlfcn_h}" = "xno" -a "x${ac_cv_header_image_h}" = "xno" -a "x${SYS}" != "xmingw32"
2500 echo "*** Your system doesn't have plugin support. All plugins will be built"
2502 plugin_support=false
2505 dnl Export automake variables
2506 if ${plugin_support}
2508 for plugin in `echo ${PLUGINS}`
2510 eval "${plugin}_plugin=yes"
2513 BUILTINS="${BUILTINS} ${PLUGINS}"
2516 AM_CONDITIONAL(HAVE_PLUGINS, ${plugin_support})
2518 [if echo "${BUILTINS}" | grep '[^ ]' >/dev/null 2>&1
2521 for builtin in `echo ${BUILTINS}`
2523 eval "${builtin}_builtin=yes"
2526 AM_CONDITIONAL(HAVE_BUILTINS, ${builtin_support})
2528 dnl do not touch this line (bootstrap needs it)
2532 dnl Stuff used by the program
2534 AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION} ${CODENAME}", [Simple version string])
2535 AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VideoLAN Client - version ${VERSION} ${CODENAME} - (c) 1996-2002 VideoLAN", [Copyright string])
2536 AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
2538 VLC_SYMBOL="`echo ${VERSION} | tr .- __`"
2539 AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module functions])
2540 AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
2541 AC_DEFINE_UNQUOTED(LIBEXT, "${LIBEXT}", [Dynamic object extension])
2543 DATA_PATH="${ac_tool_prefix}/share/videolan"
2545 PLUGIN_PATH="${ac_tool_prefix}/share/videolan"
2546 AC_SUBST(PLUGIN_PATH)
2551 CPPFLAGS="${CPPFLAGS_save}"
2552 CFLAGS="${CFLAGS_save}"
2553 CXXFLAGS="${CXXFLAGS_save}"
2554 OBJCFLAGS="${OBJCFLAGS_save}"
2555 LDFLAGS="${LDFLAGS_save}"
2558 dnl Fool automake (see Makefile.am)
2560 AUTOMAKE_SUCKS="\$(L_builtin) \$(LDFLAGS_builtin)"
2561 AC_SUBST(AUTOMAKE_SUCKS)
2564 dnl Create the vlc-config script
2566 LDFLAGS_libvlc="${LDFLAGS_vlc} ${LDFLAGS_builtins}"
2567 for i in `echo "${BUILTINS}" | sed -e 's@[^ ]*/@@g'` ; do LDFLAGS_libvlc="${LDFLAGS_libvlc} ${libdir}/vlc/${i}.a `eval echo '$'{LDFLAGS_${i}}`" ; done
2570 dnl Configuration is finished
2585 AC_SUBST(CFLAGS_TUNING)
2586 AC_SUBST(CFLAGS_OPTIM)
2587 AC_SUBST(CFLAGS_OPTIM_NODEBUG)
2590 AC_SUBST(CFLAGS_vlc)
2591 AC_SUBST(CFLAGS_pics)
2592 AC_SUBST(CXXFLAGS_pics)
2593 AC_SUBST(CFLAGS_plugins)
2594 AC_SUBST(CXXFLAGS_plugins)
2595 AC_SUBST(CFLAGS_builtins)
2596 AC_SUBST(CPPFLAGS_mozilla)
2598 AC_SUBST(LDFLAGS_vlc)
2599 AC_SUBST(LDFLAGS_libvlc)
2600 AC_SUBST(LDFLAGS_plugins)
2601 AC_SUBST(LDFLAGS_builtins)
2602 AC_SUBST(LDFLAGS_mozilla)
2618 chmod a+x vlc-config
2623 --------------------
2624 vlc version : ${VERSION}
2626 architecture : ${ARCH}
2628 test "x${DEBUG_TRUE}" = "x" && printf "debug "
2629 test "x${CPROF_TRUE}" = "x" && printf "cprof "
2630 test "x${GPROF_TRUE}" = "x" && printf "gprof "
2631 test "x${OPTIM_TRUE}" = "x" && printf "optim "
2632 test "x${RELEASE_TRUE}" = "x" && printf "release " || printf "devel "
2634 vlc aliases :${ALIASES}
2636 To build vlc and its plugins, type \`make'.