1 dnl Autoconf settings for vlc
2 AC_INIT(include/main.h)
3 AC_CONFIG_HEADER(include/defs.h)
10 dnl Save CFLAGS and LDFLAGS
11 save_CFLAGS="${CFLAGS}"
12 save_CPPFLAGS="${CPPFLAGS}"
13 save_LDFLAGS="${LDFLAGS}"
20 dnl Find the right ranlib, even when cross-compiling
21 AC_CHECK_TOOL(RANLIB, ranlib, :)
22 AC_CHECK_TOOL(STRIP, strip, :)
23 AC_CHECK_TOOL(AR, ar, :)
24 AC_CHECK_TOOL(LD, ld, :)
26 dnl Check for GNU make
27 AC_PATH_PROG(GMAKE, gmake, no)
28 if test "x$GMAKE" = "xno"; then
29 AC_CACHE_CHECK([whether GNU make is installed],
31 [if make --version | grep -q -i gnu; then
34 echo "This software needs you to install GNU make to compile properly."
35 echo "You can get it from http://www.gnu.org/."
44 ALL_LINGUAS="de en_GB fr ja no ru nl pl"
46 AC_DEFINE_UNQUOTED(VLC_PACKAGE, "$PACKAGE", [Package name])
47 AC_DEFINE_UNQUOTED(VLC_VERSION, "$VERSION", [Package version])
54 dnl Check the operating system
56 case x"${target_os}" in
65 save_CFLAGS="${save_CFLAGS} -pthread"
66 dvd_LDFLAGS="${dvd_LDFLAGS} -ldvd"
67 vcd_LDFLAGS="${vcd_LDFLAGS} -ldvd"
71 save_CFLAGS="${save_CFLAGS} -pthread"
75 save_CFLAGS="${save_CFLAGS} -no-cpp-precomp"
79 AC_CHECK_TOOL(WINDRES, windres, :)
80 save_CFLAGS="${save_CFLAGS} -D_OFF_T_ -D_off_t=long"
81 vlc_LDFLAGS="${vlc_LDFLAGS} -mwindows -Xlinker --force-exe-suffix"
82 vlc_LDFLAGS="${vlc_LDFLAGS} -lws2_32 -lnetapi32"
83 ipv4_LDFLAGS="${ipv4_LDFLAGS} -lws2_32"
84 ipv6_LDFLAGS="${ipv6_LDFLAGS} -lws2_32"
85 http_LDFLAGS="${http_LDFLAGS} -lws2_32"
86 rc_LDFLAGS="${rc_LDFLAGS} -lws2_32"
90 x11_LDFLAGS="${x11_LDFLAGS} -lsocket"
91 xvideo_LDFLAGS="${xvideo_LDFLAGS} -lsocket"
95 save_CFLAGS="${save_CFLAGS} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"
96 vlc_LDFLAGS="${vlc_LDFLAGS} -lbe"
97 plugins_LDFLAGS="${plugins_LDFLAGS} -nostart"
98 beos_LDFLAGS="${beos_LDFLAGS} -lbe -lgame -lroot -ltracker -ltranslation -lstdc++.r4"
99 ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind"
106 dnl Flags for plugin compilation
107 if test x"${SYS}" != xmingw32; then
108 plugins_CFLAGS="${plugins_CFLAGS} -fPIC"
111 dnl Check for the need to include the mingwex lib for mingw32
112 if test x$SYS = xmingw32
114 AC_CHECK_LIB(mingwex,opendir,
115 AC_CHECK_LIB(mingw32,opendir,vlc_LDFLAGS="${vlc_LDFLAGS}",
116 [vlc_LDFLAGS="${vlc_LDFLAGS} -lmingwex"
117 gtk_LDFLAGS="${gtk_LDFLAGS} -lmingwex"])
121 dnl The -DSYS_FOO flag
122 save_CFLAGS="${save_CFLAGS} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"
124 dnl Check for system libs needed
125 AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll)
127 AC_CHECK_FUNC(connect,,[
128 AC_CHECK_LIB(socket,connect,
129 ipv4_LDFLAGS="${ipv4_LDFLAGS} -lsocket"
130 vlc_LDFLAGS="${vlc_LDFLAGS} -lsocket"
132 AC_CHECK_FUNC(gethostbyname,,[
133 AC_CHECK_LIB(nsl,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lnsl")
135 AC_CHECK_FUNC(gethostbyname,,[
136 AC_CHECK_LIB(bind,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind")
139 AC_CHECK_FUNC(nanosleep,have_nanosleep=1,[
140 AC_CHECK_LIB(rt,nanosleep,
141 [vlc_LDFLAGS="${vlc_LDFLAGS} -lrt"; have_nanosleep=1],
142 [AC_CHECK_LIB(posix4,nanosleep,
143 [vlc_LDFLAGS="${vlc_LDFLAGS} -lposix4"; have_nanosleep=1])]
146 if test x$have_nanosleep = x1; then
147 AC_DEFINE(HAVE_NANOSLEEP, 1,
148 Define if nanosleep is available.)
150 AC_CHECK_FUNC(inet_aton,,[
151 AC_CHECK_LIB(resolv,inet_aton,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lresolv")
153 AC_CHECK_FUNC(textdomain,,[
154 AC_CHECK_LIB(intl,textdomain,save_LDFLAGS="${save_LDFLAGS} -lintl")
159 AC_CHECK_FUNC(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
160 [ # FreeBSD has a gnugetopt library for this:
161 AC_CHECK_LIB([gnugetopt],[getopt_long],
162 [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) vlc_LDFLAGS="${vlc_LDFLAGS} -lgnugetopt"],
166 AC_CHECK_LIB(dl,dlopen,vlc_LDFLAGS="${vlc_LDFLAGS} -ldl")
168 imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
169 filter_distort_LDFLAGS="${filter_distort_LDFLAGS} -lm")
171 imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
172 imdct3dn_LDFLAGS="${imdct3dn_LDFLAGS} -lm"
173 imdctsse_LDFLAGS="${imdctsse_LDFLAGS} -lm"
174 chroma_i420_rgb_LDFLAGS="${chroma_i420_rgb_LDFLAGS} -lm"
177 dnl Check for pthreads - borrowed from XMMS
179 if test "x${THREAD_LIB}" = xerror; then
180 AC_CHECK_LIB(pthread,pthread_attr_init,THREAD_LIB="-lpthread")
182 if test "x${THREAD_LIB}" = xerror; then
183 AC_CHECK_LIB(pthreads,pthread_attr_init,THREAD_LIB="-lpthreads")
185 if test "x${THREAD_LIB}" = xerror; then
186 AC_CHECK_LIB(c_r,pthread_attr_init,THREAD_LIB="-lc_r")
188 if test "x${THREAD_LIB}" = xerror; then
189 AC_CHECK_FUNC(pthread_attr_init)
193 dnl Check for cthreads under GNU/Hurd for instance
194 AC_CHECK_LIB(threads,cthread_fork,THREAD_LIB="-lthreads")
196 dnl Check for misc headers
197 AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
198 AC_DEFINE(PTHREAD_COND_T_IN_PTHREAD_H, 1,
199 Define if <pthread.h> defines pthread_cond_t.)])
200 AC_EGREP_HEADER(strncasecmp,strings.h,[
201 AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
202 Define if <strings.h> defines strncasecmp.)])
204 dnl Check for headers
205 AC_CHECK_HEADERS(stdint.h getopt.h strings.h inttypes.h sys/int_types.h)
206 AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h)
207 AC_CHECK_HEADERS(dlfcn.h image.h)
208 AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
209 AC_CHECK_HEADERS(machine/param.h sys/shm.h)
210 AC_CHECK_HEADERS(linux/version.h)
214 dnl Mac OS X and other OSes don't have declaration for nanosleep
215 AC_EGREP_HEADER(nanosleep,time.h,[
216 AC_DEFINE(HAVE_DECL_NANOSLEEP, 1,
217 Define if <time.h> defines nanosleep.)
220 dnl Make sure we have timespecs
221 AC_EGREP_HEADER(timespec,sys/time.h,[
222 AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
223 Define if <sys/time.h> defines struct timespec.)
226 dnl Check for threads library
227 AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
230 if test x$SYS != xmingw32
232 if test x$x_includes = xNONE; then
233 x_includes=/usr/X11R6/include
235 if test x$x_libraries = xNONE; then
236 x_libraries=/usr/X11R6/lib
238 CPPFLAGS="$save_CPPFLAGS -I$x_includes"
239 AC_CHECK_HEADERS(X11/extensions/dpms.h, [
240 AC_EGREP_HEADER(DPMSInfo,X11/extensions/dpms.h,[
241 AC_DEFINE(DPMSINFO_IN_DPMS_H, 1,
242 Define if <X11/extensions/dpms.h> defines DPMSInfo.)
245 CPPFLAGS="$save_CPPFLAGS"
248 dnl Check for ntohl, etc.
249 AC_CACHE_CHECK([for ntohl in sys/param.h],
250 [ac_cv_c_ntohl_sys_param_h],
251 [CFLAGS="${save_CFLAGS} -Wall -Werror"
252 AC_TRY_COMPILE([#include <sys/param.h>],
253 [void foo() { int meuh; ntohl(meuh); }],
254 ac_cv_c_ntohl_sys_param_h=yes, ac_cv_c_ntohl_sys_param_h=no)])
255 if test x"$ac_cv_c_ntohl_sys_param_h" != x"no"; then
256 AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
259 dnl Check for inline function size limit
260 AC_CACHE_CHECK([if \$CC accepts -finline-limit],
261 [ac_cv_c_inline_limit],
262 [CFLAGS="${save_CFLAGS} -finline-limit-30000"
263 AC_TRY_COMPILE([],,ac_cv_c_inline_limit=yes, ac_cv_c_inline_limit=no)])
264 if test x"$ac_cv_c_inline_limit" != x"no"; then
265 save_CFLAGS="${save_CFLAGS} -finline-limit-30000"
268 dnl Check for -W or -w flags
269 AC_CACHE_CHECK([if \$CC accepts -Wall -Winline],
270 [ac_cv_c_Wall_Winline],
271 [CFLAGS="${save_CFLAGS} -Wall -Winline"
272 AC_TRY_COMPILE([],,ac_cv_c_Wall_Winline=yes, ac_cv_c_Wall_Winline=no)])
273 if test x"$ac_cv_c_Wall_Winline" != x"no"; then
274 save_CFLAGS="${save_CFLAGS} -Wall -Winline"
276 AC_CACHE_CHECK([if \$CC accepts -wall -winline],
277 [ac_cv_c_wall_winline],
278 [CFLAGS="${save_CFLAGS} -wall -winline"
279 AC_TRY_COMPILE([],,ac_cv_c_wall_winline=yes, ac_cv_c_wall_winline=no)])
280 if test x"$ac_cv_c_wall_winline" != x"no"; then
281 save_CFLAGS="${save_CFLAGS} -wall -winline"
286 AC_CACHE_CHECK([if \$CC accepts -pipe],
288 [CFLAGS="${save_CFLAGS} -pipe"
289 AC_TRY_COMPILE([],,ac_cv_c_pipe=yes, ac_cv_c_pipe=no)])
290 if test x"$ac_cv_c_pipe" != x"no"; then
291 save_CFLAGS="${save_CFLAGS} -pipe"
294 dnl Check for various optimization flags
295 AC_CACHE_CHECK([if \$CC accepts -O3],
297 [CFLAGS="${save_CFLAGS} -O3"
298 AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)])
299 if test x"$ac_cv_c_o3" != x"no"; then
300 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
302 AC_CACHE_CHECK([if \$CC accepts -O2],
304 [CFLAGS="${save_CFLAGS} -O2"
305 AC_TRY_COMPILE([],,ac_cv_c_o2=yes, ac_cv_c_o2=no)])
306 if test x"$ac_cv_c_o2" != x"no"; then
307 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
309 AC_CACHE_CHECK([if \$CC accepts -O],
311 [CFLAGS="${save_CFLAGS} -O"
312 AC_TRY_COMPILE([],,ac_cv_c_o=yes, ac_cv_c_o=no)])
313 if test x"$ac_cv_c_o" != x"no"; then
314 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
319 dnl Check for -ffast-math
320 AC_CACHE_CHECK([if \$CC accepts -ffast-math],
322 [CFLAGS="${save_CFLAGS} -ffast-math"
323 AC_TRY_COMPILE([],,ac_cv_c_fast_math=yes, ac_cv_c_fast_math=no)])
324 if test x"$ac_cv_c_fast_math" != x"no"; then
325 CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
328 dnl Check for -funroll-loops
329 AC_CACHE_CHECK([if \$CC accepts -funroll-loops],
330 [ac_cv_c_unroll_loops],
331 [CFLAGS="${save_CFLAGS} -funroll-loops"
332 AC_TRY_COMPILE([],,ac_cv_c_unroll_loops=yes, ac_cv_c_unroll_loops=no)])
333 if test x"$ac_cv_c_unroll_loops" != x"no"; then
334 CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
337 dnl Check for -fomit-frame-pointer
338 AC_CACHE_CHECK([if \$CC accepts -fomit-frame-pointer],
339 [ac_cv_c_omit_frame_pointer],
340 [CFLAGS="${save_CFLAGS} -fomit-frame-pointer"
341 AC_TRY_COMPILE([],,ac_cv_c_omit_frame_pointer=yes, ac_cv_c_omit_frame_pointer=no)])
342 if test x"$ac_cv_c_omit_frame_pointer" != x"no"; then
343 CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
346 dnl Check for fnative-struct or mms-bitfields support for mingw32
347 if test x$SYS = xmingw32
349 AC_CACHE_CHECK([if \$CC accepts -mms-bitfields],
350 [ac_cv_c_mms_bitfields],
351 [CFLAGS="${save_CFLAGS} -mms-bitfields"
352 AC_TRY_COMPILE([],,ac_cv_c_mms_bitfields=yes,
353 ac_cv_c_mms_bitfields=no)])
354 if test x"$ac_cv_c_mms_bitfields" != x"no"; then
355 save_CFLAGS="${save_CFLAGS} -mms-bitfields"
356 plugins_CFLAGS="${plugins_CFLAGS} -mms-bitfields"
358 save_CFLAGS="${save_CFLAGS} -fnative-struct"
359 plugins_CFLAGS="${plugins_CFLAGS} -fnative-struct"
363 dnl Check for Darwin plugin linking flags
364 AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error -lcc_dynamic],
366 [CFLAGS="${save_CFLAGS} -bundle -undefined error -lcc_dynamic"
367 AC_TRY_COMPILE([],,ac_cv_ld_darwin=yes, ac_cv_ld_darwin=no)])
368 if test x"$ac_cv_ld_darwin" != x"no"; then
369 plugins_LDFLAGS="${plugins_LDFLAGS} -bundle -undefined error -lcc_dynamic"
372 dnl Check for standard plugin linking flags
373 AC_CACHE_CHECK([if \$CC accepts -shared],
375 [CFLAGS="${save_CFLAGS} -shared"
376 AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
377 if test x"$ac_cv_ld_plugins" != x"no"; then
378 plugins_LDFLAGS="${plugins_LDFLAGS} -shared"
381 dnl Check for variadic macros
382 AC_CACHE_CHECK([for variadic cpp macros],
383 [ac_cv_cpp_variadic_macros],
384 [CFLAGS="${save_CFLAGS}"
387 #define a(b,c...) printf(b,##c)],
388 [a("foo");a("%s","bar");a("%s%s","baz","quux");],
389 ac_cv_cpp_variadic_macros=yes,
390 ac_cv_cpp_variadic_macros=no)])
391 if test x"$ac_cv_cpp_variadic_macros" != x"no"; then
392 AC_DEFINE(HAVE_VARIADIC_MACROS, 1, Support for variadic macros)
395 dnl Checks for __attribute__(aligned()) directive
396 AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
397 [ac_cv_c_attribute_aligned],
398 [ac_cv_c_attribute_aligned=0
399 CFLAGS="${save_CFLAGS} -Werror"
400 for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
402 [static char c __attribute__ ((aligned($ac_cv_c_attr_align_try))) = 0; return c;],
403 [ac_cv_c_attribute_aligned=$ac_cv_c_attr_align_try])
405 if test x"$ac_cv_c_attribute_aligned" != x"0"; then
406 AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
407 [$ac_cv_c_attribute_aligned],[Maximum supported data alignment])
410 dnl End of the bizarre compilation tests
411 CFLAGS="${save_CFLAGS}"
412 CPPFLAGS="${save_CPPFLAGS}"
413 LDFLAGS="${save_LDFLAGS}"
415 dnl Check for boolean_t
416 AC_CACHE_CHECK([for boolean_t in sys/types.h],
417 [ac_cv_c_boolean_t_sys_types_h],
418 [AC_TRY_COMPILE([#include <sys/types.h>], [boolean_t foo;],
419 ac_cv_c_boolean_t_sys_types_h=yes, ac_cv_c_boolean_t_sys_types_h=no)])
420 if test x"$ac_cv_c_boolean_t_sys_types_h" != x"no"; then
421 AC_DEFINE(BOOLEAN_T_IN_SYS_TYPES_H, 1, Define if <sys/types.h> defines boolean_t.)
424 AC_CACHE_CHECK([for boolean_t in pthread.h],
425 [ac_cv_c_boolean_t_pthread_h],
426 [AC_TRY_COMPILE([#include <pthread.h>], [boolean_t foo;],
427 ac_cv_c_boolean_t_pthread_h=yes, ac_cv_c_boolean_t_pthread_h=no)])
428 if test x"$ac_cv_c_boolean_t_pthread_h" != x"no"; then
429 AC_DEFINE(BOOLEAN_T_IN_PTHREAD_H, 1, Define if <pthread.h> defines boolean_t.)
432 AC_CACHE_CHECK([for boolean_t in cthreads.h],
433 [ac_cv_c_boolean_t_cthreads_h],
434 [AC_TRY_COMPILE([#include <cthreads.h>], [boolean_t foo;],
435 ac_cv_c_boolean_t_cthreads_h=yes, ac_cv_c_boolean_t_cthreads_h=no)])
436 if test x"$ac_cv_c_boolean_t_cthreads_h" != x"no"; then
437 AC_DEFINE(BOOLEAN_T_IN_CTHREADS_H, 1, Define if <cthreads.h> defines boolean_t.)
443 case x"${target_cpu}" in
455 BUILTINS="${BUILTINS} idct idctclassic motion imdct downmix chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga mpeg_adec ac3_adec mpeg_vdec"
456 PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_ps mpeg_ts mpeg_audio file memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort filter_clone filter_crop fx_scope"
461 NETWORK_MODULES="udp http rtp ipv4"
464 dnl Accelerated modules
466 MMX_MODULES="memcpymmx idctmmx motionmmx chroma_i420_rgb_mmx chroma_i420_yuy2_mmx chroma_i422_yuy2_mmx chroma_i420_ymga_mmx"
467 MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
468 THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
469 SSE_MODULES="imdctsse downmixsse"
470 ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
472 if test x$SYS != xbeos
474 PLUGINS="${PLUGINS} ${NETWORK_MODULES}"
477 AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
479 [AC_TRY_COMPILE(,[void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));],
480 ac_cv_mmx_inline=yes, ac_cv_mmx_inline=no)])
481 if test x"$ac_cv_mmx_inline" != x"no"; then
482 ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
485 AC_CACHE_CHECK([if \$CC groks MMX EXT inline assembly],
486 [ac_cv_mmxext_inline],
487 [AC_TRY_COMPILE(,[void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));],
488 ac_cv_mmxext_inline=yes, ac_cv_mmxext_inline=no)])
489 if test x"$ac_cv_mmxext_inline" != x"no"; then
490 ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
493 AC_CACHE_CHECK([if \$CC groks 3D Now! inline assembly],
494 [ac_cv_3dnow_inline],
495 [AC_TRY_COMPILE(,[void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));],
496 ac_cv_3dnow_inline=yes, ac_cv_3dnow_inline=no)])
497 if test x"$ac_cv_3dnow_inline" != x"no"; then
498 AC_DEFINE(CAN_COMPILE_3DNOW, 1, Define if \$CC groks 3D Now! inline assembly.)
499 ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
502 AC_CACHE_CHECK([if \$CC groks SSE inline assembly],
504 [AC_TRY_COMPILE(,[void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));],
505 ac_cv_sse_inline=yes, ac_cv_sse_inline=no)])
506 if test x"$ac_cv_sse_inline" != x"no" -a x$SYS != xmingw32; then
507 AC_DEFINE(CAN_COMPILE_SSE, 1, Define if \$CC groks SSE inline assembly.)
508 ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
511 # don't try to grok altivec with native mingw32 it doesn't work right now
512 # we should be able to remove this test with future versions of mingw32
513 if test x$SYS != xmingw32; then
514 AC_CACHE_CHECK([if \$CC groks Altivec inline assembly],
515 [ac_cv_altivec_inline],
516 [AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
517 ac_cv_altivec_inline=yes,
519 CFLAGS="$CFLAGS -Wa,-m7400"
520 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
521 [ac_cv_altivec_inline="-Wa,-m7400"],
522 ac_cv_altivec_inline=no)
525 if test x"$ac_cv_altivec_inline" != x"no"; then
526 AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks ALTIVEC inline assembly.)
527 if test x"$ac_cv_altivec_inline" != x"yes"; then
528 idctaltivec_CFLAGS="$idctaltivec_CFLAGS $ac_cv_altivec_inline"
529 motionaltivec_CFLAGS="$motionaltivec_CFLAGS $ac_cv_altivec_inline"
530 memcpyaltivec_CFLAGS="$memcpyaltivec_CFLAGS $ac_cv_altivec_inline"
531 vlc_CFLAGS="$vlc_CFLAGS $ac_cv_altivec_inline"
533 ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
536 AC_CACHE_CHECK([if \$CC groks Altivec C extensions],
539 CFLAGS="$CFLAGS -faltivec"
541 AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
542 ac_cv_c_altivec=-faltivec, [
544 CFLAGS="$save_CFLAGS $idctaltivec_CFLAGS -fvec"
545 AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
546 [ac_cv_c_altivec="-fvec"], ac_cv_c_altivec=no)
550 if test x"$ac_cv_c_altivec" != x"no"; then
551 AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C altivec extensions.)
552 idctaltivec_CFLAGS="$idctaltivec_CFLAGS $ac_cv_c_altivec"
553 motionaltivec_CFLAGS="$motionaltivec_CFLAGS $ac_cv_c_altivec"
554 memcpyaltivec_CFLAGS="$memcpyaltivec_CFLAGS $ac_cv_c_altivec"
555 vlc_CFLAGS="$vlc_CFLAGS $ac_cv_c_altivec"
556 ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
559 AC_CACHE_CHECK([if linker needs -framework vecLib],
561 [save_LDFLAGS=$LDFLAGS
562 LDFLAGS="$LDFLAGS -framework vecLib"
563 AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)
564 LDFLAGS=$save_LDFLAGS
566 if test x"$ac_cv_ld_altivec" != x"no"; then
567 idctaltivec_LDFLAGS="${idctaltivec_LDFLAGS} -framework vecLib"
568 motionaltivec_LDFLAGS="${motionaltivec_LDFLAGS} -framework vecLib"
569 memcpyaltivec_LDFLAGS="${memcpyaltivec_LDFLAGS} -framework vecLib"
570 vlc_LDFLAGS="${vlc_LDFLAGS} -framework vecLib"
576 AC_ARG_WITH(,[Optimization options:])
579 dnl Special arch tuning
582 [ --with-tuning=ARCH enable special tuning for an architecture
583 (default i686 on IA-32 and 750 on PPC)])
584 if test "x$with_tuning" != "x"; then
585 TUNING="$with_tuning"
587 if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xi486 -o x${target_cpu} = xi386; then TUNING="pentiumpro"
589 if test x${target_cpu} = xpowerpc; then TUNING="750"; fi
594 dnl x86 accelerations
596 if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xx86 -o x${target_cpu} = xi386
599 BUILTINS="${BUILTINS} ${ACCEL_MODULES}"
603 dnl Enable/disable optimizations
605 AC_ARG_ENABLE(optimizations,
606 [ --disable-optimizations disable compiler optimizations (default enabled)],
607 [ if test x$enable_optimizations = xno; then OPTIMS=0; fi ],
611 dnl AltiVec acceleration
613 AC_ARG_ENABLE(altivec,
614 [ --disable-altivec disable altivec optimizations (default enabled on PPC)],
615 [ if test x$enable_altivec = xyes; then ARCH="${ARCH} altivec";
616 BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ],
617 [ if test x${target_cpu} = xpowerpc; then ARCH="${ARCH} altivec";
618 BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ])
625 [ --enable-debug debug mode (default disabled)],
626 [ if test x$enable_debug = xyes; then DEBUG=1; fi ])
629 dnl Enable release-specific flags
632 AC_ARG_ENABLE(release,
633 [ --enable-release activate extra optimizations (default disabled)],
634 [ if test x$enable_release = xyes; then RELEASE=1; fi ],
635 [ VERSION="${VERSION}_`date +%Y-%m-%d`" ])
641 AC_ARG_WITH(,[Input plugins:])
644 dnl DVD module: optionally check for installed libdvdcss
647 [ --enable-dvd DVD input module (default enabled)])
648 if test "x$enable_dvd" != "xno"
651 [ --with-dvdcss=PATH libdvdcss headers and libraries])
652 AC_ARG_WITH(dvdcss-tree,
653 [ --with-dvdcss-tree=PATH libdvdcss tree for static linking])
654 case "x$with_dvdcss" in
656 if test "x$with_dvdcss_tree" = x
658 AC_CHECK_HEADERS(dvdcss/dvdcss.h,
659 [ PLUGINS="${PLUGINS} dvd"
660 dvd_LDFLAGS="${dvd_LDFLAGS} -ldvdcss" ],
661 [ 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.])
662 AC_MSG_ERROR([cannot find libdvdcss headers]) ])
664 AC_MSG_CHECKING(for libdvdcss.a in ${with_dvdcss_tree})
665 real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
666 if test "x$real_dvdcss_tree" = x
668 dnl The given directory can't be found
670 AC_MSG_ERROR([cannot cd to ${with_dvdcss_tree}])
672 if test -f "${real_dvdcss_tree}/src/.libs/libdvdcss.a"
674 dnl Use a custom libdvdcss
675 AC_MSG_RESULT(${real_dvdcss_tree}/src/.libs/libdvdcss.a)
676 BUILTINS="${BUILTINS} dvd"
677 dvd_LDFLAGS="${dvd_LDFLAGS} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
678 dvd_CFLAGS="${dvd_CFLAGS} -I${real_dvdcss_tree}/src"
680 dnl The given libdvdcss wasn't built
682 AC_MSG_ERROR([cannot find ${real_dvdcss_tree}/src/.libs/libdvdcss.a, make sure you compiled libdvdcss in ${with_dvdcss_tree}])
687 dnl Compile without dvdcss (dlopen version, works only under Linux)
688 PLUGINS="${PLUGINS} dvd"
689 dvd_CFLAGS="${dvd_CFLAGS} -DGOD_DAMN_DMCA"
690 dvd_LDFLAGS="${dvd_LDFLAGS} -ldl"
693 AC_MSG_CHECKING(for dvdcss headers in ${with_dvdcss})
694 if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
696 dnl Use ${with_dvdcss}/include/dvdcss/dvdcss.h
698 PLUGINS="${PLUGINS} dvd"
699 dvd_LDFLAGS="${dvd_LDFLAGS} -L${with_dvdcss}/lib -ldvdcss"
700 dvd_CFLAGS="${dvd_CFLAGS} -I${with_dvdcss}/include"
702 dnl No libdvdcss could be found, sorry
704 AC_MSG_ERROR([cannot find ${with_dvdcss}/include/dvdcss/dvdcss.h])
711 dnl dvdread module: check for libdvdread plugin
713 AC_ARG_ENABLE(dvdread,
714 [ --enable-dvdread dvdread input module (default disabled)])
715 if test "x$enable_dvdread" != "xno"
718 [ --with-dvdread=PATH libdvdread headers and libraries])
719 if test "x$with_dvdread" = x
724 test_LDFLAGS="-L${with_dvdread}/lib"
725 test_CFLAGS="-I${with_dvdread}/include"
727 CPPFLAGS="$save_CPPFLAGS $test_CFLAGS"
728 AC_CHECK_HEADERS(dvdread/dvd_reader.h, [
729 AC_TRY_COMPILE([#include <dvdread/dvd_reader.h>],
730 [void foo() { int i=DVD_VIDEO_LB_LEN; }],[
731 PLUGINS="${PLUGINS} dvdread"
732 dvdread_LDFLAGS="${dvdread_LDFLAGS} ${test_LDFLAGS} -ldvdread"
733 dvdread_CFLAGS="${dvdread_CFLAGS} ${test_CFLAGS}"
735 if test "x$enable_dvdread" != x
737 AC_MSG_ERROR([Cannot find DVD_VIDEO_LB_LEN in dvdread/dvd_reader.h, please install libdvdread version 0.9.2 or later])
741 if test "x$enable_dvdread" != x
743 if test "x$with_dvdread" != x
745 AC_MSG_ERROR([Cannot find dvdread/dvd_reader.h in ${with_dvdread}/include])
747 AC_MSG_ERROR([Cannot find dvdread/dvd_reader.h])
751 CPPFLAGS="$save_CPPFLAGS"
755 dnl libdvbpsi ts demux
757 AC_ARG_ENABLE(dvbpsi,
758 [ --enable-dvbpsi dvbpsi ts demux module (default disabled)])
759 if test "x$enable_dvbpsi" != "xno"
762 [ --with-dvbpsi=PATH libdvbpsi headers and libraries])
764 [ --with-dvbpsi-tree=PATH libdvbpsi tree for static linking])
765 case "x$with_dvbpsi" in
767 if test "x$with_dvbpsi_tree" = x
769 AC_CHECK_HEADERS(dvbpsi/dr.h,
770 [ PLUGINS="${PLUGINS} mpeg_ts_dvbpsi"
771 mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} -ldvbpsi" ], [],
772 [ AC_MSG_ERROR([cannot find libdvbpsi headers]) ])
774 AC_MSG_CHECKING(for libdvbpsi.a in ${with_dvbpsi_tree})
775 real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
776 if test "x$real_dvbpsi_tree" = x
778 dnl The given directory can't be found
780 AC_MSG_ERROR([cannot cd to ${with_dvbpsi_tree}])
782 if test -f "${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
784 dnl Use a custom libdvbpsi
785 AC_MSG_RESULT(${real_dvbpsi_tree}/src/.libs/libdvbpsi.a)
786 BUILTINS="${BUILTINS} mpeg_ts_dvbpsi"
787 mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
788 mpeg_ts_dvbpsi_CFLAGS="${mpeg_ts_dvbpsi_CFLAGS} -I${real_dvbpsi_tree}/src"
790 dnl The given libdvbpsi wasn't built
792 AC_MSG_ERROR([cannot find ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a, make sure you compiled libdvbpsi in ${with_dvbpsi_tree}])
797 dnl Compile without dvbpsi (dlopen version, works only under Linux)
800 AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi})
801 if test "x$with_dvbpsi" = x
806 test_LDFLAGS="-L${with_dvbpsi}/lib"
807 test_CFLAGS="-I${with_dvbpsi}/include"
809 CPPFLAGS="$save_CPPFLAGS $test_CFLAGS"
810 AC_CHECK_HEADER([dvbpsi/dr.h],[
811 PLUGINS="${PLUGINS} mpeg_ts_dvbpsi"
812 mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} ${test_LDFLAGS} -ldvbpsi"
813 mpeg_ts_dvbpsi_CFLAGS="${mpeg_ts_dvbpsi_CFLAGS} ${test_CFLAGS}"
815 if test "x$enable_dvbpsi" != x
817 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])
820 CPPFLAGS="$save_CPPFLAGS"
829 [ --enable-vcd VCD support for Linux, FreeBSD and MacOS X (default enabled)])
831 if test x$enable_vcd != xno
833 AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
834 PLUGINS="${PLUGINS} vcd"
837 AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
838 PLUGINS="${PLUGINS} vcd"
839 AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
842 if test "x${SYS}" = "xbsdi"
844 PLUGINS="${PLUGINS} vcd"
847 if test "x${SYS}" = "xdarwin"
849 PLUGINS="${PLUGINS} vcd"
850 vcd_LDFLAGS="${vcd_LDFLAGS} -framework IOKit -framework CoreFoundation"
855 dnl Satellite input module
857 AC_ARG_ENABLE(satellite,
858 [ --enable-satellite satellite card support (default disabled)],
859 [ if test x$enable_satellite = xyes
861 PLUGINS="${PLUGINS} satellite"
865 dnl ipv6 plugin - not for QNX yet
867 if test x$SYS != xnto && test "x$SYS" != "xmingw32"
869 AC_CHECK_FUNC(inet_pton,[PLUGINS="${PLUGINS} ipv6"])
871 if test "x$SYS" = "xmingw32"
873 AC_MSG_CHECKING(for getaddrinfo in ws2tcpip.h)
874 AC_EGREP_HEADER(addrinfo,ws2tcpip.h,[AC_MSG_RESULT(yes)
875 PLUGINS="${PLUGINS} ipv6"],[AC_MSG_RESULT(no)])
882 [ --enable-avi AVI demux module (default enabled)])
883 if test x$enable_avi != xno
885 PLUGINS="${PLUGINS} avi"
892 AC_ARG_WITH(,[Codec plugins:])
898 [ --enable-mad libmad module (default disabled)])
899 if test x$enable_mad = xyes
902 [ --with-mad=PATH path to libmad],[],[])
903 if test "x$with_mad" != "xno" -a "x$with_mad" != "x"
905 mad_CFLAGS="${mad_CFLAGS} -I$with_mad/include"
906 mad_LDFLAGS="${mad_LDFLAGS} -L$with_mad/lib"
909 AC_ARG_WITH(mad-tree,
910 [ --with-mad-tree=PATH mad tree for static linking],[],[])
911 if test "x$with_mad_tree" != "xno" -a "x$with_mad_tree" != "x"
913 real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
914 if test "x$real_mad_tree" = x
916 dnl The given directory can't be found
918 AC_MSG_ERROR([${with_mad_tree} directory doesn't exist])
920 dnl Use a custom libmad
921 AC_MSG_CHECKING(for mad.h in ${real_mad_tree}/libmad)
922 if test -f ${real_mad_tree}/libmad/mad.h
925 mad_CFLAGS="${mad_CFLAGS} -I${real_mad_tree}/libmad"
926 mad_LDFLAGS="${mad_LDFLAGS} -L${real_mad_tree}/libmad/.libs"
927 save_LDFLAGS=$LDFLAGS
929 AC_CHECK_LIB(mad, mad_bit_init, [
930 BUILTINS="${BUILTINS} mad"
931 mad_LDFLAGS="${mad_LDFLAGS} -lmad"
932 ],[ AC_MSG_ERROR([the specified tree hasn't been compiled ])
934 LDFLAGS=$save_LDFLAGS
937 AC_MSG_ERROR([the specified tree doesn't have mad.h])
941 save_LDFLAGS=$LDFLAGS
942 CFLAGS="$CFLAGS $mad_CFLAGS"
943 LDFLAGS="$LDFLAGS $mad_LDFLAGS"
944 AC_CHECK_HEADERS(mad.h, ,
945 [ AC_MSG_ERROR([Cannot find development headers for libmad...]) ])
946 AC_CHECK_LIB(mad, mad_bit_init, [
947 PLUGINS="${PLUGINS} mad"
948 mad_LDFLAGS="${mad_LDFLAGS} -lmad" ],
949 [ AC_MSG_ERROR([Cannot find libmad library...]) ])
951 LDFLAGS=$save_LDFLAGS
956 dnl ffmpeg decoder plugin
958 AC_ARG_ENABLE(ffmpeg,
959 [ --enable-ffmpeg ffmpeg codec (default disabled)])
960 if test "x$enable_ffmpeg" = "xyes"
963 [ --with-ffmpeg=PATH path to ffmpeg installation],[],[])
964 if test "x$with_ffmpeg" != "xno" -a "x$with_ffmpeg" != "x"
966 ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I$with_ffmpeg/include/libffmpeg"
967 ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -L$with_ffmpeg/lib"
970 AC_ARG_WITH(ffmpeg-tree,
971 [ --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
972 if test "x$with_ffmpeg_tree" != "x"
974 AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
975 real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
976 if test "x$real_ffmpeg_tree" = x
978 dnl The given directory can't be found
980 AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
982 if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"
984 dnl Use a custom libffmpeg
985 AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
986 BUILTINS="${BUILTINS} ffmpeg"
987 ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} ${real_ffmpeg_tree}/libavcodec/libavcodec.a"
988 if test x$SYS != xbeos
990 ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lm"
992 ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I${real_ffmpeg_tree}/libavcodec"
994 dnl The given libavcodec wasn't built
996 AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
1000 save_LDFLAGS=$LDFLAGS
1001 CFLAGS="$CFLAGS $ffmpeg_CFLAGS"
1002 LDFLAGS="$LDFLAGS $ffmpeg_LDFLAGS"
1003 if test x$SYS != xbeos
1005 ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lm"
1007 AC_CHECK_LIB(avcodec, avcodec_init, [
1008 BUILTINS="${BUILTINS} ffmpeg"
1009 ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lavcodec"
1010 if test x$SYS != xbeos
1012 ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lm"
1014 [ AC_MSG_ERROR([Cannot find libavcodec library...]) ])
1016 LDFLAGS=$save_LDFLAGS
1021 dnl special case for BeOS
1022 if test x$SYS = xbeos
1024 PLUGINS="${PLUGINS} beos"
1028 dnl a52 AC3 decoder plugin
1031 [ --enable-a52 AC3 support with liba52 (default enabled)])
1032 if test "x$enable_a52" != "xno"
1034 AC_ARG_WITH(a52-tree,
1035 [ --with-a52-tree=PATH a52dec tree for static linking ],[],[])
1036 if test "x$with_a52_tree" != "xno" -a "x$with_a52_tree" != "x"
1038 real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
1039 if test "x$real_a52_tree" = x
1041 dnl The given directory can't be found
1043 AC_MSG_ERROR([${with_a52_tree} directory doesn't exist])
1045 dnl Use a custom a52dec
1046 AC_MSG_CHECKING(for a52.h in ${real_a52_tree}/include)
1047 if test -f ${real_a52_tree}/include/a52.h
1050 a52_CFLAGS="${a52_CFLAGS} -I${real_a52_tree}"
1051 a52_LDFLAGS="${a52_LDFLAGS} -L${real_a52_tree}/liba52/.libs"
1052 save_LDFLAGS=$LDFLAGS
1053 LDFLAGS="$a52_LDFLAGS $LDFLAGS"
1054 AC_CHECK_LIB(a52, a52_free, [
1055 BUILTINS="${BUILTINS} a52"
1056 a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
1057 a52_CFLAGS="${a52_CFLAGS} -DUSE_A52DEC_TREE"
1059 if test -f ${real_a52_tree}/liba52/.libs/liba52.a
1061 AC_MSG_ERROR([make sure you have at least a52dec-0.7.3])
1063 AC_MSG_ERROR([the specified tree hasn't been compiled])
1066 LDFLAGS=$save_LDFLAGS
1069 AC_MSG_ERROR([the specified tree doesn't have a52.h])
1071 else dnl no with args
1072 AC_CHECK_HEADERS(a52dec/a52.h, [
1073 AC_CHECK_LIB(a52, a52_free, [
1074 BUILTINS="${BUILTINS} a52"
1075 a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
1076 a52_CFLAGS="${a52_CFLAGS}"
1083 dnl ogg vorbis plugin
1085 AC_ARG_ENABLE(vorbis,
1086 [ --enable-vorbis Ogg/Vorbis decoder support (default enabled)])
1087 if test "x$enable_vorbis" != "xno"
1089 AC_CHECK_HEADERS(ogg/ogg.h, [
1090 dnl disabled for the moment
1091 #PLUGINS="${PLUGINS} vorbis"
1092 vorbis_LDFLAGS="${vorbis_LDFLAGS} -lvorbis"
1100 AC_ARG_WITH(,[Video plugins:])
1104 dnl (enabled by default except on win32)
1107 [ --enable-x11 X11 support (default enabled)])
1108 if test x$enable_x11 != xno &&
1109 (test x$SYS != xmingw32 || test x$enable_x11 = xyes); then
1110 if test x$x_includes = xNONE; then
1111 x_includes=/usr/X11R6/include
1113 if test x$x_libraries = xNONE; then
1114 x_libraries=/usr/X11R6/lib
1116 CPPFLAGS="$save_CPPFLAGS -I$x_includes"
1117 AC_CHECK_HEADERS(X11/Xlib.h, [
1118 PLUGINS="${PLUGINS} x11"
1119 x11_LDFLAGS="${x11_LDFLAGS} -L$x_libraries -lX11 -lXext"
1120 x11_CFLAGS="${x11_CFLAGS} -I$x_includes"
1122 CPPFLAGS="$save_CPPFLAGS"
1127 dnl (enabled by default except on win32)
1129 AC_ARG_ENABLE(xvideo,
1130 [ --enable-xvideo XVideo support (default enabled)])
1131 if test x$enable_xvideo != xno &&
1132 (test x$SYS != xmingw32 || test x$enable_xvideo = xyes); then
1133 if test x$x_includes = xNONE; then
1134 x_includes=/usr/X11R6/include
1136 if test x$x_libraries = xNONE; then
1137 x_libraries=/usr/X11R6/lib
1139 save_CPPFLAGS=$CPPFLAGS
1140 CPPFLAGS="$save_CPPFLAGS -I$x_includes"
1141 AC_CHECK_HEADERS(X11/extensions/Xv.h, [
1143 CFLAGS="$CFLAGS -L$x_libraries -lX11 -lXext"
1144 AC_CHECK_LIB(Xv_pic,XvSetPortAttribute,
1145 # We have Xv_pic, that's good, we can build an xvideo.so plugin !
1146 PLUGINS="${PLUGINS} xvideo"
1147 xvideo_LDFLAGS="${xvideo_LDFLAGS} -L$x_libraries -lX11 -lXext -lXv_pic"
1148 xvideo_CFLAGS="${xvideo_CFLAGS} -I$x_includes",
1149 # We don't have Xv_pic, let's make xvideo.a as builtin
1150 BUILTINS="${BUILTINS} xvideo"
1151 xvideo_LDFLAGS="${xvideo_LDFLAGS} -L$x_libraries -lX11 -lXext -lXv"
1152 xvideo_CFLAGS="${xvideo_CFLAGS} -I$x_includes")
1153 CFLAGS="$save_CFLAGS"
1155 CPPFLAGS="$save_CPPFLAGS")
1162 [ --enable-sdl SDL support (default enabled)])
1163 if test "x$enable_sdl" != "xno"
1166 AC_ARG_WITH(sdl-config-path,
1167 [ --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)],
1168 [ if test "x$with_sdl_config_path" != "xno"
1170 SDL_PATH="$with_sdl_config_path:$PATH"
1172 AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no, $SDL_PATH)
1173 SDL_CONFIG=${SDL12_CONFIG}
1174 SDL_HEADER="SDL12/SDL.h"
1175 if test x${SDL_CONFIG} = xno
1177 AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no, $SDL_PATH)
1178 SDL_CONFIG=${SDL11_CONFIG}
1179 SDL_HEADER="SDL11/SDL.h"
1181 if test x${SDL_CONFIG} = xno
1183 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, $SDL_PATH)
1184 SDL_HEADER="SDL/SDL.h"
1186 # check for cross-compiling
1188 AC_ARG_WITH(sdl-prefix,
1189 [ --with-sdl-prefix=PATH path to libsdl (needed for cross-compiling),
1191 --with-sdl-prefix=/usr/local/arm/2.95.3/arm-linux/usr)],[],[])
1192 if test "x$with_sdl_prefix" != "xno" -a "x$with_sdl_prefix" != "x"
1194 SDL_PREFIX="--prefix=$with_sdl_prefix"
1196 if test x${SDL_CONFIG} != xno
1198 PLUGINS="${PLUGINS} sdl"
1199 sdl_CFLAGS="${sdl_CFLAGS} `${SDL_CONFIG} ${SDL_PREFIX} --cflags | sed 's,SDL,,'`"
1200 sdl_LDFLAGS="${sdl_LDFLAGS} `${SDL_CONFIG} ${SDL_PREFIX} --libs | sed 's,-rdynamic,,'`"
1201 CPPFLAGS="$save_CPPFLAGS $sdl_CFLAGS"
1202 AC_CHECK_HEADERS(${SDL_HEADER}, AC_DEFINE_UNQUOTED(SDL_INCLUDE_FILE,
1203 <${SDL_HEADER}>, Indicate whether we should use SDL/SDL.h or SDL11/SDL.h),
1204 [ AC_MSG_ERROR([The development package for SDL is not installed.
1205 Please install it and try again. Alternatively you can also configure with
1208 CPPFLAGS="$save_CPPFLAGS"
1209 if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
1211 AC_MSG_ERROR([The development package for SDL is not installed.
1212 Please install it and try again. Alternatively you can also configure with
1215 elif test "x$enable_sdl" = "xyes"
1217 AC_MSG_ERROR([I couldn't find the SDL package. You can download libSDL
1218 from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
1224 dnl Qt Embedded module
1225 dnl (disabled by default)
1228 [ --enable-qte QT Embedded support (default disabled)])
1229 if test "x${enable_qte}" = "xyes"
1232 [ --with-qte=PATH Qt Embedded headers and libraries])
1233 if test "x${with_qte}" != "xno" -a "x${with_qte}" != "x"
1235 test_LDFLAGS="-L${with_qte}/lib `echo -L${with_qte}/lib | sed 's,opt/QtPalmtop,usr,'`"
1236 test_CFLAGS="-I${with_qte}/include `echo -I${with_qte}/include | sed 's,opt/QtPalmtop,usr,'`"
1238 test_LDFLAGS="-L${QTDIR}/lib `echo -L${QTDIR}/lib | sed 's,opt/QtPalmtop,usr,'`"
1239 test_CFLAGS="-I${QTDIR}/include `echo -I${QTDIR}/include | sed 's,opt/QtPalmtop,usr,'`"
1241 CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
1242 ac_cv_qte_headers=yes
1243 AC_CHECK_HEADERS(qt.h jpeglib.h, ,[
1244 ac_cv_qte_headers=no
1245 AC_MSG_ERROR([echo "Cannot find QT Embedded development headers."])
1247 if test "x${ac_cv_qte_headers}" = "xyes"
1249 qte_CFLAGS="${qte_CFLAGS} ${test_CFLAGS} -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti"
1250 qte_LDFLAGS="${qte_LDFLAGS} ${test_LDFLAGS} -ljpeg -lqte"
1251 PLUGINS="${PLUGINS} qte"
1253 CPPFLAGS="${save_CPPFLAGS}"
1257 dnl Windows DirectX module
1259 AC_ARG_ENABLE(directx,
1260 [ --enable-directx Win32 DirectX support (default enabled on Win32)])
1261 if test "x$enable_directx" != "xno"
1263 if test x$SYS = xmingw32
1265 AC_ARG_WITH(directx,
1266 [ --with-directx=PATH Win32 DirectX headers and libraries])
1267 if test "x$with_directx" = "x"
1269 AC_CHECK_HEADERS(ddraw.h,
1270 [ PLUGINS="${PLUGINS} directx"
1271 directx_LDFLAGS="${directx_LDFLAGS} -lgdi32" ])
1273 AC_MSG_CHECKING(for directX headers in ${with_directx})
1274 if test -f ${with_directx}/ddraw.h
1276 PLUGINS="${PLUGINS} directx"
1277 directx_LDFLAGS="${directx_LDFLAGS} -L${with_directx}/lib -lgdi32"
1278 directx_CFLAGS="${directx_CFLAGS} -I${with_directx}"
1282 AC_MSG_ERROR([Cannot find ${with_directx}/ddraw.h!])
1289 dnl Linux framebuffer module
1292 [ --enable-fb Linux framebuffer support (default enabled on Linux)])
1293 if test x$enable_fb != xno
1295 AC_CHECK_HEADERS(linux/fb.h, [
1296 PLUGINS="${PLUGINS} fb"
1301 dnl Linux MGA module
1304 [ --enable-mga Linux kernel Matrox support (default disabled)],
1305 [ if test x$enable_mga = xyes
1307 PLUGINS="${PLUGINS} mga xmga"
1314 [ --enable-ggi GGI support (default disabled)])
1315 if test x$enable_ggi = xyes
1317 PLUGINS="${PLUGINS} ggi"
1318 ggi_LDFLAGS="${ggi_LDFLAGS} -lggi"
1320 [ --with-ggi=PATH path to libggi],
1321 [ if test "x$with_ggi" != "xno" -a "x$with_ggi" != "x"
1323 CFLAGS_GGI="${CFLAGS_GGI} -I$with_ggi/include"
1324 ggi_LDFLAGS="${ggi_LDFLAGS} -L$with_ggi/lib"
1331 AC_ARG_ENABLE(glide,
1332 [ --enable-glide Glide (3dfx) support (default disabled)])
1333 if test x$enable_glide = xyes
1335 PLUGINS="${PLUGINS} glide"
1336 glide_LDFLAGS="${glide_LDFLAGS} -lglide2x -lm"
1337 glide_CFLAGS="${glide_CFLAGS} -I/usr/include/glide"
1339 [ --with-glide=PATH path to libglide],
1340 [ if test "x$with_glide" != "xno" -a "x$with_glide" != "x"
1342 glide_CFLAGS="${glide_CFLAGS} -I$with_glide/include"
1343 glide_LDFLAGS="${glide_LDFLAGS} -L$with_glide/lib"
1351 [ --enable-aa aalib output (default disabled)])
1352 if test x$enable_aa = xyes
1354 AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
1355 if test x$have_aa = xtrue
1357 PLUGINS="${PLUGINS} aa"
1358 aa_LDFLAGS="${aa_LDFLAGS} -laa"
1366 AC_ARG_WITH(,[Audio plugins:])
1369 dnl OSS /dev/dsp module (enabled by default except on win32)
1372 [ --enable-dsp Linux /dev/dsp support (enabled on Linux)])
1374 if test x$enable_dsp != xno &&
1375 (test x$SYS != xmingw32 || test x$enable_dsp = xyes)
1377 AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h, [
1378 PLUGINS="${PLUGINS} dsp"
1379 AC_CHECK_LIB(ossaudio,main,dsp_LDFLAGS="${dsp_LDFLAGS} -lossaudio")
1387 [ --enable-esd Esound library support (default disabled)],
1388 [if test x$enable_esd = xyes
1390 AC_PATH_PROG(ESD_CONFIG, esd-config, no)
1391 if test x${ESD_CONFIG} != xno
1393 PLUGINS="${PLUGINS} esd"
1394 esd_CFLAGS="${esd_CFLAGS} `${ESD_CONFIG} --cflags`"
1395 esd_LDFLAGS="${esd_LDFLAGS} `${ESD_CONFIG} --libs`"
1403 [ --enable-arts aRts sound server (default disabled)],
1404 [if test x$enable_arts = xyes
1406 AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
1407 if test x${ARTS_CONFIG} != xno
1409 PLUGINS="${PLUGINS} arts"
1410 arts_CFLAGS="${arts_CFLAGS} `${ARTS_CONFIG} --cflags`"
1411 arts_LDFLAGS="${arts_LDFLAGS} `${ARTS_CONFIG} --libs `"
1419 [ --enable-alsa ALSA sound support for Linux (default disabled)],
1420 [if test x$enable_alsa = xyes
1422 AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
1423 if test x$have_alsa = xtrue
1425 PLUGINS="${PLUGINS} alsa"
1426 alsa_LDFLAGS="${alsa_LDFLAGS} -lasound -lm -ldl"
1431 dnl win32 waveOut plugin
1433 AC_ARG_ENABLE(waveout,
1434 [ --enable-waveout Win32 waveOut module (default enabled on Win32)])
1435 if test "x$enable_waveout" != "xno" -a x$SYS = xmingw32
1437 PLUGINS="${PLUGINS} waveout"
1438 waveout_LDFLAGS="-lwinmm"
1442 dnl Interface plugins
1445 AC_ARG_WITH(,[Interface plugins:])
1451 [ --enable-gtk Gtk+ support (default enabled)])
1452 if test x$enable_gtk != xno
1455 AC_ARG_WITH(gtk-config-path,
1456 [ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
1457 [ if test "x$with_gtk_config_path" != "xno"
1459 GTK_PATH="$with_gtk_config_path:$PATH"
1461 # look for gtk-config
1462 AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, $GTK_PATH)
1463 GTK_CONFIG=${GTK12_CONFIG}
1464 if test x${GTK_CONFIG} = xno
1466 AC_PATH_PROG(GTK_CONFIG, gtk-config, no, $GTK_PATH)
1468 if test x${GTK_CONFIG} != xno
1470 if expr 1.2.0 \> `$GTK_CONFIG --version` >/dev/null
1472 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.])
1474 gtk_CFLAGS="${gtk_CFLAGS} `${GTK_CONFIG} --cflags gtk`"
1475 gtk_LDFLAGS="${gtk_LDFLAGS} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
1476 # now look for the gtk.h header
1477 CPPFLAGS="$save_CPPFLAGS $gtk_CFLAGS"
1478 ac_cv_gtk_headers=yes
1479 AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
1480 ac_cv_gtk_headers=no
1481 echo "Cannot find gtk development headers."
1483 if test "x$ac_cv_gtk_headers" = xyes
1485 PLUGINS="${PLUGINS} gtk"
1486 ALIASES="${ALIASES} gvlc"
1488 CPPFLAGS="$save_CPPFLAGS"
1493 dnl Familiar module uses Gtk+ library
1495 AC_ARG_ENABLE(familiar,
1496 [ --enable-familiar Familiar Gtk+ support (default disabled)])
1497 if test "x${enable_familiar}" = "xyes"
1500 AC_ARG_WITH(gtk-config-path,
1501 [ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
1502 [ if test "x${with_gtk_config_path}" != "xno"
1504 GTK_PATH="${with_gtk_config_path}:${PATH}"
1506 # look for gtk-config
1507 AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
1508 GTK_CONFIG=${GTK12_CONFIG}
1509 if test "x${GTK_CONFIG}" = "xno"
1511 AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
1513 # check for cross-compiling
1515 AC_ARG_WITH(gtk-prefix,
1516 [ --with-gtk-prefix=PATH path to libgtk (needed for cross-compiling),
1518 --with-gtk-prefix=/usr/local/arm/2.95.3/arm-linux/usr)],[],[])
1519 if test "x$with_gtk_prefix" != "xno" -a "x$with_gtk_prefix" != "x"
1521 GTK_PREFIX="--prefix=$with_gtk_prefix"
1523 if test "x${GTK_CONFIG}" != "xno"
1525 if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
1527 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.])
1529 familiar_CFLAGS="${familiar_CFLAGS} `${GTK_CONFIG} ${GTK_PREFIX} --cflags gtk gthread`"
1530 familiar_LDFLAGS="${familiar_LDFLAGS} `${GTK_CONFIG} ${GTK_PREFIX} --libs gtk gthread | sed 's,-rdynamic,,'`"
1531 # now look for the gtk.h header
1532 CPPFLAGS="${save_CPPFLAGS} ${familiar_CFLAGS}"
1533 ac_cv_gtk_headers=yes
1534 AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
1535 ac_cv_gtk_headers=no
1536 echo "Cannot find gtk development headers."
1539 # now look for gpe support
1540 AC_ARG_WITH(gpe-prefix,
1541 [ --with-gpe-prefix=PATH gpe installation path prefix (default search in \$PATH)],[],[])
1542 if test "x$with_gpe_prefix" != "xno" -a "x$with_gpe_prefix" != "x"
1544 gpe_CFLAGS="-I$with_gpe_prefix/include"
1545 gpe_LDFLAGS="-lXi -lgdk_pixbuf -L$with_gpe_prefix/lib -lgpewidget"
1546 # now look for gpe/init.h header file
1548 save_LDFLAGS=$LDFLAGS
1549 CFLAGS="${familiar_CFLAGS} ${gpe_CFLAGS}"
1550 LDFLAGS="${familiar_LDFLAGS} ${gpe_LDFLAGS}"
1551 CPPFLAGS="${save_CPPFLAGS} ${familiar_CFLAGS} ${gpe_CFLAGS}"
1552 ac_cv_gpe_headers=yes
1553 AC_CHECK_HEADERS(gpe/init.h, ,
1554 [ ac_cv_gpe_headers=no
1555 AC_MSG_ERROR([Cannot find development headers for libgpewidget...]) ])
1556 # AC_CHECK_LIB(gpewidget, gpe_application_init,
1557 # [ gpe_LDFLAGS="${gpe_LDFLAGS} -lgpewidget" ],
1558 # [ AC_MSG_ERROR([Cannot find libgpewidget library...]) ])
1560 LDFLAGS=$save_LDFLAG
1561 if test "x${ac_cv_gpe_headers}" = "xyes"
1563 familiar_CFLAGS="${familiar_CFLAGS} ${gpe_CFLAGS}"
1564 familiar_LDFLAGS="${familiar_LDFLAGS} ${gpe_LDFLAGS}"
1567 if test "x${ac_cv_gtk_headers}" = "xyes"
1569 PLUGINS="${PLUGINS} familiar"
1571 CPPFLAGS="${save_CPPFLAGS}"
1578 AC_ARG_ENABLE(gnome,
1579 [ --enable-gnome Gnome interface support (default disabled)],
1580 [if test x$enable_gnome = xyes; then
1581 # look for gnome-config
1582 AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
1583 if test -x ${GNOME_CONFIG}
1585 gnome_CFLAGS="${gnome_CFLAGS} `${GNOME_CONFIG} --cflags gtk gnomeui`"
1586 gnome_LDFLAGS="${gnome_LDFLAGS} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
1588 # now look for the gnome.h header
1589 CPPFLAGS="$save_CPPFLAGS $gnome_CFLAGS"
1590 AC_CHECK_HEADERS(gnome.h, [
1591 PLUGINS="${PLUGINS} gnome"
1592 ALIASES="${ALIASES} gnome-vlc"
1594 AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
1595 developement tools or remove the --enable-gnome option])
1597 CPPFLAGS="$save_CPPFLAGS"
1604 [ --enable-qt Qt interface support (default disabled)],
1605 [if test x$enable_qt = xyes; then
1606 PLUGINS="${PLUGINS} qt"
1607 ALIASES="${ALIASES} qvlc"
1608 qt_LDFLAGS="${qt_LDFLAGS} -lqt -L${QTDIR}/lib"
1609 qt_CFLAGS="${qt_CFLAGS} -I/usr/include/qt -I${QTDIR}/include"
1610 if test -x ${QTDIR}/bin/moc
1612 MOC=${QTDIR}/bin/moc
1622 [ --enable-kde KDE interface support (default disabled)],
1623 [if test x$enable_kde = xyes; then
1624 PLUGINS="${PLUGINS} kde"
1625 ALIASES="${ALIASES} kvlc"
1626 kde_LDFLAGS="${kde_LDFLAGS} -L${KDEDIR}/lib -lkfile"
1627 kde_CFLAGS="${kde_CFLAGS} -I/usr/include/kde -I/usr/include/qt"
1628 kde_CFLAGS="${kde_CFLAGS} -I${KDEDIR}/include -I${QTDIR}/include"
1629 if test -x ${QTDIR}/bin/moc
1631 MOC=${QTDIR}/bin/moc
1638 dnl Opie QT embedded module
1641 [ --enable-opie Qt embedded interface support (default disabled)],
1642 [if test "x${enable_opie}" = "xyes"; then
1645 [ --with-qte=PATH Qt Embedded headers and libraries])
1646 if test "x${with_qte}" != "xno" -a "x${with_qte}" != "x"
1648 test_LDFLAGS="-L${with_qte}/lib `echo -L${with_qte}/lib | sed 's,opt/QtPalmtop,usr,'`"
1649 test_CFLAGS="-I${with_qte}/include `echo -I${with_qte}/include | sed 's,opt/QtPalmtop,usr,'`"
1651 test_LDFLAGS="-L${QTDIR}/lib `echo -L${QTDIR}/lib | sed 's,opt/QtPalmtop,usr,'`"
1652 test_CFLAGS="-I${QTDIR}/include `echo -I${QTDIR}/include | sed 's,opt/QtPalmtop,usr,'`"
1654 CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
1655 ac_cv_qte_headers=yes
1656 AC_CHECK_HEADERS(qt.h jpeglib.h, ,[
1657 ac_cv_qte_headers=no
1658 AC_MSG_ERROR([echo "Cannot find QT Embedded development headers."])
1660 if test "x${ac_cv_qte_headers}" = "xyes"
1662 qte_CFLAGS="${qte_CFLAGS} ${test_CFLAGS} -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti"
1663 qte_LDFLAGS="${qte_LDFLAGS} ${test_LDFLAGS} -lqpe -ljpeg -lqte"
1665 CPPFLAGS="${save_CPPFLAGS}"
1667 if test x${ac_cv_qte_headers} = "xyes"
1669 PLUGINS="${PLUGINS} opie"
1670 opie_LDFLAGS="${opie_LDFLAGS} ${test_LDFLAGS}"
1671 opie_CFLAGS="${opie_CFLAGS} ${test_CFLAGS}"
1672 if test -x ${QTDIR}/bin/moc
1674 MOC=${QTDIR}/bin/moc
1684 AC_ARG_ENABLE(macosx,
1685 [ --enable-macosx MacOS X support (default enabled on MacOS X)],
1686 [if test x$enable_macosx = xyes
1688 BUILTINS="${BUILTINS} macosx"
1689 macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc -ObjC"
1691 [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
1692 BUILTINS="${BUILTINS} macosx"
1693 macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc -ObjC"
1700 [ --enable-qnx QNX RTOS support (default enabled on QNX RTOS)])
1701 if test x$enable_qnx != xno
1703 AC_CHECK_HEADERS(Ph.h, [
1704 PLUGINS="${PLUGINS} qnx"
1705 qnx_LDFLAGS="${qnx_LDFLAGS} -lasound -lph"
1710 dnl Windows native interface module, built with Borland C++ Builder
1712 AC_ARG_ENABLE(intfwin,
1713 [ --enable-intfwin Win32 interface support (default disabled)],
1714 [ if test "x$enable_intfwin" != "xno"
1716 AC_ARG_WITH(bcbuilder,
1717 [ --with-bcbuilder=PATH Borland C++ Builder installation path])
1718 if test "x$with_bcbuilder" != "x"
1720 BCBUILDER="$with_bcbuilder"
1722 PLUGINS="${PLUGINS} intfwin"
1728 AC_ARG_ENABLE(ncurses,
1729 [ --enable-ncurses ncurses interface support (default disabled)],
1730 [if test x$enable_ncurses = xyes; then
1731 PLUGINS="${PLUGINS} ncurses"
1732 ncurses_LDFLAGS="${ncurses_LDFLAGS} -lncurses"
1739 [ --enable-lirc lirc support (default disabled)])
1740 if test x$enable_lirc = xyes
1742 AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
1743 if test x$have_lirc = xtrue
1745 PLUGINS="${PLUGINS} lirc"
1746 lirc_LDFLAGS="${lirc_LDFLAGS} -llirc_client"
1750 AC_ARG_WITH(,[Misc options:])
1753 dnl Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
1755 dnl We give the user the opportunity to specify
1756 dnl --with-words=big or --with-words=little ; otherwise, try to guess
1759 [ --with-words=endianness set endianness (big or little)])
1760 case "x$with_words" in
1762 ac_cv_c_bigendian=yes
1765 ac_cv_c_bigendian=no
1768 dnl Try to guess endianness by matching patterns on a compiled
1769 dnl binary, by looking for an ASCII or EBCDIC string
1770 AC_CACHE_CHECK([whether the byte order is big-endian],
1771 [ac_cv_c_bigendian],
1772 [ac_cv_c_bigendian=unknown
1773 [cat >conftest.c <<EOF
1774 short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
1775 short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
1776 void _a(void) { char*s = (char*)am; s = (char *)ai; }
1777 short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
1778 short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
1779 void _e(void) { char*s = (char*)em; s = (char*)ei; }
1780 int main(void) { _a(); _e(); return 0; }
1783 if test -f conftest.c
1785 if ${CC-cc} -c conftest.c -o conftest.o >config.log 2>&1 \
1786 && test -f conftest.o
1788 if test "`strings conftest.o | grep BIGenDianSyS`"
1790 ac_cv_c_bigendian=yes
1792 if test "`strings conftest.o | grep LiTTleEnDian`"
1794 ac_cv_c_bigendian=no
1799 if test x$ac_cv_c_bigendian = xunknown
1801 AC_MSG_ERROR([Could not guess endianness, please use --with-words])
1805 dnl Now we know what to use for endianness, just put it in the header
1806 if test $ac_cv_c_bigendian = yes
1808 AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system)
1815 AC_ARG_ENABLE(gprof,
1816 [ --enable-gprof gprof profiling (default disabled)],
1817 [ if test "x$enable_gprof" = "xyes"; then GPROF=1; fi ])
1820 AC_ARG_ENABLE(cprof,
1821 [ --enable-cprof cprof profiling (default disabled)],
1822 [ if test "x$enable_cprof" = "xyes";
1824 LDFLAGS="${LDFLAGS} -lcprof"
1830 dnl GNU portable threads
1833 [ --enable-pth GNU Pth support (default disabled)],
1834 [ if test "x$enable_pth" = "xyes"; then
1835 AC_CHECK_LIB(pth,pth_init)
1836 AC_EGREP_HEADER(pth_init,pth.h,[
1837 AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
1838 Define if <pth.h> defines pth_init)
1847 [ --enable-st State Threads (default disabled)],
1848 [ if test "x$enable_st" = "xyes"; then
1849 AC_CHECK_LIB(st,st_init)
1850 AC_EGREP_HEADER(st_init,st.h,[
1851 AC_DEFINE(ST_INIT_IN_ST_H, 1,
1852 Define if <st.h> defines st_init)
1857 LDFLAGS="${LDFLAGS} ${THREAD_LIB}"
1860 dnl Plug-ins - this must be AT THE END
1862 AC_ARG_ENABLE(plugins,
1863 [ --disable-plugins make all plug-ins built-in (default plug-ins enabled)],
1864 [if test x$enable_plugins = xno
1866 BUILTINS="${BUILTINS} ${PLUGINS}"
1870 dnl Automagically disable plug-ins if there is no system support for .so files
1871 dnl don't forget vlc-win32 still can load .so as plugins
1872 if test x$ac_cv_header_dlfcn_h = xno -a x$ac_cv_header_image_h = xno -a x$SYS != xmingw32
1874 echo "*** Your system doesn't have plug-in support. All plug-ins will be compiled"
1876 BUILTINS="${BUILTINS} ${PLUGINS}"
1881 dnl Stuff used by the program
1883 AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "vlc $VERSION $CODENAME Copyright 1996-2002 VideoLAN", [Simple version string])
1884 AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VideoLAN Client - version $VERSION $CODENAME - (c) 1996-2002 VideoLAN", [Copyright string])
1886 VLC_SYMBOL="`echo ${VERSION} | tr .- __`"
1887 AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__MODULE_$VLC_SYMBOL", [String suffix for module functions])
1888 AC_DEFINE_UNQUOTED(MODULE_SYMBOL, $VLC_SYMBOL, [Symbol suffix for module functions])
1890 DATA_PATH="${ac_tool_prefix}/share/videolan"
1892 PLUGIN_PATH="${ac_tool_prefix}/share/videolan"
1893 AC_SUBST(PLUGIN_PATH)
1896 dnl Configuration is finished
1915 AC_SUBST(NEED_GETOPT)
1917 AC_SUBST(CFLAGS_OPTIM)
1918 AC_SUBST(CFLAGS_OPTIM_NODEBUG)
1921 AC_SUBST(vlc_CFLAGS)
1922 AC_SUBST(plugins_CFLAGS)
1923 AC_SUBST(builtins_CFLAGS)
1925 AC_SUBST(a52_CFLAGS)
1926 AC_SUBST(arts_CFLAGS)
1927 AC_SUBST(dvd_CFLAGS)
1928 AC_SUBST(dvdread_CFLAGS)
1929 AC_SUBST(mpeg_ts_dvbpsi_CFLAGS)
1930 AC_SUBST(directx_CFLAGS)
1931 AC_SUBST(esd_CFLAGS)
1932 AC_SUBST(familiar_CFLAGS)
1933 AC_SUBST(ffmpeg_CFLAGS)
1934 AC_SUBST(glide_CFLAGS)
1935 AC_SUBST(gnome_CFLAGS)
1936 AC_SUBST(gtk_CFLAGS)
1937 AC_SUBST(kde_CFLAGS)
1938 AC_SUBST(idctaltivec_CFLAGS)
1939 AC_SUBST(macosx_CFLAGS)
1940 AC_SUBST(mad_CFLAGS)
1941 AC_SUBST(memcpyaltivec_CFLAGS)
1942 AC_SUBST(motionaltivec_CFLAGS)
1943 AC_SUBST(opie_CFLAGS)
1945 AC_SUBST(qte_CFLAGS)
1946 AC_SUBST(sdl_CFLAGS)
1947 AC_SUBST(x11_CFLAGS)
1948 AC_SUBST(xvideo_CFLAGS)
1950 AC_SUBST(vlc_LDFLAGS)
1951 AC_SUBST(plugins_LDFLAGS)
1952 AC_SUBST(builtins_LDFLAGS)
1954 AC_SUBST(a52_LDFLAGS)
1955 AC_SUBST(aa_LDFLAGS)
1956 AC_SUBST(alsa_LDFLAGS)
1957 AC_SUBST(arts_LDFLAGS)
1958 AC_SUBST(beos_LDFLAGS)
1959 AC_SUBST(chroma_i420_rgb_LDFLAGS)
1960 AC_SUBST(directx_LDFLAGS)
1961 AC_SUBST(dsp_LDFLAGS)
1962 AC_SUBST(dvd_LDFLAGS)
1963 AC_SUBST(dvdread_LDFLAGS)
1964 AC_SUBST(mpeg_ts_dvbpsi_LDFLAGS)
1965 AC_SUBST(esd_LDFLAGS)
1966 AC_SUBST(familiar_LDFLAGS)
1967 AC_SUBST(filter_distort_LDFLAGS)
1968 AC_SUBST(ffmpeg_LDFLAGS)
1969 AC_SUBST(ggi_LDFLAGS)
1970 AC_SUBST(glide_LDFLAGS)
1971 AC_SUBST(gnome_LDFLAGS)
1972 AC_SUBST(gtk_LDFLAGS)
1973 AC_SUBST(http_LDFLAGS)
1974 AC_SUBST(idctaltivec_LDFLAGS)
1975 AC_SUBST(imdct_LDFLAGS)
1976 AC_SUBST(imdct3dn_LDFLAGS)
1977 AC_SUBST(imdctsse_LDFLAGS)
1978 AC_SUBST(ipv4_LDFLAGS)
1979 AC_SUBST(ipv6_LDFLAGS)
1980 AC_SUBST(kde_LDFLAGS)
1981 AC_SUBST(lirc_LDFLAGS)
1982 AC_SUBST(macosx_LDFLAGS)
1983 AC_SUBST(mad_LDFLAGS)
1984 AC_SUBST(memcpyaltivec_LDFLAGS)
1985 AC_SUBST(motionaltivec_LDFLAGS)
1986 AC_SUBST(ncurses_LDFLAGS)
1987 AC_SUBST(opie_LDFLAGS)
1988 AC_SUBST(qnx_LDFLAGS)
1989 AC_SUBST(qt_LDFLAGS)
1990 AC_SUBST(qte_LDFLAGS)
1991 AC_SUBST(rc_LDFLAGS)
1992 AC_SUBST(sdl_LDFLAGS)
1993 AC_SUBST(vcd_LDFLAGS)
1994 AC_SUBST(vorbis_LDFLAGS)
1995 AC_SUBST(waveout_LDFLAGS)
1996 AC_SUBST(x11_LDFLAGS)
1997 AC_SUBST(xvideo_LDFLAGS)
1999 AC_OUTPUT([Makefile.config Makefile.opts po/Makefile.in])
2003 --------------------
2004 vlc version : ${VERSION}
2006 architecture : ${ARCH}
2007 optimizations : ${OPTIMS}
2009 debug mode : ${DEBUG}
2010 release : ${RELEASE}
2011 cprof/gprof support : ${CPROF}/${GPROF}
2012 need builtin getopt : ${NEED_GETOPT}
2013 built-in modules :${BUILTINS}
2014 plug-in modules :${PLUGINS}
2015 vlc aliases :${ALIASES}
2017 You may now tune Makefile.opts at your convenience, for instance to choose
2018 which modules get compiled as plugins.
2020 To build vlc and its plugins, type \`$VLC_MAKE'.