041238097230bf7240f9ba6763475fdbe86ca81e
[vlc.git] / configure.ac.in
1 dnl Autoconf settings for vlc
2
3 AC_INIT(vlc,0.5.0-cvs)
4
5 CONFIGURE_LINE="$0 $*"
6 CODENAME="Natalya"
7
8 AC_PREREQ(2.50)
9 AC_CONFIG_SRCDIR(src/libvlc.c)
10 AC_CANONICAL_SYSTEM
11
12 dnl XXX: we don't put any flags here, because automake 1.5 doesn't support
13 dnl them. And we need the comma otherwize automake will choke on it.
14 AM_INIT_AUTOMAKE(vlc,0.5.0-cvs)
15 AM_CONFIG_HEADER(config.h)
16
17 dnl
18 dnl  Save *FLAGS
19 dnl
20 CPPFLAGS_save="${CPPFLAGS}"
21 CFLAGS_save="${CFLAGS}"
22 CXXFLAGS_save="${CXXFLAGS}"
23 OBJCFLAGS_save="${OBJCFLAGS}"
24 LDFLAGS_save="${LDFLAGS}"
25
26 dnl
27 dnl Check for tools
28 dnl
29 AC_PROG_CC
30 AM_PROG_CC_C_O
31 AC_PROG_CPP
32 AC_PROG_CXX
33 AC_PROG_MAKE_SET
34 AC_PROG_INSTALL
35
36 dnl AC_PROG_OBJC doesn't seem to exist, this is the KDE workaround
37 AC_MSG_CHECKING(for an Objective-C compiler)
38 OBJC="${CXX}"
39 AC_SUBST(OBJC)
40 OBJCFLAGS="${CXXFLAGS} -fgnu-runtime -fconstant-string-class=NSConstantString"
41 AC_SUBST(OBJCFLAGS)
42 dnl _AM_DEPENDENCIES(OBJC) doesn't work, so hard code OBJCDEPMODE here
43 #OBJCDEPMODE="depmode=gcc3"
44 #AC_SUBST(OBJCDEPMODE)
45 _AM_DEPENDENCIES(OBJC)
46 AC_MSG_RESULT(not implemented yet)
47
48 dnl Find the right ranlib, even when cross-compiling
49 AC_CHECK_TOOL(RANLIB, ranlib, :)
50 AC_CHECK_TOOL(STRIP, strip, :)
51
52 dnl
53 dnl Gettext stuff
54 dnl
55 ALL_LINGUAS="de en_GB fr ja no ru nl pl se"
56 AM_GNU_GETTEXT_VERSION(0.10.40)
57 AM_GNU_GETTEXT
58 if test "${nls_cv_force_use_gnu_gettext}" = "yes"; then
59   AC_DEFINE(HAVE_INCLUDED_GETTEXT, 1, Define if we use the local libintl)
60   INCLUDES="${INCLUDES} -I\\\$(top_srcdir)/intl"
61 fi
62 AM_CONDITIONAL(BUILD_INTL, test "${nls_cv_force_use_gnu_gettext}" = "yes")
63
64 dnl AM_PROG_LIBTOOL
65 AC_PROG_INSTALL
66
67 dnl Check for compiler properties
68 AC_C_CONST
69 AC_C_INLINE
70
71 dnl
72 dnl  Set default values
73 dnl
74 LDFLAGS_vlc="${LDFLAGS}"
75 LIBEXT=".so"
76
77 dnl
78 dnl  Check the operating system
79 dnl
80 case "x${target_os}" in
81   x)
82     SYS=unknown
83     ;;
84   xlinux*)
85     SYS=linux
86     ;;
87   xbsdi*)
88     SYS=bsdi
89     CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
90     LDFLAGS_dvd="${LDFLAGS_dvd} -ldvd"
91     LDFLAGS_vcd="${LDFLAGS_vcd} -ldvd"
92     ;;
93   x*bsd*)
94     SYS="${target_os}"
95     CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
96     ;;
97   xdarwin*)
98     SYS=darwin
99     CFLAGS_save="${CFLAGS_save} -no-cpp-precomp"; CFLAGS="${CFLAGS_save}"
100     CXXFLAGS_save="${CXXFLAGS_save} -no-cpp-precomp"; CXXFLAGS="${CXXFLAGS_save}"
101     OBJCFLAGS_save="${OBJCFLAGS_save} -no-cpp-precomp"; OBJCFLAGS="${OBJCFLAGS_save}"
102     LDFLAGS_vlc="${LDFLAGS_vlc} -all_load"
103     LIBEXT=".dylib"
104     ;;
105   x*mingw32* | x*cygwin*)
106     AC_CHECK_TOOL(WINDRES, windres, :)
107     LIBEXT=".dll"
108
109     case "x${target_os}" in
110       x*mingw32*)
111         SYS=mingw32
112         ;;
113       x*cygwin*)
114         dnl Check if we are using the mno-cygwin mode in which case we are
115         dnl actually dealing with a mingw32 compiler.
116         AC_EGREP_CPP(yes,
117             [#ifdef WIN32
118              yes
119              #endif],
120             SYS=mingw32, SYS=cygwin)
121         ;;
122     esac
123
124     if test "x$SYS" = "xmingw32"; then
125         # add ws2_32 for closesocket, select, recv
126         CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"
127         CPPFLAGS="${CPPFLAGS_save}"
128         LDFLAGS_vlc="${LDFLAGS_vlc} -lws2_32 -lnetapi32 -mwindows"
129         LDFLAGS_ipv4="${LDFLAGS_ipv4} -lws2_32"
130         LDFLAGS_ipv6="${LDFLAGS_ipv6} -lws2_32"
131         LDFLAGS_access_http="${LDFLAGS_access_http} -lws2_32"
132         LDFLAGS_access_mms="${LDFLAGS_access_mms} -lws2_32"
133         LDFLAGS_access_rtp="${LDFLAGS_access_rtp} -lws2_32"
134         LDFLAGS_access_udp="${LDFLAGS_access_udp} -lws2_32"
135         LDFLAGS_rc="${LDFLAGS_rc} -lws2_32"
136     fi
137     ;;
138   x*nto*)
139     SYS=nto
140     LDFLAGS_x11="${LDFLAGS_x11} -lsocket"
141     LDFLAGS_xvideo="${LDFLAGS_xvideo} -lsocket"
142     ;;
143   xsolaris*)
144     SYS=solaris
145     ;;
146   xhpux*)
147     SYS=hpux
148     LIBEXT=".sl"
149     ;;
150   xbeos)
151     SYS=beos
152     CFLAGS_save="${CFLAGS_save} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CFLAGS="${CFLAGS_save}"
153     CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CXXFLAGS="${CXXFLAGS_save}"
154     LDFLAGS_vlc="${LDFLAGS_vlc} -lbe"
155     LDFLAGS_plugins="${LDFLAGS_plugins} -nostart"
156     LDFLAGS_beos="${LDFLAGS_beos} -lbe -lmedia -lroot -ltracker -lstdc++.r4 -ltranslation"
157     LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind"
158     ;;
159   x*)
160     SYS="${target_os}"
161     ;;
162 esac
163 AM_CONDITIONAL(HAVE_BEOS, test "x${SYS}" = "xbeos")
164 AM_CONDITIONAL(HAVE_DARWIN, test "x${SYS}" = "xdarwin")
165 AM_CONDITIONAL(HAVE_WIN32, test "x${SYS}" = "xmingw32")
166
167 AC_MSG_CHECKING(for suffix of libraries)
168 AC_MSG_RESULT(${LIBEXT})
169
170 dnl Check for the need to include the mingwex lib for mingw32
171 if test x$SYS = xmingw32
172 then
173     AC_CHECK_LIB(mingwex,opendir,
174         AC_CHECK_LIB(mingw32,opendir,LDFLAGS_vlc="${LDFLAGS_vlc}",
175             [LDFLAGS_vlc="${LDFLAGS_vlc} -lmingwex"
176              LDFLAGS_gtk="${LDFLAGS_gtk} -lmingwex"])
177     )
178 fi
179
180 dnl Check for fnative-struct or mms-bitfields support for mingw32
181 if test x$SYS = xmingw32
182 then
183     AC_CACHE_CHECK([if \$CC accepts -mms-bitfields],
184         [ac_cv_c_mms_bitfields],
185         [CFLAGS="${CFLAGS_save} -mms-bitfields"
186          AC_TRY_COMPILE([],,ac_cv_c_mms_bitfields=yes, ac_cv_c_mms_bitfields=no)])
187     if test x"$ac_cv_c_mms_bitfields" != x"no"; then
188         CFLAGS_mingw32_special="-mms-bitfields"
189     else
190         CFLAGS_mingw32_special="-fnative-struct"
191     fi
192
193     CFLAGS_save="${CFLAGS_save} ${CFLAGS_mingw32_special}"; CFLAGS="${CFLAGS_save}"
194 fi
195
196 dnl Flags for plugin compilation
197 case "x${SYS}" in
198   xmingw32|xcygwin)
199     CFLAGS_pics="${CFLAGS_pics} ${CFLAGS_mingw32_special}"
200     CXXFLAGS_pics="${CXXFLAGS_pics} ${CFLAGS_mingw32_special}"
201     OBJCFLAGS_pics="${OBJCFLAGS_pics} ${CFLAGS_mingw32_special}"
202     CFLAGS_plugins="${CFLAGS_plugins} ${CFLAGS_mingw32_special}"
203     CXXFLAGS_plugins="${CXXFLAGS_plugins} ${CFLAGS_mingw32_special}"
204     OBJCFLAGS_plugins="${OBJCFLAGS_plugins} ${CFLAGS_mingw32_special}"
205     ;;
206   x*)
207     CFLAGS_pics="${CFLAGS_pics} -fPIC"
208     CXXFLAGS_pics="${CXXFLAGS_pics} -fPIC"
209     OBJCFLAGS_pics="${OBJCFLAGS_pics} -fPIC"
210     CFLAGS_plugins="${CFLAGS_plugins} -fPIC"
211     CXXFLAGS_plugins="${CXXFLAGS_plugins} -fPIC"
212     OBJCFLAGS_plugins="${OBJCFLAGS_plugins} -fPIC"
213     LDFLAGS_plugins="${LDFLAGS_plugins} -fPIC"
214     ;;
215 esac
216
217 dnl The -DSYS_FOO flag
218 CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"; CPPFLAGS="${CPPFLAGS_save}"
219
220 dnl Check for system libs needed
221 need_libc=false
222
223 AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll getenv putenv setenv)
224
225 dnl Check for usual libc functions
226 AC_CHECK_FUNCS(strdup,,[need_libc=:])
227 AC_CHECK_FUNCS(strndup,,[need_libc=:])
228 AC_CHECK_FUNCS(atof,,[need_libc=:])
229 AC_CHECK_FUNCS(lseek,,[need_libc=:])
230 AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp,,[need_libc=:])])
231 AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp,,[need_libc=:])])
232
233 AM_CONDITIONAL(BUILD_LIBC, ${need_libc})
234
235 AC_CHECK_FUNC(connect,,[
236   AC_CHECK_LIB(socket,connect,
237     LDFLAGS_ipv4="${LDFLAGS_ipv4} -lsocket"
238     LDFLAGS_vlc="${LDFLAGS_vlc} -lsocket"
239 )])
240
241 AC_CHECK_FUNC(send,,[
242   AC_CHECK_LIB(socket,send,
243     LDFLAGS_access_http="${LDFLAGS_access_http} -lsocket"
244     LDFLAGS_access_mms="${LDFLAGS_access_mms} -lsocket"
245     LDFLAGS_access_rtp="${LDFLAGS_access_rtp} -lsocket"
246     LDFLAGS_access_udp="${LDFLAGS_access_udp} -lsocket"
247 )])
248
249 AC_CHECK_FUNC(gethostbyname,,[
250   AC_CHECK_LIB(nsl,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lnsl",[
251     AC_CHECK_LIB(bind,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind")])
252 ])
253
254 have_nanosleep=false
255 AC_CHECK_FUNC(nanosleep,have_nanosleep=:,[
256   AC_CHECK_LIB(rt,nanosleep,
257     [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"; have_nanosleep=:],
258     [AC_CHECK_LIB(posix4,nanosleep,
259         [LDFLAGS_vlc="${LDFLAGS_vlc} -lposix4"; have_nanosleep=:])]
260   )
261 ])
262 if ${have_nanosleep}; then
263   AC_DEFINE(HAVE_NANOSLEEP, 1,
264             Define if nanosleep is available.)
265 fi
266 # HP/UX port
267 AC_CHECK_LIB(rt,sem_init, [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"])
268
269 AC_CHECK_FUNC(inet_aton,,[
270   AC_CHECK_LIB(resolv,inet_aton,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lresolv")
271 ])
272 AC_CHECK_FUNC(textdomain,,[
273   AC_CHECK_LIB(intl,textdomain,
274     LDFLAGS_vlc="${LDFLAGS_vlc} -lintl"
275     LDFLAGS_plugins="${LDFLAGS_plugins} -lintl"
276   )
277 ])
278
279 dnl Check for getopt
280 need_getopt=false
281 AC_CHECK_FUNC(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
282 [ # FreeBSD has a gnugetopt library for this:
283   AC_CHECK_LIB([gnugetopt],[getopt_long],
284     [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) LDFLAGS_vlc="${LDFLAGS_vlc} -lgnugetopt"],
285     [need_getopt=:])])
286 AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt})
287
288 AC_TYPE_SIGNAL
289 AC_CHECK_LIB(dl,dlopen,LDFLAGS_vlc="${LDFLAGS_vlc} -ldl")
290 AC_CHECK_LIB(m,cos,
291   LDFLAGS_imdct="${LDFLAGS_imdct} -lm"
292   LDFLAGS_filter_distort="${LDFLAGS_filter_distort} -lm")
293 AC_CHECK_LIB(m,pow,
294   LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lm"
295   LDFLAGS_imdct="${LDFLAGS_imdct} -lm"
296   LDFLAGS_imdct3dn="${LDFLAGS_imdct3dn} -lm"
297   LDFLAGS_imdctsse="${LDFLAGS_imdctsse} -lm"
298   LDFLAGS_i420_rgb="${LDFLAGS_i420_rgb} -lm"
299   LDFLAGS_faad="${LDFLAGS_faad} -lm"
300 )
301
302 dnl Check for pthreads - borrowed from XMMS
303 THREAD_LIB=error
304 if test "x${THREAD_LIB}" = "xerror"; then
305   AC_CHECK_LIB(pthread,main,THREAD_LIB="-lpthread")
306 fi
307 if test "x${THREAD_LIB}" = "xerror"; then
308   AC_CHECK_LIB(pthreads,main,THREAD_LIB="-lpthreads")
309 fi
310 if test "x${THREAD_LIB}" = "xerror"; then
311   AC_CHECK_LIB(c_r,main,THREAD_LIB="-lc_r")
312 fi
313 if test "x${THREAD_LIB}" = "xerror"; then
314   AC_CHECK_FUNC(pthread_mutex_lock)
315   THREAD_LIB=""
316 fi
317
318 dnl Check for cthreads under GNU/Hurd for instance
319 AC_CHECK_LIB(threads,cthread_fork,THREAD_LIB="-lthreads")
320
321 dnl Check for misc headers
322 AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
323   AC_DEFINE(PTHREAD_COND_T_IN_PTHREAD_H, 1,
324             Define if <pthread.h> defines pthread_cond_t.)])
325 AC_EGREP_HEADER(pthread_once,pthread.h,[
326   AC_DEFINE(PTHREAD_ONCE_IN_PTHREAD_H, 1,
327             Define if <pthread.h> defines pthread_once.)])
328 AC_EGREP_HEADER(strncasecmp,strings.h,[
329   AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
330             Define if <strings.h> defines strncasecmp.)])
331
332 dnl Check for headers
333 AC_CHECK_HEADERS(signal.h time.h errno.h stdint.h getopt.h strings.h inttypes.h sys/int_types.h)
334 AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h)
335 AC_CHECK_HEADERS(dlfcn.h image.h)
336 AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
337 AC_CHECK_HEADERS(machine/param.h sys/shm.h)
338 AC_CHECK_HEADERS(linux/version.h)
339
340 AC_HEADER_TIME
341
342 dnl Check for dirent
343 need_dirent=false
344 AC_CHECK_HEADERS(dirent.h,,[need_dirent=:])
345 AM_CONDITIONAL(BUILD_DIRENT, ${need_dirent})
346
347 dnl Mac OS X and other OSes don't have declaration for nanosleep
348 AC_EGREP_HEADER(nanosleep,time.h,[
349   AC_DEFINE(HAVE_DECL_NANOSLEEP, 1,
350             Define if <time.h> defines nanosleep.)
351 ])
352
353 dnl Make sure we have timespecs
354 AC_EGREP_HEADER(timespec,sys/time.h,[
355   AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
356             Define if <sys/time.h> defines struct timespec.)
357 ])
358
359 dnl Check for threads library
360 AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
361
362 dnl Default X headers and libraries
363 if test "x${x_includes}" = "xNONE"; then
364   x_includes="/usr/X11R6/include"
365 fi
366 if test "x${x_libraries}" = "xNONE"; then
367   x_libraries="/usr/X11R6/lib"
368 fi
369
370 dnl Build the gtk_main plugins?
371 NEED_GTK_MAIN=no
372 NEED_GNOME_MAIN=no
373
374 dnl Check for DPMS
375 if test "x${SYS}" != "xmingw32"
376 then
377   CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
378   AC_CHECK_HEADERS(X11/extensions/dpms.h, [
379     AC_EGREP_HEADER(DPMSInfo,X11/extensions/dpms.h,[
380       AC_DEFINE(DPMSINFO_IN_DPMS_H, 1,
381                 Define if <X11/extensions/dpms.h> defines DPMSInfo.)
382     ])
383   ])
384   CPPFLAGS="${CPPFLAGS_save}"
385 fi
386
387 dnl Check for ntohl, etc.
388 AC_CACHE_CHECK([for ntohl in sys/param.h],
389     [ac_cv_c_ntohl_sys_param_h],
390     [CFLAGS="${CFLAGS_save} -Wall -Werror"
391      AC_TRY_COMPILE([#include <sys/param.h>],
392         [void foo() { int meuh; ntohl(meuh); }],
393         ac_cv_c_ntohl_sys_param_h=yes, ac_cv_c_ntohl_sys_param_h=no)])
394 if test "x${ac_cv_c_ntohl_sys_param_h}" != "xno"; then
395     AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
396 fi
397
398 dnl Check for inline function size limit
399 AC_CACHE_CHECK([if \$CC accepts -finline-limit],
400     [ac_cv_c_inline_limit],
401     [CFLAGS="${CFLAGS_save} -finline-limit-30000"
402      AC_TRY_COMPILE([],,ac_cv_c_inline_limit=yes, ac_cv_c_inline_limit=no)])
403 if test "x${ac_cv_c_inline_limit}" != "xno"; then
404     CFLAGS_save="${CFLAGS_save} -finline-limit-30000"; CFLAGS="${CFLAGS_save}"
405     CXXFLAGS_save="${CXXFLAGS_save} -finline-limit-30000"; CXXFLAGS="${CXXFLAGS_save}"
406     OBJCFLAGS_save="${OBJCFLAGS_save} -finline-limit-30000"; OBJCFLAGS="${OBJCFLAGS_save}"
407 fi
408
409 dnl Check for -W or -w flags
410 AC_CACHE_CHECK([if \$CC accepts -Wall -Winline],
411     [ac_cv_c_Wall_Winline],
412     [CFLAGS="-Wall -Winline ${CFLAGS_save}"
413      AC_TRY_COMPILE([],,ac_cv_c_Wall_Winline=yes, ac_cv_c_Wall_Winline=no)])
414 if test "x${ac_cv_c_Wall_Winline}" != "xno"; then
415     CFLAGS_save="-Wall -Winline ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
416     CXXFLAGS_save="-Wall -Winline ${CXXFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
417     OBJCFLAGS_save="-Wall -Winline ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
418 else
419     AC_CACHE_CHECK([if \$CC accepts -wall -winline],
420         [ac_cv_c_wall_winline],
421         [CFLAGS="-wall -winline ${CFLAGS_save}"
422          AC_TRY_COMPILE([],,ac_cv_c_wall_winline=yes, ac_cv_c_wall_winline=no)])
423     if test "x${ac_cv_c_wall_winline}" != "xno"; then
424         CFLAGS_save="-wall -winline ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
425         CXXFLAGS_save="-wall -winline ${CXXFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
426         OBJCFLAGS_save="-wall -winline ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
427     fi
428 fi
429
430 dnl Check for -pipe
431 AC_CACHE_CHECK([if \$CC accepts -pipe],
432     [ac_cv_c_pipe],
433     [CFLAGS="${CFLAGS_save} -pipe"
434      AC_TRY_COMPILE([],,ac_cv_c_pipe=yes, ac_cv_c_pipe=no)])
435 if test "x${ac_cv_c_pipe}" != "xno"; then
436     CFLAGS_save="${CFLAGS_save} -pipe"; CFLAGS="${CFLAGS_save}"
437     CXXFLAGS_save="${CXXFLAGS_save} -pipe"; CXXFLAGS="${CXXFLAGS_save}"
438     OBJCFLAGS_save="${OBJCFLAGS_save} -pipe"; OBJCFLAGS="${OBJCFLAGS_save}"
439 fi
440
441 dnl Check for various optimization flags
442 AC_CACHE_CHECK([if \$CC accepts -O3],
443     [ac_cv_c_o3],
444     [CFLAGS="${CFLAGS_save} -O3"
445      AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)])
446 if test "x${ac_cv_c_o3}" != "xno"; then
447     CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
448 else
449     AC_CACHE_CHECK([if \$CC accepts -O2],
450         [ac_cv_c_o2],
451         [CFLAGS="${CFLAGS_save} -O2"
452          AC_TRY_COMPILE([],,ac_cv_c_o2=yes, ac_cv_c_o2=no)])
453     if test "x${ac_cv_c_o2}" != "xno"; then
454         CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
455     else
456         AC_CACHE_CHECK([if \$CC accepts -O],
457             [ac_cv_c_o],
458             [CFLAGS="${CFLAGS_save} -O"
459              AC_TRY_COMPILE([],,ac_cv_c_o=yes, ac_cv_c_o=no)])
460         if test "x${ac_cv_c_o}" != "xno"; then
461             CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
462         fi
463     fi
464 fi
465
466 dnl Check for -ffast-math
467 AC_CACHE_CHECK([if \$CC accepts -ffast-math],
468     [ac_cv_c_fast_math],
469     [CFLAGS="${CFLAGS_save} -ffast-math"
470      AC_TRY_COMPILE([],,ac_cv_c_fast_math=yes, ac_cv_c_fast_math=no)])
471 if test "x${ac_cv_c_fast_math}" != "xno"; then
472     CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
473 fi
474
475 dnl Check for -funroll-loops
476 AC_CACHE_CHECK([if \$CC accepts -funroll-loops],
477     [ac_cv_c_unroll_loops],
478     [CFLAGS="${CFLAGS_save} -funroll-loops"
479      AC_TRY_COMPILE([],,ac_cv_c_unroll_loops=yes, ac_cv_c_unroll_loops=no)])
480 if test "x${ac_cv_c_unroll_loops}" != "xno"; then
481     CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
482 fi
483
484 dnl Check for -fomit-frame-pointer
485 AC_CACHE_CHECK([if \$CC accepts -fomit-frame-pointer],
486     [ac_cv_c_omit_frame_pointer],
487     [CFLAGS="${CFLAGS_save} -fomit-frame-pointer"
488      AC_TRY_COMPILE([],,ac_cv_c_omit_frame_pointer=yes, ac_cv_c_omit_frame_pointer=no)])
489 if test "x${ac_cv_c_omit_frame_pointer}" != "xno"; then
490     CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
491     # this plugin does not compile without -fomit-frame-pointer, damn gcc!
492     CFLAGS_i420_yuy2_mmx="${CFLAGS_i420_yuy2_mmx} -fomit-frame-pointer"
493 fi
494
495 dnl Check for -mdynamic-no-pic
496 AC_CACHE_CHECK([if \$CC accepts -mdynamic-no-pic],
497     [ac_cv_c_dynamic_no_pic],
498     [CFLAGS="${CFLAGS_save} -mdynamic-no-pic"
499      AC_TRY_COMPILE([],,ac_cv_c_dynamic_no_pic=yes, ac_cv_c_dynamic_no_pic=no)])
500 if test "x${ac_cv_c_dynamic_no_pic}" != "xno"; then
501     CFLAGS_builtins="${CFLAGS_builtins} -mdynamic-no-pic"
502     CFLAGS_libvlc="${CFLAGS_libvlc} -mdynamic-no-pic"
503 fi
504
505 dnl Check for Darwin plugin linking flags
506 AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error -lcc_dynamic],
507     [ac_cv_ld_darwin],
508     [CFLAGS="${CFLAGS_save} -bundle -undefined error -lcc_dynamic"
509      AC_TRY_COMPILE([],,ac_cv_ld_darwin=yes, ac_cv_ld_darwin=no)])
510 if test "x${ac_cv_ld_darwin}" != "xno"; then
511     LDFLAGS_plugins="${LDFLAGS_plugins} -bundle -undefined error -lcc_dynamic"
512 fi
513
514 dnl Check for standard plugin linking flags
515 AC_CACHE_CHECK([if \$CC accepts -shared],
516     [ac_cv_ld_plugins],
517     [CFLAGS="${CFLAGS_save} -shared"
518      AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
519 if test "x${ac_cv_ld_plugins}" != "xno"; then
520     LDFLAGS_plugins="${LDFLAGS_plugins} -shared"
521 fi
522
523 dnl Check for variadic macros
524 AC_CACHE_CHECK([for variadic cpp macros],
525     [ac_cv_cpp_variadic_macros],
526     [CFLAGS="${CFLAGS_save}"
527      AC_TRY_COMPILE(
528          [#include <stdio.h>
529           #define a(b,c...) printf(b,##c)],
530          [a("foo");a("%s","bar");a("%s%s","baz","quux");],
531          ac_cv_cpp_variadic_macros=yes,
532          ac_cv_cpp_variadic_macros=no)])
533 if test "x${ac_cv_cpp_variadic_macros}" != "xno"; then
534     AC_DEFINE(HAVE_VARIADIC_MACROS, 1, Support for variadic macros)
535 fi
536
537 dnl Checks for __attribute__(aligned()) directive
538 AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
539     [ac_cv_c_attribute_aligned],
540     [ac_cv_c_attribute_aligned=0
541         CFLAGS="${CFLAGS_save} -Werror"
542     for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
543         AC_TRY_COMPILE([],
544         [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;],
545         [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
546     done
547         CFLAGS="${CFLAGS_save}"])
548 if test "x${ac_cv_c_attribute_aligned}" != "x0"; then
549     AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
550         [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
551 fi
552
553 dnl
554 dnl  Check the CPU
555 dnl
556 case "x${target_cpu}" in
557   x)
558     ARCH=unknown
559     ;;
560   *)
561     ARCH="${target_cpu}"
562     ;;
563 esac
564
565 case "${ARCH}" in
566   hppa64)
567     CFLAGS_mpeg_video="${CFLAGS_mpeg_video} -ffunction-sections"
568     ;;
569 esac
570
571 dnl
572 dnl  default modules
573 dnl
574 PLUGINS="${PLUGINS} dummy rc logger access_file memcpy"
575 PLUGINS="${PLUGINS} es audio mpeg_system ps ts"
576 PLUGINS="${PLUGINS} idct idctclassic motion mpeg_video spudec mpeg_audio"
577 #PLUGINS="${PLUGINS} a52old imdct downmix"
578 PLUGINS="${PLUGINS} lpcm a52"
579 PLUGINS="${PLUGINS} deinterlace invert yuv wall transform distort clone crop motionblur"
580 PLUGINS="${PLUGINS} float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif fixed32tofloat32 fixed32tos16 s16tofloat32 s16tofloat32swab s8tofloat32 u8tofloat32"
581 PLUGINS="${PLUGINS} trivial_resampler ugly_resampler linear_resampler"
582 PLUGINS="${PLUGINS} trivial_channel_mixer"
583 PLUGINS="${PLUGINS} trivial_mixer spdif_mixer float32_mixer"
584 PLUGINS="${PLUGINS} aout_file"
585 #PLUGINS="${PLUGINS} scope"
586 PLUGINS="${PLUGINS} i420_rgb i420_yuy2 i422_yuy2 i420_ymga"
587 PLUGINS="${PLUGINS} id3 m3u"
588 PLUGINS="${PLUGINS} wav araw demuxdump demuxsub"
589
590 dnl
591 dnl  Network modules
592 dnl
593 NETWORK_MODULES="access_udp access_http access_rtp ipv4 access_mms"
594
595 dnl
596 dnl  Accelerated modules
597 dnl
598 MMX_MODULES="memcpymmx idctmmx motionmmx i420_rgb_mmx i420_yuy2_mmx i422_yuy2_mmx i420_ymga_mmx"
599 MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
600 THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
601 SSE_MODULES="imdctsse downmixsse"
602 ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
603
604 if test x${SYS} != xbeos
605 then
606   PLUGINS="${PLUGINS} ${NETWORK_MODULES}"
607 fi
608
609 AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
610     [ac_cv_mmx_inline],
611     [CFLAGS="${CFLAGS_save}"
612      AC_TRY_COMPILE(,[void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));],
613                     ac_cv_mmx_inline=yes, ac_cv_mmx_inline=no)])
614 if test "x${ac_cv_mmx_inline}" != "xno"; then
615   ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
616 fi
617
618 AC_CACHE_CHECK([if \$CC groks MMX EXT inline assembly],
619     [ac_cv_mmxext_inline],
620     [CFLAGS="${CFLAGS_save}"
621      AC_TRY_COMPILE(,[void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));],
622                     ac_cv_mmxext_inline=yes, ac_cv_mmxext_inline=no)])
623 if test "x${ac_cv_mmxext_inline}" != "xno"; then
624   ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
625 fi
626
627 AC_CACHE_CHECK([if \$CC groks 3D Now! inline assembly],
628     [ac_cv_3dnow_inline],
629     [CFLAGS="${CFLAGS_save}"
630      AC_TRY_COMPILE(,[void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));],
631                     ac_cv_3dnow_inline=yes, ac_cv_3dnow_inline=no)])
632 if test "x${ac_cv_3dnow_inline}" != "xno"; then
633   AC_DEFINE(CAN_COMPILE_3DNOW, 1, Define if \$CC groks 3D Now! inline assembly.)
634   ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
635 fi
636
637 AC_CACHE_CHECK([if \$CC groks SSE inline assembly],
638     [ac_cv_sse_inline],
639     [CFLAGS="${CFLAGS_save}"
640      AC_TRY_COMPILE(,[void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));],
641                     ac_cv_sse_inline=yes, ac_cv_sse_inline=no)])
642 if test "x${ac_cv_sse_inline}" != "xno" -a "x${SYS}" != "xmingw32"; then
643   AC_DEFINE(CAN_COMPILE_SSE, 1, Define if \$CC groks SSE inline assembly.)
644   ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
645 fi
646
647 # don't try to grok AltiVec with native mingw32 it doesn't work right now
648 # we should be able to remove this test with future versions of mingw32
649 if test "x${SYS}" != "xmingw32"; then
650 AC_CACHE_CHECK([if \$CC groks AltiVec inline assembly],
651     [ac_cv_altivec_inline],
652     [CFLAGS="${CFLAGS_save}"
653      AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
654          ac_cv_altivec_inline=yes,
655          [CFLAGS="${CFLAGS_save} -Wa,-m7400"
656           AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
657             [ac_cv_altivec_inline="-Wa,-m7400"],
658             ac_cv_altivec_inline=no)
659          ])])
660 if test "x${ac_cv_altivec_inline}" != "xno"; then
661   AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks AltiVec inline assembly.)
662   if test "x${ac_cv_altivec_inline}" != "xyes"; then
663     CFLAGS_idctaltivec="${CFLAGS_idctaltivec} ${ac_cv_altivec_inline}"
664     CFLAGS_motionaltivec="${CFLAGS_motionaltivec} ${ac_cv_altivec_inline}"
665     CFLAGS_memcpyaltivec="${CFLAGS_memcpyaltivec} ${ac_cv_altivec_inline}"
666     CFLAGS_vlc="${CFLAGS_vlc} ${ac_cv_altivec_inline}"
667   fi
668   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
669 fi
670
671 AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
672     [ac_cv_c_altivec],
673     [CFLAGS="${CFLAGS_save} -faltivec"
674      # Darwin test
675      AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
676         ac_cv_c_altivec=-faltivec, [
677         # Linux/PPC test
678         CFLAGS="${CFLAGS_save} ${CFLAGS_idctaltivec} -fvec"
679         AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
680             [ac_cv_c_altivec="-fvec"], ac_cv_c_altivec=no)
681         ])
682      CFLAGS="${CFLAGS_save}"])
683 if test "x${ac_cv_c_altivec}" != "xno"; then
684   AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
685   CFLAGS_idctaltivec="${CFLAGS_idctaltivec} ${ac_cv_c_altivec}"
686   CFLAGS_motionaltivec="${CFLAGS_motionaltivec} ${ac_cv_c_altivec}"
687   CFLAGS_memcpyaltivec="${CFLAGS_memcpyaltivec} ${ac_cv_c_altivec}"
688   CFLAGS_vlc="${CFLAGS_vlc} ${ac_cv_c_altivec}"
689   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
690 fi
691
692 AC_CACHE_CHECK([if linker needs -framework vecLib],
693     [ac_cv_ld_altivec],
694     [LDFLAGS="${LDFLAGS_vlc} -framework vecLib"
695      AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)
696      LDFLAGS="${LDFLAGS_save}"
697     ])
698 if test "x${ac_cv_ld_altivec}" != "xno"; then
699   LDFLAGS_idctaltivec="${LDFLAGS_idctaltivec} -framework vecLib"
700   LDFLAGS_motionaltivec="${LDFLAGS_motionaltivec} -framework vecLib"
701   LDFLAGS_memcpyaltivec="${LDFLAGS_memcpyaltivec} -framework vecLib"
702   LDFLAGS_vlc="${LDFLAGS_vlc} -framework vecLib"
703 fi
704 fi # end if mingw32
705
706 AC_ARG_WITH(,[])
707 AC_ARG_WITH(,[Optimization options:])
708
709 dnl
710 dnl  Special arch tuning
711 dnl
712 AC_ARG_WITH(tuning,
713 [  --with-tuning=ARCH      enable special tuning for an architecture
714                           (default i686 on IA-32 and 750 on PPC)])
715 if test "x${with_tuning}" != "x"; then
716     if test "x${target_cpu}" = "xpowerpc"; then
717         CFLAGS_TUNING="-mtune=${with_tuning}"
718     else
719         CFLAGS_TUNING="-mcpu=${with_tuning}"
720     fi
721 else
722     if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xi486" -o "x${target_cpu}" = "xi386"; then CFLAGS_TUNING="-mcpu=pentiumpro"
723     else
724         if test "x${target_cpu}" = "xpowerpc"; then CFLAGS_TUNING="-mtune=750"; fi
725     fi
726 fi
727
728 dnl
729 dnl  x86 accelerations
730 dnl
731 if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xx86" -o "x${target_cpu}" = "xi386"
732 then
733     ARCH="${ARCH} mmx"
734     PLUGINS="${PLUGINS} ${ACCEL_MODULES}"
735 fi
736
737 dnl
738 dnl  Enable/disable optimizations
739 dnl
740 AC_ARG_ENABLE(optimizations,
741 [  --disable-optimizations disable compiler optimizations (default enabled)])
742 AM_CONDITIONAL(OPTIM, test "x${enable_optimizations}" != "xno")
743
744 dnl
745 dnl  AltiVec acceleration
746 dnl
747 AC_ARG_ENABLE(altivec,
748 [  --disable-altivec       disable AltiVec optimizations (default enabled on PPC)],
749 [ if test "x${enable_altivec}" = "xyes"; then ARCH="${ARCH} altivec";
750     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ],
751 [ if test "x${target_cpu}" = "xpowerpc"; then ARCH="${ARCH} altivec";
752     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ])
753
754 dnl
755 dnl  Debugging mode
756 dnl
757 AC_ARG_ENABLE(debug,
758 [  --enable-debug          debug mode (default disabled)])
759 AM_CONDITIONAL(DEBUG, test "x${enable_debug}" = "xyes")
760
761 dnl
762 dnl  Enable release-specific flags
763 dnl
764 AC_ARG_ENABLE(release,
765 [  --enable-release        activate extra optimizations (default disabled)])
766 AM_CONDITIONAL(RELEASE, test "x${enable_release}" = "xyes")
767
768 dnl
769 dnl  Input plugins
770 dnl
771
772 AC_ARG_WITH(,[Input plugins:])
773
774 dnl
775 dnl  DVD module: optionally check for installed libdvdcss
776 dnl
777 AC_ARG_ENABLE(dvd,
778 [  --enable-dvd            DVD input module (default enabled)])
779 if test "x${enable_dvd}" != "xno"
780 then
781   AC_ARG_WITH(dvdcss,
782   [    --with-dvdcss=PATH    libdvdcss headers and libraries])
783   AC_ARG_WITH(dvdcss-tree,
784   [    --with-dvdcss-tree=PATH libdvdcss tree for static linking])
785   case "x${with_dvdcss}" in
786   x|xyes)
787     if test "x${with_dvdcss_tree}" = x
788     then
789       AC_CHECK_HEADERS(dvdcss/dvdcss.h,
790         [ PLUGINS="${PLUGINS} dvd"
791           LDFLAGS_dvd="${LDFLAGS_dvd} -ldvdcss"
792           LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -ldvdcss" ],
793         [ 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.])
794           AC_MSG_ERROR([cannot find libdvdcss headers]) ])
795     else
796       AC_MSG_CHECKING(for libdvdcss.a in ${with_dvdcss_tree})
797       real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
798       if test "x${real_dvdcss_tree}" = "x"
799       then
800         dnl  The given directory can't be found
801         AC_MSG_RESULT(no)
802         AC_MSG_ERROR([cannot cd to ${with_dvdcss_tree}])
803       fi
804       if test -f "${real_dvdcss_tree}/src/.libs/libdvdcss.a"
805       then
806         dnl  Use a custom libdvdcss
807         AC_MSG_RESULT(${real_dvdcss_tree}/src/.libs/libdvdcss.a)
808         BUILTINS="${BUILTINS} dvd"
809         LDFLAGS_dvd="${LDFLAGS_dvd} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
810         LDFLAGS_dvdcss="${LDFLAGS_dvdcss} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
811         CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${real_dvdcss_tree}/src"
812       else
813         dnl  The given libdvdcss wasn't built
814         AC_MSG_RESULT(no)
815         AC_MSG_ERROR([cannot find ${real_dvdcss_tree}/src/.libs/libdvdcss.a, make sure you compiled libdvdcss in ${with_dvdcss_tree}])
816       fi
817     fi
818   ;;
819   xno)
820     dnl  Compile without dvdcss (dlopen version, works only under Linux)
821     PLUGINS="${PLUGINS} dvd"
822     CPPFLAGS_dvd="${CPPFLAGS_dvd} -DGOD_DAMN_DMCA"
823     LDFLAGS_dvd="${LDFLAGS_dvd} -ldl"
824   ;;
825   *)
826     AC_MSG_CHECKING(for dvdcss headers in ${with_dvdcss})
827     if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
828     then
829       dnl  Use ${with_dvdcss}/include/dvdcss/dvdcss.h
830       AC_MSG_RESULT(yes)
831       PLUGINS="${PLUGINS} dvd"
832       LDFLAGS_dvd="${LDFLAGS_dvd} -L${with_dvdcss}/lib -ldvdcss"
833       LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -L${with_dvdcss}/lib -ldvdcss"
834       CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${with_dvdcss}/include"
835     else
836       dnl  No libdvdcss could be found, sorry
837       AC_MSG_RESULT(no)
838       AC_MSG_ERROR([cannot find ${with_dvdcss}/include/dvdcss/dvdcss.h])
839     fi
840   ;;
841   esac
842 fi
843
844 dnl
845 dnl dvdread module: check for libdvdread plugin
846 dnl
847 AC_ARG_ENABLE(dvdread,
848 [  --enable-dvdread        dvdread input module (default disabled)])
849 if test "x${enable_dvdread}" != "xno"
850 then
851   AC_ARG_WITH(dvdread,
852   [    --with-dvdread=PATH   libdvdread headers and libraries])
853   if test "x${with_dvdread}" = "x"
854   then
855     LDFLAGS_test=""
856     CPPFLAGS_test=""
857   else
858     LDFLAGS_test="-L${with_dvdread}/lib"
859     CPPFLAGS_test="-I${with_dvdread}/include"
860   fi
861   CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
862   AC_CHECK_HEADERS(dvdread/dvd_reader.h, [
863      AC_TRY_COMPILE([#include <dvdread/dvd_reader.h>],
864         [int foo() { return DVD_VIDEO_LB_LEN; }],[
865           PLUGINS="${PLUGINS} dvdread"
866           LDFLAGS_dvdread="${LDFLAGS_dvdread} ${LDFLAGS_test} -ldvdread ${LDFLAGS_dvdcss}"
867           CPPFLAGS_dvdread="${CPPFLAGS_dvdread} ${CPPFLAGS_test}"
868         ],[
869           if test "x${enable_dvdread}" != "x"
870           then
871             AC_MSG_ERROR([Cannot find DVD_VIDEO_LB_LEN in dvdread/dvd_reader.h, please install libdvdread version 0.9.2 or later])
872           fi
873         ])
874   ],[
875     if test "x${enable_dvdread}" != "x"
876     then
877       if test "x${with_dvdread}" != "x"
878       then
879         AC_MSG_ERROR([Cannot find dvdread/dvd_reader.h in ${with_dvdread}/include])
880       else
881         AC_MSG_ERROR([Cannot find dvdread/dvd_reader.h])
882       fi
883     fi
884   ])
885   CPPFLAGS="${CPPFLAGS_save}"
886 fi
887
888 dnl
889 dnl dvdplay module: check for libdvdplay
890 dnl
891 AC_ARG_ENABLE(dvdplay,
892 [  --enable-dvdplay        dvdplay input module (default disabled)])
893 if test "x${enable_dvdplay}" != "xno"
894 then
895   AC_ARG_WITH(dvdplay,
896   [    --with-dvdplay=PATH   libdvdplay headers and libraries])
897   if test "x${with_dvdplay}" = x
898   then
899     LDFLAGS_test=""
900     CPPFLAGS_test=""
901   else
902     LDFLAGS_test="-L${with_dvdplay}/lib"
903     CPPFLAGS_test="-I${with_dvdplay}/include"
904   fi
905   CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
906   AC_CHECK_HEADERS(dvdplay/dvdplay.h, [
907       PLUGINS="${PLUGINS} dvdplay"
908       LDFLAGS_dvdplay="${LDFLAGS_dvdplay} ${LDFLAGS_test} -ldvdplay -ldvdread ${LDFLAGS_dvdcss}"
909       CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_test}"
910     ],[
911     if test "x${enable_dvdplay}" != x
912     then
913       if test "x${with_dvdplay}" != x
914       then
915         AC_MSG_ERROR([Cannot find dvdplay/dvdplay.h in ${with_dvdplay}/include])
916       else
917         AC_MSG_ERROR([Cannot find dvdplay/dvdplay.h])
918       fi
919     fi
920   ])
921   CPPFLAGS="${CPPFLAGS_save}"
922 fi
923
924
925 dnl
926 dnl  libdvbpsi ts demux
927 dnl
928 AC_ARG_ENABLE(dvbpsi,
929 [  --enable-dvbpsi         dvbpsi ts demux module (default disabled)])
930 if test "x${enable_dvbpsi}" != "xno"
931 then
932   AC_ARG_WITH(dvbpsi,
933   [    --with-dvbpsi=PATH    libdvbpsi headers and libraries])
934   AC_ARG_WITH(dvbpsi,
935   [    --with-dvbpsi-tree=PATH libdvbpsi tree for static linking])
936   case "x${with_dvbpsi}" in
937   x|xyes)
938     if test "x${with_dvbpsi_tree}" = "x"
939     then
940       AC_CHECK_HEADERS(dvbpsi/dr.h,
941         [ PLUGINS="${PLUGINS} ts_dvbpsi"
942           LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} -ldvbpsi" ], [],
943         [  AC_MSG_ERROR([cannot find libdvbpsi headers]) ])
944     else
945       AC_MSG_CHECKING(for libdvbpsi.a in ${with_dvbpsi_tree})
946       real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
947       if test "x${real_dvbpsi_tree}" = "x"
948       then
949         dnl  The given directory can't be found
950         AC_MSG_RESULT(no)
951         AC_MSG_ERROR([cannot cd to ${with_dvbpsi_tree}])
952       fi
953       if test -f "${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
954       then
955         dnl  Use a custom libdvbpsi
956         AC_MSG_RESULT(${real_dvbpsi_tree}/src/.libs/libdvbpsi.a)
957         BUILTINS="${BUILTINS} ts_dvbpsi"
958         LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
959         CPPFLAGS_ts_dvbpsi="${CPPFLAGS_ts_dvbpsi} -I${real_dvbpsi_tree}/src"
960       else
961         dnl  The given libdvbpsi wasn't built
962         AC_MSG_RESULT(no)
963         AC_MSG_ERROR([cannot find ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a, make sure you compiled libdvbpsi in ${with_dvbpsi_tree}])
964       fi
965     fi
966   ;;
967   xno)
968     dnl  Compile without dvbpsi
969   ;;
970   *)
971     AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi})
972     if test "x${with_dvbpsi}" = "x"
973     then
974       LDFLAGS_test=""
975       CPPFLAGS_test=""
976     else
977       LDFLAGS_test="-L${with_dvbpsi}/lib"
978       CPPFLAGS_test="-I${with_dvbpsi}/include"
979     fi
980     CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
981     AC_CHECK_HEADER([dvbpsi/dr.h],[
982       PLUGINS="${PLUGINS} ts_dvbpsi"
983       LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} ${LDFLAGS_test} -ldvbpsi"
984       CPPFLAGS_ts_dvbpsi="${CPPFLAGS_ts_dvbpsi} ${CPPFLAGS_test}"
985       ],[
986       if test "x${enable_dvbpsi}" != "x"
987       then
988         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])
989       fi
990     ])
991     CPPFLAGS="${CPPFLAGS_save}"
992   ;;
993   esac
994 fi
995
996 dnl
997 dnl  Video4Linux plugin
998 dnl
999 AC_ARG_ENABLE(v4l,
1000   [  --enable-v4l            Video4Linux input support (default disabled)])
1001 if test "x${enable_v4l}" = "xyes"
1002 then
1003   AC_CHECK_HEADERS(libv4l/v4l.h, [
1004     PLUGINS="${PLUGINS} v4l"
1005    ],[])
1006 fi
1007
1008 dnl
1009 dnl  VCD module
1010 dnl
1011 AC_ARG_ENABLE(vcd,
1012   [  --enable-vcd            VCD support for Linux, FreeBSD, MacOS X and Win32 (default enabled)])
1013
1014 if test "x${enable_vcd}" != "xno"
1015 then
1016   AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
1017     PLUGINS="${PLUGINS} vcd"
1018   ])
1019
1020   AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
1021     PLUGINS="${PLUGINS} vcd"
1022     AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
1023   ])
1024
1025   if test "x${SYS}" = "xbsdi" -o "x${SYS}" = "xmingw32"
1026   then
1027     PLUGINS="${PLUGINS} vcd"
1028   fi
1029
1030   if test "x${SYS}" = "xdarwin"
1031   then
1032     PLUGINS="${PLUGINS} vcd"
1033     LDFLAGS_vcd="${LDFLAGS_vcd} -framework IOKit -framework CoreFoundation"
1034   fi
1035 fi
1036
1037 dnl
1038 dnl  Satellite input module
1039 dnl
1040 AC_ARG_ENABLE(satellite,
1041   [  --enable-satellite      satellite card support (default disabled)],
1042   [ if test "x${enable_satellite}" = "xyes"
1043     then
1044       PLUGINS="${PLUGINS} satellite"
1045     fi])
1046
1047 dnl
1048 dnl  ipv6 plugin - not for QNX yet
1049 dnl
1050 if test "x${SYS}" != "xnto" && test "x${SYS}" != "xmingw32"
1051 then
1052   have_ipv6=false
1053   AC_CHECK_FUNC(inet_pton,[have_ipv6=:],[
1054     AC_CHECK_LIB(resolv,inet_pton,
1055       [have_ipv6=:
1056        LDFLAGS_ipv6="${LDFLAGS_ipv6} -lresolv"])
1057   ])
1058   AC_MSG_CHECKING(for sockaddr_in6 in netinet/in.h)
1059   AC_EGREP_HEADER(sockaddr_in6,netinet/in.h,
1060     [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); have_ipv6=false])
1061   if ${have_ipv6}; then
1062     PLUGINS="${PLUGINS} ipv6"
1063   fi
1064 fi
1065 if test "x${SYS}" = "xmingw32"
1066 then
1067   AC_MSG_CHECKING(for getaddrinfo in ws2tcpip.h)
1068   AC_EGREP_HEADER(addrinfo,ws2tcpip.h,[AC_MSG_RESULT(yes)
1069     PLUGINS="${PLUGINS} ipv6"],[AC_MSG_RESULT(no)])
1070 fi
1071
1072 dnl
1073 dnl  AVI demux plugin
1074 dnl
1075 AC_ARG_ENABLE(avi,
1076   [  --enable-avi            AVI demux module (default enabled)])
1077 if test "x${enable_avi}" != "xno"
1078 then
1079   PLUGINS="${PLUGINS} avi"
1080 fi
1081
1082 dnl
1083 dnl  ASF demux plugin
1084 dnl
1085 AC_ARG_ENABLE(asf,
1086   [  --enable-asf            ASF demux module (default enabled)])
1087 if test "x${enable_asf}" != "xno"
1088 then
1089   PLUGINS="${PLUGINS} asf"
1090 fi
1091
1092 dnl
1093 dnl  AAC demux plugin
1094 dnl
1095 AC_ARG_ENABLE(aac,
1096   [  --enable-aac            AAC demux module (default enabled)])
1097 if test "x${enable_aac}" != "xno"
1098 then
1099   PLUGINS="${PLUGINS} aac"
1100 fi
1101
1102 dnl
1103 dnl  ogg plugin
1104 dnl
1105 AC_ARG_ENABLE(ogg,
1106   [  --enable-ogg            Ogg demux support (default enabled)])
1107 if test "x${enable_ogg}" != "xno"
1108 then
1109   AC_CHECK_HEADERS(ogg/ogg.h, [
1110     PLUGINS="${PLUGINS} ogg"
1111     LDFLAGS_ogg="${LDFLAGS_ogg} -logg"
1112    ],[])
1113 fi
1114
1115 dnl
1116 dnl  Codec plugins
1117 dnl
1118
1119 AC_ARG_WITH(,[Codec plugins:])
1120
1121 dnl
1122 dnl  mad plugin
1123 dnl
1124 AC_ARG_ENABLE(mad,
1125   [  --enable-mad            libmad module (default disabled)])
1126 if test "x${enable_mad}" = "xyes"
1127 then
1128   AC_ARG_WITH(mad,
1129     [    --with-mad=PATH       path to libmad],[],[])
1130   if test "x${with_mad}" != "xno" -a "x${with_mad}" != "x"
1131   then
1132     CPPFLAGS_mad="${CPPFLAGS_mad} -I${with_mad}/include"
1133     LDFLAGS_mad="${LDFLAGS_mad} -L${with_mad}/lib"
1134   fi
1135
1136   AC_ARG_WITH(mad-tree,
1137     [    --with-mad-tree=PATH  mad tree for static linking],[],[])
1138   if test "x${with_mad_tree}" != "xno" -a "x${with_mad_tree}" != "x"
1139   then
1140     real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
1141     if test "x${real_mad_tree}" = "x"
1142     then
1143       dnl  The given directory can't be found
1144       AC_MSG_RESULT(no)
1145       AC_MSG_ERROR([${with_mad_tree} directory doesn't exist])
1146     fi
1147     dnl  Use a custom libmad
1148     AC_MSG_CHECKING(for mad.h in ${real_mad_tree}/libmad)
1149     if test -f ${real_mad_tree}/libmad/mad.h
1150     then
1151       AC_MSG_RESULT(yes)
1152       CPPFLAGS_mad="${CPPFLAGS_mad} -I${real_mad_tree}/libmad"
1153       LDFLAGS_mad="${LDFLAGS_mad} -L${real_mad_tree}/libmad/.libs"
1154       LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mad}"
1155       AC_CHECK_LIB(mad, mad_bit_init, [
1156         BUILTINS="${BUILTINS} mad"
1157         LDFLAGS_mad="${LDFLAGS_mad} -lmad"
1158         ],[ AC_MSG_ERROR([the specified tree hasn't been compiled ])
1159       ],[])
1160       LDFLAGS="${LDFLAGS_save}"
1161     else
1162       AC_MSG_RESULT(no)
1163       AC_MSG_ERROR([the specified tree doesn't have mad.h])
1164     fi
1165   else
1166     CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mad}"
1167     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mad}"
1168     AC_CHECK_HEADERS(mad.h, ,
1169       [ AC_MSG_ERROR([Cannot find development headers for libmad...]) ])
1170     AC_CHECK_LIB(mad, mad_bit_init, [
1171       PLUGINS="${PLUGINS} mad"
1172       LDFLAGS_mad="${LDFLAGS_mad} -lmad" ],
1173       [ AC_MSG_ERROR([Cannot find libmad library...]) ])
1174     CPPFLAGS="${CPPFLAGS_save}"
1175     LDFLAGS="${LDFLAGS_save}"
1176   fi
1177 fi
1178
1179 dnl
1180 dnl   libid3tag support
1181 dnl
1182 AC_CHECK_HEADERS(id3tag.h, [
1183   LDFLAGS_id3tag="${LDFLAGS_id3tag} -lz -lid3tag"
1184   PLUGINS="${PLUGINS} id3tag"])
1185
1186 dnl
1187 dnl  ffmpeg decoder plugin
1188 dnl
1189 AC_ARG_ENABLE(ffmpeg,
1190 [  --enable-ffmpeg         ffmpeg codec (default disabled)])
1191 if test "x${enable_ffmpeg}" = "xyes"
1192 then
1193   AC_ARG_WITH(ffmpeg,
1194     [    --with-ffmpeg=PATH    path to ffmpeg installation],[],[])
1195   if test "x${with_ffmpeg}" != "xno" -a "x${with_ffmpeg}" != "x"
1196   then
1197     CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${with_ffmpeg}/include/libffmpeg"
1198     LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -L${with_ffmpeg}/lib"
1199   fi
1200
1201   dnl Add postprocessing modules
1202   PLUGINS="${PLUGINS} postprocessing_c"
1203   if test "x${ac_cv_mmx_inline}" != "xno"; then
1204     PLUGINS="${PLUGINS} postprocessing_mmx"
1205   fi
1206
1207   if test "x${ac_cv_mmxext_inline}" != "xno"; then
1208     PLUGINS="${PLUGINS} postprocessing_mmxext"
1209   fi
1210
1211   AC_ARG_WITH(ffmpeg-tree,
1212   [    --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
1213   if test "x${with_ffmpeg_tree}" != "x"
1214   then
1215     AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
1216     real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
1217     if test "x${real_ffmpeg_tree}" = x
1218     then
1219       dnl  The given directory can't be found
1220       AC_MSG_RESULT(no)
1221       AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
1222     fi
1223     if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"
1224     then
1225       dnl  Use a custom libffmpeg
1226       AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
1227       BUILTINS="${BUILTINS} ffmpeg"
1228       LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} ${real_ffmpeg_tree}/libavcodec/libavcodec.a"
1229       CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${real_ffmpeg_tree}/libavcodec"
1230     else
1231       dnl  The given libavcodec wasn't built
1232       AC_MSG_RESULT(no)
1233       AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
1234     fi
1235   else
1236     CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
1237     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
1238     AC_CHECK_LIB(avcodec, avcodec_init, [
1239       BUILTINS="${BUILTINS} ffmpeg"
1240       LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lavcodec" ],
1241       [ AC_MSG_ERROR([Cannot find libavcodec library...]) ])
1242     LDFLAGS="${LDFLAGS_save}"
1243     CPPFLAGS="${CPPFLAGS_save}"
1244   fi
1245 fi
1246
1247 dnl
1248 dnl  faad decoder plugin
1249 dnl
1250 AC_ARG_ENABLE(faad,
1251 [  --enable-faad           faad codec (default disabled)])
1252 if test "x${enable_faad}" = "xyes"
1253 then
1254   AC_ARG_WITH(faad,
1255     [    --with-faad=PATH      path to faad installation],[],[])
1256   if test "x${with_faad}" != "xno" -a "x${with_faad}" != "x"
1257   then
1258     CPPFLAGS_faad="${CPPFLAGS_faad} -I${with_faad}/include"
1259     LDFLAGS_faad="${LDFLAGS_faad} -L${with_faad}/lib"
1260   fi
1261   LDFLAGS_faad="${LDFLAGS_faad}"
1262
1263   AC_ARG_WITH(faad-tree,
1264   [    --with-faad-tree=PATH faad tree for static linking])
1265   if test "x${with_faad_tree}" != "x"
1266   then
1267     AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
1268     real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
1269     if test "x${real_faad_tree}" = x
1270     then
1271       dnl  The given directory can't be found
1272       AC_MSG_RESULT(no)
1273       AC_MSG_ERROR([cannot cd to ${with_faad_tree}])
1274     fi
1275     if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a"
1276     then
1277       dnl  Use a custom faad
1278       AC_MSG_RESULT(${real_faad_tree}/libfaad/.libs/libfaad.a)
1279       BUILTINS="${BUILTINS} faad"
1280       LDFLAGS_faad="${LDFLAGS_faad} ${real_faad_tree}/libfaad/.libs/libfaad.a"
1281       CPPFLAGS_faad="${CPPFLAGS_faad} -I${real_faad_tree}/include"
1282     else
1283       dnl  The given libfaad wasn't built
1284       AC_MSG_RESULT(no)
1285       AC_MSG_ERROR([cannot find ${real_faad_tree}/libfaad/.libs/libfaad.a, make sure you compiled libfaad in ${with_faad_tree}])
1286     fi
1287   else
1288     CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_faad}"
1289     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_faad}"
1290     AC_CHECK_HEADERS(faad.h, ,
1291       [ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ])
1292     AC_CHECK_LIB(faad, faacDecOpen, [
1293       PLUGINS="${PLUGINS} faad"
1294       LDFLAGS_faad="${LDFLAGS_faad} -lfaad" ],
1295       [ AC_MSG_ERROR([Cannot find libfaad library...]) ])
1296     LDFLAGS="${LDFLAGS_save}"
1297     CPPFLAGS="${CPPFLAGS_save}"
1298   fi
1299 fi
1300
1301
1302 dnl
1303 dnl  xvid decoder plugin
1304 dnl
1305 AC_ARG_ENABLE(xvid,
1306 [  --enable-xvid           xvid codec (default disabled)])
1307 if test "x${enable_xvid}" = "xyes"
1308 then
1309   AC_ARG_WITH(xvid,
1310     [    --with-xvid=PATH      path to xvid installation],[],[])
1311   if test "x${with_xvid}" != "xno" -a "x${with_xvid}" != "x"
1312   then
1313     CPPFLAGS_xvid="${CPPFLAGS_xvid} -I${with_xvid}/include"
1314     LDFLAGS_xvid="${LDFLAGS_xvid} -L${with_xvid}/lib"
1315   fi
1316   LDFLAGS_xvid="${LDFLAGS_xvid}"
1317
1318   AC_ARG_WITH(xvid-tree,
1319   [    --with-xvid-tree=PATH xvid tree for static linking])
1320   if test "x${with_xvid_tree}" != "x"
1321   then
1322     AC_MSG_CHECKING(for libxvidcore.a in ${with_xvid_tree})
1323     real_xvid_tree="`cd ${with_xvid_tree} 2>/dev/null && pwd`"
1324     if test "x${real_xvid_tree}" = x
1325     then
1326       dnl  The given directory can't be found
1327       AC_MSG_RESULT(no)
1328       AC_MSG_ERROR([cannot cd to ${with_xvid_tree}])
1329     fi
1330     if test -f "${real_xvid_tree}/build/generic/libxvidcore.a"
1331     then
1332       dnl  Use a custom xvid
1333       AC_MSG_RESULT(${real_xvid_tree}/build/generic/libxvidcore.a)
1334       BUILTINS="${BUILTINS} xvid"
1335       LDFLAGS_xvid="${LDFLAGS_xvid} ${real_xvid_tree}/build/generic/libxvidcore.a"
1336       CPPFLAGS_xvid="${CPPFLAGS_xvid} -I${real_xvid_tree}/src"
1337     else
1338       dnl  The given libxvidcore wasn't built
1339       AC_MSG_RESULT(no)
1340       AC_MSG_ERROR([cannot find ${real_xvid_tree}/build/generic/libxvidcore.a, make sure you compiled libxvidcore in ${with_xvid_tree}])
1341     fi
1342   else
1343     CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_xvid}"
1344     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_xvid}"
1345     AC_CHECK_HEADERS(xvid.h, ,
1346       [ AC_MSG_ERROR([Cannot find development headers for libxvidcore...]) ])
1347     AC_CHECK_LIB(xvid, xvid_init, [
1348       PLUGINS="${PLUGINS} xvid"
1349       LDFLAGS_xvid="${LDFLAGS_xvid} -lxvid" ],
1350       [ AC_MSG_ERROR([Cannot find libxvidcore library...]) ])
1351     LDFLAGS="${LDFLAGS_save}"
1352     CPPFLAGS="${CPPFLAGS_save}"
1353   fi
1354 fi
1355
1356
1357
1358 dnl
1359 dnl MP4 module
1360 dnl
1361 AC_ARG_ENABLE(mp4,
1362   [  --enable-mp4            MP4 demux module (default enabled)])
1363 if test "x${enable_mp4}" != "xno"
1364 then
1365
1366     PLUGINS="${PLUGINS} mp4"
1367     AC_CHECK_HEADERS(zlib.h,
1368               [ LDFLAGS_mp4="${LDFLAGS_mp4} -lz" ] )
1369 fi
1370
1371 dnl
1372 dnl  a52 AC3 decoder plugin
1373 dnl
1374 AC_ARG_ENABLE(a52,
1375   [  --enable-a52            A/52 support with liba52 (default enabled)])
1376 if test "x${enable_a52}" != "xno"
1377 then
1378   AC_ARG_WITH(a52,
1379     [    --with-a52=PATH       a52 headers and libraries])
1380   AC_ARG_WITH(a52-tree,
1381     [    --with-a52-tree=PATH  a52dec tree for static linking ],[],[])
1382   if test "x${with_a52_tree}" != "xno" -a "x${with_a52_tree}" != "x"
1383   then
1384     real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
1385     if test "x${real_a52_tree}" = "x"
1386     then
1387       dnl  The given directory can't be found
1388       AC_MSG_RESULT(no)
1389       AC_MSG_ERROR([${with_a52_tree} directory doesn't exist])
1390     fi
1391     dnl  Use a custom a52dec
1392     AC_MSG_CHECKING(for a52.h in ${real_a52_tree}/include)
1393     if test -f ${real_a52_tree}/include/a52.h
1394     then
1395       AC_MSG_RESULT(yes)
1396       CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} -I${real_a52_tree}"
1397       LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} -L${real_a52_tree}/liba52/.libs"
1398       LDFLAGS="${LDFLAGS_save} ${LDFLAGS_a52tofloat32}"
1399       AC_CHECK_LIB(a52, a52_free, [
1400         BUILTINS="${BUILTINS} a52tofloat32"
1401         LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} -la52 -lm"
1402         CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} -DUSE_A52DEC_TREE"
1403         ],[
1404         if test -f ${real_a52_tree}/liba52/.libs/liba52.a
1405         then
1406           AC_MSG_ERROR([make sure you have at least a52dec-0.7.3])
1407         else
1408           AC_MSG_ERROR([the specified tree hasn't been compiled])
1409         fi
1410       ],[-lm])
1411       LDFLAGS="${LDFLAGS_save}"
1412     else
1413       AC_MSG_RESULT(no)
1414       AC_MSG_ERROR([the specified tree doesn't have a52.h])
1415     fi
1416   else
1417     if test "x${with_a52}" = "x"
1418     then
1419       LDFLAGS_test=""
1420       CPPFLAGS_test=""
1421     else
1422       LDFLAGS_test="-L${with_a52}/lib"
1423       CPPFLAGS_test="-I${with_a52}/include"
1424     fi
1425     CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
1426     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_test}"
1427     AC_CHECK_HEADERS(a52dec/a52.h, [
1428       AC_CHECK_LIB(a52, a52_free, [
1429         PLUGINS="${PLUGINS} a52tofloat32"
1430         LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} ${LDFLAGS_test} -la52 -lm"
1431         CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} ${CPPFLAGS_test}"
1432       ],[
1433         if test "x${enable_dvbpsi}" != "x"
1434         then
1435           AC_MSG_ERROR([Could not find a52 on your system: you may get it from http://liba52.sf.net])
1436         fi
1437       ],[-lm])
1438     ])
1439     CPPFLAGS="${CPPFLAGS_save}"
1440     LDFLAGS="${LDFLAGS_save}"
1441   fi
1442 fi
1443
1444 dnl
1445 dnl  cinepak plugin
1446 dnl
1447 AC_ARG_ENABLE(cinepak,
1448   [  --enable-cinepak        Cinepak decoder (default enabled)])
1449 if test "x${enable_cinepak}" != "xno"
1450 then
1451   PLUGINS="${PLUGINS} cinepak"
1452 fi
1453
1454 dnl
1455 dnl  DV plugin
1456 dnl
1457 AC_ARG_ENABLE(dv,
1458   [  --enable-dv             DV decoder support (default disabled)])
1459 if test "x${enable_dv}" = "xyes"
1460 then
1461   AC_CHECK_HEADERS(libdv/dv.h, [
1462     PLUGINS="${PLUGINS} dv"
1463     LDFLAGS_dv="${LDFLAGS_dv} -ldv"
1464    ],[])
1465 fi
1466
1467 dnl
1468 dnl  Vorbis plugin
1469 dnl
1470 AC_ARG_ENABLE(vorbis,
1471   [  --enable-vorbis         Vorbis decoder support (default enabled)])
1472 if test "x${enable_vorbis}" != "xno"
1473 then
1474   AC_CHECK_HEADERS(vorbis/codec.h, [
1475     PLUGINS="${PLUGINS} vorbis"
1476     LDFLAGS_vorbis="${LDFLAGS_vorbis} -lvorbis -logg"
1477    ],[])
1478 fi
1479
1480 dnl
1481 dnl  Video plugins
1482 dnl
1483
1484 AC_ARG_WITH(,[Video plugins:])
1485
1486 dnl
1487 dnl  X11 module
1488 dnl  (enabled by default except on win32)
1489 dnl
1490 AC_ARG_ENABLE(x11,
1491   [  --enable-x11            X11 support (default enabled)])
1492 if test "x${enable_x11}" != "xno" &&
1493   (test "x${SYS}" != "xmingw32" || test "x${enable_x11}" = "xyes"); then
1494   CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
1495   AC_CHECK_HEADERS(X11/Xlib.h, [
1496     PLUGINS="${PLUGINS} x11"
1497     LDFLAGS_x11="${LDFLAGS_x11} -L${x_libraries} -lX11 -lXext"
1498     CPPFLAGS_x11="${CPPFLAGS_x11} -I${x_includes}"
1499   ])
1500   CPPFLAGS="${CPPFLAGS_save}"
1501 fi
1502
1503 dnl
1504 dnl  XVideo module
1505 dnl  (enabled by default except on win32)
1506 dnl
1507 AC_ARG_ENABLE(xvideo,
1508   [  --enable-xvideo         XVideo support (default enabled)])
1509 if test "x${enable_xvideo}" != "xno" &&
1510   (test "x${SYS}" != "xmingw32" || test "x${enable_xvideo}" = "xyes"); then
1511   CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
1512   AC_CHECK_HEADERS(X11/extensions/Xv.h, [
1513     CFLAGS="${CFLAGS_save} -L${x_libraries} -lX11 -lXext"
1514     AC_CHECK_LIB(Xv_pic,XvPutImage,
1515       # We have Xv_pic, that's good, we can build an xvideo.so plugin !
1516       PLUGINS="${PLUGINS} xvideo"
1517       LDFLAGS_xvideo="${LDFLAGS_xvideo} -L${x_libraries} -lX11 -lXext -lXv_pic"
1518       CPPFLAGS_xvideo="${CPPFLAGS_xvideo} -I${x_includes}",
1519       AC_CHECK_LIB(Xv,XvPutImage,
1520         # We don't have Xv_pic, but we have Xv, let's make xvideo.a as builtin
1521         PLUGINS="${PLUGINS} xvideo"
1522         LDFLAGS_xvideo="${LDFLAGS_xvideo} -L${x_libraries} -lX11 -lXext -lXv"
1523         CPPFLAGS_xvideo="${CPPFLAGS_xvideo} -I${x_includes}",
1524         # Otherwise... well, do nothing.
1525         :
1526       )
1527     )
1528     CFLAGS="${CFLAGS_save}"
1529   ]
1530   CPPFLAGS="${CPPFLAGS_save}")
1531 fi
1532
1533 dnl
1534 dnl  SDL module
1535 dnl
1536 AC_ARG_ENABLE(sdl,
1537   [  --enable-sdl            SDL support (default enabled)])
1538 if test "x${enable_sdl}" != "xno"
1539 then
1540   SDL_PATH="${PATH}"
1541   AC_ARG_WITH(sdl-config-path,
1542     [    --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)],
1543     [ if test "x${with_sdl_config_path}" != "xno"
1544       then
1545         SDL_PATH="${with_sdl_config_path}:${PATH}"
1546       fi ])
1547   AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no, ${SDL_PATH})
1548   SDL_CONFIG="${SDL12_CONFIG}"
1549   SDL_HEADER="SDL12/SDL.h"
1550   if test "x${SDL_CONFIG}" = "xno"
1551   then
1552     AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no, ${SDL_PATH})
1553     SDL_CONFIG=${SDL11_CONFIG}
1554     SDL_HEADER="SDL11/SDL.h"
1555   fi
1556   if test "x${SDL_CONFIG}" = "xno"
1557   then
1558     AC_PATH_PROG(SDL_CONFIG, sdl-config, no, ${SDL_PATH})
1559     SDL_HEADER="SDL/SDL.h"
1560   fi
1561   if test "x${SDL_CONFIG}" != "xno"
1562   then
1563     PLUGINS="${PLUGINS} vout_sdl aout_sdl"
1564     CFLAGS_vout_sdl="${CFLAGS_vout_sdl} `${SDL_CONFIG} --cflags`"
1565     LDFLAGS_vout_sdl="${LDFLAGS_vout_sdl} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
1566     CFLAGS_aout_sdl="${CFLAGS_aout_sdl} `${SDL_CONFIG} --cflags`"
1567     LDFLAGS_aout_sdl="${LDFLAGS_aout_sdl} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
1568     CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_vout_sdl}"
1569     AC_CHECK_HEADERS(${SDL_HEADER}, AC_DEFINE_UNQUOTED(SDL_INCLUDE_FILE,
1570       <${SDL_HEADER}>, Indicate whether we should use SDL/SDL.h or SDL11/SDL.h),
1571       [ AC_MSG_ERROR([The development package for SDL is not installed.
1572 Please install it and try again. Alternatively you can also configure with
1573 --disable-sdl.])
1574       ])
1575     CPPFLAGS="${CPPFLAGS_save}"
1576     if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
1577     then
1578       AC_MSG_ERROR([The development package for SDL is not installed.
1579 Please install it and try again. Alternatively you can also configure with
1580 --disable-sdl.])
1581     fi
1582   elif test "x${enable_sdl}" =  "xyes"
1583   then
1584     AC_MSG_ERROR([I couldn't find the SDL package. You can download libSDL
1585 from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
1586     ])
1587   fi
1588 fi
1589
1590 dnl
1591 dnl  Qt Embedded module
1592 dnl  (disabled by default)
1593 dnl
1594 AC_ARG_ENABLE(qte,
1595   [  --enable-qte            QT Embedded support (default disabled)])
1596 if test "x${enable_qte}" != "xno"
1597 then
1598   AC_ARG_WITH(qte,
1599   [    --with-qte=PATH    Qt Embedded headers and libraries])
1600   if test "x${with_qte}" = "x"
1601   then
1602     LDFLAGS_test="-L${QTDIR}/lib"
1603     CPPFLAGS_test="-I${QTDIR}/include"
1604   else
1605     LDFLAGS_test="-L${with_qte}/lib"
1606     CPPFLAGS_test="-I${with_qte}/include"
1607   fi
1608
1609   CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
1610   AC_CHECK_HEADERS(qt.h, [
1611     CPPFLAGS_qte="${CPPFLAGS_qte} ${CPPFLAGS_test} -DQT_QWS_IPAQ -DQWS"
1612     CXXFLAGS_qte="${CXXFLAGS_qte} -fno-exceptions -fno-rtti"
1613     LDFLAGS_qte="${LDFLAGS_qte} ${LDFLAGS_test} -lqte"
1614     if test "x${with_qte}" = "x"
1615     then
1616       PLUGINS="${PLUGINS} qte"
1617     else
1618       BUILTINS="${BUILTINS} qte"
1619     fi
1620   ])
1621   CPPFLAGS="${CPPFLAGS_save}"
1622 fi
1623
1624 dnl
1625 dnl  Windows DirectX module
1626 dnl
1627 AC_ARG_ENABLE(directx,
1628   [  --enable-directx        Win32 DirectX support (default enabled on Win32)])
1629 if test "x${enable_directx}" != "xno"
1630 then
1631   if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"
1632   then
1633     AC_ARG_WITH(directx,
1634     [    --with-directx=PATH   Win32 DirectX headers])
1635     if test "x${with_directx}" = "x"
1636     then
1637       AC_CHECK_HEADERS(ddraw.h,
1638       [ PLUGINS="${PLUGINS} vout_directx aout_directx"
1639         LDFLAGS_vout_directx="${LDFLAGS_directx} -lgdi32" ])
1640     else
1641       AC_MSG_CHECKING(for directX headers in ${with_directx})
1642       if test -f ${with_directx}/ddraw.h
1643       then
1644         PLUGINS="${PLUGINS} vout_directx aout_directx"
1645         LDFLAGS_vout_directx="${LDFLAGS_directx} -lgdi32"
1646         CPPFLAGS_vout_directx="${CPPFLAGS_vout_directx} -I${with_directx}"
1647         CPPFLAGS_aout_directx="${CPPFLAGS_aout_directx} -I${with_directx}"
1648         AC_MSG_RESULT(yes)
1649       else
1650         AC_MSG_RESULT(no)
1651         AC_MSG_ERROR([Cannot find ${with_directx}/ddraw.h!])
1652       fi
1653     fi
1654   fi
1655 fi
1656
1657 dnl
1658 dnl  Linux framebuffer module
1659 dnl
1660 AC_ARG_ENABLE(fb,
1661   [  --enable-fb             Linux framebuffer support (default enabled on Linux)])
1662     if test "x${enable_fb}" != "xno"
1663     then
1664       AC_CHECK_HEADERS(linux/fb.h, [
1665         PLUGINS="${PLUGINS} fb"
1666       ])
1667     fi
1668
1669 dnl
1670 dnl  Linux MGA module
1671 dnl
1672 AC_ARG_ENABLE(mga,
1673   [  --enable-mga            Linux kernel Matrox support (default disabled)],
1674   [ if test "x${enable_mga}" = "xyes"
1675     then
1676       PLUGINS="${PLUGINS} mga xmga"
1677     fi ])
1678
1679 dnl
1680 dnl  SVGAlib module
1681 dnl
1682 AC_ARG_ENABLE(svgalib,
1683   [  --enable-svgalib        SVGAlib support (default disabled)])
1684 if test "x${enable_svgalib}" = "xyes"
1685 then
1686   PLUGINS="${PLUGINS} svgalib"
1687   LDFLAGS_svgalib="${LDFLAGS_svgalib} -lvgagl -lvga"
1688 fi
1689
1690 dnl
1691 dnl  GGI module
1692 dnl
1693 AC_ARG_ENABLE(ggi,
1694   [  --enable-ggi            GGI support (default disabled)])
1695 if test "x${enable_ggi}" = "xyes"
1696 then
1697   PLUGINS="${PLUGINS} ggi"
1698   LDFLAGS_ggi="${LDFLAGS_ggi} -lggi"
1699   AC_ARG_WITH(ggi,
1700     [    --with-ggi=PATH       path to libggi],
1701     [ if test "x${with_ggi}" != "xno" -a "x${with_ggi}" != "x"
1702       then
1703         CPPFLAGS_ggi="${CPPFLAGS_ggi} -I${with_ggi}/include"
1704         LDFLAGS_ggi="${LDFLAGS_ggi} -L${with_ggi}/lib"
1705       fi ])
1706 fi
1707
1708 dnl
1709 dnl  Glide module
1710 dnl
1711 AC_ARG_ENABLE(glide,
1712   [  --enable-glide          Glide (3dfx) support (default disabled)])
1713 if test "x${enable_glide}" = "xyes"
1714 then
1715   PLUGINS="${PLUGINS} glide"
1716   LDFLAGS_glide="${LDFLAGS_glide} -lglide2x -lm"
1717   CPPFLAGS_glide="${CPPFLAGS_glide} -I/usr/include/glide"
1718   AC_ARG_WITH(glide,
1719     [    --with-glide=PATH     path to libglide],
1720     [ if test "x${with_glide}" != "xno" -a "x${with_glide}" != "x"
1721       then
1722         CPPFLAGS_glide="${CPPFLAGS_glide} -I${with_glide}/include"
1723         LDFLAGS_glide="${LDFLAGS_glide} -L${with_glide}/lib"
1724       fi ])
1725 fi
1726
1727 dnl
1728 dnl  AA plugin
1729 dnl
1730 AC_ARG_ENABLE(aa,
1731   [  --enable-aa             aalib output (default disabled)])
1732 if test "x${enable_aa}" = "xyes"
1733 then
1734   AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
1735   if test "x${have_aa}" = "xtrue"
1736   then
1737     PLUGINS="${PLUGINS} aa"
1738     LDFLAGS_aa="${LDFLAGS_aa} -laa"
1739   fi
1740 fi
1741
1742 dnl
1743 dnl  Audio plugins
1744 dnl
1745
1746 AC_ARG_WITH(,[Audio plugins:])
1747
1748 dnl
1749 dnl  OSS /dev/dsp module (enabled by default except on win32)
1750 dnl
1751 AC_ARG_ENABLE(oss,
1752   [  --enable-oss            Linux OSS /dev/dsp support (enabled on Linux)])
1753
1754 if test "x${enable_oss}" != "xno" &&
1755   (test "x${SYS}" != "xmingw32" || test "x${enable_oss}" = "xyes")
1756 then
1757   AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h, [
1758     PLUGINS="${PLUGINS} oss"
1759     AC_CHECK_LIB(ossaudio,main,LDFLAGS_oss="${LDFLAGS_oss} -lossaudio")
1760   ])
1761 fi
1762
1763 dnl
1764 dnl  Esound module
1765 dnl
1766 AC_ARG_ENABLE(esd,
1767   [  --enable-esd            Esound library support (default disabled)],
1768   [if test "x${enable_esd}" = "xyes"
1769    then
1770      AC_PATH_PROG(ESD_CONFIG, esd-config, no)
1771      if test "x${ESD_CONFIG}" != "xno"
1772      then
1773        PLUGINS="${PLUGINS} esd"
1774        CFLAGS_esd="${CFLAGS_esd} `${ESD_CONFIG} --cflags`"
1775        LDFLAGS_esd="${LDFLAGS_esd} `${ESD_CONFIG} --libs`"
1776      fi
1777    fi])
1778
1779 dnl
1780 dnl  aRts module
1781 dnl
1782 AC_ARG_ENABLE(arts,
1783   [  --enable-arts           aRts sound server (default disabled)],
1784   [if test "x${enable_arts}" = "xyes"
1785    then
1786      AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
1787      if test "x${ARTS_CONFIG}" != "xno"
1788      then
1789        PLUGINS="${PLUGINS} arts"
1790        CFLAGS_arts="${CFLAGS_arts} `${ARTS_CONFIG} --cflags`"
1791        LDFLAGS_arts="${LDFLAGS_arts} `${ARTS_CONFIG} --libs `"
1792      fi
1793    fi])
1794
1795 dnl
1796 dnl  ALSA module
1797 dnl
1798 AC_ARG_ENABLE(alsa,
1799   [  --enable-alsa           ALSA sound support for Linux (default disabled)],
1800   [if test "x${enable_alsa}" = "xyes"
1801    then
1802      AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
1803      if test "x${have_alsa}" = "xtrue"
1804      then
1805        #PLUGINS="${PLUGINS} alsa"
1806        LDFLAGS_alsa="${LDFLAGS_alsa} -lasound -lm -ldl"
1807      fi
1808    fi])
1809
1810 dnl
1811 dnl  win32 waveOut plugin
1812 dnl
1813 AC_ARG_ENABLE(waveout,
1814   [  --enable-waveout        Win32 waveOut module (default enabled on Win32)])
1815 if test "x${enable_waveout}" != "xno"; then
1816   if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
1817     PLUGINS="${PLUGINS} waveout"
1818     LDFLAGS_waveout="-lwinmm"
1819   fi
1820 fi
1821
1822 dnl
1823 dnl  Interface plugins
1824 dnl
1825
1826 AC_ARG_WITH(,[Interface plugins:])
1827
1828 dnl special case for BeOS
1829 if test "x${SYS}" = "xbeos"
1830 then
1831     PLUGINS="${PLUGINS} beos"
1832 fi
1833
1834 dnl
1835 dnl  Gtk+ module
1836 dnl
1837 AC_ARG_ENABLE(gtk,
1838   [  --enable-gtk            Gtk+ support (default enabled)])
1839 if test "x${enable_gtk}" != "xno"
1840 then
1841   GTK_PATH="${PATH}"
1842   AC_ARG_WITH(gtk-config-path,
1843     [    --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
1844     [ if test "x${with_gtk_config_path}" != "xno"
1845       then
1846         GTK_PATH="${with_gtk_config_path}:${PATH}"
1847       fi ])
1848   # look for gtk-config
1849   AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
1850   GTK_CONFIG=${GTK12_CONFIG}
1851   if test "x${GTK_CONFIG}" = "xno"
1852   then
1853     AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
1854   fi
1855   if test "x${GTK_CONFIG}" != "xno"
1856   then
1857     if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
1858     then
1859       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.])
1860     fi
1861     if test "x${SYS}" != "xmingw32"; then
1862       CFLAGS_gtk="${CFLAGS_gtk} `${GTK_CONFIG} --cflags gtk gthread`"
1863       LDFLAGS_gtk="${LDFLAGS_gtk} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
1864     else
1865       CFLAGS_gtk="${CFLAGS_gtk} `${GTK_CONFIG} --cflags gtk`"
1866       LDFLAGS_gtk="${LDFLAGS_gtk} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
1867     fi
1868     # now look for the gtk.h header
1869     CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gtk}"
1870     ac_cv_gtk_headers=yes
1871     AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
1872       ac_cv_gtk_headers=no
1873       echo "Cannot find gtk development headers."
1874     ])
1875     if test "x${ac_cv_gtk_headers}" = "xyes"
1876     then
1877       PLUGINS="${PLUGINS} gtk"
1878       if test "x${SYS}" != "xmingw32"; then
1879         NEED_GTK_MAIN=yes
1880       fi
1881       ALIASES="${ALIASES} gvlc"
1882     fi
1883     CPPFLAGS="${CPPFLAGS_save}"
1884   fi
1885 fi
1886
1887 dnl
1888 dnl  Familiar module uses Gtk+ library
1889 dnl
1890 AC_ARG_ENABLE(familiar,
1891   [  --enable-familiar       Familiar Gtk+ support (default disabled)])
1892 if test "x${enable_familiar}" = "xyes"
1893 then
1894   GTK_PATH="${PATH}"
1895   AC_ARG_WITH(gtk-config-path,
1896     [    --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
1897     [ if test "x${with_gtk_config_path}" != "xno"
1898       then
1899         GTK_PATH="${with_gtk_config_path}:${PATH}"
1900       fi ])
1901   # look for gtk-config
1902   AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
1903   GTK_CONFIG=${GTK12_CONFIG}
1904   if test "x${GTK_CONFIG}" = "xno"
1905   then
1906     AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
1907   fi
1908   if test "x${GTK_CONFIG}" != "xno"
1909   then
1910     if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
1911     then
1912       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.])
1913     fi
1914     CFLAGS_familiar="${CFLAGS_familiar} `${GTK_CONFIG} --cflags gtk gthread`"
1915     LDFLAGS_familiar="${LDFLAGS_familiar} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
1916     # now look for the gtk.h header
1917     CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_familiar}"
1918     ac_cv_gtk_headers=yes
1919     AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
1920       ac_cv_gtk_headers=no
1921       echo "Cannot find gtk development headers."
1922     ])
1923     if test "x${ac_cv_gtk_headers}" = "xyes"
1924     then
1925       PLUGINS="${PLUGINS} familiar"
1926       NEED_GTK_MAIN=yes
1927     fi
1928     CPPFLAGS="${CPPFLAGS_save}"
1929   fi
1930 fi
1931
1932 dnl
1933 dnl  Gnome module
1934 dnl
1935 AC_ARG_ENABLE(gnome,
1936   [  --enable-gnome          Gnome interface support (default disabled)],
1937   [if test "x${enable_gnome}" = "xyes"; then
1938     # look for gnome-config
1939     AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
1940     if test -x ${GNOME_CONFIG}
1941     then
1942        CFLAGS_gnome="${CFLAGS_gnome} `${GNOME_CONFIG} --cflags gtk gnomeui`"
1943        LDFLAGS_gnome="${LDFLAGS_gnome} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
1944     fi
1945     # now look for the gnome.h header
1946     CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gnome}"
1947     AC_CHECK_HEADERS(gnome.h, [
1948       PLUGINS="${PLUGINS} gnome"
1949       NEED_GTK_MAIN=yes
1950       NEED_GNOME_MAIN=yes
1951       ALIASES="${ALIASES} gnome-vlc"
1952      ],[
1953       AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
1954 developement tools or remove the --enable-gnome option])
1955      ])
1956     CPPFLAGS="${CPPFLAGS_save}"
1957   fi])
1958
1959 dnl
1960 dnl  Qt module
1961 dnl
1962 AC_ARG_ENABLE(qt,
1963   [  --enable-qt             Qt interface support (default disabled)],
1964   [if test "x${enable_qt}" = "xyes"; then
1965      PLUGINS="${PLUGINS} qt"
1966      ALIASES="${ALIASES} qvlc"
1967      LDFLAGS_qt="${LDFLAGS_qt} -lqt -L${QTDIR}/lib"
1968      CPPFLAGS_qt="${CPPFLAGS_qt} -I/usr/include/qt -I${QTDIR}/include"
1969      if test -x ${QTDIR}/bin/moc
1970      then
1971        MOC=${QTDIR}/bin/moc
1972      else
1973        MOC=moc
1974      fi
1975    fi])
1976
1977 dnl
1978 dnl  KDE module
1979 dnl
1980 AC_ARG_ENABLE(kde,
1981   [  --enable-kde            KDE interface support (default disabled)],
1982   [if test "x${enable_kde}" = "xyes"; then
1983      PLUGINS="${PLUGINS} kde"
1984      ALIASES="${ALIASES} kvlc"
1985      LDFLAGS_kde="${LDFLAGS_kde} -L${KDEDIR}/lib -lkfile"
1986      CPPFLAGS_kde="${CPPFLAGS_kde} -I/usr/include/kde -I/usr/include/qt"
1987      CPPFLAGS_kde="${CPPFLAGS_kde} -I${KDEDIR}/include -I${QTDIR}/include"
1988      if test -x ${QTDIR}/bin/moc
1989      then
1990        MOC=${QTDIR}/bin/moc
1991      else
1992        MOC=moc
1993      fi
1994    fi])
1995
1996 dnl
1997 dnl  Opie QT embedded module
1998 dnl
1999 AC_ARG_ENABLE(opie,
2000   [  --enable-opie           Qt embedded interface support (default disabled)],
2001   [if test "x${enable_opie}" = "xyes"; then
2002      AC_ARG_WITH(qte,
2003      [    --with-qte=PATH    Qt Embedded headers and libraries])
2004      if test "x${with_qte}" = "x"
2005      then
2006        LDFLAGS_test="-L${QTDIR}/lib"
2007        CPPFLAGS_test="-I${QTDIR}/include"
2008      else
2009        LDFLAGS_test="-L${with_qte}/lib"
2010        CPPFLAGS_test="-I${with_qte}/include"
2011      fi
2012
2013      PLUGINS="${PLUGINS} opie"
2014      LDFLAGS_opie="${LDFLAGS_opie} ${LDFLAGS_test} -lqte"
2015      CPPFLAGS_opie="${CPPFLAGS_opie} ${CPPFLAGS_test}"
2016      if test -x ${QTEDIR}/bin/moc
2017      then
2018        MOC=${QTEDIR}/bin/moc
2019      else
2020        MOC=moc
2021      fi
2022    fi])
2023
2024 dnl
2025 dnl  MacOS X module
2026 dnl
2027 AC_ARG_ENABLE(macosx,
2028   [  --enable-macosx         MacOS X support (default enabled on MacOS X)],
2029   [if test "x${enable_macosx}" = "xyes"
2030    then
2031      BUILTINS="${BUILTINS} macosx"
2032      LDFLAGS_macosx="${LDFLAGS_macosx} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC"
2033    fi],
2034   [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
2035      BUILTINS="${BUILTINS} macosx"
2036      LDFLAGS_macosx="${LDFLAGS_macosx} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC"
2037    )])
2038
2039 dnl
2040 dnl  QNX RTOS module
2041 dnl
2042 AC_ARG_ENABLE(qnx,
2043   [  --enable-qnx            QNX RTOS support (default enabled on QNX RTOS)])
2044     if test "x${enable_qnx}" != "xno"
2045     then
2046       AC_CHECK_HEADERS(Ph.h, [
2047         PLUGINS="${PLUGINS} qnx"
2048         LDFLAGS_qnx="${LDFLAGS_qnx} -lasound -lph"
2049       ])
2050     fi
2051
2052 dnl
2053 dnl  Windows native interface module, built with Borland C++ Builder
2054 dnl
2055 AC_ARG_ENABLE(intfwin,
2056 [  --enable-intfwin        Win32 interface support (default disabled)],
2057 [ if test "x${enable_intfwin}" != "xno"
2058   then
2059     AC_ARG_WITH(bcbuilder,
2060     [    --with-bcbuilder=PATH Borland C++ Builder installation path])
2061     if test "x${with_bcbuilder}" != "x"
2062     then
2063       BCBUILDER="${with_bcbuilder}"
2064     fi
2065     PLUGINS="${PLUGINS} win32"
2066   fi ])
2067
2068 dnl
2069 dnl  ncurses module
2070 dnl
2071 AC_ARG_ENABLE(ncurses,
2072   [  --enable-ncurses        ncurses interface support (default disabled)],
2073   [if test "x${enable_ncurses}" = "xyes"; then
2074      PLUGINS="${PLUGINS} ncurses"
2075      LDFLAGS_ncurses="${LDFLAGS_ncurses} -lncurses"
2076    fi])
2077
2078 dnl
2079 dnl  XOSD plugin
2080 dnl
2081 AC_ARG_ENABLE(xosd,
2082   [  --enable-xosd           xosd interface support (default disabled)])
2083 if test "x${enable_xosd}" = "xyes"
2084 then
2085   AC_CHECK_HEADER(xosd.h, have_xosd="true", have_xosd="false")
2086   AC_TRY_COMPILE([#include <xosd.h>],
2087      [void foo() { xosd_init("foo","bar",12,XOSD_top,2,12,42); }],,
2088       AC_DEFINE(HAVE_OLD_XOSD_H, 1, Define if <xosd.h> is pre-1.0.0))
2089   if test "x${have_xosd}" = "xtrue"
2090   then
2091     PLUGINS="${PLUGINS} xosd"
2092     LDFLAGS_xosd="${LDFLAGS_xosd} -lxosd"
2093   fi
2094 fi
2095
2096 dnl
2097 dnl  Lirc plugin
2098 dnl
2099 AC_ARG_ENABLE(lirc,
2100   [  --enable-lirc           lirc support (default disabled)])
2101 if test "x${enable_lirc}" = "xyes"
2102 then
2103   AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
2104   if test "x${have_lirc}" = "xtrue"
2105   then
2106     PLUGINS="${PLUGINS} lirc"
2107     LDFLAGS_lirc="${LDFLAGS_lirc} -llirc_client"
2108   fi
2109 fi
2110
2111 AC_ARG_WITH(,[Misc options:])
2112
2113 dnl
2114 dnl  Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
2115 dnl
2116 dnl  We give the user the opportunity to specify
2117 dnl  --with-words=big or --with-words=little ; otherwise, try to guess
2118 dnl
2119 AC_ARG_WITH(words,
2120   [  --with-words=endianness set endianness (big or little)])
2121   case "x${with_words}" in
2122     xbig)
2123       ac_cv_c_bigendian=yes
2124       ;;
2125     xlittle)
2126       ac_cv_c_bigendian=no
2127       ;;
2128     *)
2129       dnl  Try to guess endianness by matching patterns on a compiled
2130       dnl  binary, by looking for an ASCII or EBCDIC string
2131       AC_CACHE_CHECK([whether the byte order is big-endian],
2132         [ac_cv_c_bigendian],
2133         [ac_cv_c_bigendian="unknown"
2134         [cat >conftest.c <<EOF
2135         short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
2136         short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
2137         void _a(void) { char*s = (char*)am; s = (char *)ai; }
2138         short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
2139         short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
2140         void _e(void) { char*s = (char*)em; s = (char*)ei; }
2141         int main(void) { _a(); _e(); return 0; }
2142 EOF
2143         ]
2144         if test -f conftest.c
2145         then
2146           if ${CC-cc} -c conftest.c -o conftest.o >>config.log 2>&1 \
2147               && test -f conftest.o
2148           then
2149             if test "`strings conftest.o | grep BIGenDianSyS`"
2150             then
2151               ac_cv_c_bigendian="yes"
2152             fi
2153             if test "`strings conftest.o | grep LiTTleEnDian`"
2154             then
2155               ac_cv_c_bigendian="no"
2156             fi
2157           fi
2158         fi
2159       ])
2160       if test "x${ac_cv_c_bigendian}" = "xunknown"
2161       then
2162         AC_MSG_ERROR([Could not guess endianness, please use --with-words])
2163       fi
2164       ;;
2165   esac
2166 dnl  Now we know what to use for endianness, just put it in the header
2167 if test "${ac_cv_c_bigendian}" = "yes"
2168 then
2169   AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system)
2170 fi
2171
2172 dnl
2173 dnl  Profiling
2174 dnl
2175 AC_ARG_ENABLE(gprof,
2176 [  --enable-gprof          gprof profiling (default disabled)])
2177 AC_ARG_ENABLE(cprof,
2178 [  --enable-cprof          cprof profiling (default disabled)])
2179 AM_CONDITIONAL(GPROF, test "x${enable_gprof}" = "xyes")
2180 AM_CONDITIONAL(CPROF, test "x${enable_gprof}" = "xyes")
2181
2182 dnl
2183 dnl  GNU portable threads
2184 dnl
2185 AC_ARG_ENABLE(pth,
2186   [  --enable-pth            GNU Pth support (default disabled)],
2187   [ if test "x${enable_pth}" = "xyes"; then
2188     AC_CHECK_LIB(pth,pth_init)
2189     AC_EGREP_HEADER(pth_init,pth.h,[
2190       AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
2191                 Define if <pth.h> defines pth_init)
2192     THREAD_LIB="-lpth"
2193     fi])
2194 ])
2195
2196 dnl
2197 dnl  State Threads
2198 dnl
2199 AC_ARG_ENABLE(st,
2200   [  --enable-st             State Threads (default disabled)],
2201   [ if test "x${enable_st}" = "xyes"; then
2202     AC_CHECK_LIB(st,st_init)
2203     AC_EGREP_HEADER(st_init,st.h,[
2204       AC_DEFINE(ST_INIT_IN_ST_H, 1,
2205                 Define if <st.h> defines st_init)
2206     THREAD_LIB="-lst"
2207     fi])
2208 ])
2209
2210 if test "x${SYS}" != "xmingw32"; then
2211   LDFLAGS_vlc="${LDFLAGS_vlc} ${THREAD_LIB}"
2212   LDFLAGS_plugins="${LDFLAGS_plugins} ${THREAD_LIB}"
2213 fi
2214
2215 dnl
2216 dnl  Mozilla plugin
2217 dnl
2218 mozilla=false
2219 AC_ARG_ENABLE(mozilla,
2220   [  --enable-mozilla        build a vlc-based Mozilla plugin (default disabled)])
2221 if test "x${enable_mozilla}" = "xyes"
2222 then
2223   AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
2224   if test "x${MOZILLA_CONFIG}" != "xno"
2225   then
2226     if test "x${SYS}" != "xmingw32"; then
2227       LDFLAGS="${LDFLAGS_save} -L${x_libraries}"
2228       AC_CHECK_LIB(Xt,XtStrings,[
2229         LDFLAGS_mozilla="${LDFLAGS_mozilla} -L${x_libraries} -lXt"
2230       ])
2231       LDFLAGS="${LDFLAGS_save}"
2232     fi
2233     mozilla=:
2234     dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490
2235     [CPPFLAGS_mozilla="${CPPFLAGS_mozilla} `${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`"]
2236     #[CPPFLAGS_mozilla="${CPPFLAGS_mozilla} `${MOZILLA_CONFIG} --cflags plugin xpcom java --defines | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`"]
2237     LDFLAGS_mozilla="${LDFLAGS_mozilla} `${MOZILLA_CONFIG} --libs plugin xpcom`"
2238     dnl Not necessarily in ${PATH}
2239     if test "x${XPIDL}" = "x" -o ! -x "${XPIDL}"
2240     then
2241       XPIDL="/usr/lib/mozilla/xpidl"
2242     fi
2243   fi
2244 fi
2245 AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
2246
2247 dnl
2248 dnl  test plugins
2249 dnl
2250 AC_ARG_ENABLE(testsuite,
2251   [  --enable-testsuite      build test modules (default disabled)])
2252 if test "x${enable_testsuite}" = "xyes"
2253 then
2254   TESTS="test1 test2 test3 test4"
2255
2256   dnl  we define those so that bootstrap sets the right linker
2257   CXXFLAGS_test2="${CXXFLAGS_test2}"
2258   OBJCFLAGS_test3="${OBJCFLAGS_test3}"
2259   dnl  this one is needed until automake knows what to do
2260   LDFLAGS_test3="${LDFLAGS_test3} -lobjc"
2261
2262   PLUGINS="${PLUGINS} ${TESTS}"
2263   #BUILTINS="${BUILTINS} ${TESTS}"
2264 fi
2265
2266 dnl
2267 dnl  gtk_main plugin
2268 dnl
2269 if test "x${NEED_GTK_MAIN}" != "xno"
2270 then
2271     PLUGINS="${PLUGINS} gtk_main"
2272     CFLAGS_gtk="${CFLAGS_gtk} -DNEED_GTK_MAIN"
2273     CFLAGS_gtk_main="${CFLAGS_gtk_main} ${CFLAGS_gtk} ${CFLAGS_familiar}"
2274     LDFLAGS_gtk_main="${LDFLAGS_gtk_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar}"
2275 fi
2276
2277 if test "x${NEED_GNOME_MAIN}" != "xno"
2278 then
2279     PLUGINS="${PLUGINS} gnome_main"
2280     CFLAGS_gnome_main="${CFLAGS_gnome_main} ${CFLAGS_gtk} ${CFLAGS_familiar} ${CFLAGS_gnome}"
2281     LDFLAGS_gnome_main="${LDFLAGS_gnome_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar} ${LDFLAGS_gnome}"
2282 fi
2283
2284 dnl
2285 dnl  Plugin and builtin checks
2286 dnl
2287 builtin_support=false
2288 plugin_support=:
2289
2290 dnl Support for plugins - this must be AT THE END
2291 AC_ARG_ENABLE(plugins,
2292   [  --disable-plugins       make all plugins built-in (default plugins enabled)],
2293   [if test "x${enable_plugins}" = "xno"
2294    then
2295      plugin_support=false
2296    fi])
2297
2298 dnl Automagically disable plugins if there is no system support for
2299 dnl dynamically loadable files (.so, .dll, .dylib).
2300 dnl don't forget vlc-win32 still can load .dll as plugins
2301 if test "x${ac_cv_header_dlfcn_h}" = "xno" -a "x${ac_cv_header_image_h}" = "xno" -a "x${SYS}" != "xmingw32"
2302 then
2303   echo "*** Your system doesn't have plugin support. All plugins will be built"
2304   echo "statically."
2305   plugin_support=false
2306 fi
2307
2308 dnl Export automake variables
2309 if ${plugin_support}
2310 then
2311   for plugin in `echo ${PLUGINS}`
2312   do
2313     eval "${plugin}_plugin=yes"
2314   done
2315 else
2316   BUILTINS="${BUILTINS} ${PLUGINS}"
2317   PLUGINS=
2318 fi
2319 AM_CONDITIONAL(HAVE_PLUGINS, ${plugin_support})
2320
2321 [if echo "${BUILTINS}" | grep '[^ ]' >/dev/null 2>&1
2322 then
2323   builtin_support=:
2324   for builtin in `echo ${BUILTINS}`
2325   do
2326     eval "${builtin}_builtin=yes"
2327   done
2328 fi]
2329 AM_CONDITIONAL(HAVE_BUILTINS, ${builtin_support})
2330
2331 dnl do not touch this line (bootstrap needs it)
2332
2333
2334 dnl
2335 dnl  Stuff used by the program
2336 dnl
2337 AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION} ${CODENAME}", [Simple version string])
2338 AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VideoLAN Client - version ${VERSION} ${CODENAME} - (c) 1996-2002 VideoLAN", [Copyright string])
2339 AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
2340
2341 VLC_SYMBOL="`echo ${VERSION} | tr .- __`"
2342 AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module functions])
2343 AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
2344 AC_DEFINE_UNQUOTED(LIBEXT, "${LIBEXT}", [Dynamic object extension])
2345
2346 DATA_PATH="${ac_tool_prefix}/share/videolan"
2347 AC_SUBST(DATA_PATH)
2348 PLUGIN_PATH="${ac_tool_prefix}/share/videolan"
2349 AC_SUBST(PLUGIN_PATH)
2350
2351 dnl
2352 dnl  Restore *FLAGS
2353 dnl
2354 CPPFLAGS="${CPPFLAGS_save}"
2355 CFLAGS="${CFLAGS_save}"
2356 CXXFLAGS="${CXXFLAGS_save}"
2357 OBJCFLAGS="${OBJCFLAGS_save}"
2358 LDFLAGS="${LDFLAGS_save}"
2359
2360 dnl
2361 dnl  Fool automake (see Makefile.am)
2362 dnl
2363 AUTOMAKE_SUCKS="\$(L_builtin) \$(LDFLAGS_builtin)"
2364 AC_SUBST(AUTOMAKE_SUCKS)
2365
2366 dnl
2367 dnl  Create the vlc-config script
2368 dnl
2369 LDFLAGS_libvlc="${LDFLAGS_vlc} ${LDFLAGS_builtins}"
2370 for i in `echo "${BUILTINS}" | sed -e 's@[^ ]*/@@g'` ; do LDFLAGS_libvlc="${LDFLAGS_libvlc} ${libdir}/vlc/${i}.a `eval echo '$'{LDFLAGS_${i}}`" ; done
2371
2372 dnl
2373 dnl  Configuration is finished
2374 dnl
2375 AC_SUBST(SYS)
2376 AC_SUBST(ARCH)
2377 AC_SUBST(PLUGINS)
2378 AC_SUBST(BUILTINS)
2379 AC_SUBST(ALIASES)
2380 AC_SUBST(ASM)
2381 AC_SUBST(MOC)
2382 AC_SUBST(WINDRES)
2383 AC_SUBST(BCBUILDER)
2384 AC_SUBST(XPIDL)
2385 AC_SUBST(LIBEXT)
2386 AC_SUBST(INCLUDES)
2387
2388 AC_SUBST(CFLAGS_TUNING)
2389 AC_SUBST(CFLAGS_OPTIM)
2390 AC_SUBST(CFLAGS_OPTIM_NODEBUG)
2391 AC_SUBST(LDFLAGS)
2392
2393 AC_SUBST(CFLAGS_vlc)
2394 AC_SUBST(CFLAGS_pics)
2395 AC_SUBST(CFLAGS_plugins)
2396 AC_SUBST(CFLAGS_builtins)
2397 AC_SUBST(CPPFLAGS_mozilla)
2398
2399 AC_SUBST(LDFLAGS_vlc)
2400 AC_SUBST(LDFLAGS_libvlc)
2401 AC_SUBST(LDFLAGS_plugins)
2402 AC_SUBST(LDFLAGS_builtins)
2403 AC_SUBST(LDFLAGS_mozilla)
2404
2405 AC_OUTPUT([
2406   Makefile
2407   debian/Makefile
2408   doc/Makefile
2409   intl/Makefile
2410   ipkg/Makefile
2411   lib/Makefile
2412   m4/Makefile
2413   modules/Makefile
2414   po/Makefile.in
2415   share/Makefile
2416   src/Makefile
2417   vlc-config
2418 ],[
2419   chmod a+x vlc-config
2420 ])
2421
2422 printf "
2423 vlc configuration
2424 --------------------
2425 vlc version           : ${VERSION}
2426 system                : ${SYS}
2427 architecture          : ${ARCH}
2428 build flavour         : "
2429 test "x${DEBUG_TRUE}" = "x" && printf "debug "
2430 test "x${CPROF_TRUE}" = "x" && printf "cprof "
2431 test "x${GPROF_TRUE}" = "x" && printf "gprof "
2432 test "x${OPTIM_TRUE}" = "x" && printf "optim "
2433 test "x${RELEASE_TRUE}" = "x" && printf "release " || printf "devel "
2434 echo "
2435 vlc aliases           :${ALIASES}
2436
2437 To build vlc and its plugins, type \`make'.
2438 "
2439