]> git.sesse.net Git - vlc/blob - configure.in
Build and link Familiar interface against libgpewidget for gpe support.
[vlc] / configure.in
1 dnl Autoconf settings for vlc
2 AC_INIT(include/main.h)
3 AC_CONFIG_HEADER(include/defs.h)
4 AC_CANONICAL_SYSTEM
5
6 PACKAGE="vlc"
7 VERSION="0.4.6"
8 CODENAME=Ourumov
9
10 dnl Save CFLAGS and LDFLAGS
11 save_CFLAGS="${CFLAGS}"
12 save_CPPFLAGS="${CPPFLAGS}"
13 save_LDFLAGS="${LDFLAGS}"
14
15 dnl Check for tools
16 AC_PROG_MAKE_SET
17 AC_PROG_CC
18 AC_PROG_CPP
19
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, :)
25
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],
30       [ac_cv_gmake],
31       [if make --version | grep -q -i gnu; then
32          ac_cv_gmake="yes"
33        else
34          echo "This software needs you to install GNU make to compile properly."
35          echo "You can get it from http://www.gnu.org/."
36          exit
37        fi])
38   VLC_MAKE="make"
39 else
40   VLC_MAKE="gmake"
41 fi
42
43 dnl Gettext stuff
44 ALL_LINGUAS="de en_GB fr ja no ru nl pl"
45
46 AC_DEFINE_UNQUOTED(VLC_PACKAGE, "$PACKAGE", [Package name])
47 AC_DEFINE_UNQUOTED(VLC_VERSION, "$VERSION", [Package version])
48 AM_GNU_GETTEXT
49
50 dnl AM_PROG_LIBTOOL
51 AC_PROG_INSTALL
52
53 dnl
54 dnl  Check the operating system
55 dnl
56 case x"${target_os}" in
57   x)
58     SYS=unknown
59     ;;
60   xlinux*)
61     SYS=linux
62     ;;
63   xbsdi*)
64     SYS=bsdi
65     save_CFLAGS="${save_CFLAGS} -pthread"
66     dvd_LDFLAGS="${dvd_LDFLAGS} -ldvd"
67     vcd_LDFLAGS="${vcd_LDFLAGS} -ldvd"
68     ;;
69   x*bsd*)
70     SYS="${target_os}"
71     save_CFLAGS="${save_CFLAGS} -pthread"
72     ;;
73   xdarwin*)
74     SYS=darwin
75     save_CFLAGS="${save_CFLAGS} -no-cpp-precomp"
76     ;;
77   x*mingw32*)
78     SYS=mingw32
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"
87     ;;
88   x*nto*)
89     SYS=nto
90     x11_LDFLAGS="${x11_LDFLAGS} -lsocket"
91     xvideo_LDFLAGS="${xvideo_LDFLAGS} -lsocket"
92     ;;
93   xbeos)
94     SYS=beos
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"
100     ;;
101   x*)
102     SYS="${target_os}"
103     ;;
104 esac
105
106 dnl Flags for plugin compilation
107 if test x"${SYS}" != xmingw32; then
108   plugins_CFLAGS="${plugins_CFLAGS} -fPIC"
109 fi
110
111 dnl Check for the need to include the mingwex lib for mingw32
112 if test x$SYS = xmingw32
113 then
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"])
118     )
119 fi
120
121 dnl The -DSYS_FOO flag
122 save_CFLAGS="${save_CFLAGS} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"
123
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)
126
127 AC_CHECK_FUNC(connect,,[
128   AC_CHECK_LIB(socket,connect,
129     ipv4_LDFLAGS="${ipv4_LDFLAGS} -lsocket"
130     vlc_LDFLAGS="${vlc_LDFLAGS} -lsocket"
131 )])
132 AC_CHECK_FUNC(gethostbyname,,[
133   AC_CHECK_LIB(nsl,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lnsl")
134 ])
135 AC_CHECK_FUNC(gethostbyname,,[
136   AC_CHECK_LIB(bind,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind")
137 ])
138 have_nanosleep=0
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])]
144   )
145 ])
146 if test x$have_nanosleep = x1; then
147   AC_DEFINE(HAVE_NANOSLEEP, 1,
148             Define if nanosleep is available.)
149 fi
150 AC_CHECK_FUNC(inet_aton,,[
151   AC_CHECK_LIB(resolv,inet_aton,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lresolv")
152 ])
153 AC_CHECK_FUNC(textdomain,,[
154   AC_CHECK_LIB(intl,textdomain,save_LDFLAGS="${save_LDFLAGS} -lintl")
155 ])
156
157 dnl Check for getopt
158 NEED_GETOPT=0
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"],
163     [NEED_GETOPT=1])])
164
165 AC_TYPE_SIGNAL
166 AC_CHECK_LIB(dl,dlopen,vlc_LDFLAGS="${vlc_LDFLAGS} -ldl")
167 AC_CHECK_LIB(m,cos,
168   imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
169   filter_distort_LDFLAGS="${filter_distort_LDFLAGS} -lm")
170 AC_CHECK_LIB(m,pow,
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"
175 )
176
177 dnl Check for pthreads - borrowed from XMMS
178 THREAD_LIB=error
179 if test "x${THREAD_LIB}" = xerror; then
180   AC_CHECK_LIB(pthread,pthread_attr_init,THREAD_LIB="-lpthread")
181 fi
182 if test "x${THREAD_LIB}" = xerror; then
183   AC_CHECK_LIB(pthreads,pthread_attr_init,THREAD_LIB="-lpthreads")
184 fi
185 if test "x${THREAD_LIB}" = xerror; then
186   AC_CHECK_LIB(c_r,pthread_attr_init,THREAD_LIB="-lc_r")
187 fi
188 if test "x${THREAD_LIB}" = xerror; then
189   AC_CHECK_FUNC(pthread_attr_init)
190   THREAD_LIB=""
191 fi
192
193 dnl Check for cthreads under GNU/Hurd for instance
194 AC_CHECK_LIB(threads,cthread_fork,THREAD_LIB="-lthreads")
195
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.)])
203
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)
211
212 AC_HEADER_TIME
213
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.)
218 ])
219
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.)
224 ])
225
226 dnl Check for threads library
227 AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
228
229 dnl Check for DPMS
230 if test x$SYS != xmingw32
231 then
232   if test x$x_includes = xNONE; then
233     x_includes=/usr/X11R6/include
234   fi
235   if test x$x_libraries = xNONE; then
236     x_libraries=/usr/X11R6/lib
237   fi
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.)
243     ])
244   ])
245   CPPFLAGS="$save_CPPFLAGS"
246 fi
247
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.)
257 fi
258
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"
266 fi
267
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"
275 else
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"
282     fi
283 fi
284
285 dnl Check for -pipe
286 AC_CACHE_CHECK([if \$CC accepts -pipe],
287     [ac_cv_c_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"
292 fi
293
294 dnl Check for various optimization flags
295 AC_CACHE_CHECK([if \$CC accepts -O3],
296     [ac_cv_c_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"
301 else
302     AC_CACHE_CHECK([if \$CC accepts -O2],
303         [ac_cv_c_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"
308     else
309         AC_CACHE_CHECK([if \$CC accepts -O],
310             [ac_cv_c_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"
315         fi
316     fi
317 fi
318
319 dnl Check for -ffast-math
320 AC_CACHE_CHECK([if \$CC accepts -ffast-math],
321     [ac_cv_c_fast_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"
326 fi
327
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"
335 fi
336
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"
344 fi
345
346 dnl Check for fnative-struct or mms-bitfields support for mingw32
347 if test x$SYS = xmingw32
348 then
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"
357     else
358         save_CFLAGS="${save_CFLAGS} -fnative-struct"
359         plugins_CFLAGS="${plugins_CFLAGS} -fnative-struct"
360     fi
361 fi
362
363 dnl Check for Darwin plugin linking flags
364 AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error -lcc_dynamic],
365     [ac_cv_ld_darwin],
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"
370 fi
371
372 dnl Check for standard plugin linking flags
373 AC_CACHE_CHECK([if \$CC accepts -shared],
374     [ac_cv_ld_plugins],
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"
379 fi
380         
381 dnl Check for variadic macros
382 AC_CACHE_CHECK([for variadic cpp macros],
383     [ac_cv_cpp_variadic_macros],
384     [CFLAGS="${save_CFLAGS}"
385      AC_TRY_COMPILE(
386          [#include <stdio.h>
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)
393 fi
394
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
401         AC_TRY_COMPILE([],
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])
404     done])
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])
408 fi
409
410 dnl End of the bizarre compilation tests
411 CFLAGS="${save_CFLAGS}"
412 CPPFLAGS="${save_CPPFLAGS}"
413 LDFLAGS="${save_LDFLAGS}"
414
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.)
422 fi
423
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.)
430 fi
431
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.)
438 fi
439
440 dnl
441 dnl  Check the CPU
442 dnl
443 case x"${target_cpu}" in
444   x)
445     ARCH=unknown
446     ;;
447   *)
448     ARCH="${target_cpu}"
449     ;;
450 esac
451
452 dnl
453 dnl  default modules
454 dnl
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"
457
458 dnl
459 dnl  Network modules
460 dnl
461 NETWORK_MODULES="udp http rtp ipv4"
462
463 dnl
464 dnl  Accelerated modules
465 dnl
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"
471
472 if test x$SYS != xbeos
473 then
474     PLUGINS="${PLUGINS} ${NETWORK_MODULES}"
475 fi
476
477 AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
478     [ac_cv_mmx_inline],
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}"
483 fi
484
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}"
491 fi
492
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}"
500 fi
501
502 AC_CACHE_CHECK([if \$CC groks SSE inline assembly],
503     [ac_cv_sse_inline],
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}"
509 fi
510
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,
518          [save_CFLAGS=$CFLAGS
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)
523           CFLAGS=$save_CFLAGS
524          ])])
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"
532   fi
533   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
534 fi
535
536 AC_CACHE_CHECK([if \$CC groks Altivec C extensions],
537     [ac_cv_c_altivec],
538     [save_CFLAGS=$CFLAGS
539      CFLAGS="$CFLAGS -faltivec"
540      # Darwin test
541      AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
542         ac_cv_c_altivec=-faltivec, [
543         # Linux/PPC test
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)
547         ])
548      CFLAGS=$save_CFLAGS
549     ])
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}"
557 fi
558
559 AC_CACHE_CHECK([if linker needs -framework vecLib],
560     [ac_cv_ld_altivec],
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
565     ])
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"
571 fi
572 fi # end if mingw32
573
574
575 AC_ARG_WITH(,[])
576 AC_ARG_WITH(,[Optimization options:])
577
578 dnl
579 dnl  Special arch tuning
580 dnl
581 AC_ARG_WITH(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"
586 else
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"
588     else
589         if test x${target_cpu} = xpowerpc; then TUNING="750"; fi
590     fi
591 fi
592
593 dnl
594 dnl  x86 accelerations
595 dnl
596 if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xx86 -o x${target_cpu} = xi386
597 then
598     ARCH="${ARCH} mmx"
599     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"
600 fi
601
602 dnl
603 dnl  Enable/disable optimizations
604 dnl
605 AC_ARG_ENABLE(optimizations,
606 [  --disable-optimizations disable compiler optimizations (default enabled)],
607 [ if test x$enable_optimizations = xno; then OPTIMS=0; fi ],
608 [ OPTIMS=1 ])
609
610 dnl
611 dnl  AltiVec acceleration
612 dnl
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 ])
619
620 dnl
621 dnl  Debugging mode
622 dnl
623 DEBUG=0
624 AC_ARG_ENABLE(debug,
625 [  --enable-debug          debug mode (default disabled)],
626 [ if test x$enable_debug = xyes; then DEBUG=1; fi ])
627
628 dnl
629 dnl  Enable release-specific flags
630 dnl
631 RELEASE=0
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`" ])
636
637 dnl
638 dnl  Input plugins
639 dnl
640
641 AC_ARG_WITH(,[Input plugins:])
642
643 dnl
644 dnl  DVD module: optionally check for installed libdvdcss
645 dnl
646 AC_ARG_ENABLE(dvd,
647 [  --enable-dvd            DVD input module (default enabled)])
648 if test "x$enable_dvd" != "xno"
649 then
650   AC_ARG_WITH(dvdcss, 
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
655   x|xyes)
656     if test "x$with_dvdcss_tree" = x
657     then
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]) ])
663     else
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
667       then
668         dnl  The given directory can't be found
669         AC_MSG_RESULT(no)
670         AC_MSG_ERROR([cannot cd to ${with_dvdcss_tree}])
671       fi
672       if test -f "${real_dvdcss_tree}/src/.libs/libdvdcss.a"
673       then
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"
679       else
680         dnl  The given libdvdcss wasn't built
681         AC_MSG_RESULT(no)
682         AC_MSG_ERROR([cannot find ${real_dvdcss_tree}/src/.libs/libdvdcss.a, make sure you compiled libdvdcss in ${with_dvdcss_tree}])
683       fi
684     fi
685   ;;
686   xno)
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"
691   ;;
692   *)
693     AC_MSG_CHECKING(for dvdcss headers in ${with_dvdcss})
694     if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
695     then
696       dnl  Use ${with_dvdcss}/include/dvdcss/dvdcss.h
697       AC_MSG_RESULT(yes)
698       PLUGINS="${PLUGINS} dvd"
699       dvd_LDFLAGS="${dvd_LDFLAGS} -L${with_dvdcss}/lib -ldvdcss"
700       dvd_CFLAGS="${dvd_CFLAGS} -I${with_dvdcss}/include"
701     else
702       dnl  No libdvdcss could be found, sorry
703       AC_MSG_RESULT(no)
704       AC_MSG_ERROR([cannot find ${with_dvdcss}/include/dvdcss/dvdcss.h])
705     fi
706   ;;
707   esac
708 fi
709
710 dnl
711 dnl dvdread module: check for libdvdread plugin
712 dnl
713 AC_ARG_ENABLE(dvdread,
714 [  --enable-dvdread        dvdread input module (default disabled)])
715 if test "x$enable_dvdread" != "xno"
716 then
717   AC_ARG_WITH(dvdread, 
718   [    --with-dvdread=PATH   libdvdread headers and libraries])
719   if test "x$with_dvdread" = x
720   then
721     test_LDFLAGS=""
722     test_CFLAGS=""
723   else
724     test_LDFLAGS="-L${with_dvdread}/lib"
725     test_CFLAGS="-I${with_dvdread}/include"
726   fi
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}"
734         ],[
735           if test "x$enable_dvdread" != x
736           then
737             AC_MSG_ERROR([Cannot find DVD_VIDEO_LB_LEN in dvdread/dvd_reader.h, please install libdvdread version 0.9.2 or later])
738           fi
739         ])
740   ],[
741     if test "x$enable_dvdread" != x
742     then
743       if test "x$with_dvdread" != x
744       then
745         AC_MSG_ERROR([Cannot find dvdread/dvd_reader.h in ${with_dvdread}/include])
746       else
747         AC_MSG_ERROR([Cannot find dvdread/dvd_reader.h])
748       fi
749     fi
750   ])
751   CPPFLAGS="$save_CPPFLAGS"
752 fi
753
754 dnl
755 dnl  libdvbpsi ts demux
756 dnl
757 AC_ARG_ENABLE(dvbpsi,
758 [  --enable-dvbpsi        dvbpsi ts demux module (default disabled)])
759 if test "x$enable_dvbpsi" != "xno"
760 then
761   AC_ARG_WITH(dvbpsi, 
762   [    --with-dvbpsi=PATH    libdvbpsi headers and libraries])
763   AC_ARG_WITH(dvbpsi,
764   [    --with-dvbpsi-tree=PATH libdvbpsi tree for static linking])
765   case "x$with_dvbpsi" in
766   x|xyes)
767     if test "x$with_dvbpsi_tree" = x
768     then
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]) ])
773     else
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
777       then
778         dnl  The given directory can't be found
779         AC_MSG_RESULT(no)
780         AC_MSG_ERROR([cannot cd to ${with_dvbpsi_tree}])
781       fi
782       if test -f "${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
783       then
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"
789       else
790         dnl  The given libdvbpsi wasn't built
791         AC_MSG_RESULT(no)
792         AC_MSG_ERROR([cannot find ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a, make sure you compiled libdvbpsi in ${with_dvbpsi_tree}])
793       fi
794     fi
795   ;;
796   xno)
797     dnl  Compile without dvbpsi (dlopen version, works only under Linux)
798   ;;
799   *)
800     AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi})
801     if test "x$with_dvbpsi" = x
802     then
803       test_LDFLAGS=""
804       test_CFLAGS=""
805     else
806       test_LDFLAGS="-L${with_dvbpsi}/lib"
807       test_CFLAGS="-I${with_dvbpsi}/include"
808     fi
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}"
814       ],[
815       if test "x$enable_dvbpsi" != x
816       then
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])
818       fi
819     ])
820     CPPFLAGS="$save_CPPFLAGS"
821   ;;
822   esac
823 fi
824
825 dnl
826 dnl  VCD module
827 dnl
828 AC_ARG_ENABLE(vcd,
829   [  --enable-vcd            VCD support for Linux, FreeBSD and MacOS X (default enabled)])
830
831 if test x$enable_vcd != xno
832 then
833   AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
834     PLUGINS="${PLUGINS} vcd"
835   ])
836   
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)
840   ])
841   
842   if test "x${SYS}" = "xbsdi"
843   then
844     PLUGINS="${PLUGINS} vcd"
845   fi
846
847   if test "x${SYS}" = "xdarwin"
848   then
849     PLUGINS="${PLUGINS} vcd"
850     vcd_LDFLAGS="${vcd_LDFLAGS} -framework IOKit -framework CoreFoundation" 
851   fi
852 fi
853
854 dnl
855 dnl  Satellite input module
856 dnl
857 AC_ARG_ENABLE(satellite,
858   [  --enable-satellite      satellite card support (default disabled)],
859   [ if test x$enable_satellite = xyes
860     then
861       PLUGINS="${PLUGINS} satellite"
862     fi])
863
864 dnl
865 dnl  ipv6 plugin - not for QNX yet
866 dnl
867 if test x$SYS != xnto && test "x$SYS" != "xmingw32"
868 then
869   AC_CHECK_FUNC(inet_pton,[PLUGINS="${PLUGINS} ipv6"])
870 fi
871 if test "x$SYS" = "xmingw32"
872 then
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)])
876 fi
877
878 dnl
879 dnl  AVI demux plugin
880 dnl
881 AC_ARG_ENABLE(avi,
882   [  --enable-avi            AVI demux module (default enabled)])
883 if test x$enable_avi != xno
884 then
885   PLUGINS="${PLUGINS} avi"
886 fi
887
888 dnl
889 dnl  Codec plugins
890 dnl
891
892 AC_ARG_WITH(,[Codec plugins:])
893
894 dnl
895 dnl  mad plugin
896 dnl
897 AC_ARG_ENABLE(mad,
898   [  --enable-mad            libmad module (default disabled)])
899 if test x$enable_mad = xyes
900 then
901   AC_ARG_WITH(mad,
902     [    --with-mad=PATH       path to libmad],[],[])
903   if test "x$with_mad" != "xno" -a "x$with_mad" != "x"
904   then
905     mad_CFLAGS="${mad_CFLAGS} -I$with_mad/include"
906     mad_LDFLAGS="${mad_LDFLAGS} -L$with_mad/lib"
907   fi
908
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"
912   then
913     real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
914     if test "x$real_mad_tree" = x
915     then
916       dnl  The given directory can't be found
917       AC_MSG_RESULT(no)
918       AC_MSG_ERROR([${with_mad_tree} directory doesn't exist])
919     fi
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
923     then
924       AC_MSG_RESULT(yes)
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
928       LDFLAGS=$mad_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 ])
933       ],[])
934       LDFLAGS=$save_LDFLAGS
935     else
936       AC_MSG_RESULT(no)
937       AC_MSG_ERROR([the specified tree doesn't have mad.h])
938     fi
939   else
940     save_CFLAGS=$CFLAGS
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...]) ])
950     CFLAGS=$save_CFLAGS
951     LDFLAGS=$save_LDFLAGS
952   fi
953 fi
954
955 dnl
956 dnl  ffmpeg decoder plugin
957 dnl
958 AC_ARG_ENABLE(ffmpeg,
959 [  --enable-ffmpeg         ffmpeg codec (default disabled)])
960 if test "x$enable_ffmpeg" = "xyes"
961 then
962   AC_ARG_WITH(ffmpeg,
963     [    --with-ffmpeg=PATH    path to ffmpeg installation],[],[])
964   if test "x$with_ffmpeg" != "xno" -a "x$with_ffmpeg" != "x"
965   then
966     ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I$with_ffmpeg/include/libffmpeg"
967     ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -L$with_ffmpeg/lib"
968   fi
969
970   AC_ARG_WITH(ffmpeg-tree, 
971   [    --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
972   if test "x$with_ffmpeg_tree" != "x"
973   then
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
977     then
978       dnl  The given directory can't be found
979       AC_MSG_RESULT(no)
980       AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
981     fi
982     if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"
983     then
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
989       then
990         ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lm"
991       fi
992       ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I${real_ffmpeg_tree}/libavcodec"
993     else
994       dnl  The given libavcodec wasn't built
995       AC_MSG_RESULT(no)
996       AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
997     fi
998   else
999     save_CFLAGS=$CFLAGS
1000     save_LDFLAGS=$LDFLAGS
1001     CFLAGS="$CFLAGS $ffmpeg_CFLAGS"
1002     LDFLAGS="$LDFLAGS $ffmpeg_LDFLAGS"
1003     if test x$SYS != xbeos
1004     then
1005       ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lm"
1006     fi
1007     AC_CHECK_LIB(avcodec, avcodec_init, [
1008       BUILTINS="${BUILTINS} ffmpeg"
1009       ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lavcodec"
1010       if test x$SYS != xbeos
1011       then
1012         ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lm"
1013       fi ],
1014       [ AC_MSG_ERROR([Cannot find libavcodec library...]) ])
1015     CFLAGS=$save_CFLAGS
1016     LDFLAGS=$save_LDFLAGS
1017   fi
1018 fi
1019
1020
1021 dnl special case for BeOS
1022 if test x$SYS = xbeos
1023 then
1024     PLUGINS="${PLUGINS} beos"
1025 fi
1026
1027 dnl
1028 dnl  a52 AC3 decoder plugin
1029 dnl
1030 AC_ARG_ENABLE(a52,
1031   [  --enable-a52            AC3 support with liba52 (default enabled)])
1032 if test "x$enable_a52" != "xno"
1033 then
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"
1037   then
1038     real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
1039     if test "x$real_a52_tree" = x
1040     then
1041       dnl  The given directory can't be found
1042       AC_MSG_RESULT(no)
1043       AC_MSG_ERROR([${with_a52_tree} directory doesn't exist])
1044     fi
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
1048     then
1049       AC_MSG_RESULT(yes)
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"
1058         ],[
1059         if test -f ${real_a52_tree}/liba52/.libs/liba52.a
1060         then
1061           AC_MSG_ERROR([make sure you have at least a52dec-0.7.3])
1062         else
1063           AC_MSG_ERROR([the specified tree hasn't been compiled])
1064         fi
1065       ],[-lm])
1066       LDFLAGS=$save_LDFLAGS
1067     else
1068       AC_MSG_RESULT(no)
1069       AC_MSG_ERROR([the specified tree doesn't have a52.h])
1070     fi
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}"
1077       ],[],[-lm])
1078     ])
1079   fi
1080 fi
1081
1082 dnl
1083 dnl  ogg vorbis plugin
1084 dnl
1085 AC_ARG_ENABLE(vorbis,
1086   [  --enable-vorbis         Ogg/Vorbis decoder support (default enabled)])
1087 if test "x$enable_vorbis" != "xno"
1088 then
1089   AC_CHECK_HEADERS(ogg/ogg.h, [
1090     dnl disabled for the moment
1091     #PLUGINS="${PLUGINS} vorbis"
1092     vorbis_LDFLAGS="${vorbis_LDFLAGS} -lvorbis"
1093    ],[])
1094 fi
1095
1096 dnl
1097 dnl  Video plugins
1098 dnl
1099
1100 AC_ARG_WITH(,[Video plugins:])
1101
1102 dnl
1103 dnl  X11 module
1104 dnl  (enabled by default except on win32)
1105 dnl
1106 AC_ARG_ENABLE(x11,
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
1112   fi
1113   if test x$x_libraries = xNONE; then
1114     x_libraries=/usr/X11R6/lib
1115   fi
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"
1121   ])
1122   CPPFLAGS="$save_CPPFLAGS"
1123 fi
1124
1125 dnl
1126 dnl  XVideo module
1127 dnl  (enabled by default except on win32)
1128 dnl
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
1135   fi
1136   if test x$x_libraries = xNONE; then
1137     x_libraries=/usr/X11R6/lib
1138   fi
1139   save_CPPFLAGS=$CPPFLAGS
1140   CPPFLAGS="$save_CPPFLAGS -I$x_includes"
1141   AC_CHECK_HEADERS(X11/extensions/Xv.h, [
1142     save_CFLAGS=$CFLAGS
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"
1154   ]
1155   CPPFLAGS="$save_CPPFLAGS")
1156 fi
1157
1158 dnl
1159 dnl  SDL module
1160 dnl
1161 AC_ARG_ENABLE(sdl,
1162   [  --enable-sdl            SDL support (default enabled)])
1163 if test "x$enable_sdl" != "xno"
1164 then
1165   SDL_PATH=$PATH
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"
1169       then
1170         SDL_PATH="$with_sdl_config_path:$PATH"
1171       fi ])
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
1176   then
1177     AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no, $SDL_PATH)
1178     SDL_CONFIG=${SDL11_CONFIG}
1179     SDL_HEADER="SDL11/SDL.h"
1180   fi
1181   if test x${SDL_CONFIG} = xno
1182   then
1183     AC_PATH_PROG(SDL_CONFIG, sdl-config, no, $SDL_PATH)
1184     SDL_HEADER="SDL/SDL.h"
1185   fi
1186   # check for cross-compiling
1187   SDL_PREFIX=
1188   AC_ARG_WITH(sdl-prefix,
1189     [    --with-sdl-prefix=PATH path to libsdl (needed for cross-compiling),
1190                                e.g use as:
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"
1193   then
1194     SDL_PREFIX="--prefix=$with_sdl_prefix"
1195   fi
1196   if test x${SDL_CONFIG} != xno
1197   then
1198     PLUGINS="${PLUGINS} sdl"
1199     sdl_CFLAGS="${sdl_CFLAGS} `${SDL_CONFIG} ${SDL_PREFIX} --cflags`"
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 
1206 --disable-sdl.])
1207       ])
1208     CPPFLAGS="$save_CPPFLAGS"
1209     if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
1210     then
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
1213 --disable-sdl.])
1214     fi
1215   elif test "x$enable_sdl" =  "xyes"
1216   then
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.
1219     ])
1220   fi
1221 fi
1222
1223 dnl
1224 dnl  Qt Embedded module
1225 dnl  (disabled by default)
1226 dnl
1227 AC_ARG_ENABLE(qte,
1228   [  --enable-qte            QT Embedded support (default disabled)])
1229 if test "x${enable_qte}" != "xno"
1230 then
1231   AC_ARG_WITH(qte,
1232   [    --with-qte=PATH       Qt Embedded headers and libraries])
1233   if test "x${with_qte}" = "x"
1234   then
1235     test_LDFLAGS="-L${QTDIR}/lib"
1236     test_CFLAGS="-I${QTDIR}/include"
1237   else
1238     test_LDFLAGS="-L${with_qte}/lib"
1239     test_CFLAGS="-I${with_qte}/include"
1240   fi
1241
1242   CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
1243   AC_CHECK_HEADERS(qt.h, [
1244     qte_CFLAGS="${qte_CFLAGS} ${test_CFLAGS} -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti"
1245     qte_LDFLAGS="${qte_LDFLAGS} ${test_LDFLAGS} -lqpe -lqte"
1246     if test "x${with_qte}" = "x"
1247     then
1248       PLUGINS="${PLUGINS} qte"
1249     else
1250       BUILTINS="${BUILTINS} qte"
1251     fi
1252   ])
1253   CPPFLAGS="${save_CPPFLAGS}"
1254 fi
1255
1256 dnl
1257 dnl  Windows DirectX module
1258 dnl
1259 AC_ARG_ENABLE(directx,
1260   [  --enable-directx        Win32 DirectX support (default enabled on Win32)])
1261 if test "x$enable_directx" != "xno"
1262 then
1263   if test x$SYS = xmingw32
1264   then
1265     AC_ARG_WITH(directx, 
1266     [    --with-directx=PATH   Win32 DirectX headers and libraries])
1267     if test "x$with_directx" = "x"
1268     then
1269       AC_CHECK_HEADERS(ddraw.h,
1270       [ PLUGINS="${PLUGINS} directx"
1271         directx_LDFLAGS="${directx_LDFLAGS} -lgdi32" ])
1272     else
1273       AC_MSG_CHECKING(for directX headers in ${with_directx})
1274       if test -f ${with_directx}/ddraw.h
1275       then
1276         PLUGINS="${PLUGINS} directx"
1277         directx_LDFLAGS="${directx_LDFLAGS} -L${with_directx}/lib -lgdi32"
1278         directx_CFLAGS="${directx_CFLAGS} -I${with_directx}"
1279         AC_MSG_RESULT(yes)
1280       else
1281         AC_MSG_RESULT(no)
1282         AC_MSG_ERROR([Cannot find ${with_directx}/ddraw.h!])
1283       fi
1284     fi
1285   fi
1286 fi
1287
1288 dnl
1289 dnl  Linux framebuffer module
1290 dnl
1291 AC_ARG_ENABLE(fb,
1292   [  --enable-fb             Linux framebuffer support (default enabled on Linux)])
1293     if test x$enable_fb != xno
1294     then
1295       AC_CHECK_HEADERS(linux/fb.h, [
1296         PLUGINS="${PLUGINS} fb"
1297       ])
1298     fi
1299
1300 dnl
1301 dnl  Linux MGA module
1302 dnl
1303 AC_ARG_ENABLE(mga,
1304   [  --enable-mga            Linux kernel Matrox support (default disabled)],
1305   [ if test x$enable_mga = xyes
1306     then
1307       PLUGINS="${PLUGINS} mga xmga"
1308     fi ])
1309
1310 dnl
1311 dnl  GGI module
1312 dnl
1313 AC_ARG_ENABLE(ggi,
1314   [  --enable-ggi            GGI support (default disabled)])
1315 if test x$enable_ggi = xyes
1316 then
1317   PLUGINS="${PLUGINS} ggi"
1318   ggi_LDFLAGS="${ggi_LDFLAGS} -lggi"
1319   AC_ARG_WITH(ggi,
1320     [    --with-ggi=PATH       path to libggi],
1321     [ if test "x$with_ggi" != "xno" -a "x$with_ggi" != "x"
1322       then
1323         CFLAGS_GGI="${CFLAGS_GGI} -I$with_ggi/include"
1324         ggi_LDFLAGS="${ggi_LDFLAGS} -L$with_ggi/lib"
1325       fi ])
1326 fi
1327
1328 dnl
1329 dnl  Glide module
1330 dnl
1331 AC_ARG_ENABLE(glide,
1332   [  --enable-glide          Glide (3dfx) support (default disabled)])
1333 if test x$enable_glide = xyes
1334 then
1335   PLUGINS="${PLUGINS} glide"
1336   glide_LDFLAGS="${glide_LDFLAGS} -lglide2x -lm"
1337   glide_CFLAGS="${glide_CFLAGS} -I/usr/include/glide"
1338   AC_ARG_WITH(glide,
1339     [    --with-glide=PATH     path to libglide],
1340     [ if test "x$with_glide" != "xno" -a "x$with_glide" != "x"
1341       then
1342         glide_CFLAGS="${glide_CFLAGS} -I$with_glide/include"
1343         glide_LDFLAGS="${glide_LDFLAGS} -L$with_glide/lib"
1344       fi ])
1345 fi
1346
1347 dnl
1348 dnl  AA plugin
1349 dnl
1350 AC_ARG_ENABLE(aa,
1351   [  --enable-aa             aalib output (default disabled)])
1352 if test x$enable_aa = xyes
1353 then
1354   AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
1355   if test x$have_aa = xtrue
1356   then
1357     PLUGINS="${PLUGINS} aa"
1358     aa_LDFLAGS="${aa_LDFLAGS} -laa"
1359   fi
1360 fi
1361
1362 dnl
1363 dnl  Audio plugins
1364 dnl
1365
1366 AC_ARG_WITH(,[Audio plugins:])
1367
1368 dnl
1369 dnl  OSS /dev/dsp module (enabled by default except on win32)
1370 dnl
1371 AC_ARG_ENABLE(dsp,
1372   [  --enable-dsp            Linux /dev/dsp support (enabled on Linux)])
1373
1374 if test x$enable_dsp != xno &&
1375   (test x$SYS != xmingw32 || test x$enable_dsp = xyes)
1376 then
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")
1380   ])
1381 fi
1382
1383 dnl
1384 dnl  Esound module
1385 dnl
1386 AC_ARG_ENABLE(esd,
1387   [  --enable-esd            Esound library support (default disabled)],
1388   [if test x$enable_esd = xyes
1389    then
1390      AC_PATH_PROG(ESD_CONFIG, esd-config, no)
1391      if test x${ESD_CONFIG} != xno
1392      then
1393        PLUGINS="${PLUGINS} esd"
1394        esd_CFLAGS="${esd_CFLAGS} `${ESD_CONFIG} --cflags`"
1395        esd_LDFLAGS="${esd_LDFLAGS} `${ESD_CONFIG} --libs`"
1396      fi
1397    fi])
1398
1399 dnl
1400 dnl  aRts module
1401 dnl
1402 AC_ARG_ENABLE(arts,
1403   [  --enable-arts           aRts sound server (default disabled)],
1404   [if test x$enable_arts = xyes
1405    then
1406      AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
1407      if test x${ARTS_CONFIG} != xno
1408      then
1409        PLUGINS="${PLUGINS} arts"
1410        arts_CFLAGS="${arts_CFLAGS} `${ARTS_CONFIG} --cflags`"
1411        arts_LDFLAGS="${arts_LDFLAGS} `${ARTS_CONFIG} --libs `"
1412      fi
1413    fi])
1414
1415 dnl
1416 dnl  ALSA module
1417 dnl
1418 AC_ARG_ENABLE(alsa,
1419   [  --enable-alsa           ALSA sound support for Linux (default disabled)],
1420   [if test x$enable_alsa = xyes
1421    then
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
1424      then
1425        PLUGINS="${PLUGINS} alsa"
1426        alsa_LDFLAGS="${alsa_LDFLAGS} -lasound -lm -ldl"
1427      fi
1428    fi])
1429
1430 dnl
1431 dnl  win32 waveOut plugin
1432 dnl
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
1436   then
1437     PLUGINS="${PLUGINS} waveout"
1438     waveout_LDFLAGS="-lwinmm"
1439 fi
1440
1441 dnl
1442 dnl  Interface plugins
1443 dnl
1444
1445 AC_ARG_WITH(,[Interface plugins:])
1446
1447 dnl
1448 dnl  Gtk+ module
1449 dnl
1450 AC_ARG_ENABLE(gtk,
1451   [  --enable-gtk            Gtk+ support (default enabled)])
1452 if test x$enable_gtk != xno
1453 then
1454   GTK_PATH=$PATH
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"
1458       then
1459         GTK_PATH="$with_gtk_config_path:$PATH"
1460       fi ])
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
1465   then
1466     AC_PATH_PROG(GTK_CONFIG, gtk-config, no, $GTK_PATH)
1467   fi
1468   if test x${GTK_CONFIG} != xno
1469   then
1470     if expr 1.2.0 \> `$GTK_CONFIG --version` >/dev/null
1471     then
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.])
1473     fi
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."
1482     ])
1483     if test "x$ac_cv_gtk_headers" = xyes
1484     then
1485       PLUGINS="${PLUGINS} gtk"
1486       ALIASES="${ALIASES} gvlc"
1487     fi
1488     CPPFLAGS="$save_CPPFLAGS"
1489   fi
1490 fi
1491
1492 dnl
1493 dnl  Familiar module uses Gtk+ library
1494 dnl
1495 AC_ARG_ENABLE(familiar,
1496   [  --enable-familiar       Familiar Gtk+ support (default disabled)])
1497 if test "x${enable_familiar}" = "xyes"
1498 then
1499   GTK_PATH="${PATH}"
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"
1503       then
1504         GTK_PATH="${with_gtk_config_path}:${PATH}"
1505       fi ])
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"
1510   then
1511     AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
1512   fi
1513   # check for cross-compiling
1514   GTK_PREFIX=
1515   AC_ARG_WITH(gtk-prefix,
1516     [    --with-gtk-prefix=PATH path to libgtk (needed for cross-compiling),
1517                           e.g use as:
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"
1520   then
1521     GTK_PREFIX="--prefix=$with_gtk_prefix"
1522   fi
1523   if test "x${GTK_CONFIG}" != "xno"
1524   then
1525     if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
1526     then
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.])
1528     fi
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."
1537     ])
1538
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"
1543     then
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
1547       save_CFLAGS=$CFLAGS
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...]) ])
1559       CFLAGS=$save_CFLAGS
1560       LDFLAGS=$save_LDFLAG 
1561       if test "x${ac_cv_gpe_headers}" = "xyes"
1562       then
1563         familiar_CFLAGS="${familiar_CFLAGS} ${gpe_CFLAGS}"
1564         familiar_LDFLAGS="${familiar_LDFLAGS} ${gpe_LDFLAGS}" 
1565       fi
1566     fi 
1567     if test "x${ac_cv_gtk_headers}" = "xyes"
1568     then
1569       PLUGINS="${PLUGINS} familiar"
1570     fi
1571     CPPFLAGS="${save_CPPFLAGS}"
1572   fi
1573 fi
1574
1575 dnl
1576 dnl  Gnome module
1577 dnl
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}
1584     then
1585        gnome_CFLAGS="${gnome_CFLAGS} `${GNOME_CONFIG} --cflags gtk gnomeui`"
1586        gnome_LDFLAGS="${gnome_LDFLAGS} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
1587     fi
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"
1593      ],[
1594       AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
1595 developement tools or remove the --enable-gnome option])
1596      ])
1597     CPPFLAGS="$save_CPPFLAGS"
1598   fi])
1599
1600 dnl
1601 dnl  Qt module
1602 dnl
1603 AC_ARG_ENABLE(qt,
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
1611      then
1612        MOC=${QTDIR}/bin/moc
1613      else
1614        MOC=moc
1615      fi
1616    fi])
1617
1618 dnl 
1619 dnl  KDE module
1620 dnl
1621 AC_ARG_ENABLE(kde,
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
1630      then
1631        MOC=${QTDIR}/bin/moc
1632      else
1633        MOC=moc
1634      fi
1635    fi])
1636
1637 dnl
1638 dnl  Opie QT embedded module
1639 dnl
1640 AC_ARG_ENABLE(opie,
1641   [  --enable-opie           Qt embedded interface support (default disabled)],
1642   [if test "x${enable_opie}" = "xyes"; then
1643      AC_ARG_WITH(qte,
1644   [    --with-qte=PATH       Qt Embedded headers and libraries])
1645      if test "x${with_qte}" = "x"
1646      then
1647        test_LDFLAGS="-L${QTDIR}/lib"
1648        test_CFLAGS="-I${QTDIR}/include"
1649      else
1650        test_LDFLAGS="-L${with_qte}/lib"
1651        test_CFLAGS="-I${with_qte}/include"
1652      fi
1653
1654      PLUGINS="${PLUGINS} opie"
1655      opie_LDFLAGS="${opie_LDFLAGS} ${test_LDFLAGS} -lqpe -lqte"
1656      opie_CFLAGS="${opie_CFLAGS} ${test_CFLAGS}-DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti"
1657      if test -x ${QTDIR}/bin/moc
1658      then
1659        MOC=${QTDIR}/bin/moc
1660      else
1661        MOC=moc
1662      fi
1663    fi])
1664
1665 dnl
1666 dnl  MacOS X module
1667 dnl
1668 AC_ARG_ENABLE(macosx,
1669   [  --enable-macosx         MacOS X support (default enabled on MacOS X)],
1670   [if test x$enable_macosx = xyes
1671    then
1672      BUILTINS="${BUILTINS} macosx"
1673      macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc -ObjC"
1674    fi],
1675   [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
1676      BUILTINS="${BUILTINS} macosx"
1677      macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc -ObjC"
1678    )])
1679
1680 dnl
1681 dnl  QNX RTOS module
1682 dnl
1683 AC_ARG_ENABLE(qnx,
1684   [  --enable-qnx            QNX RTOS support (default enabled on QNX RTOS)])
1685     if test x$enable_qnx != xno
1686     then
1687       AC_CHECK_HEADERS(Ph.h, [
1688         PLUGINS="${PLUGINS} qnx"
1689         qnx_LDFLAGS="${qnx_LDFLAGS} -lasound -lph"
1690       ])
1691     fi
1692
1693 dnl
1694 dnl  Windows native interface module, built with Borland C++ Builder
1695 dnl
1696 AC_ARG_ENABLE(intfwin,
1697 [  --enable-intfwin        Win32 interface support (default disabled)],
1698 [ if test "x$enable_intfwin" != "xno"
1699   then
1700     AC_ARG_WITH(bcbuilder, 
1701     [    --with-bcbuilder=PATH Borland C++ Builder installation path])
1702     if test "x$with_bcbuilder" != "x"
1703     then
1704       BCBUILDER="$with_bcbuilder"
1705     fi
1706     PLUGINS="${PLUGINS} intfwin"
1707   fi ])
1708
1709 dnl
1710 dnl  ncurses module
1711 dnl
1712 AC_ARG_ENABLE(ncurses,
1713   [  --enable-ncurses        ncurses interface support (default disabled)],
1714   [if test x$enable_ncurses = xyes; then
1715      PLUGINS="${PLUGINS} ncurses"
1716      ncurses_LDFLAGS="${ncurses_LDFLAGS} -lncurses"
1717    fi])
1718
1719 dnl
1720 dnl  Lirc plugin
1721 dnl
1722 AC_ARG_ENABLE(lirc,
1723   [  --enable-lirc           lirc support (default disabled)])
1724 if test x$enable_lirc = xyes
1725 then
1726   AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
1727   if test x$have_lirc = xtrue
1728   then
1729     PLUGINS="${PLUGINS} lirc"
1730     lirc_LDFLAGS="${lirc_LDFLAGS} -llirc_client"
1731   fi
1732 fi
1733
1734 AC_ARG_WITH(,[Misc options:])
1735
1736 dnl
1737 dnl  Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
1738 dnl
1739 dnl  We give the user the opportunity to specify
1740 dnl  --with-words=big or --with-words=little ; otherwise, try to guess
1741 dnl
1742 AC_ARG_WITH(words,
1743   [  --with-words=endianness set endianness (big or little)])
1744   case "x$with_words" in
1745     xbig)
1746       ac_cv_c_bigendian=yes
1747       ;;
1748     xlittle)
1749       ac_cv_c_bigendian=no
1750       ;;
1751     *)
1752       dnl  Try to guess endianness by matching patterns on a compiled
1753       dnl  binary, by looking for an ASCII or EBCDIC string
1754       AC_CACHE_CHECK([whether the byte order is big-endian],
1755         [ac_cv_c_bigendian],
1756         [ac_cv_c_bigendian=unknown
1757         [cat >conftest.c <<EOF
1758         short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
1759         short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
1760         void _a(void) { char*s = (char*)am; s = (char *)ai; }
1761         short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
1762         short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
1763         void _e(void) { char*s = (char*)em; s = (char*)ei; }
1764         int main(void) { _a(); _e(); return 0; }
1765 EOF
1766         ]
1767         if test -f conftest.c
1768         then 
1769           if ${CC-cc} -c conftest.c -o conftest.o >config.log 2>&1 \
1770               && test -f conftest.o
1771           then
1772             if test "`strings conftest.o | grep BIGenDianSyS`"
1773             then
1774               ac_cv_c_bigendian=yes
1775             fi
1776             if test "`strings conftest.o | grep LiTTleEnDian`"
1777             then
1778               ac_cv_c_bigendian=no
1779             fi
1780           fi
1781         fi
1782       ])
1783       if test x$ac_cv_c_bigendian = xunknown
1784       then
1785         AC_MSG_ERROR([Could not guess endianness, please use --with-words])
1786       fi
1787       ;;
1788   esac
1789 dnl  Now we know what to use for endianness, just put it in the header
1790 if test $ac_cv_c_bigendian = yes
1791 then
1792   AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system)
1793 fi
1794
1795 dnl
1796 dnl  Profiling
1797 dnl
1798 GPROF=0
1799 AC_ARG_ENABLE(gprof,
1800 [  --enable-gprof          gprof profiling (default disabled)],
1801 [ if test "x$enable_gprof" = "xyes"; then GPROF=1; fi ])
1802
1803 CPROF=0
1804 AC_ARG_ENABLE(cprof,
1805 [  --enable-cprof          cprof profiling (default disabled)],
1806 [ if test "x$enable_cprof" = "xyes";
1807   then
1808     LDFLAGS="${LDFLAGS} -lcprof"
1809     CPROF=1
1810   fi
1811 ])
1812
1813 dnl
1814 dnl  GNU portable threads
1815 dnl
1816 AC_ARG_ENABLE(pth,
1817   [  --enable-pth            GNU Pth support (default disabled)],
1818   [ if test "x$enable_pth" = "xyes"; then
1819     AC_CHECK_LIB(pth,pth_init)
1820     AC_EGREP_HEADER(pth_init,pth.h,[
1821       AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
1822                 Define if <pth.h> defines pth_init)
1823     THREAD_LIB="-lpth"
1824     fi])
1825 ])
1826
1827 dnl
1828 dnl  State Threads
1829 dnl
1830 AC_ARG_ENABLE(st,
1831   [  --enable-st             State Threads (default disabled)],
1832   [ if test "x$enable_st" = "xyes"; then
1833     AC_CHECK_LIB(st,st_init)
1834     AC_EGREP_HEADER(st_init,st.h,[
1835       AC_DEFINE(ST_INIT_IN_ST_H, 1,
1836                 Define if <st.h> defines st_init)
1837     THREAD_LIB="-lst"
1838     fi])
1839 ])
1840
1841 LDFLAGS="${LDFLAGS} ${THREAD_LIB}"
1842
1843 dnl
1844 dnl  Plug-ins - this must be AT THE END
1845 dnl
1846 AC_ARG_ENABLE(plugins,
1847   [  --disable-plugins       make all plug-ins built-in (default plug-ins enabled)],
1848   [if test x$enable_plugins = xno
1849    then
1850      BUILTINS="${BUILTINS} ${PLUGINS}"
1851      PLUGINS=
1852    fi])
1853
1854 dnl Automagically disable plug-ins if there is no system support for .so files
1855 dnl don't forget vlc-win32 still can load .so as plugins
1856 if test x$ac_cv_header_dlfcn_h = xno -a x$ac_cv_header_image_h = xno -a x$SYS != xmingw32
1857 then
1858   echo "*** Your system doesn't have plug-in support. All plug-ins will be compiled"
1859   echo "as built-in"
1860   BUILTINS="${BUILTINS} ${PLUGINS}"
1861   PLUGINS=
1862 fi
1863
1864 dnl
1865 dnl  Stuff used by the program
1866 dnl
1867 AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "vlc $VERSION $CODENAME Copyright 1996-2002 VideoLAN", [Simple version string])
1868 AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VideoLAN Client - version $VERSION $CODENAME - (c) 1996-2002 VideoLAN", [Copyright string])
1869
1870 VLC_SYMBOL="`echo ${VERSION} | tr .- __`"
1871 AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__MODULE_$VLC_SYMBOL", [String suffix for module functions])
1872 AC_DEFINE_UNQUOTED(MODULE_SYMBOL, $VLC_SYMBOL, [Symbol suffix for module functions])
1873
1874 DATA_PATH="${ac_tool_prefix}/share/videolan"
1875 AC_SUBST(DATA_PATH)
1876 PLUGIN_PATH="${ac_tool_prefix}/share/videolan"
1877 AC_SUBST(PLUGIN_PATH)
1878
1879 dnl 
1880 dnl  Configuration is finished
1881 dnl
1882 AC_SUBST(SYS)
1883 AC_SUBST(ARCH)
1884 AC_SUBST(PLUGINS)
1885 AC_SUBST(BUILTINS)
1886 AC_SUBST(ALIASES)
1887 AC_SUBST(DEBUG)
1888 AC_SUBST(ASM)
1889 AC_SUBST(CPROF)
1890 AC_SUBST(GPROF)
1891 AC_SUBST(OPTIMS)
1892 AC_SUBST(TUNING)
1893 AC_SUBST(RELEASE)
1894 AC_SUBST(MOC)
1895 AC_SUBST(WINDRES)
1896 AC_SUBST(BCBUILDER)
1897 AC_SUBST(PACKAGE)
1898 AC_SUBST(VERSION)
1899 AC_SUBST(NEED_GETOPT)
1900
1901 AC_SUBST(CFLAGS_OPTIM)
1902 AC_SUBST(CFLAGS_OPTIM_NODEBUG)
1903 AC_SUBST(LDFLAGS)
1904
1905 AC_SUBST(vlc_CFLAGS)
1906 AC_SUBST(plugins_CFLAGS)
1907 AC_SUBST(builtins_CFLAGS)
1908
1909 AC_SUBST(a52_CFLAGS)
1910 AC_SUBST(arts_CFLAGS)
1911 AC_SUBST(dvd_CFLAGS)
1912 AC_SUBST(dvdread_CFLAGS)
1913 AC_SUBST(mpeg_ts_dvbpsi_CFLAGS)
1914 AC_SUBST(directx_CFLAGS)
1915 AC_SUBST(esd_CFLAGS)
1916 AC_SUBST(familiar_CFLAGS)
1917 AC_SUBST(ffmpeg_CFLAGS)
1918 AC_SUBST(glide_CFLAGS)
1919 AC_SUBST(gnome_CFLAGS)
1920 AC_SUBST(gtk_CFLAGS)
1921 AC_SUBST(kde_CFLAGS)
1922 AC_SUBST(idctaltivec_CFLAGS)
1923 AC_SUBST(macosx_CFLAGS)
1924 AC_SUBST(mad_CFLAGS)
1925 AC_SUBST(memcpyaltivec_CFLAGS)
1926 AC_SUBST(motionaltivec_CFLAGS)
1927 AC_SUBST(opie_CFLAGS)
1928 AC_SUBST(qt_CFLAGS)
1929 AC_SUBST(qte_CFLAGS)
1930 AC_SUBST(sdl_CFLAGS)
1931 AC_SUBST(x11_CFLAGS)
1932 AC_SUBST(xvideo_CFLAGS)
1933
1934 AC_SUBST(vlc_LDFLAGS)
1935 AC_SUBST(plugins_LDFLAGS)
1936 AC_SUBST(builtins_LDFLAGS)
1937
1938 AC_SUBST(a52_LDFLAGS)
1939 AC_SUBST(aa_LDFLAGS)
1940 AC_SUBST(alsa_LDFLAGS)
1941 AC_SUBST(arts_LDFLAGS)
1942 AC_SUBST(beos_LDFLAGS)
1943 AC_SUBST(chroma_i420_rgb_LDFLAGS)
1944 AC_SUBST(directx_LDFLAGS)
1945 AC_SUBST(dsp_LDFLAGS)
1946 AC_SUBST(dvd_LDFLAGS)
1947 AC_SUBST(dvdread_LDFLAGS)
1948 AC_SUBST(mpeg_ts_dvbpsi_LDFLAGS)
1949 AC_SUBST(esd_LDFLAGS)
1950 AC_SUBST(familiar_LDFLAGS)
1951 AC_SUBST(filter_distort_LDFLAGS)
1952 AC_SUBST(ffmpeg_LDFLAGS)
1953 AC_SUBST(ggi_LDFLAGS)
1954 AC_SUBST(glide_LDFLAGS)
1955 AC_SUBST(gnome_LDFLAGS)
1956 AC_SUBST(gtk_LDFLAGS)
1957 AC_SUBST(http_LDFLAGS)
1958 AC_SUBST(idctaltivec_LDFLAGS)
1959 AC_SUBST(imdct_LDFLAGS)
1960 AC_SUBST(imdct3dn_LDFLAGS)
1961 AC_SUBST(imdctsse_LDFLAGS)
1962 AC_SUBST(ipv4_LDFLAGS)
1963 AC_SUBST(ipv6_LDFLAGS)
1964 AC_SUBST(kde_LDFLAGS)
1965 AC_SUBST(lirc_LDFLAGS)
1966 AC_SUBST(macosx_LDFLAGS)
1967 AC_SUBST(mad_LDFLAGS)
1968 AC_SUBST(memcpyaltivec_LDFLAGS)
1969 AC_SUBST(motionaltivec_LDFLAGS)
1970 AC_SUBST(ncurses_LDFLAGS)
1971 AC_SUBST(opie_LDFLAGS)
1972 AC_SUBST(qnx_LDFLAGS)
1973 AC_SUBST(qt_LDFLAGS)
1974 AC_SUBST(qte_LDFLAGS)
1975 AC_SUBST(rc_LDFLAGS)
1976 AC_SUBST(sdl_LDFLAGS)
1977 AC_SUBST(vcd_LDFLAGS)
1978 AC_SUBST(vorbis_LDFLAGS)
1979 AC_SUBST(waveout_LDFLAGS)
1980 AC_SUBST(x11_LDFLAGS)
1981 AC_SUBST(xvideo_LDFLAGS)
1982
1983 AC_OUTPUT([Makefile.config Makefile.opts po/Makefile.in])
1984
1985 echo "
1986 vlc configuration
1987 --------------------
1988 vlc version           : ${VERSION}
1989 system                : ${SYS}
1990 architecture          : ${ARCH}
1991 optimizations         : ${OPTIMS}
1992 tuning                : ${TUNING}
1993 debug mode            : ${DEBUG}
1994 release               : ${RELEASE}
1995 cprof/gprof support   : ${CPROF}/${GPROF}
1996 need builtin getopt   : ${NEED_GETOPT}
1997 built-in modules      :${BUILTINS}
1998 plug-in modules       :${PLUGINS}
1999 vlc aliases           :${ALIASES}
2000
2001 You may now tune Makefile.opts at your convenience, for instance to choose
2002 which modules get compiled as plugins.
2003
2004 To build vlc and its plugins, type \`$VLC_MAKE'.
2005 "
2006