1 dnl Autoconf settings for vlc
2 AC_INIT(include/main.h)
3 AC_CONFIG_HEADER(include/defs.h)
15 save_CPPFLAGS="${CPPFLAGS}"
16 save_CFLAGS="${CFLAGS}"
17 save_LDFLAGS="${LDFLAGS}"
26 dnl Find the right ranlib, even when cross-compiling
27 AC_CHECK_TOOL(RANLIB, ranlib, :)
28 AC_CHECK_TOOL(STRIP, strip, :)
31 dnl Check for GNU make
33 AC_PATH_PROG(GMAKE, gmake, no)
34 if test "x${GMAKE}" = "xno"; then
35 AC_CACHE_CHECK([whether GNU make is installed],
37 [if make --version | grep -q -i gnu; then
40 echo "This software needs you to install GNU make to compile properly."
41 echo "You can get it from http://www.gnu.org/."
50 ALL_LINGUAS="de en_GB fr ja no ru nl pl se"
52 AC_DEFINE_UNQUOTED(VLC_PACKAGE, "${PACKAGE}", [Package name])
53 AC_DEFINE_UNQUOTED(VLC_VERSION, "${VERSION}", [Package version])
60 dnl Set default LDFLAGS
62 vlc_LDFLAGS="${LDFLAGS}"
65 dnl Check the operating system
67 case "x${target_os}" in
76 save_CFLAGS="${save_CFLAGS} -pthread"; CFLAGS="${save_CFLAGS}"
77 dvd_LDFLAGS="${dvd_LDFLAGS} -ldvd"
78 vcd_LDFLAGS="${vcd_LDFLAGS} -ldvd"
82 save_CFLAGS="${save_CFLAGS} -pthread"; CFLAGS="${save_CFLAGS}"
86 save_CFLAGS="${save_CFLAGS} -no-cpp-precomp"; CFLAGS="${save_CFLAGS}"
87 vlc_LDFLAGS="${vlc_LDFLAGS} -all_load"
91 AC_CHECK_TOOL(WINDRES, windres, :)
92 save_CFLAGS="${save_CFLAGS} -fnative-struct -D_OFF_T_ -D_off_t=long"; CFLAGS="${save_CFLAGS}"
93 vlc_LDFLAGS="${vlc_LDFLAGS} -mwindows -Xlinker --force-exe-suffix"
94 vlc_LDFLAGS="${vlc_LDFLAGS} -lws2_32 -lnetapi32"
95 ipv4_LDFLAGS="${ipv4_LDFLAGS} -lws2_32"
96 ipv6_LDFLAGS="${ipv6_LDFLAGS} -lws2_32"
97 http_LDFLAGS="${http_LDFLAGS} -lws2_32"
98 rc_LDFLAGS="${rc_LDFLAGS} -lws2_32"
102 x11_LDFLAGS="${x11_LDFLAGS} -lsocket"
103 xvideo_LDFLAGS="${xvideo_LDFLAGS} -lsocket"
110 save_CFLAGS="${save_CFLAGS} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CFLAGS="${save_CFLAGS}"
111 vlc_LDFLAGS="${vlc_LDFLAGS} -lbe"
112 plugins_LDFLAGS="${plugins_LDFLAGS} -nostart"
113 beos_LDFLAGS="${beos_LDFLAGS} -lbe -lgame -lroot -ltracker"
114 ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind"
121 dnl Flags for plugin compilation
122 if test "x${SYS}" = "xmingw32"
124 plugins_CFLAGS="${plugins_CFLAGS} -fnative-struct"
126 plugins_CFLAGS="${plugins_CFLAGS} -fPIC"
127 plugins_LDFLAGS="${plugins_LDFLAGS} -fPIC"
130 dnl The -DSYS_FOO flag
131 save_CFLAGS="${save_CFLAGS} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"; CFLAGS="${save_CFLAGS}"
133 dnl Check for system libs needed
134 AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll strndup)
136 AC_CHECK_FUNC(connect,,[
137 AC_CHECK_LIB(socket,connect,
138 ipv4_LDFLAGS="${ipv4_LDFLAGS} -lsocket"
139 vlc_LDFLAGS="${vlc_LDFLAGS} -lsocket"
141 AC_CHECK_FUNC(send,,[
142 AC_CHECK_LIB(socket,send,
143 http_LDFLAGS="${http_LDFLAGS} -lsocket"
145 AC_CHECK_FUNC(gethostbyname,,[
146 AC_CHECK_LIB(nsl,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lnsl")
148 AC_CHECK_FUNC(gethostbyname,,[
149 AC_CHECK_LIB(bind,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind")
152 AC_CHECK_FUNC(nanosleep,have_nanosleep=1,[
153 AC_CHECK_LIB(rt,nanosleep,
154 [vlc_LDFLAGS="${vlc_LDFLAGS} -lrt"; have_nanosleep=1],
155 [AC_CHECK_LIB(posix4,nanosleep,
156 [vlc_LDFLAGS="${vlc_LDFLAGS} -lposix4"; have_nanosleep=1])]
159 if test x$have_nanosleep = x1; then
160 AC_DEFINE(HAVE_NANOSLEEP, 1,
161 Define if nanosleep is available.)
164 AC_CHECK_LIB(rt,sem_init, [vlc_LDFLAGS="${vlc_LDFLAGS} -lrt"])
166 AC_CHECK_FUNC(inet_aton,,[
167 AC_CHECK_LIB(resolv,inet_aton,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lresolv")
169 AC_CHECK_FUNC(textdomain,,[
170 AC_CHECK_LIB(intl,textdomain,
171 vlc_LDFLAGS="${vlc_LDFLAGS} -lintl"
172 plugins_LDFLAGS="${plugins_LDFLAGS} -lintl"
178 AC_CHECK_FUNC(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
179 [ # FreeBSD has a gnugetopt library for this:
180 AC_CHECK_LIB([gnugetopt],[getopt_long],
181 [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) vlc_LDFLAGS="${vlc_LDFLAGS} -lgnugetopt"],
185 AC_CHECK_LIB(dl,dlopen,vlc_LDFLAGS="${vlc_LDFLAGS} -ldl")
187 imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
188 filter_distort_LDFLAGS="${filter_distort_LDFLAGS} -lm")
190 ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lm"
191 imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
192 imdct3dn_LDFLAGS="${imdct3dn_LDFLAGS} -lm"
193 imdctsse_LDFLAGS="${imdctsse_LDFLAGS} -lm"
194 chroma_i420_rgb_LDFLAGS="${chroma_i420_rgb_LDFLAGS} -lm"
197 dnl Check for pthreads - borrowed from XMMS
199 if test "x${THREAD_LIB}" = "xerror"; then
200 AC_CHECK_LIB(pthread,main,THREAD_LIB="-lpthread")
202 if test "x${THREAD_LIB}" = "xerror"; then
203 AC_CHECK_LIB(pthreads,main,THREAD_LIB="-lpthreads")
205 if test "x${THREAD_LIB}" = "xerror"; then
206 AC_CHECK_LIB(c_r,main,THREAD_LIB="-lc_r")
208 if test "x${THREAD_LIB}" = "xerror"; then
209 AC_CHECK_FUNC(pthread_mutex_lock)
213 dnl Check for cthreads under GNU/Hurd for instance
214 AC_CHECK_LIB(threads,cthread_fork,THREAD_LIB="-lthreads")
216 dnl Check for misc headers
217 AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
218 AC_DEFINE(PTHREAD_COND_T_IN_PTHREAD_H, 1,
219 Define if <pthread.h> defines pthread_cond_t.)])
220 AC_EGREP_HEADER(pthread_once,pthread.h,[
221 AC_DEFINE(PTHREAD_ONCE_IN_PTHREAD_H, 1,
222 Define if <pthread.h> defines pthread_once.)])
223 AC_EGREP_HEADER(strncasecmp,strings.h,[
224 AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
225 Define if <strings.h> defines strncasecmp.)])
227 dnl Check for headers
228 AC_CHECK_HEADERS(stdint.h getopt.h strings.h inttypes.h sys/int_types.h)
229 AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h)
230 AC_CHECK_HEADERS(dlfcn.h image.h)
231 AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
232 AC_CHECK_HEADERS(machine/param.h sys/shm.h)
233 AC_CHECK_HEADERS(linux/version.h)
237 dnl Mac OS X and other OSes don't have declaration for nanosleep
238 AC_EGREP_HEADER(nanosleep,time.h,[
239 AC_DEFINE(HAVE_DECL_NANOSLEEP, 1,
240 Define if <time.h> defines nanosleep.)
243 dnl Make sure we have timespecs
244 AC_EGREP_HEADER(timespec,sys/time.h,[
245 AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
246 Define if <sys/time.h> defines struct timespec.)
249 dnl Check for threads library
250 AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
252 dnl Default X headers and libraries
253 if test "x${x_includes}" = "xNONE"; then
254 x_includes="/usr/X11R6/include"
256 if test "x${x_libraries}" = "xNONE"; then
257 x_libraries="/usr/X11R6/lib"
261 if test "x${SYS}" != "xmingw32"
263 CPPFLAGS="${save_CPPFLAGS} -I${x_includes}"
264 AC_CHECK_HEADERS(X11/extensions/dpms.h, [
265 AC_EGREP_HEADER(DPMSInfo,X11/extensions/dpms.h,[
266 AC_DEFINE(DPMSINFO_IN_DPMS_H, 1,
267 Define if <X11/extensions/dpms.h> defines DPMSInfo.)
270 CPPFLAGS="${save_CPPFLAGS}"
273 dnl Check for ntohl, etc.
274 AC_CACHE_CHECK([for ntohl in sys/param.h],
275 [ac_cv_c_ntohl_sys_param_h],
276 [CFLAGS="${save_CFLAGS} -Wall -Werror"
277 AC_TRY_COMPILE([#include <sys/param.h>],
278 [void foo() { int meuh; ntohl(meuh); }],
279 ac_cv_c_ntohl_sys_param_h=yes, ac_cv_c_ntohl_sys_param_h=no)])
280 if test "x${ac_cv_c_ntohl_sys_param_h}" != "xno"; then
281 AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
284 dnl Check for inline function size limit
285 AC_CACHE_CHECK([if \$CC accepts -finline-limit],
286 [ac_cv_c_inline_limit],
287 [CFLAGS="${save_CFLAGS} -finline-limit-30000"
288 AC_TRY_COMPILE([],,ac_cv_c_inline_limit=yes, ac_cv_c_inline_limit=no)])
289 if test "x${ac_cv_c_inline_limit}" != "xno"; then
290 save_CFLAGS="${save_CFLAGS} -finline-limit-30000"; CFLAGS="${save_CFLAGS}"
293 dnl Check for -W or -w flags
294 AC_CACHE_CHECK([if \$CC accepts -Wall -Winline],
295 [ac_cv_c_Wall_Winline],
296 [CFLAGS="-Wall -Winline ${save_CFLAGS}"
297 AC_TRY_COMPILE([],,ac_cv_c_Wall_Winline=yes, ac_cv_c_Wall_Winline=no)])
298 if test "x${ac_cv_c_Wall_Winline}" != "xno"; then
299 save_CFLAGS="-Wall -Winline ${save_CFLAGS}"; CFLAGS="${save_CFLAGS}"
301 AC_CACHE_CHECK([if \$CC accepts -wall -winline],
302 [ac_cv_c_wall_winline],
303 [CFLAGS="-wall -winline ${save_CFLAGS}"
304 AC_TRY_COMPILE([],,ac_cv_c_wall_winline=yes, ac_cv_c_wall_winline=no)])
305 if test "x${ac_cv_c_wall_winline}" != "xno"; then
306 save_CFLAGS="-wall -winline ${save_CFLAGS}"; CFLAGS="${save_CFLAGS}"
311 AC_CACHE_CHECK([if \$CC accepts -pipe],
313 [CFLAGS="${save_CFLAGS} -pipe"
314 AC_TRY_COMPILE([],,ac_cv_c_pipe=yes, ac_cv_c_pipe=no)])
315 if test "x${ac_cv_c_pipe}" != "xno"; then
316 save_CFLAGS="${save_CFLAGS} -pipe"; CFLAGS="${save_CFLAGS}"
319 dnl Check for various optimization flags
320 AC_CACHE_CHECK([if \$CC accepts -O3],
322 [CFLAGS="${save_CFLAGS} -O3"
323 AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)])
324 if test "x${ac_cv_c_o3}" != "xno"; then
325 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
327 AC_CACHE_CHECK([if \$CC accepts -O2],
329 [CFLAGS="${save_CFLAGS} -O2"
330 AC_TRY_COMPILE([],,ac_cv_c_o2=yes, ac_cv_c_o2=no)])
331 if test "x${ac_cv_c_o2}" != "xno"; then
332 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
334 AC_CACHE_CHECK([if \$CC accepts -O],
336 [CFLAGS="${save_CFLAGS} -O"
337 AC_TRY_COMPILE([],,ac_cv_c_o=yes, ac_cv_c_o=no)])
338 if test "x${ac_cv_c_o}" != "xno"; then
339 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
344 dnl Check for -ffast-math
345 AC_CACHE_CHECK([if \$CC accepts -ffast-math],
347 [CFLAGS="${save_CFLAGS} -ffast-math"
348 AC_TRY_COMPILE([],,ac_cv_c_fast_math=yes, ac_cv_c_fast_math=no)])
349 if test "x${ac_cv_c_fast_math}" != "xno"; then
350 CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
353 dnl Check for -funroll-loops
354 AC_CACHE_CHECK([if \$CC accepts -funroll-loops],
355 [ac_cv_c_unroll_loops],
356 [CFLAGS="${save_CFLAGS} -funroll-loops"
357 AC_TRY_COMPILE([],,ac_cv_c_unroll_loops=yes, ac_cv_c_unroll_loops=no)])
358 if test "x${ac_cv_c_unroll_loops}" != "xno"; then
359 CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
362 dnl Check for -fomit-frame-pointer
363 AC_CACHE_CHECK([if \$CC accepts -fomit-frame-pointer],
364 [ac_cv_c_omit_frame_pointer],
365 [CFLAGS="${save_CFLAGS} -fomit-frame-pointer"
366 AC_TRY_COMPILE([],,ac_cv_c_omit_frame_pointer=yes, ac_cv_c_omit_frame_pointer=no)])
367 if test "x${ac_cv_c_omit_frame_pointer}" != "xno"; then
368 CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
369 # this plugin does not compile without -fomit-frame-pointer, damn gcc!
370 chroma_i420_yuy2_mmx_CFLAGS="${chroma_i420_yuy2_mmx_CFLAGS} -fomit-frame-pointer"
373 dnl Check for Darwin plugin linking flags
374 AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error -lcc_dynamic],
376 [CFLAGS="${save_CFLAGS} -bundle -undefined error -lcc_dynamic"
377 AC_TRY_COMPILE([],,ac_cv_ld_darwin=yes, ac_cv_ld_darwin=no)])
378 if test "x${ac_cv_ld_darwin}" != "xno"; then
379 plugins_LDFLAGS="${plugins_LDFLAGS} -bundle -undefined error -lcc_dynamic"
382 dnl Check for standard plugin linking flags
383 AC_CACHE_CHECK([if \$CC accepts -shared],
385 [CFLAGS="${save_CFLAGS} -shared"
386 AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
387 if test "x${ac_cv_ld_plugins}" != "xno"; then
388 plugins_LDFLAGS="${plugins_LDFLAGS} -shared"
391 dnl Check for variadic macros
392 AC_CACHE_CHECK([for variadic cpp macros],
393 [ac_cv_cpp_variadic_macros],
394 [CFLAGS="${save_CFLAGS}"
397 #define a(b,c...) printf(b,##c)],
398 [a("foo");a("%s","bar");a("%s%s","baz","quux");],
399 ac_cv_cpp_variadic_macros=yes,
400 ac_cv_cpp_variadic_macros=no)])
401 if test "x${ac_cv_cpp_variadic_macros}" != "xno"; then
402 AC_DEFINE(HAVE_VARIADIC_MACROS, 1, Support for variadic macros)
405 dnl Checks for __attribute__(aligned()) directive
406 AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
407 [ac_cv_c_attribute_aligned],
408 [ac_cv_c_attribute_aligned=0
409 CFLAGS="${save_CFLAGS} -Werror"
410 for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
412 [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;],
413 [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
415 CFLAGS="${save_CFLAGS}"])
416 if test "x${ac_cv_c_attribute_aligned}" != "x0"; then
417 AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
418 [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
424 case "x${target_cpu}" in
436 BUILTINS="${BUILTINS}"
437 PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_audio mpeg_ps mpeg_ts idct idctclassic motion imdct downmix mpeg_adec ac3_adec mpeg_vdec file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort filter_clone filter_crop fx_scope chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga"
440 dnl Accelerated modules
442 MMX_MODULES="memcpymmx idctmmx motionmmx chroma_i420_rgb_mmx chroma_i420_yuy2_mmx chroma_i422_yuy2_mmx chroma_i420_ymga_mmx"
443 MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
444 THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
445 SSE_MODULES="imdctsse downmixsse"
446 ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
448 AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
450 [CFLAGS="${save_CFLAGS}"
451 AC_TRY_COMPILE(,[void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));],
452 ac_cv_mmx_inline=yes, ac_cv_mmx_inline=no)])
453 if test "x${ac_cv_mmx_inline}" != "xno"; then
454 ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
457 AC_CACHE_CHECK([if \$CC groks MMX EXT inline assembly],
458 [ac_cv_mmxext_inline],
459 [CFLAGS="${save_CFLAGS}"
460 AC_TRY_COMPILE(,[void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));],
461 ac_cv_mmxext_inline=yes, ac_cv_mmxext_inline=no)])
462 if test "x${ac_cv_mmxext_inline}" != "xno"; then
463 ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
466 AC_CACHE_CHECK([if \$CC groks 3D Now! inline assembly],
467 [ac_cv_3dnow_inline],
468 [CFLAGS="${save_CFLAGS}"
469 AC_TRY_COMPILE(,[void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));],
470 ac_cv_3dnow_inline=yes, ac_cv_3dnow_inline=no)])
471 if test "x${ac_cv_3dnow_inline}" != "xno"; then
472 AC_DEFINE(CAN_COMPILE_3DNOW, 1, Define if \$CC groks 3D Now! inline assembly.)
473 ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
476 AC_CACHE_CHECK([if \$CC groks SSE inline assembly],
478 [CFLAGS="${save_CFLAGS}"
479 AC_TRY_COMPILE(,[void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));],
480 ac_cv_sse_inline=yes, ac_cv_sse_inline=no)])
481 if test "x${ac_cv_sse_inline}" != "xno" -a "x${SYS}" != "xmingw32"; then
482 AC_DEFINE(CAN_COMPILE_SSE, 1, Define if \$CC groks SSE inline assembly.)
483 ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
486 # don't try to grok AltiVec with native mingw32 it doesn't work right now
487 # we should be able to remove this test with future versions of mingw32
488 if test "x${SYS}" != "xmingw32"; then
489 AC_CACHE_CHECK([if \$CC groks AltiVec inline assembly],
490 [ac_cv_altivec_inline],
491 [CFLAGS="${save_CFLAGS}"
492 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
493 ac_cv_altivec_inline=yes,
494 [CFLAGS="${save_CFLAGS} -Wa,-m7400"
495 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
496 [ac_cv_altivec_inline="-Wa,-m7400"],
497 ac_cv_altivec_inline=no)
499 if test "x${ac_cv_altivec_inline}" != "xno"; then
500 AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks AltiVec inline assembly.)
501 if test "x${ac_cv_altivec_inline}" != "xyes"; then
502 idctaltivec_CFLAGS="${idctaltivec_CFLAGS} ${ac_cv_altivec_inline}"
503 motionaltivec_CFLAGS="${motionaltivec_CFLAGS} ${ac_cv_altivec_inline}"
504 memcpyaltivec_CFLAGS="${memcpyaltivec_CFLAGS} ${ac_cv_altivec_inline}"
505 vlc_CFLAGS="${vlc_CFLAGS} ${ac_cv_altivec_inline}"
507 ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
510 AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
512 [CFLAGS="${save_CFLAGS} -faltivec"
514 AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
515 ac_cv_c_altivec=-faltivec, [
517 CFLAGS="${save_CFLAGS} ${idctaltivec_CFLAGS} -fvec"
518 AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
519 [ac_cv_c_altivec="-fvec"], ac_cv_c_altivec=no)
521 CFLAGS="${save_CFLAGS}"])
522 if test "x${ac_cv_c_altivec}" != "xno"; then
523 AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
524 idctaltivec_CFLAGS="${idctaltivec_CFLAGS} ${ac_cv_c_altivec}"
525 motionaltivec_CFLAGS="${motionaltivec_CFLAGS} ${ac_cv_c_altivec}"
526 memcpyaltivec_CFLAGS="${memcpyaltivec_CFLAGS} ${ac_cv_c_altivec}"
527 vlc_CFLAGS="${vlc_CFLAGS} ${ac_cv_c_altivec}"
528 ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
531 AC_CACHE_CHECK([if linker needs -framework vecLib],
533 [LDFLAGS="${vlc_LDFLAGS} -framework vecLib"
534 AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)
535 LDFLAGS="${save_LDFLAGS}"
537 if test "x${ac_cv_ld_altivec}" != "xno"; then
538 idctaltivec_LDFLAGS="${idctaltivec_LDFLAGS} -framework vecLib"
539 motionaltivec_LDFLAGS="${motionaltivec_LDFLAGS} -framework vecLib"
540 memcpyaltivec_LDFLAGS="${memcpyaltivec_LDFLAGS} -framework vecLib"
541 vlc_LDFLAGS="${vlc_LDFLAGS} -framework vecLib"
547 AC_ARG_WITH(,[Optimization options:])
550 dnl Special arch tuning
553 [ --with-tuning=ARCH enable special tuning for an architecture
554 (default i686 on IA-32 and 750 on PPC)])
555 if test "x${with_tuning}" != "x"; then
556 TUNING="${with_tuning}"
558 if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xi486" -o "x${target_cpu}" = "xi386"; then TUNING="pentiumpro"
560 if test "x${target_cpu}" = "xpowerpc"; then TUNING="750"; fi
565 dnl x86 accelerations
567 if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xx86" -o "x${target_cpu}" = "xi386"
570 PLUGINS="${PLUGINS} ${ACCEL_MODULES}"
574 dnl Enable/disable optimizations
576 AC_ARG_ENABLE(optimizations,
577 [ --disable-optimizations disable compiler optimizations (default enabled)],
578 [ if test "x${enable_optimizations}" = "xno"; then OPTIMS=0; fi ],
582 dnl AltiVec acceleration
584 AC_ARG_ENABLE(altivec,
585 [ --disable-altivec disable AltiVec optimizations (default enabled on PPC)],
586 [ if test "x${enable_altivec}" = "xyes"; then ARCH="${ARCH} altivec";
587 BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ],
588 [ if test "x${target_cpu}" = "xpowerpc"; then ARCH="${ARCH} altivec";
589 BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ])
596 [ --enable-debug debug mode (default disabled)],
597 [ if test "x${enable_debug}" = "xyes"; then DEBUG=1; fi ])
600 dnl Enable release-specific flags
603 AC_ARG_ENABLE(release,
604 [ --enable-release activate extra optimizations (default disabled)],
605 [ if test "x${enable_release}" = "xyes"; then RELEASE=1; fi ],
606 [ VERSION="${VERSION}_`date +%Y-%m-%d`" ])
612 AC_ARG_WITH(,[Input plugins:])
615 dnl DVD module: optionally check for installed libdvdcss
618 [ --enable-dvd DVD input module (default enabled)])
619 if test "x${enable_dvd}" != "xno"
622 [ --with-dvdcss=PATH libdvdcss headers and libraries])
623 AC_ARG_WITH(dvdcss-tree,
624 [ --with-dvdcss-tree=PATH libdvdcss tree for static linking])
625 case "x${with_dvdcss}" in
627 if test "x${with_dvdcss_tree}" = x
629 AC_CHECK_HEADERS(dvdcss/dvdcss.h,
630 [ PLUGINS="${PLUGINS} dvd"
631 dvd_LDFLAGS="${dvd_LDFLAGS} -ldvdcss" ],
632 [ 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.])
633 AC_MSG_ERROR([cannot find libdvdcss headers]) ])
635 AC_MSG_CHECKING(for libdvdcss.a in ${with_dvdcss_tree})
636 real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
637 if test "x${real_dvdcss_tree}" = "x"
639 dnl The given directory can't be found
641 AC_MSG_ERROR([cannot cd to ${with_dvdcss_tree}])
643 if test -f "${real_dvdcss_tree}/src/.libs/libdvdcss.a"
645 dnl Use a custom libdvdcss
646 AC_MSG_RESULT(${real_dvdcss_tree}/src/.libs/libdvdcss.a)
647 BUILTINS="${BUILTINS} dvd"
648 dvd_LDFLAGS="${dvd_LDFLAGS} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
649 dvd_CFLAGS="${dvd_CFLAGS} -I${real_dvdcss_tree}/src"
651 dnl The given libdvdcss wasn't built
653 AC_MSG_ERROR([cannot find ${real_dvdcss_tree}/src/.libs/libdvdcss.a, make sure you compiled libdvdcss in ${with_dvdcss_tree}])
658 dnl Compile without dvdcss (dlopen version, works only under Linux)
659 PLUGINS="${PLUGINS} dvd"
660 dvd_CFLAGS="${dvd_CFLAGS} -DGOD_DAMN_DMCA"
661 dvd_LDFLAGS="${dvd_LDFLAGS} -ldl"
664 AC_MSG_CHECKING(for dvdcss headers in ${with_dvdcss})
665 if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
667 dnl Use ${with_dvdcss}/include/dvdcss/dvdcss.h
669 PLUGINS="${PLUGINS} dvd"
670 dvd_LDFLAGS="${dvd_LDFLAGS} -L${with_dvdcss}/lib -ldvdcss"
671 dvd_CFLAGS="${dvd_CFLAGS} -I${with_dvdcss}/include"
673 dnl No libdvdcss could be found, sorry
675 AC_MSG_ERROR([cannot find ${with_dvdcss}/include/dvdcss/dvdcss.h])
682 dnl dvdread module: check for libdvdread plugin
684 AC_ARG_ENABLE(dvdread,
685 [ --enable-dvdread dvdread input module (default disabled)])
686 if test "x${enable_dvdread}" != "xno"
689 [ --with-dvdread=PATH libdvdread headers and libraries])
690 if test "x${with_dvdread}" = "x"
695 test_LDFLAGS="-L${with_dvdread}/lib"
696 test_CFLAGS="-I${with_dvdread}/include"
698 CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
699 AC_CHECK_HEADERS(dvdread/dvd_reader.h, [
700 AC_TRY_COMPILE([#include <dvdread/dvd_reader.h>],
701 [void foo() { int i=DVD_VIDEO_LB_LEN; }],[
702 PLUGINS="${PLUGINS} dvdread"
703 dvdread_LDFLAGS="${dvdread_LDFLAGS} ${test_LDFLAGS} -ldvdread"
704 dvdread_CFLAGS="${dvdread_CFLAGS} ${test_CFLAGS}"
706 if test "x${enable_dvdread}" != "x"
708 AC_MSG_ERROR([Cannot find DVD_VIDEO_LB_LEN in dvdread/dvd_reader.h, please install libdvdread version 0.9.2 or later])
712 if test "x${enable_dvdread}" != "x"
714 if test "x${with_dvdread}" != "x"
716 AC_MSG_ERROR([Cannot find dvdread/dvd_reader.h in ${with_dvdread}/include])
718 AC_MSG_ERROR([Cannot find dvdread/dvd_reader.h])
722 CPPFLAGS="$save_CPPFLAGS"
726 dnl dvdplay module: check for libdvdplay
728 AC_ARG_ENABLE(dvdplay,
729 [ --enable-dvdplay dvdplay input module (default disabled)])
730 if test "x$enable_dvdplay" != "xno"
733 [ --with-dvdplay=PATH libdvdplay headers and libraries])
734 if test "x$with_dvdplay" = x
739 test_LDFLAGS="-L${with_dvdplay}/lib"
740 test_CFLAGS="-I${with_dvdplay}/include"
742 CPPFLAGS="$save_CPPFLAGS $test_CFLAGS"
743 AC_CHECK_HEADERS(dvdplay/dvdplay.h, [
744 PLUGINS="${PLUGINS} dvdplay"
745 dvdplay_LDFLAGS="${dvdplay_LDFLAGS} ${test_LDFLAGS} -ldvdplay -ldvdread"
746 dvdplay_CFLAGS="${dvdplay_CFLAGS} ${test_CFLAGS}"
748 if test "x$enable_dvdplay" != x
750 if test "x$with_dvdplay" != x
752 AC_MSG_ERROR([Cannot find dvdplay/dvdplay.h in ${with_dvdplay}/include])
754 AC_MSG_ERROR([Cannot find dvdplay/dvdplay.h])
758 CPPFLAGS="${save_CPPFLAGS}"
763 dnl libdvbpsi ts demux
765 AC_ARG_ENABLE(dvbpsi,
766 [ --enable-dvbpsi dvbpsi ts demux module (default disabled)])
767 if test "x${enable_dvbpsi}" != "xno"
770 [ --with-dvbpsi=PATH libdvbpsi headers and libraries])
772 [ --with-dvbpsi-tree=PATH libdvbpsi tree for static linking])
773 case "x${with_dvbpsi}" in
775 if test "x${with_dvbpsi_tree}" = "x"
777 AC_CHECK_HEADERS(dvbpsi/dr.h,
778 [ PLUGINS="${PLUGINS} mpeg_ts_dvbpsi"
779 mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} -ldvbpsi" ], [],
780 [ AC_MSG_ERROR([cannot find libdvbpsi headers]) ])
782 AC_MSG_CHECKING(for libdvbpsi.a in ${with_dvbpsi_tree})
783 real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
784 if test "x${real_dvbpsi_tree}" = "x"
786 dnl The given directory can't be found
788 AC_MSG_ERROR([cannot cd to ${with_dvbpsi_tree}])
790 if test -f "${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
792 dnl Use a custom libdvbpsi
793 AC_MSG_RESULT(${real_dvbpsi_tree}/src/.libs/libdvbpsi.a)
794 BUILTINS="${BUILTINS} mpeg_ts_dvbpsi"
795 mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
796 mpeg_ts_dvbpsi_CFLAGS="${mpeg_ts_dvbpsi_CFLAGS} -I${real_dvbpsi_tree}/src"
798 dnl The given libdvbpsi wasn't built
800 AC_MSG_ERROR([cannot find ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a, make sure you compiled libdvbpsi in ${with_dvbpsi_tree}])
805 dnl Compile without dvbpsi (dlopen version, works only under Linux)
808 AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi})
809 if test "x${with_dvbpsi}" = "x"
814 test_LDFLAGS="-L${with_dvbpsi}/lib"
815 test_CFLAGS="-I${with_dvbpsi}/include"
817 CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
818 AC_CHECK_HEADER([dvbpsi/dr.h],[
819 PLUGINS="${PLUGINS} mpeg_ts_dvbpsi"
820 mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} ${test_LDFLAGS} -ldvbpsi"
821 mpeg_ts_dvbpsi_CFLAGS="${mpeg_ts_dvbpsi_CFLAGS} ${test_CFLAGS}"
823 if test "x${enable_dvbpsi}" != "x"
825 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])
828 CPPFLAGS="${save_CPPFLAGS}"
837 [ --enable-vcd VCD support for Linux, FreeBSD and MacOS X (default enabled)])
839 if test "x${enable_vcd}" != "xno"
841 AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
842 PLUGINS="${PLUGINS} vcd"
845 AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
846 PLUGINS="${PLUGINS} vcd"
847 AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
850 if test "x${SYS}" = "xbsdi"
852 PLUGINS="${PLUGINS} vcd"
855 if test "x${SYS}" = "xdarwin"
857 # No need to add vcd to PLUGINS, Darwin is already based on FreeBSD
858 vcd_LDFLAGS="${vcd_LDFLAGS} -framework IOKit -framework CoreFoundation"
863 dnl Satellite input module
865 AC_ARG_ENABLE(satellite,
866 [ --enable-satellite satellite card support (default disabled)],
867 [ if test "x${enable_satellite}" = "xyes"
869 PLUGINS="${PLUGINS} satellite"
873 dnl ipv6 plugin - not for QNX yet
875 if test "x${SYS}" != "xnto" && test "x${SYS}" != "xmingw32"
878 AC_CHECK_FUNC(inet_pton,[have_ipv6=1],[
879 AC_CHECK_LIB(resolv,inet_pton,
881 ipv6_LDFLAGS="${ipv6_LDFLAGS} -lresolv"])
883 AC_MSG_CHECKING(for sockaddr_in6 in netinet/in.h)
884 AC_EGREP_HEADER(sockaddr_in6,netinet/in.h,
885 [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); have_ipv6=0])
886 if test x$have_ipv6 = x1; then
887 PLUGINS="${PLUGINS} ipv6"
890 if test "x${SYS}" = "xmingw32"
892 AC_MSG_CHECKING(for getaddrinfo in ws2tcpip.h)
893 AC_EGREP_HEADER(addrinfo,ws2tcpip.h,[AC_MSG_RESULT(yes)
894 PLUGINS="${PLUGINS} ipv6"],[AC_MSG_RESULT(no)])
901 [ --enable-avi AVI demux module (default enabled)])
902 if test "x${enable_avi}" != "xno"
904 PLUGINS="${PLUGINS} avi"
911 AC_ARG_WITH(,[Codec plugins:])
917 [ --enable-mad libmad module (default disabled)])
918 if test "x${enable_mad}" = "xyes"
921 [ --with-mad=PATH path to libmad],[],[])
922 if test "x${with_mad}" != "xno" -a "x${with_mad}" != "x"
924 mad_CFLAGS="${mad_CFLAGS} -I${with_mad}/include"
925 mad_LDFLAGS="${mad_LDFLAGS} -L${with_mad}/lib"
928 AC_ARG_WITH(mad-tree,
929 [ --with-mad-tree=PATH mad tree for static linking],[],[])
930 if test "x${with_mad_tree}" != "xno" -a "x${with_mad_tree}" != "x"
932 real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
933 if test "x${real_mad_tree}" = "x"
935 dnl The given directory can't be found
937 AC_MSG_ERROR([${with_mad_tree} directory doesn't exist])
939 dnl Use a custom libmad
940 AC_MSG_CHECKING(for mad.h in ${real_mad_tree}/libmad)
941 if test -f ${real_mad_tree}/libmad/mad.h
944 mad_CFLAGS="${mad_CFLAGS} -I${real_mad_tree}/libmad"
945 mad_LDFLAGS="${mad_LDFLAGS} -L${real_mad_tree}/libmad/.libs"
946 LDFLAGS="${save_LDFLAGS} ${mad_LDFLAGS}"
947 AC_CHECK_LIB(mad, mad_bit_init, [
948 BUILTINS="${BUILTINS} mad"
949 mad_LDFLAGS="${mad_LDFLAGS} -lmad"
950 ],[ AC_MSG_ERROR([the specified tree hasn't been compiled ])
952 LDFLAGS="${save_LDFLAGS}"
955 AC_MSG_ERROR([the specified tree doesn't have mad.h])
958 CFLAGS="${save_CFLAGS} ${mad_CFLAGS}"
959 LDFLAGS="${save_LDFLAGS} ${mad_LDFLAGS}"
960 AC_CHECK_HEADERS(mad.h, ,
961 [ AC_MSG_ERROR([Cannot find development headers for libmad...]) ])
962 AC_CHECK_LIB(mad, mad_bit_init, [
963 PLUGINS="${PLUGINS} mad"
964 mad_LDFLAGS="${mad_LDFLAGS} -lmad" ],
965 [ AC_MSG_ERROR([Cannot find libmad library...]) ])
966 CFLAGS="${save_CFLAGS}"
967 LDFLAGS="${save_LDFLAGS}"
972 dnl ffmpeg decoder plugin
974 AC_ARG_ENABLE(ffmpeg,
975 [ --enable-ffmpeg ffmpeg codec (default disabled)])
976 if test "x${enable_ffmpeg}" = "xyes"
979 [ --with-ffmpeg=PATH path to ffmpeg installation],[],[])
980 if test "x${with_ffmpeg}" != "xno" -a "x${with_ffmpeg}" != "x"
982 ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I${with_ffmpeg}/include/libffmpeg"
983 ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -L${with_ffmpeg}/lib"
986 AC_ARG_WITH(ffmpeg-tree,
987 [ --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
988 if test "x${with_ffmpeg_tree}" != "x"
990 AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
991 real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
992 if test "x${real_ffmpeg_tree}" = x
994 dnl The given directory can't be found
996 AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
998 if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"
1000 dnl Use a custom libffmpeg
1001 AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
1002 BUILTINS="${BUILTINS} ffmpeg"
1003 ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} ${real_ffmpeg_tree}/libavcodec/libavcodec.a -lm"
1004 ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I${real_ffmpeg_tree}/libavcodec"
1006 dnl The given libavcodec wasn't built
1008 AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
1011 CFLAGS="${save_CFLAGS} ${ffmpeg_CFLAGS}"
1012 LDFLAGS="${save_LDFLAGS} ${ffmpeg_LDFLAGS} -lm"
1013 AC_CHECK_LIB(avcodec, avcodec_init, [
1014 BUILTINS="${BUILTINS} ffmpeg"
1015 ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lavcodec -lm" ],
1016 [ AC_MSG_ERROR([Cannot find libavcodec library...]) ])
1017 LDFLAGS="${save_LDFLAGS}"
1018 CFLAGS="${save_CFLAGS}"
1026 [ --enable-mp4 MP4 demux module (default disabled)])
1027 if test "x${enable_mp4}" = "xyes"
1029 AC_CHECK_HEADER(zlib.h,
1030 AC_CHECK_LIB(z, inflateEnd,
1031 [ PLUGINS="${PLUGINS} mp4"
1032 mp4_LDFLAGS="${mp4_LDFLAGS} -lz" ],
1033 [ AC_MSG_ERROR([cannot find zlib library...]) ]),
1034 [ AC_MSG_ERROR([cannot find zlib header...]) ])
1037 dnl special case for BeOS
1038 if test "x${SYS}" = "xbeos"
1040 PLUGINS="${PLUGINS} beos"
1044 dnl a52 AC3 decoder plugin
1047 [ --enable-a52 AC3 support with liba52 (default enabled)])
1048 if test "x${enable_a52}" != "xno"
1050 AC_ARG_WITH(a52-tree,
1051 [ --with-a52-tree=PATH a52dec tree for static linking ],[],[])
1052 if test "x${with_a52_tree}" != "xno" -a "x${with_a52_tree}" != "x"
1054 real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
1055 if test "x${real_a52_tree}" = "x"
1057 dnl The given directory can't be found
1059 AC_MSG_ERROR([${with_a52_tree} directory doesn't exist])
1061 dnl Use a custom a52dec
1062 AC_MSG_CHECKING(for a52.h in ${real_a52_tree}/include)
1063 if test -f ${real_a52_tree}/include/a52.h
1066 a52_CFLAGS="${a52_CFLAGS} -I${real_a52_tree}"
1067 a52_LDFLAGS="${a52_LDFLAGS} -L${real_a52_tree}/liba52/.libs"
1068 LDFLAGS="${save_LDFLAGS} ${a52_LDFLAGS}"
1069 AC_CHECK_LIB(a52, a52_free, [
1070 BUILTINS="${BUILTINS} a52"
1071 a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
1072 a52_CFLAGS="${a52_CFLAGS} -DUSE_A52DEC_TREE"
1074 if test -f ${real_a52_tree}/liba52/.libs/liba52.a
1076 AC_MSG_ERROR([make sure you have at least a52dec-0.7.3])
1078 AC_MSG_ERROR([the specified tree hasn't been compiled])
1081 LDFLAGS="${save_LDFLAGS}"
1084 AC_MSG_ERROR([the specified tree doesn't have a52.h])
1086 else dnl no with args
1087 AC_CHECK_HEADERS(a52dec/a52.h, [
1088 AC_CHECK_LIB(a52, a52_free, [
1089 BUILTINS="${BUILTINS} a52"
1090 a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
1091 a52_CFLAGS="${a52_CFLAGS}"
1100 AC_ARG_ENABLE(cinepak,
1101 [ --enable-cinepak Cinepak decoder (default enabled)])
1102 if test "x${enable_cinepak}" != "xno"
1104 PLUGINS="${PLUGINS} cinepak"
1108 dnl ogg vorbis plugin
1110 AC_ARG_ENABLE(vorbis,
1111 [ --enable-vorbis Ogg/Vorbis decoder support (default enabled)])
1112 if test "x${enable_vorbis}" != "xno"
1114 AC_CHECK_HEADERS(ogg/ogg.h, [
1115 dnl disabled for the moment
1116 #PLUGINS="${PLUGINS} vorbis"
1117 vorbis_LDFLAGS="${vorbis_LDFLAGS} -lvorbis"
1125 AC_ARG_WITH(,[Video plugins:])
1129 dnl (enabled by default except on win32)
1132 [ --enable-x11 X11 support (default enabled)])
1133 if test "x${enable_x11}" != "xno" &&
1134 (test "x${SYS}" != "xmingw32" || test "x${enable_x11}" = "xyes"); then
1135 CPPFLAGS="${save_CPPFLAGS} -I${x_includes}"
1136 AC_CHECK_HEADERS(X11/Xlib.h, [
1137 PLUGINS="${PLUGINS} x11"
1138 x11_LDFLAGS="${x11_LDFLAGS} -L${x_libraries} -lX11 -lXext"
1139 x11_CFLAGS="${x11_CFLAGS} -I${x_includes}"
1141 CPPFLAGS="${save_CPPFLAGS}"
1146 dnl (enabled by default except on win32)
1148 AC_ARG_ENABLE(xvideo,
1149 [ --enable-xvideo XVideo support (default enabled)])
1150 if test "x${enable_xvideo}" != "xno" &&
1151 (test "x${SYS}" != "xmingw32" || test "x${enable_xvideo}" = "xyes"); then
1152 CPPFLAGS="${save_CPPFLAGS} -I${x_includes}"
1153 AC_CHECK_HEADERS(X11/extensions/Xv.h, [
1154 CFLAGS="${save_CFLAGS} -L${x_libraries} -lX11 -lXext"
1155 AC_CHECK_LIB(Xv_pic,XvPutImage,
1156 # We have Xv_pic, that's good, we can build an xvideo.so plugin !
1157 PLUGINS="${PLUGINS} xvideo"
1158 xvideo_LDFLAGS="${xvideo_LDFLAGS} -L${x_libraries} -lX11 -lXext -lXv_pic"
1159 xvideo_CFLAGS="${xvideo_CFLAGS} -I${x_includes}",
1160 AC_CHECK_LIB(Xv,XvPutImage,
1161 # We don't have Xv_pic, but we have Xv, let's make xvideo.a as builtin
1162 PLUGINS="${PLUGINS} xvideo"
1163 xvideo_LDFLAGS="${xvideo_LDFLAGS} -L${x_libraries} -lX11 -lXext -lXv"
1164 xvideo_CFLAGS="${xvideo_CFLAGS} -I${x_includes}",
1165 # Otherwise... well, do nothing.
1168 CFLAGS="${save_CFLAGS}"
1170 CPPFLAGS="${save_CPPFLAGS}")
1177 [ --enable-sdl SDL support (default enabled)])
1178 if test "x${enable_sdl}" != "xno"
1181 AC_ARG_WITH(sdl-config-path,
1182 [ --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)],
1183 [ if test "x${with_sdl_config_path}" != "xno"
1185 SDL_PATH="${with_sdl_config_path}:${PATH}"
1187 AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no, ${SDL_PATH})
1188 SDL_CONFIG="${SDL12_CONFIG}"
1189 SDL_HEADER="SDL12/SDL.h"
1190 if test "x${SDL_CONFIG}" = "xno"
1192 AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no, ${SDL_PATH})
1193 SDL_CONFIG=${SDL11_CONFIG}
1194 SDL_HEADER="SDL11/SDL.h"
1196 if test "x${SDL_CONFIG}" = "xno"
1198 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, ${SDL_PATH})
1199 SDL_HEADER="SDL/SDL.h"
1201 if test "x${SDL_CONFIG}" != "xno"
1203 PLUGINS="${PLUGINS} sdl"
1204 sdl_CFLAGS="${sdl_CFLAGS} `${SDL_CONFIG} --cflags`"
1205 sdl_LDFLAGS="${sdl_LDFLAGS} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
1206 CPPFLAGS="${save_CPPFLAGS} ${sdl_CFLAGS}"
1207 AC_CHECK_HEADERS(${SDL_HEADER}, AC_DEFINE_UNQUOTED(SDL_INCLUDE_FILE,
1208 <${SDL_HEADER}>, Indicate whether we should use SDL/SDL.h or SDL11/SDL.h),
1209 [ AC_MSG_ERROR([The development package for SDL is not installed.
1210 Please install it and try again. Alternatively you can also configure with
1213 CPPFLAGS="${save_CPPFLAGS}"
1214 if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
1216 AC_MSG_ERROR([The development package for SDL is not installed.
1217 Please install it and try again. Alternatively you can also configure with
1220 elif test "x${enable_sdl}" = "xyes"
1222 AC_MSG_ERROR([I couldn't find the SDL package. You can download libSDL
1223 from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
1229 dnl Windows DirectX module
1231 AC_ARG_ENABLE(directx,
1232 [ --enable-directx Win32 DirectX support (default enabled on Win32)])
1233 if test "x${enable_directx}" != "xno"
1235 if test "x${SYS}" = "xmingw32"
1237 AC_ARG_WITH(directx,
1238 [ --with-directx=PATH Win32 DirectX headers])
1239 if test "x${with_directx}" = "x"
1241 AC_CHECK_HEADERS(ddraw.h,
1242 [ PLUGINS="${PLUGINS} directx"
1243 directx_LDFLAGS="${directx_LDFLAGS} -lgdi32" ])
1245 AC_MSG_CHECKING(for directX headers in ${with_directx})
1246 if test -f ${with_directx}/ddraw.h
1248 PLUGINS="${PLUGINS} directx"
1249 directx_LDFLAGS="${directx_LDFLAGS} -lgdi32"
1250 directx_CFLAGS="${directx_CFLAGS} -I${with_directx}"
1254 AC_MSG_ERROR([Cannot find ${with_directx}/ddraw.h!])
1261 dnl Linux framebuffer module
1264 [ --enable-fb Linux framebuffer support (default enabled on Linux)])
1265 if test "x${enable_fb}" != "xno"
1267 AC_CHECK_HEADERS(linux/fb.h, [
1268 PLUGINS="${PLUGINS} fb"
1273 dnl Linux MGA module
1276 [ --enable-mga Linux kernel Matrox support (default disabled)],
1277 [ if test "x${enable_mga}" = "xyes"
1279 PLUGINS="${PLUGINS} mga xmga"
1286 [ --enable-ggi GGI support (default disabled)])
1287 if test "x${enable_ggi}" = "xyes"
1289 PLUGINS="${PLUGINS} ggi"
1290 ggi_LDFLAGS="${ggi_LDFLAGS} -lggi"
1292 [ --with-ggi=PATH path to libggi],
1293 [ if test "x${with_ggi}" != "xno" -a "x${with_ggi}" != "x"
1295 CFLAGS_GGI="${CFLAGS_GGI} -I${with_ggi}/include"
1296 ggi_LDFLAGS="${ggi_LDFLAGS} -L${with_ggi}/lib"
1303 AC_ARG_ENABLE(glide,
1304 [ --enable-glide Glide (3dfx) support (default disabled)])
1305 if test "x${enable_glide}" = "xyes"
1307 PLUGINS="${PLUGINS} glide"
1308 glide_LDFLAGS="${glide_LDFLAGS} -lglide2x -lm"
1309 glide_CFLAGS="${glide_CFLAGS} -I/usr/include/glide"
1311 [ --with-glide=PATH path to libglide],
1312 [ if test "x${with_glide}" != "xno" -a "x${with_glide}" != "x"
1314 glide_CFLAGS="${glide_CFLAGS} -I${with_glide}/include"
1315 glide_LDFLAGS="${glide_LDFLAGS} -L${with_glide}/lib"
1323 [ --enable-aa aalib output (default disabled)])
1324 if test "x${enable_aa}" = "xyes"
1326 AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
1327 if test "x${have_aa}" = "xtrue"
1329 PLUGINS="${PLUGINS} aa"
1330 aa_LDFLAGS="${aa_LDFLAGS} -laa"
1338 AC_ARG_WITH(,[Audio plugins:])
1341 dnl OSS /dev/dsp module (enabled by default except on win32)
1344 [ --enable-dsp Linux /dev/dsp support (enabled on Linux)])
1346 if test "x${enable_dsp}" != "xno" &&
1347 (test "x${SYS}" != "xmingw32" || test "x${enable_dsp}" = "xyes")
1349 AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h, [
1350 PLUGINS="${PLUGINS} dsp"
1351 AC_CHECK_LIB(ossaudio,main,dsp_LDFLAGS="${dsp_LDFLAGS} -lossaudio")
1359 [ --enable-esd Esound library support (default disabled)],
1360 [if test "x${enable_esd}" = "xyes"
1362 AC_PATH_PROG(ESD_CONFIG, esd-config, no)
1363 if test "x${ESD_CONFIG}" != "xno"
1365 PLUGINS="${PLUGINS} esd"
1366 esd_CFLAGS="${esd_CFLAGS} `${ESD_CONFIG} --cflags`"
1367 esd_LDFLAGS="${esd_LDFLAGS} `${ESD_CONFIG} --libs`"
1375 [ --enable-arts aRts sound server (default disabled)],
1376 [if test "x${enable_arts}" = "xyes"
1378 AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
1379 if test "x${ARTS_CONFIG}" != "xno"
1381 PLUGINS="${PLUGINS} arts"
1382 arts_CFLAGS="${arts_CFLAGS} `${ARTS_CONFIG} --cflags`"
1383 arts_LDFLAGS="${arts_LDFLAGS} `${ARTS_CONFIG} --libs `"
1391 [ --enable-alsa ALSA sound support for Linux (default disabled)],
1392 [if test "x${enable_alsa}" = "xyes"
1394 AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
1395 if test "x${have_alsa}" = "xtrue"
1397 PLUGINS="${PLUGINS} alsa"
1398 alsa_LDFLAGS="${alsa_LDFLAGS} -lasound -lm -ldl"
1403 dnl win32 waveOut plugin
1405 AC_ARG_ENABLE(waveout,
1406 [ --enable-waveout Win32 waveOut module (default enabled on Win32)])
1407 if test "x${enable_waveout}" != "xno" -a "x${SYS}" = "xmingw32"
1409 PLUGINS="${PLUGINS} waveout"
1410 waveout_LDFLAGS="-lwinmm"
1414 dnl Interface plugins
1417 AC_ARG_WITH(,[Interface plugins:])
1423 [ --enable-gtk Gtk+ support (default enabled)])
1424 if test "x${enable_gtk}" != "xno"
1427 AC_ARG_WITH(gtk-config-path,
1428 [ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
1429 [ if test "x${with_gtk_config_path}" != "xno"
1431 GTK_PATH="${with_gtk_config_path}:${PATH}"
1433 # look for gtk-config
1434 AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
1435 GTK_CONFIG=${GTK12_CONFIG}
1436 if test "x${GTK_CONFIG}" = "xno"
1438 AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
1440 if test "x${GTK_CONFIG}" != "xno"
1442 if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
1444 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.])
1446 gtk_CFLAGS="${gtk_CFLAGS} `${GTK_CONFIG} --cflags gtk`"
1447 gtk_LDFLAGS="${gtk_LDFLAGS} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
1448 # now look for the gtk.h header
1449 CPPFLAGS="${save_CPPFLAGS} ${gtk_CFLAGS}"
1450 ac_cv_gtk_headers=yes
1451 AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
1452 ac_cv_gtk_headers=no
1453 echo "Cannot find gtk development headers."
1455 if test "x${ac_cv_gtk_headers}" = "xyes"
1457 PLUGINS="${PLUGINS} gtk"
1458 ALIASES="${ALIASES} gvlc"
1460 CPPFLAGS="${save_CPPFLAGS}"
1465 dnl Familiar module uses Gtk+ library
1467 AC_ARG_ENABLE(familiar,
1468 [ --enable-familiar Familiar Gtk+ support (default disabled)])
1469 if test "x${enable_familiar}" = "xyes"
1472 AC_ARG_WITH(gtk-config-path,
1473 [ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
1474 [ if test "x${with_gtk_config_path}" != "xno"
1476 GTK_PATH="${with_gtk_config_path}:${PATH}"
1478 # look for gtk-config
1479 AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
1480 GTK_CONFIG=${GTK12_CONFIG}
1481 if test "x${GTK_CONFIG}" = "xno"
1483 AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
1485 if test "x${GTK_CONFIG}" != "xno"
1487 if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
1489 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.])
1491 familiar_CFLAGS="${familiar_CFLAGS} `${GTK_CONFIG} --cflags gtk`"
1492 familiar_LDFLAGS="${familiar_LDFLAGS} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
1493 # now look for the gtk.h header
1494 CPPFLAGS="${save_CPPFLAGS} ${familiar_CFLAGS}"
1495 ac_cv_gtk_headers=yes
1496 AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
1497 ac_cv_gtk_headers=no
1498 echo "Cannot find gtk development headers."
1500 if test "x${ac_cv_gtk_headers}" = "xyes"
1502 PLUGINS="${PLUGINS} familiar"
1504 CPPFLAGS="${save_CPPFLAGS}"
1511 AC_ARG_ENABLE(gnome,
1512 [ --enable-gnome Gnome interface support (default disabled)],
1513 [if test "x${enable_gnome}" = "xyes"; then
1514 # look for gnome-config
1515 AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
1516 if test -x ${GNOME_CONFIG}
1518 gnome_CFLAGS="${gnome_CFLAGS} `${GNOME_CONFIG} --cflags gtk gnomeui`"
1519 gnome_LDFLAGS="${gnome_LDFLAGS} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
1521 # now look for the gnome.h header
1522 CPPFLAGS="${save_CPPFLAGS} ${gnome_CFLAGS}"
1523 AC_CHECK_HEADERS(gnome.h, [
1524 PLUGINS="${PLUGINS} gnome"
1525 ALIASES="${ALIASES} gnome-vlc"
1527 AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
1528 developement tools or remove the --enable-gnome option])
1530 CPPFLAGS="${save_CPPFLAGS}"
1537 [ --enable-qt Qt interface support (default disabled)],
1538 [if test "x${enable_qt}" = "xyes"; then
1539 PLUGINS="${PLUGINS} qt"
1540 ALIASES="${ALIASES} qvlc"
1541 qt_LDFLAGS="${qt_LDFLAGS} -lqt -L${QTDIR}/lib"
1542 qt_CFLAGS="${qt_CFLAGS} -I/usr/include/qt -I${QTDIR}/include"
1543 if test -x ${QTDIR}/bin/moc
1545 MOC=${QTDIR}/bin/moc
1555 [ --enable-kde KDE interface support (default disabled)],
1556 [if test "x${enable_kde}" = "xyes"; then
1557 PLUGINS="${PLUGINS} kde"
1558 ALIASES="${ALIASES} kvlc"
1559 kde_LDFLAGS="${kde_LDFLAGS} -L${KDEDIR}/lib -lkfile"
1560 kde_CFLAGS="${kde_CFLAGS} -I/usr/include/kde -I/usr/include/qt"
1561 kde_CFLAGS="${kde_CFLAGS} -I${KDEDIR}/include -I${QTDIR}/include"
1562 if test -x ${QTDIR}/bin/moc
1564 MOC=${QTDIR}/bin/moc
1573 AC_ARG_ENABLE(macosx,
1574 [ --enable-macosx MacOS X support (default enabled on MacOS X)],
1575 [if test "x${enable_macosx}" = "xyes"
1577 BUILTINS="${BUILTINS} macosx"
1578 macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC"
1580 [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
1581 BUILTINS="${BUILTINS} macosx"
1582 macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC"
1589 [ --enable-qnx QNX RTOS support (default enabled on QNX RTOS)])
1590 if test "x${enable_qnx}" != "xno"
1592 AC_CHECK_HEADERS(Ph.h, [
1593 PLUGINS="${PLUGINS} qnx"
1594 qnx_LDFLAGS="${qnx_LDFLAGS} -lasound -lph"
1599 dnl Windows native interface module, built with Borland C++ Builder
1601 AC_ARG_ENABLE(intfwin,
1602 [ --enable-intfwin Win32 interface support (default disabled)],
1603 [ if test "x${enable_intfwin}" != "xno"
1605 AC_ARG_WITH(bcbuilder,
1606 [ --with-bcbuilder=PATH Borland C++ Builder installation path])
1607 if test "x${with_bcbuilder}" != "x"
1609 BCBUILDER="${with_bcbuilder}"
1611 PLUGINS="${PLUGINS} intfwin"
1617 AC_ARG_ENABLE(ncurses,
1618 [ --enable-ncurses ncurses interface support (default disabled)],
1619 [if test "x${enable_ncurses}" = "xyes"; then
1620 PLUGINS="${PLUGINS} ncurses"
1621 ncurses_LDFLAGS="${ncurses_LDFLAGS} -lncurses"
1628 [ --enable-xosd xosd interface support (default disabled)])
1629 if test "x${enable_xosd}" = "xyes"
1631 AC_CHECK_HEADER(xosd.h, have_xosd="true", have_xosd="false")
1632 if test "x${have_xosd}" = "xtrue"
1634 PLUGINS="${PLUGINS} xosd"
1635 xosd_LDFLAGS="${xosd_LDFLAGS} -lxosd"
1643 [ --enable-lirc lirc support (default disabled)])
1644 if test "x${enable_lirc}" = "xyes"
1646 AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
1647 if test "x${have_lirc}" = "xtrue"
1649 PLUGINS="${PLUGINS} lirc"
1650 lirc_LDFLAGS="${lirc_LDFLAGS} -llirc_client"
1654 AC_ARG_WITH(,[Misc options:])
1657 dnl Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
1659 dnl We give the user the opportunity to specify
1660 dnl --with-words=big or --with-words=little ; otherwise, try to guess
1663 [ --with-words=endianness set endianness (big or little)])
1664 case "x${with_words}" in
1666 ac_cv_c_bigendian=yes
1669 ac_cv_c_bigendian=no
1672 dnl Try to guess endianness by matching patterns on a compiled
1673 dnl binary, by looking for an ASCII or EBCDIC string
1674 AC_CACHE_CHECK([whether the byte order is big-endian],
1675 [ac_cv_c_bigendian],
1676 [ac_cv_c_bigendian="unknown"
1677 [cat >conftest.c <<EOF
1678 short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
1679 short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
1680 void _a(void) { char*s = (char*)am; s = (char *)ai; }
1681 short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
1682 short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
1683 void _e(void) { char*s = (char*)em; s = (char*)ei; }
1684 int main(void) { _a(); _e(); return 0; }
1687 if test -f conftest.c
1689 if ${CC-cc} -c conftest.c -o conftest.o >config.log 2>&1 \
1690 && test -f conftest.o
1692 if test "`strings conftest.o | grep BIGenDianSyS`"
1694 ac_cv_c_bigendian="yes"
1696 if test "`strings conftest.o | grep LiTTleEnDian`"
1698 ac_cv_c_bigendian="no"
1703 if test "x${ac_cv_c_bigendian}" = "xunknown"
1705 AC_MSG_ERROR([Could not guess endianness, please use --with-words])
1709 dnl Now we know what to use for endianness, just put it in the header
1710 if test "${ac_cv_c_bigendian}" = "yes"
1712 AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system)
1721 AC_ARG_ENABLE(gprof,
1722 [ --enable-gprof gprof profiling (default disabled)],
1723 [ if test "x${enable_gprof}" = "xyes"
1731 AC_ARG_ENABLE(cprof,
1732 [ --enable-cprof cprof profiling (default disabled)],
1733 [ if test "x${enable_cprof}" = "xyes"
1735 save_LDFLAGS="${save_LDFLAGS} -lcprof"; LDFLAGS="${save_LDFLAGS}"
1742 dnl GNU portable threads
1745 [ --enable-pth GNU Pth support (default disabled)],
1746 [ if test "x${enable_pth}" = "xyes"; then
1747 AC_CHECK_LIB(pth,pth_init)
1748 AC_EGREP_HEADER(pth_init,pth.h,[
1749 AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
1750 Define if <pth.h> defines pth_init)
1759 [ --enable-st State Threads (default disabled)],
1760 [ if test "x${enable_st}" = "xyes"; then
1761 AC_CHECK_LIB(st,st_init)
1762 AC_EGREP_HEADER(st_init,st.h,[
1763 AC_DEFINE(ST_INIT_IN_ST_H, 1,
1764 Define if <st.h> defines st_init)
1769 vlc_LDFLAGS="${vlc_LDFLAGS} ${THREAD_LIB}"
1770 plugins_LDFLAGS="${plugins_LDFLAGS} ${THREAD_LIB}"
1776 AC_ARG_ENABLE(mozilla,
1777 [ --enable-mozilla build a vlc-based Mozilla plugin (default disabled)])
1778 if test "x${enable_mozilla}" = "xyes"
1780 AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
1781 if test "x${MOZILLA_CONFIG}" != "xno"
1783 if test "x${SYS}" != "xmingw32"; then
1784 LDFLAGS="${save_LDFLAGS} -L${x_libraries}"
1785 AC_CHECK_LIB(Xt,XtStrings,[
1786 mozilla_LDFLAGS="${mozilla_LDFLAGS} -L${x_libraries} -lXt"
1788 LDFLAGS="${save_LDFLAGS}"
1791 mozilla_CFLAGS="${mozilla_CFLAGS} `${MOZILLA_CONFIG} --cflags plugin java --defines | xargs`"
1792 dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490
1793 mozilla_LDFLAGS="${mozilla_LDFLAGS} `${MOZILLA_CONFIG} --libs | sed 's#-I\(.*\)/mozilla/\([^ ]*\)#-I\1/\2 -I\1/mozilla/\2#g'`"
1798 dnl Plug-ins - this must be AT THE END
1800 AC_ARG_ENABLE(plugins,
1801 [ --disable-plugins make all plug-ins built-in (default plug-ins enabled)],
1802 [if test "x${enable_plugins}" = "xno"
1804 BUILTINS="${BUILTINS} ${PLUGINS}"
1808 dnl Automagically disable plug-ins if there is no system support for .so files
1809 dnl don't forget vlc-win32 still can load .so as plugins
1810 if test "x${ac_cv_header_dlfcn_h}" = "xno" -a "x${ac_cv_header_image_h}" = "xno" -a "x${SYS}" != "xmingw32"
1812 echo "*** Your system doesn't have plug-in support. All plug-ins will be compiled"
1814 BUILTINS="${BUILTINS} ${PLUGINS}"
1819 dnl Stuff used by the program
1821 AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "vlc ${VERSION} ${CODENAME} Copyright 1996-2002 VideoLAN", [Simple version string])
1822 AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VideoLAN Client - version ${VERSION} ${CODENAME} - (c) 1996-2002 VideoLAN", [Copyright string])
1823 AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
1825 VLC_SYMBOL="`echo ${VERSION} | tr .- __`"
1826 AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module functions])
1827 AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
1829 DATA_PATH="${ac_tool_prefix}/share/videolan"
1831 PLUGIN_PATH="${ac_tool_prefix}/share/videolan"
1832 AC_SUBST(PLUGIN_PATH)
1837 CPPFLAGS="${save_CPPFLAGS}"
1838 CFLAGS="${save_CFLAGS}"
1839 LDFLAGS="${save_LDFLAGS}"
1842 dnl Create the vlc-config script
1844 libvlc_LDFLAGS="${vlc_LDFLAGS} ${builtins_LDFLAGS}"
1845 for i in ${BUILTINS} ; do libvlc_LDFLAGS="${libvlc_LDFLAGS} ${libdir}/vlc/${i}.a `eval echo '$'{${i}_LDFLAGS}`" ; done
1846 AC_SUBST(libvlc_LDFLAGS)
1849 dnl Configuration is finished
1868 AC_SUBST(NEED_GETOPT)
1871 AC_SUBST(CFLAGS_OPTIM)
1872 AC_SUBST(CFLAGS_OPTIM_NODEBUG)
1875 AC_SUBST(vlc_CFLAGS)
1876 AC_SUBST(plugins_CFLAGS)
1877 AC_SUBST(builtins_CFLAGS)
1878 AC_SUBST(mozilla_CFLAGS)
1880 AC_SUBST(a52_CFLAGS)
1881 AC_SUBST(arts_CFLAGS)
1882 AC_SUBST(chroma_i420_yuy2_mmx_CFLAGS)
1883 AC_SUBST(dvd_CFLAGS)
1884 AC_SUBST(dvdread_CFLAGS)
1885 AC_SUBST(dvdplay_CFLAGS)
1886 AC_SUBST(mpeg_ts_dvbpsi_CFLAGS)
1887 AC_SUBST(directx_CFLAGS)
1888 AC_SUBST(esd_CFLAGS)
1889 AC_SUBST(familiar_CFLAGS)
1890 AC_SUBST(ffmpeg_CFLAGS)
1891 AC_SUBST(glide_CFLAGS)
1892 AC_SUBST(gnome_CFLAGS)
1893 AC_SUBST(gtk_CFLAGS)
1894 AC_SUBST(kde_CFLAGS)
1895 AC_SUBST(idctaltivec_CFLAGS)
1896 AC_SUBST(macosx_CFLAGS)
1897 AC_SUBST(mad_CFLAGS)
1898 AC_SUBST(memcpyaltivec_CFLAGS)
1899 AC_SUBST(motionaltivec_CFLAGS)
1901 AC_SUBST(sdl_CFLAGS)
1902 AC_SUBST(x11_CFLAGS)
1903 AC_SUBST(xvideo_CFLAGS)
1905 AC_SUBST(vlc_LDFLAGS)
1906 AC_SUBST(plugins_LDFLAGS)
1907 AC_SUBST(builtins_LDFLAGS)
1908 AC_SUBST(mozilla_LDFLAGS)
1910 AC_SUBST(a52_LDFLAGS)
1911 AC_SUBST(aa_LDFLAGS)
1912 AC_SUBST(alsa_LDFLAGS)
1913 AC_SUBST(arts_LDFLAGS)
1914 AC_SUBST(beos_LDFLAGS)
1915 AC_SUBST(chroma_i420_rgb_LDFLAGS)
1916 AC_SUBST(directx_LDFLAGS)
1917 AC_SUBST(dsp_LDFLAGS)
1918 AC_SUBST(dvd_LDFLAGS)
1919 AC_SUBST(dvdread_LDFLAGS)
1920 AC_SUBST(dvdplay_LDFLAGS)
1921 AC_SUBST(mpeg_ts_dvbpsi_LDFLAGS)
1922 AC_SUBST(esd_LDFLAGS)
1923 AC_SUBST(familiar_LDFLAGS)
1924 AC_SUBST(filter_distort_LDFLAGS)
1925 AC_SUBST(ffmpeg_LDFLAGS)
1926 AC_SUBST(mp4_LDFLAGS)
1927 AC_SUBST(ggi_LDFLAGS)
1928 AC_SUBST(glide_LDFLAGS)
1929 AC_SUBST(gnome_LDFLAGS)
1930 AC_SUBST(gtk_LDFLAGS)
1931 AC_SUBST(http_LDFLAGS)
1932 AC_SUBST(idctaltivec_LDFLAGS)
1933 AC_SUBST(imdct_LDFLAGS)
1934 AC_SUBST(imdct3dn_LDFLAGS)
1935 AC_SUBST(imdctsse_LDFLAGS)
1936 AC_SUBST(ipv4_LDFLAGS)
1937 AC_SUBST(ipv6_LDFLAGS)
1938 AC_SUBST(kde_LDFLAGS)
1939 AC_SUBST(lirc_LDFLAGS)
1940 AC_SUBST(macosx_LDFLAGS)
1941 AC_SUBST(mad_LDFLAGS)
1942 AC_SUBST(memcpyaltivec_LDFLAGS)
1943 AC_SUBST(motionaltivec_LDFLAGS)
1944 AC_SUBST(ncurses_LDFLAGS)
1945 AC_SUBST(qnx_LDFLAGS)
1946 AC_SUBST(qt_LDFLAGS)
1947 AC_SUBST(rc_LDFLAGS)
1948 AC_SUBST(sdl_LDFLAGS)
1949 AC_SUBST(vcd_LDFLAGS)
1950 AC_SUBST(vorbis_LDFLAGS)
1951 AC_SUBST(waveout_LDFLAGS)
1952 AC_SUBST(x11_LDFLAGS)
1953 AC_SUBST(xvideo_LDFLAGS)
1954 AC_SUBST(xosd_LDFLAGS)
1956 AC_OUTPUT([Makefile.config Makefile.opts po/Makefile.in vlc-config])
1957 chmod a+x vlc-config
1961 --------------------
1962 vlc version : ${VERSION}
1964 architecture : ${ARCH}
1965 optimizations : ${OPTIMS}
1967 debug mode : ${DEBUG}
1968 release : ${RELEASE}
1969 profiling : ${PROFILING}
1970 need builtin getopt : ${NEED_GETOPT}
1971 built-in modules :${BUILTINS}
1972 plug-in modules :${PLUGINS}
1973 mozilla plugin : ${MOZILLA}
1974 vlc aliases :${ALIASES}
1976 You may now tune Makefile.opts at your convenience, for instance to choose
1977 which modules get compiled as plugins.
1979 To build vlc and its plugins, type \`${VLC_MAKE}'.