1 dnl Autoconf settings for vlc
3 AC_INIT(vlc,0.6.0-test3)
9 AC_CONFIG_SRCDIR(src/libvlc.c)
10 AC_CONFIG_AUX_DIR(autotools)
13 dnl XXX: we don't put any flags here, because automake 1.5 doesn't support
14 dnl them. And we need the comma otherwize automake will choke on it.
15 AM_INIT_AUTOMAKE(vlc,0.6.0-test3)
16 AM_CONFIG_HEADER(config.h)
21 CPPFLAGS_save="${CPPFLAGS}"
22 CFLAGS_save="${CFLAGS}"
23 CXXFLAGS_save="${CXXFLAGS}"
24 OBJCFLAGS_save="${OBJCFLAGS}"
25 LDFLAGS_save="${LDFLAGS}"
37 dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right
38 dnl now otherwise it might be set in an obscure if statement.
41 dnl AC_PROG_OBJC doesn't seem to exist, this is the KDE workaround
42 AC_MSG_CHECKING(for an Objective-C compiler)
45 OBJCFLAGS="${CXXFLAGS} -fgnu-runtime -fconstant-string-class=NSConstantString"
47 dnl _AM_DEPENDENCIES(OBJC) doesn't work, so hard code OBJCDEPMODE here
48 #OBJCDEPMODE="depmode=gcc3"
49 #AC_SUBST(OBJCDEPMODE)
50 _AM_DEPENDENCIES(OBJC)
51 AC_MSG_RESULT(not implemented yet)
53 dnl Find the right ranlib, even when cross-compiling
54 AC_CHECK_TOOL(RANLIB, ranlib, :)
55 AC_CHECK_TOOL(STRIP, strip, :)
56 AC_CHECK_TOOL(AR, ar, :)
57 AC_CHECK_TOOL(LD, ld, :)
62 dnl Check for compiler properties
67 dnl Set default values
69 LDFLAGS_vlc="${LDFLAGS}"
73 dnl Check the operating system
75 case "${target_os}" in
84 CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
85 LDFLAGS_dvd="${LDFLAGS_dvd} -ldvd"
86 LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -ldvd"
87 LDFLAGS_vcd="${LDFLAGS_vcd} -ldvd"
88 LDFLAGS_cdda="${LDFLAGS_cdda} -ldvd"
92 CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
96 CFLAGS_save="${CFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; CFLAGS="${CFLAGS_save}"
97 CXXFLAGS_save="${CXXFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; CXXFLAGS="${CXXFLAGS_save}"
98 OBJCFLAGS_save="${OBJCFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; OBJCFLAGS="${OBJCFLAGS_save}"
99 LDFLAGS_vlc="${LDFLAGS_vlc} -all_load"
100 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -all_load"
103 *mingw32* | *cygwin*)
104 AC_CHECK_TOOL(WINDRES, windres, :)
107 case "${target_os}" in
112 dnl Check if we are using the mno-cygwin mode in which case we are
113 dnl actually dealing with a mingw32 compiler.
118 SYS=mingw32, SYS=cygwin)
122 if test "${SYS}" = "mingw32"; then
123 # add ws2_32 for closesocket, select, recv
124 CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"
125 CPPFLAGS="${CPPFLAGS_save}"
126 LDFLAGS_vlc="${LDFLAGS_vlc} -lws2_32 -lnetapi32 -lwinmm -mwindows"
127 LDFLAGS_ipv4="${LDFLAGS_ipv4} -lws2_32"
128 LDFLAGS_ipv6="${LDFLAGS_ipv6} -lws2_32"
129 LDFLAGS_access_http="${LDFLAGS_access_http} -lws2_32"
130 LDFLAGS_access_mms="${LDFLAGS_access_mms} -lws2_32"
131 LDFLAGS_access_udp="${LDFLAGS_access_udp} -lws2_32"
132 LDFLAGS_access_ftp="${LDFLAGS_access_ftp} -lws2_32"
133 LDFLAGS_access_output_udp="${LDFLAGS_access_output_udp} -lws2_32"
134 LDFLAGS_sap="${LDFLAGS_sap} -lws2_32"
135 LDFLAGS_slp="${LDFLAGS_slp} -lws2_32"
136 LDFLAGS_http="${LDFLAGS_http} -lws2_32"
137 LDFLAGS_httpd="${LDFLAGS_httpd} -lws2_32"
142 LDFLAGS_x11="${LDFLAGS_x11} -lsocket"
143 LDFLAGS_xvideo="${LDFLAGS_xvideo} -lsocket"
154 CFLAGS_save="${CFLAGS_save} -Wno-multichar"; CFLAGS="${CFLAGS_save}"
155 CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar"; CXXFLAGS="${CXXFLAGS_save}"
156 LDFLAGS_vlc="${LDFLAGS_vlc} -lbe"
157 LDFLAGS_beos="${LDFLAGS_beos} -lbe -lmedia -ltranslation -ltracker -lgame -lstdc++.r4"
158 dnl Check if we have BONE (old net_server doesn't have libsocket.so)
159 AC_CHECK_LIB( socket, connect,
160 LDFLAGS_vlc="${LDFLAGS_vlc} -lsocket -lbind"
161 LDFLAGS_access_mms="${LDFLAGS_access_mms} -lsocket -lbind"
162 LDFLAGS_ipv4="${LDFLAGS_ipv4} -lsocket -lbind"
163 LDFLAGS_httpd="${LDFLAGS_httpd} -lsocket -lbind" )
169 AM_CONDITIONAL(HAVE_BEOS, test "${SYS}" = "beos")
170 AM_CONDITIONAL(HAVE_DARWIN, test "${SYS}" = "darwin")
171 AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32")
176 ALL_LINGUAS="de en_GB fr it ja no ru nl pl sv"
177 AM_GNU_GETTEXT_VERSION(0.11.5)
179 if test "${nls_cv_force_use_gnu_gettext}" = "yes"; then
180 AC_DEFINE(HAVE_INCLUDED_GETTEXT, 1, Define if we use the local libintl)
181 INCLUDES="${INCLUDES} -I\\\$(top_srcdir)/intl"
183 AC_CHECK_FUNCS(textdomain,,[
184 AC_CHECK_LIB(intl,textdomain,
185 LDFLAGS_vlc="${LDFLAGS_vlc} ${LIBINTL}",,
190 AM_CONDITIONAL(BUILD_INTL, test "${nls_cv_force_use_gnu_gettext}" = "yes")
191 XGETTEXT="${XGETTEXT} --keyword=_NS --keyword=_ANS"
193 AC_MSG_CHECKING(for suffix of libraries)
194 AC_MSG_RESULT(${LIBEXT})
196 dnl Check for the need to include the mingwex lib for mingw32
197 if test "${SYS}" = "mingw32"
199 AC_CHECK_LIB(mingwex,opendir,
200 AC_CHECK_LIB(mingw32,opendir,LDFLAGS_vlc="${LDFLAGS_vlc}",
201 [LDFLAGS_vlc="${LDFLAGS_vlc} -lmingwex"
202 LDFLAGS_gtk="${LDFLAGS_gtk} -lmingwex"])
206 dnl Check for fnative-struct or mms-bitfields support for mingw32
207 if test "${SYS}" = "mingw32"
209 AC_CACHE_CHECK([if \$CC accepts -mms-bitfields],
210 [ac_cv_c_mms_bitfields],
211 [CFLAGS="${CFLAGS_save} -mms-bitfields"
212 AC_TRY_COMPILE([],,ac_cv_c_mms_bitfields=yes, ac_cv_c_mms_bitfields=no)])
213 if test "${ac_cv_c_mms_bitfields}" != "no"; then
214 CFLAGS_save="${CFLAGS_save} -mms-bitfields";
215 CXXFLAGS_save="${CXXFLAGS_save} -mms-bitfields";
217 AC_CACHE_CHECK([if \$CC accepts -fnative-struct],
218 [ac_cv_c_fnative_struct],
219 [CFLAGS="${CFLAGS_save} -fnative-struct"
220 AC_TRY_COMPILE([],,ac_cv_c_fnative_struct=yes, ac_cv_c_fnative_struct=no)])
221 if test "${ac_cv_c_fnative_struct}" != "no"; then
222 CFLAGS_save="${CFLAGS_save} -fnative-struct";
223 CXXFLAGS_save="${CXXFLAGS_save} -fnative-struct";
227 CFLAGS="${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
230 dnl Check for fvtable-thunks support for mingw32
231 if test "${SYS}" = "mingw32"
234 AC_CACHE_CHECK([if \$CXX accepts -fvtable-thunks],
235 [ac_cv_cxx_fvtable_thunks],
236 [CXXFLAGS="${CXXFLAGS_save} -Wall -Werror -fvtable-thunks"
237 AC_TRY_COMPILE([],,ac_cv_cxx_fvtable_thunks=yes,
238 ac_cv_cxx_fvtable_thunks=no)])
239 if test "${ac_cv_cxx_fvtable_thunks}" = "yes"; then
240 CXXFLAGS_mingw32_special="-fvtable-thunks"
243 CXXFLAGS_save="${CXXFLAGS_save} ${CXXFLAGS_mingw32_special}"
244 CXXFLAGS="${CXXFLAGS_save}"
248 dnl Flags for plugin compilation
251 CFLAGS_pics="${CFLAGS_pics} ${CFLAGS_mingw32_special}"
252 CXXFLAGS_pics="${CXXFLAGS_pics} ${CFLAGS_mingw32_special} ${CXXFLAGS_mingw32_special}"
253 OBJCFLAGS_pics="${OBJCFLAGS_pics} ${CFLAGS_mingw32_special}"
254 CFLAGS_plugins="${CFLAGS_plugins} ${CFLAGS_mingw32_special}"
255 CXXFLAGS_plugins="${CXXFLAGS_plugins} ${CFLAGS_mingw32_special} ${CXXFLAGS_mingw32_special}"
256 OBJCFLAGS_plugins="${OBJCFLAGS_plugins} ${CFLAGS_mingw32_special}"
259 CFLAGS_pics="${CFLAGS_pics} -fPIC"
260 CXXFLAGS_pics="${CXXFLAGS_pics} -fPIC"
261 OBJCFLAGS_pics="${OBJCFLAGS_pics} -fPIC"
262 CFLAGS_plugins="${CFLAGS_plugins} -fPIC"
263 CXXFLAGS_plugins="${CXXFLAGS_plugins} -fPIC"
264 OBJCFLAGS_plugins="${OBJCFLAGS_plugins} -fPIC"
265 LDFLAGS_plugins="${LDFLAGS_plugins} -fPIC"
269 dnl The -DSYS_FOO flag
270 CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"; CPPFLAGS="${CPPFLAGS_save}"
272 dnl Check for system libs needed
275 AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 if_nametoindex atoll getenv putenv setenv)
277 dnl Check for usual libc functions
278 AC_CHECK_FUNCS(strdup strndup atof lseek)
279 AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)])
280 AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)])
282 AC_CHECK_FUNCS(connect,,[
283 AC_CHECK_LIB(socket,connect,
284 LDFLAGS_ipv4="${LDFLAGS_ipv4} -lsocket"
285 LDFLAGS_vlc="${LDFLAGS_vlc} -lsocket"
288 AC_CHECK_FUNCS(send,,[
289 AC_CHECK_LIB(socket,send,
290 LDFLAGS_access_http="${LDFLAGS_access_http} -lsocket"
291 LDFLAGS_access_mms="${LDFLAGS_access_mms} -lsocket"
292 LDFLAGS_access_udp="${LDFLAGS_access_udp} -lsocket"
293 LDFLAGS_access_ftp="${LDFLAGS_access_ftp} -lsocket"
294 LDFLAGS_sap="${LDFLAGS_sap} -lsocket"
295 LDFLAGS_http="${LDFLAGS_http} -lsocket"
296 LDFLAGS_access_output_udp="${LDFLAGS_access_output_udp} -lsocket"
299 AC_CHECK_FUNCS(gethostbyname,,[
300 AC_CHECK_LIB(nsl,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lnsl" LDFLAGS_httpd="${LDFLAGS_httpd} -lnsl" LDFLAGS_vlc="${LDFLAGS_vlc} -lnsl",[
301 AC_CHECK_LIB(bind,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind" LDFLAGS_httpd="${LDFLAGS_httpd} -lbind")])
304 dnl Check for socklen_t
305 AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
307 [#include <sys/types.h>
308 #include <sys/socket.h>],
309 [socklen_t len = 42; return len;],
310 ac_cv_type_socklen_t=yes,
311 ac_cv_type_socklen_t=no)])
312 if test "${ac_cv_type_socklen_t}" != "no"; then
313 AC_DEFINE(HAVE_SOCKLEN_T, 1, [Define if <sys/socket.h> defines socklen_t.])
316 dnl Check for va_copy
317 AC_CACHE_CHECK([for va_copy], ac_cv_c_va_copy,
319 [#include <stdarg.h>],
320 [va_list ap1, ap2; va_copy(ap1,ap2);],
321 [ac_cv_c_va_copy="yes"],
322 [ac_cv_c_va_copy="no"]))
323 if test "${ac_cv_c_va_copy}" = "yes"; then
324 AC_DEFINE(HAVE_VA_COPY, 1, [Define if <stdarg.h> defines va_copy.])
326 AC_CACHE_CHECK([for __va_copy], ac_cv_c___va_copy,
328 [#include <stdarg.h>],
329 [va_list ap1, ap2; __va_copy(ap1,ap2);],
330 [ac_cv_c___va_copy="yes"],
331 [ac_cv_c___va_copy="no"]))
332 if test "${ac_cv_c___va_copy}" = "yes"; then
333 AC_DEFINE(HAVE___VA_COPY, 1, [Define if <stdarg.h> defines __va_copy.])
336 AC_CHECK_FUNCS(inet_aton,,[
337 AC_CHECK_LIB(resolv,inet_aton,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lresolv" LDFLAGS_httpd="${LDFLAGS_httpd} -lresolv")
342 AC_CHECK_FUNCS(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
343 [ # FreeBSD has a gnugetopt library for this:
344 AC_CHECK_LIB([gnugetopt],[getopt_long],
345 [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) LDFLAGS_vlc="${LDFLAGS_vlc} -lgnugetopt"],
347 AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt})
349 if test "${SYS}" != "mingw32"; then
351 AC_CHECK_LIB(dl,dlopen,LDFLAGS_vlc="${LDFLAGS_vlc} -ldl")
353 LDFLAGS_imdct="${LDFLAGS_imdct} -lm"
354 LDFLAGS_adjust="${LDFLAGS_adjust} -lm"
355 LDFLAGS_distort="${LDFLAGS_distort} -lm"
356 LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} -lm")
358 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lm"
359 LDFLAGS_stream_out_transcode="${LDFLAGS_stream_out_transcode} -lm"
360 LDFLAGS_imdct="${LDFLAGS_imdct} -lm"
361 LDFLAGS_imdct3dn="${LDFLAGS_imdct3dn} -lm"
362 LDFLAGS_imdctsse="${LDFLAGS_imdctsse} -lm"
363 LDFLAGS_i420_rgb="${LDFLAGS_i420_rgb} -lm"
364 LDFLAGS_faad="${LDFLAGS_faad} -lm"
367 LDFLAGS_headphone_channel_mixer="${LDFLAGS_headphone_channel_mixer} -lm"
369 fi # end "${SYS}" != "mingw32"
371 if test "${SYS}" != "mingw32"; then
372 dnl Check for pthreads - borrowed from XMMS
374 if test "${THREAD_LIB}" = "error"; then
375 AC_CHECK_LIB(pthread,main,THREAD_LIB="-lpthread")
377 if test "${THREAD_LIB}" = "error"; then
378 AC_CHECK_LIB(pthreads,main,THREAD_LIB="-lpthreads")
380 if test "${THREAD_LIB}" = "error"; then
381 AC_CHECK_LIB(c_r,main,THREAD_LIB="-lc_r")
383 if test "${THREAD_LIB}" = "error"; then
384 AC_CHECK_FUNCS(pthread_mutex_lock)
388 dnl Check for cthreads under GNU/Hurd for instance
389 AC_CHECK_LIB(threads,cthread_fork,THREAD_LIB="-lthreads")
392 dnl GNU portable threads
395 [ --enable-pth GNU Pth support (default disabled)],
396 [ if test "${enable_pth}" = "yes"; then
397 AC_CHECK_LIB(pth,pth_init)
398 AC_MSG_CHECKING(for pth_init in pth.h)
399 AC_EGREP_HEADER(pth_init,pth.h,[
401 AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
402 Define if <pth.h> defines pth_init)
414 [ --enable-st State Threads (default disabled)],
415 [ if test "${enable_st}" = "yes"; then
416 AC_CHECK_LIB(st,st_init)
417 AC_MSG_CHECKING(for st_init in st.h)
418 AC_EGREP_HEADER(st_init,st.h,[
420 AC_DEFINE(ST_INIT_IN_ST_H, 1,
421 Define if <st.h> defines st_init)
429 LDFLAGS_vlc="${LDFLAGS_vlc} ${THREAD_LIB}"
430 LDFLAGS_plugins="${LDFLAGS_plugins} ${THREAD_LIB}"
432 dnl Don't link with rt when using GNU-pth
433 if test "${THREAD_LIB}" != "-lpth" && test "${THREAD_LIB}" != "-lst"; then
435 AC_CHECK_LIB(rt,sem_init, [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"])
438 AC_CHECK_FUNCS(nanosleep,have_nanosleep=:,[
439 AC_CHECK_LIB(rt,nanosleep,
440 [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"; have_nanosleep=:],
441 [AC_CHECK_LIB(posix4,nanosleep,
442 [LDFLAGS_vlc="${LDFLAGS_vlc} -lposix4"; have_nanosleep=:])]
445 if ${have_nanosleep}; then
446 AC_DEFINE(HAVE_NANOSLEEP, 1,
447 Define if nanosleep is available.)
451 dnl Check for misc headers
452 AC_MSG_CHECKING(for pthread_cond_t in pthread.h)
453 AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
455 AC_DEFINE(PTHREAD_COND_T_IN_PTHREAD_H, 1,
456 Define if <pthread.h> defines pthread_cond_t.)],[
459 AC_MSG_CHECKING(for pthread_once in pthread.h)
460 AC_EGREP_HEADER(pthread_once,pthread.h,[
462 AC_DEFINE(PTHREAD_ONCE_IN_PTHREAD_H, 1,
463 Define if <pthread.h> defines pthread_once.)],[
465 fi # end "${SYS}" != "mingw32"
467 AC_MSG_CHECKING(for strncasecmp in strings.h)
468 AC_EGREP_HEADER(strncasecmp,strings.h,[
470 AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
471 Define if <strings.h> defines strncasecmp.)],[
474 dnl Check for headers
475 AC_CHECK_HEADERS(signal.h time.h errno.h stdint.h getopt.h strings.h inttypes.h sys/int_types.h)
476 AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h)
477 AC_CHECK_HEADERS(dlfcn.h image.h)
478 AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
479 if test "${SYS}" != "mingw32"; then
480 AC_CHECK_HEADERS(machine/param.h sys/shm.h)
481 AC_CHECK_HEADERS(linux/version.h)
482 fi # end "${SYS}" != "mingw32"
488 AC_CHECK_HEADERS(dirent.h,,[need_dirent=:])
489 AM_CONDITIONAL(BUILD_DIRENT, ${need_dirent})
491 dnl Mac OS X and other OSes don't have declaration for nanosleep
492 if test "${SYS}" != "mingw32"; then
493 AC_MSG_CHECKING(for nanosleep in time.h)
494 AC_EGREP_HEADER(nanosleep,time.h,[
496 AC_DEFINE(HAVE_DECL_NANOSLEEP, 1,
497 Define if <time.h> defines nanosleep.)
501 fi # end "${SYS}" != "mingw32"
503 dnl Make sure we have timespecs
504 AC_MSG_CHECKING(for timespec in sys/time.h)
505 AC_EGREP_HEADER(timespec,sys/time.h,[
507 AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
508 Define if <sys/time.h> defines struct timespec.)
513 dnl Check for threads library
514 if test "${SYS}" != "mingw32"; then
515 AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
516 fi # end "${SYS}" != "mingw32"
518 dnl Default X headers and libraries
519 if test "${x_includes}" = "NONE"; then
520 x_includes="/usr/X11R6/include"
522 if test "${x_libraries}" = "NONE"; then
523 x_libraries="/usr/X11R6/lib"
526 dnl Build the gtk_main plugins?
532 dnl build the qte plugin ?
535 dnl Check for ntohl, etc.
536 AC_CACHE_CHECK([for ntohl in sys/param.h],
537 [ac_cv_c_ntohl_sys_param_h],
538 [CFLAGS="${CFLAGS_save} -Wall -Werror"
539 AC_TRY_COMPILE([#include <sys/param.h>],
540 [void foo() { int meuh; ntohl(meuh); }],
541 ac_cv_c_ntohl_sys_param_h=yes, ac_cv_c_ntohl_sys_param_h=no)])
542 if test "${ac_cv_c_ntohl_sys_param_h}" != "no"; then
543 AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
546 dnl Check for inline function size limit
547 AC_CACHE_CHECK([if \$CC accepts -finline-limit],
548 [ac_cv_c_inline_limit],
549 [CFLAGS="${CFLAGS_save} -finline-limit-30000"
550 AC_TRY_COMPILE([],,ac_cv_c_inline_limit=yes, ac_cv_c_inline_limit=no)])
551 if test "${ac_cv_c_inline_limit}" != "no"; then
552 CFLAGS_save="${CFLAGS_save} -finline-limit-30000"; CFLAGS="${CFLAGS_save}"
553 CXXFLAGS_save="${CXXFLAGS_save} -finline-limit-30000"; CXXFLAGS="${CXXFLAGS_save}"
554 OBJCFLAGS_save="${OBJCFLAGS_save} -finline-limit-30000"; OBJCFLAGS="${OBJCFLAGS_save}"
557 # XXX: do this with an M4 macro?
558 #dnl Check for various -W flags
559 #for flag in "" all unreachable-code conversion sign-compare disabled-optimization
561 # AC_CACHE_CHECK([if \$CC accepts -W${flag}],
562 # [ac_cv_c_W${flag}],
563 # [CFLAGS="-W${flag} ${CFLAGS_save}"
564 # AC_TRY_COMPILE([],,ac_cv_c_W${flag}=yes, ac_cv_c_W${flag}=no)])
565 # if test "${ac_cv_c_W${flag}}" != "no"; then
566 # CFLAGS_save="-W${flag} ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
567 # CXXFLAGS_save="-W${flag} ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
568 # OBJCFLAGS_save="-W${flag} ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
572 AC_CACHE_CHECK([if \$CC accepts -Wall],
574 [CFLAGS="-Wall ${CFLAGS_save}"
575 AC_TRY_COMPILE([],,ac_cv_c_Wall=yes, ac_cv_c_Wall=no)])
577 AC_CACHE_CHECK([if \$CC accepts -Wconversion],
578 [ac_cv_c_Wconversion],
579 [CFLAGS="-Wconversion ${CFLAGS_save}"
580 AC_TRY_COMPILE([],,ac_cv_c_Wconversion=yes, ac_cv_c_Wconversion=no)])
582 AC_CACHE_CHECK([if \$CC accepts -Wunreachable-code],
583 [ac_cv_c_Wunreachable_code],
584 [CFLAGS="-Wunreachable-code ${CFLAGS_save}"
585 AC_TRY_COMPILE([],,ac_cv_c_Wunreachable_code=yes, ac_cv_c_Wunreachable_code=no)])
587 AC_CACHE_CHECK([if \$CC accepts -Wsign-compare],
588 [ac_cv_c_Wsign_compare],
589 [CFLAGS="-Wsign-compare ${CFLAGS_save}"
590 AC_TRY_COMPILE([],,ac_cv_c_Wsign_compare=yes, ac_cv_c_Wsign_compare=no)])
592 AC_CACHE_CHECK([if \$CC accepts -Wdisabled-optimization],
593 [ac_cv_c_Wdisabled_optimization],
594 [CFLAGS="-Wdisabled-optimization ${CFLAGS_save}"
595 AC_TRY_COMPILE([],,ac_cv_c_Wdisabled_optimization=yes, ac_cv_c_Wdisabled_optimization=no)])
597 AC_CACHE_CHECK([if \$CC accepts -Winline],
599 [CFLAGS="-Winline ${CFLAGS_save}"
600 AC_TRY_COMPILE([],,ac_cv_c_Winline=yes, ac_cv_c_Winline=no)])
602 if test "${ac_cv_c_Wall}" != "no"; then
603 CFLAGS_save="-Wall ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
604 CXXFLAGS_save="-Wall ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
605 OBJCFLAGS_save="-Wall ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
608 if test "${ac_cv_c_Wunreachable_code}" != "no"; then
609 # CFLAGS_save="-Wunreachable-code ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
610 # CXXFLAGS_save="-Wunreachable-code ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
611 # OBJCFLAGS_save="-Wunreachable-code ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
613 dnl -Wunreachable-code means gcc-3.x, we can use -Wconversion and we can
614 dnl activate -Winline for C++, it won't choke on system headers.
615 # if test "${ac_cv_c_Wconversion}" != "no"; then
616 # CFLAGS_save="-Wconversion ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
617 # CXXFLAGS_save="-Wconversion ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
618 # OBJCFLAGS_save="-Wconversion ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
620 if test "${ac_cv_c_Winline}" != "no"; then
621 CXXFLAGS_save="-Winline ${CXXFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
626 if test "${ac_cv_c_Wsign_compare}" != "no"; then
627 CFLAGS_save="-Wsign-compare ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
628 CXXFLAGS_save="-Wsign-compare ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
629 OBJCFLAGS_save="-Wsign-compare ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
632 if test "${ac_cv_c_Wdisabled_optimization}" != "no"; then
633 CFLAGS_save="-Wdisabled-optimization ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
634 CXXFLAGS_save="-Wdisabled-optimization ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
635 OBJCFLAGS_save="-Wdisabled-optimization ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
638 if test "${ac_cv_c_Winline}" != "no"; then
639 CFLAGS_save="-Winline ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
640 OBJCFLAGS_save="-Winline ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
644 AC_CACHE_CHECK([if \$CC accepts -pipe],
646 [CFLAGS="${CFLAGS_save} -pipe"
647 AC_TRY_COMPILE([],,ac_cv_c_pipe=yes, ac_cv_c_pipe=no)])
648 if test "${ac_cv_c_pipe}" != "no"; then
649 CFLAGS_save="${CFLAGS_save} -pipe"; CFLAGS="${CFLAGS_save}"
650 CXXFLAGS_save="${CXXFLAGS_save} -pipe"; CXXFLAGS="${CXXFLAGS_save}"
651 OBJCFLAGS_save="${OBJCFLAGS_save} -pipe"; OBJCFLAGS="${OBJCFLAGS_save}"
654 dnl Check for various optimization flags
655 AC_CACHE_CHECK([if \$CC accepts -O3],
657 [CFLAGS="${CFLAGS_save} -O3"
658 AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)])
659 if test "${ac_cv_c_o3}" != "no"; then
660 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
663 AC_CACHE_CHECK([if \$CC accepts -O2],
665 [CFLAGS="${CFLAGS_save} -O2"
666 AC_TRY_COMPILE([],,ac_cv_c_o2=yes, ac_cv_c_o2=no)])
667 if test "${ac_cv_c_o2}" != "no"; then
668 if test "${ac_cv_c_o3}" = "no"; then
669 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
671 CFLAGS_NOOPTIM="${CFLAGS_NOOPTIM} -O2"
673 AC_CACHE_CHECK([if \$CC accepts -O],
675 [CFLAGS="${CFLAGS_save} -O"
676 AC_TRY_COMPILE([],,ac_cv_c_o=yes, ac_cv_c_o=no)])
677 if test "${ac_cv_c_o}" != "no"; then
678 if test "${ac_cv_c_o3}" = "no"; then
679 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
681 CFLAGS_NOOPTIM="${CFLAGS_NOOPTIM} -O"
685 dnl Check for -ffast-math
686 AC_CACHE_CHECK([if \$CC accepts -ffast-math],
688 [CFLAGS="${CFLAGS_save} -ffast-math"
689 AC_TRY_COMPILE([],,ac_cv_c_fast_math=yes, ac_cv_c_fast_math=no)])
690 if test "${ac_cv_c_fast_math}" != "no"; then
691 CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
694 dnl Check for -funroll-loops
695 dnl Disabled on BeOS because BeOS' gcc is buggy and may crash with it
696 if test "${SYS}" != "beos"
698 AC_CACHE_CHECK([if \$CC accepts -funroll-loops],
699 [ac_cv_c_unroll_loops],
700 [CFLAGS="${CFLAGS_save} -funroll-loops"
701 AC_TRY_COMPILE([],,ac_cv_c_unroll_loops=yes, ac_cv_c_unroll_loops=no)])
702 if test "${ac_cv_c_unroll_loops}" != "no"; then
703 CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
707 dnl Check for -fomit-frame-pointer
708 AC_CACHE_CHECK([if \$CC accepts -fomit-frame-pointer],
709 [ac_cv_c_omit_frame_pointer],
710 [CFLAGS="${CFLAGS_save} -fomit-frame-pointer"
711 AC_TRY_COMPILE([],,ac_cv_c_omit_frame_pointer=yes, ac_cv_c_omit_frame_pointer=no)])
712 if test "${ac_cv_c_omit_frame_pointer}" != "no"; then
713 CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
714 # this plugin does not compile without -fomit-frame-pointer, damn gcc!
715 CFLAGS_i420_yuy2_mmx="${CFLAGS_i420_yuy2_mmx} -fomit-frame-pointer"
718 dnl Check for -mdynamic-no-pic
719 AC_CACHE_CHECK([if \$CC accepts -mdynamic-no-pic],
720 [ac_cv_c_dynamic_no_pic],
721 [CFLAGS="${CFLAGS_save} -mdynamic-no-pic"
722 AC_TRY_COMPILE([],,ac_cv_c_dynamic_no_pic=yes, ac_cv_c_dynamic_no_pic=no)])
723 if test "${ac_cv_c_dynamic_no_pic}" != "no"; then
724 CFLAGS_builtins="${CFLAGS_builtins} -mdynamic-no-pic"
725 CFLAGS_libvlc="${CFLAGS_libvlc} -mdynamic-no-pic"
728 dnl Check for Darwin plugin linking flags
729 AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error -lcc_dynamic],
731 [CFLAGS="${CFLAGS_save} -bundle -undefined error -lcc_dynamic"
732 AC_TRY_COMPILE([],,ac_cv_ld_darwin=yes, ac_cv_ld_darwin=no)])
733 if test "${ac_cv_ld_darwin}" != "no"; then
734 LDFLAGS_plugins="${LDFLAGS_plugins} -bundle -undefined error -lcc_dynamic"
737 dnl Check for standard plugin linking flags
738 dnl BeOS' gcc needs -nostart instead of -shared, even if -shared isn't harmful (just a warning)
739 if test "${SYS}" = "beos"; then
740 LDFLAGS_plugins="${LDFLAGS_plugins} -nostart"
742 AC_CACHE_CHECK([if \$CC accepts -shared],
744 [CFLAGS="${CFLAGS_save} -shared"
745 AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
746 if test "${ac_cv_ld_plugins}" != "no"; then
747 LDFLAGS_plugins="${LDFLAGS_plugins} -shared"
751 dnl Check for variadic macros
752 AC_CACHE_CHECK([for variadic cpp macros],
753 [ac_cv_cpp_variadic_macros],
754 [CFLAGS="${CFLAGS_save}"
757 #define a(b,c...) printf(b,##c)],
758 [a("foo");a("%s","bar");a("%s%s","baz","quux");],
759 ac_cv_cpp_variadic_macros=yes,
760 ac_cv_cpp_variadic_macros=no)])
761 if test "${ac_cv_cpp_variadic_macros}" != "no"; then
762 AC_DEFINE(HAVE_VARIADIC_MACROS, 1, Support for variadic macros)
765 dnl Checks for __attribute__(aligned()) directive
766 AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
767 [ac_cv_c_attribute_aligned],
768 [ac_cv_c_attribute_aligned=0
769 CFLAGS="${CFLAGS_save} -Werror"
770 for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
772 [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;],
773 [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
775 CFLAGS="${CFLAGS_save}"])
776 if test "${ac_cv_c_attribute_aligned}" != "0"; then
777 AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
778 [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
781 dnl Checks for __attribute__(format()) directive
782 AC_CACHE_CHECK([__attribute__ ((format ())) support with function pointers],
783 [ac_cv_c_attribute_format],
784 [ac_cv_c_attribute_format=no
785 CFLAGS="${CFLAGS_save} -Werror"
787 [static void (*pf_printf)(const char *, ...) __attribute__ ((format(printf,1,2)));(void)pf_printf;],
788 [ac_cv_c_attribute_format=yes])
789 CFLAGS="${CFLAGS_save}"])
790 if test "${ac_cv_c_attribute_format}" != "no"; then
791 AC_DEFINE(HAVE_ATTRIBUTE_FORMAT, 1, Support for __attribute__((format())) with function pointers)
797 case "${target_cpu}" in
808 CFLAGS_mpeg_video_old="${CFLAGS_mpeg_video_old} -ffunction-sections"
816 [ --enable-gprof gprof profiling (default disabled)])
818 [ --enable-cprof cprof profiling (default disabled)])
819 AM_CONDITIONAL(GPROF, test "${enable_gprof}" = "yes")
820 AM_CONDITIONAL(CPROF, test "${enable_gprof}" = "yes")
825 #BUILTINS="${BUILTINS} mpeg_video_old idct idctclassic motion"
826 PLUGINS="${PLUGINS} dummy rc logger gestures memcpy"
827 PLUGINS="${PLUGINS} es audio m4v mpeg_system ps ts avi asf aac mp4 rawdv"
828 PLUGINS="${PLUGINS} spudec mpeg_audio lpcm a52 dts cinepak"
829 PLUGINS="${PLUGINS} deinterlace invert adjust wall transform distort clone crop motionblur"
830 PLUGINS="${PLUGINS} float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif dtstospdif fixed32tofloat32 fixed32tos16 s16tofixed32 s16tofloat32 s16tofloat32swab s8tofloat32 u8tofixed32 u8tofloat32"
831 PLUGINS="${PLUGINS} trivial_resampler ugly_resampler linear_resampler bandlimited_resampler"
832 PLUGINS="${PLUGINS} trivial_channel_mixer headphone_channel_mixer"
833 PLUGINS="${PLUGINS} trivial_mixer spdif_mixer float32_mixer"
834 PLUGINS="${PLUGINS} aout_file"
835 #PLUGINS="${PLUGINS} scope"
836 PLUGINS="${PLUGINS} i420_rgb i420_yuy2 i422_yuy2 i420_ymga"
837 PLUGINS="${PLUGINS} id3 m3u"
838 PLUGINS="${PLUGINS} rawvideo"
839 PLUGINS="${PLUGINS} wav araw demuxdump demuxsub adpcm a52sys au"
840 PLUGINS="${PLUGINS} access_file access_udp access_http ipv4 access_mms"
841 PLUGINS="${PLUGINS} access_ftp access_directory sap httpd http"
844 dnl Switch to enable a version of VLC where most modules will be builtin
846 AC_ARG_ENABLE(mostly-builtin,
847 [ --enable-mostly-builtin most modules will be built-in (default disabled)])
848 if test "${enable_mostly_builtin}" = "yes"; then
849 BUILTINS="${BUILTINS} ${PLUGINS}"
854 dnl Some plugins aren't useful on some platforms
856 if test "${SYS}" != "mingw32"; then
857 PLUGINS="${PLUGINS} screensaver"
861 dnl Accelerated modules
863 MMX_MODULES="memcpymmx i420_rgb_mmx i422_yuy2_mmx i420_ymga_mmx"
864 #MMX_MODULES="${MMX_MODULES} idctmmx motionmmx"
865 MMXEXT_MODULES="memcpymmxext"
866 #MMXEXT_MODULES="${MMXEXT_MODULES} idctmmxext motionmmxext"
867 THREEDNOW_MODULES="memcpy3dn"
869 ALTIVEC_MODULES="memcpyaltivec"
870 #ALTIVEC_MODULES="${ALTIVEC_MODULES} idctaltivec motionaltivec"
872 if test "${enable_gprof}" != "yes"
874 MMX_MODULES="${MMX_MODULES} i420_yuy2_mmx"
877 AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
879 [CFLAGS="${CFLAGS_save}"
880 AC_TRY_COMPILE(,[void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));],
881 ac_cv_mmx_inline=yes, ac_cv_mmx_inline=no)])
882 if test "${ac_cv_mmx_inline}" != "no"; then
883 ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
886 AC_CACHE_CHECK([if \$CC groks MMX EXT inline assembly],
887 [ac_cv_mmxext_inline],
888 [CFLAGS="${CFLAGS_save}"
889 AC_TRY_COMPILE(,[void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));],
890 ac_cv_mmxext_inline=yes, ac_cv_mmxext_inline=no)])
891 if test "${ac_cv_mmxext_inline}" != "no"; then
892 ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
895 AC_CACHE_CHECK([if \$CC groks 3D Now! inline assembly],
896 [ac_cv_3dnow_inline],
897 [CFLAGS="${CFLAGS_save}"
898 AC_TRY_COMPILE(,[void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));],
899 ac_cv_3dnow_inline=yes, ac_cv_3dnow_inline=no)])
900 if test "${ac_cv_3dnow_inline}" != "no"; then
901 AC_DEFINE(CAN_COMPILE_3DNOW, 1, Define if \$CC groks 3D Now! inline assembly.)
902 ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
905 AC_CACHE_CHECK([if \$CC groks SSE inline assembly],
907 [CFLAGS="${CFLAGS_save}"
908 AC_TRY_COMPILE(,[void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));],
909 ac_cv_sse_inline=yes, ac_cv_sse_inline=no)])
910 if test "${ac_cv_sse_inline}" != "no" -a "${SYS}" != "mingw32"; then
911 AC_DEFINE(CAN_COMPILE_SSE, 1, Define if \$CC groks SSE inline assembly.)
912 ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
915 if test "${SYS}" != "mingw32"; then
916 AC_CACHE_CHECK([if \$CC groks AltiVec inline assembly],
917 [ac_cv_altivec_inline],
918 [CFLAGS="${CFLAGS_save}"
919 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
920 ac_cv_altivec_inline=yes,
921 [CFLAGS="${CFLAGS_save} -Wa,-m7400"
922 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
923 [ac_cv_altivec_inline="-Wa,-m7400"],
924 ac_cv_altivec_inline=no)
926 if test "${ac_cv_altivec_inline}" != "no"; then
927 AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks AltiVec inline assembly.)
928 if test "${ac_cv_altivec_inline}" != "yes"; then
929 CFLAGS_idctaltivec="${CFLAGS_idctaltivec} ${ac_cv_altivec_inline}"
930 CFLAGS_motionaltivec="${CFLAGS_motionaltivec} ${ac_cv_altivec_inline}"
931 CFLAGS_memcpyaltivec="${CFLAGS_memcpyaltivec} ${ac_cv_altivec_inline}"
932 CFLAGS_vlc="${CFLAGS_vlc} ${ac_cv_altivec_inline}"
934 ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
937 AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
939 [CFLAGS="${CFLAGS_save} -faltivec"
941 AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
942 ac_cv_c_altivec=-faltivec, [
944 CFLAGS="${CFLAGS_save} ${CFLAGS_idctaltivec} -fvec"
945 AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
946 [ac_cv_c_altivec="-fvec"], ac_cv_c_altivec=no)
948 CFLAGS="${CFLAGS_save}"])
949 if test "${ac_cv_c_altivec}" != "no"; then
950 AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
951 CFLAGS_idctaltivec="${CFLAGS_idctaltivec} ${ac_cv_c_altivec}"
952 CFLAGS_motionaltivec="${CFLAGS_motionaltivec} ${ac_cv_c_altivec}"
953 CFLAGS_memcpyaltivec="${CFLAGS_memcpyaltivec} ${ac_cv_c_altivec}"
954 CFLAGS_vlc="${CFLAGS_vlc} ${ac_cv_c_altivec}"
955 ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
958 AC_CACHE_CHECK([if linker needs -framework vecLib],
960 [LDFLAGS="${LDFLAGS_vlc} -framework vecLib"
961 AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)
962 LDFLAGS="${LDFLAGS_save}"
964 if test "${ac_cv_ld_altivec}" != "no"; then
965 LDFLAGS_idctaltivec="${LDFLAGS_idctaltivec} -framework vecLib"
966 LDFLAGS_motionaltivec="${LDFLAGS_motionaltivec} -framework vecLib"
967 LDFLAGS_memcpyaltivec="${LDFLAGS_memcpyaltivec} -framework vecLib"
968 LDFLAGS_vlc="${LDFLAGS_vlc} -framework vecLib"
970 fi # end "${SYS}" != "mingw32"
973 AC_ARG_WITH(,[Optimization options:])
976 dnl Special arch tuning
979 [ --with-tuning=ARCH enable special tuning for an architecture
980 (default i686 on IA-32 and 750 on PPC)])
981 if test "${with_tuning}" != ""; then
982 if test "${target_cpu}" = "powerpc"; then
983 CFLAGS_TUNING="-mtune=${with_tuning}"
985 CFLAGS_TUNING="-mcpu=${with_tuning}"
988 if test "${target_cpu}" = "i686" -o "${target_cpu}" = "i586" -o "${target_cpu}" = "i486" -o "${target_cpu}" = "i386"; then CFLAGS_TUNING="-mcpu=pentiumpro"
990 if test "${target_cpu}" = "powerpc"; then CFLAGS_TUNING="-mtune=750"; fi
995 dnl x86 accelerations
997 if test "${target_cpu}" = "i686" -o "${target_cpu}" = "i586" -o "${target_cpu}" = "x86" -o "${target_cpu}" = "i386"
1000 BUILTINS="${BUILTINS} ${ACCEL_MODULES}"
1004 dnl Enable/disable optimizations
1006 AC_ARG_ENABLE(optimizations,
1007 [ --disable-optimizations disable compiler optimizations (default enabled)])
1008 AM_CONDITIONAL(OPTIM, test "${enable_optimizations}" != "no")
1011 dnl AltiVec acceleration
1013 AC_ARG_ENABLE(altivec,
1014 [ --disable-altivec disable AltiVec optimizations (default enabled on PPC)],
1015 [ if test "${enable_altivec}" = "yes"; then ARCH="${ARCH} altivec";
1016 BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ],
1017 [ if test "${target_cpu}" = "powerpc"; then ARCH="${ARCH} altivec";
1018 BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ])
1023 AC_ARG_ENABLE(debug,
1024 [ --enable-debug debug mode (default disabled)])
1025 AM_CONDITIONAL(DEBUG, test "${enable_debug}" = "yes")
1028 dnl Enable release-specific flags
1030 AC_ARG_ENABLE(release,
1031 [ --enable-release activate extra optimizations (default disabled)])
1032 AM_CONDITIONAL(RELEASE, test "${enable_release}" = "yes")
1038 [ --enable-sout Stream output modules (default enabled)])
1039 if test "${enable_sout}" != "no"
1041 PLUGINS="${PLUGINS} access_output_dummy access_output_udp access_output_file access_output_http"
1042 PLUGINS="${PLUGINS} mux_ts mux_ps mux_avi mux_dummy"
1043 PLUGINS="${PLUGINS} packetizer_mpegaudio packetizer_mpegvideo packetizer_a52"
1044 PLUGINS="${PLUGINS} packetizer_mpeg4video packetizer_mpeg4audio"
1045 PLUGINS="${PLUGINS} packetizer_copy"
1047 PLUGINS="${PLUGINS} stream_out_dummy stream_out_standard stream_out_es"
1048 PLUGINS="${PLUGINS} stream_out_duplicate stream_out_display"
1051 AC_CHECK_HEADERS(ogg/ogg.h, [
1052 AC_CHECK_LIB( ogg, ogg_stream_packetin, [
1053 PLUGINS="${PLUGINS} mux_ogg"
1054 LDFLAGS_mux_ogg="${LDFLAGS_mux_ogg} -logg" ])
1063 AC_ARG_WITH(,[Input plugins:])
1066 dnl DVD module: optionally check for installed libdvdcss
1069 [ --enable-dvd DVD input module (default enabled)])
1070 if test "${enable_dvd}" != "no"
1073 [ --with-dvdcss=PATH libdvdcss headers and libraries])
1074 AC_ARG_WITH(dvdcss-tree,
1075 [ --with-dvdcss-tree=PATH libdvdcss tree for static linking])
1076 case "${with_dvdcss}" in
1078 if test "${with_dvdcss_tree}" = ""
1080 AC_CHECK_HEADERS(dvdcss/dvdcss.h,
1081 [ PLUGINS="${PLUGINS} dvd"
1082 LDFLAGS_dvd="${LDFLAGS_dvd} -ldvdcss"
1083 LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -ldvdcss" ],
1084 [ 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.])
1085 AC_MSG_ERROR([cannot find libdvdcss headers]) ])
1087 AC_MSG_CHECKING(for libdvdcss.a in ${with_dvdcss_tree})
1088 real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
1089 if test "${real_dvdcss_tree}" = ""
1091 dnl The given directory can't be found
1093 AC_MSG_ERROR([cannot cd to ${with_dvdcss_tree}])
1095 if test -f "${real_dvdcss_tree}/src/.libs/libdvdcss.a"
1097 dnl Use a custom libdvdcss
1098 AC_MSG_RESULT(${real_dvdcss_tree}/src/.libs/libdvdcss.a)
1099 BUILTINS="${BUILTINS} dvd"
1100 LDFLAGS_dvd="${LDFLAGS_dvd} -L${real_dvdcss_tree}/src/.libs -ldvdcss"
1101 LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -L${real_dvdcss_tree}/src/.libs -ldvdcss"
1102 CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${real_dvdcss_tree}/src"
1104 dnl The given libdvdcss wasn't built
1106 AC_MSG_ERROR([cannot find ${real_dvdcss_tree}/src/.libs/libdvdcss.a, make sure you compiled libdvdcss in ${with_dvdcss_tree}])
1111 dnl Compile without dvdcss (dlopen version, works only under Linux)
1112 PLUGINS="${PLUGINS} dvd"
1113 CPPFLAGS_dvd="${CPPFLAGS_dvd} -DGOD_DAMN_DMCA"
1114 LDFLAGS_dvd="${LDFLAGS_dvd} -ldl"
1117 AC_MSG_CHECKING(for dvdcss headers in ${with_dvdcss})
1118 if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
1120 dnl Use ${with_dvdcss}/include/dvdcss/dvdcss.h
1122 PLUGINS="${PLUGINS} dvd"
1123 LDFLAGS_dvd="${LDFLAGS_dvd} -L${with_dvdcss}/lib -ldvdcss"
1124 LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -L${with_dvdcss}/lib -ldvdcss"
1125 CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${with_dvdcss}/include"
1127 dnl No libdvdcss could be found, sorry
1129 AC_MSG_ERROR([cannot find ${with_dvdcss}/include/dvdcss/dvdcss.h])
1136 dnl dvdread module: check for libdvdread
1138 AC_ARG_ENABLE(dvdread,
1139 [ --enable-dvdread dvdread input module (default disabled)])
1140 if test "${enable_dvdread}" != "no"
1142 AC_ARG_WITH(dvdread,
1143 [ --with-dvdread=PATH libdvdread headers and libraries])
1144 AC_ARG_WITH(dvdread-tree,
1145 [ --with-dvdread-tree=PATH libdvdread tree for static linking])
1146 if test "${with_dvdread}" = ""
1148 if test "${with_dvdread_tree}" = ""
1150 AC_CHECK_HEADERS(dvdread/dvd_reader.h,
1151 [ PLUGINS="${PLUGINS} dvdread"
1152 LDFLAGS_dvdread="${LDFLAGS_dvdread} -ldvdread ${LDFLAGS_dvdcss}" ],
1153 [ if test "${enable_dvdread}" != ""
1155 AC_MSG_WARN([Please get libdvdread from http://www.dtek.chalmers.se/groups/dvd/downloads.shtml])
1156 AC_MSG_ERROR([cannot find libdvdread headers])
1159 AC_MSG_CHECKING(for libdvdread.a in ${with_dvdread_tree})
1160 real_dvdread_tree="`cd ${with_dvdread_tree} 2>/dev/null && pwd`"
1161 if test "${real_dvdread_tree}" = ""
1163 dnl The given directory can't be found
1165 AC_MSG_ERROR([cannot cd to ${with_dvdread_tree}])
1167 if test -f "${real_dvdread_tree}/dvdread/.libs/libdvdread.a"
1169 dnl Use a custom libdvdread
1170 AC_MSG_RESULT(${real_dvdread_tree}/dvdread/.libs/libdvdread.a)
1171 BUILTINS="${BUILTINS} dvdread"
1172 LDFLAGS_dvdread="${LDFLAGS_dvdread} -L${real_dvdread_tree}/dvdread/.libs -ldvdread ${LDFLAGS_dvdcss}"
1173 CPPFLAGS_dvdread="${CPPFLAGS_dvdread} -I${real_dvdread_tree}"
1175 dnl The given libdvdread wasn't built
1177 AC_MSG_ERROR([cannot find ${real_dvdread_tree}/dvdread/.libs/libdvdread.a, make sure you compiled libdvdread in ${with_dvdread_tree}])
1181 AC_MSG_CHECKING(for dvdread headers in ${with_dvdread})
1182 if test -f ${with_dvdread}/include/dvdread/dvd_reader.h
1184 dnl Use ${with_dvdread}/include/dvdread/dvd_reader.h
1186 PLUGINS="${PLUGINS} dvdread"
1187 LDFLAGS_dvdread="${LDFLAGS_dvdread} -L${with_dvdread}/lib -ldvdread ${LDFLAGS_dvdcss}"
1188 CPPFLAGS_dvdread="${CPPFLAGS_dvdread} -I${with_dvdread}/include"
1190 dnl No libdvdread could be found, sorry
1192 AC_MSG_ERROR([cannot find ${with_dvdread}/include/dvdread/dvd_reader.h])
1198 dnl dvdplay module: check for libdvdplay
1200 AC_ARG_ENABLE(dvdplay,
1201 [ --enable-dvdplay dvdplay input module (default enabled)])
1202 if test "${enable_dvdplay}" != "no"
1204 AC_ARG_WITH(dvdplay,
1205 [ --with-dvdplay=PATH libdvdplay headers and libraries])
1206 AC_ARG_WITH(dvdplay-tree,
1207 [ --with-dvdplay-tree=PATH libdvdplay tree for static linking])
1208 if test "${with_dvdplay}" = ""
1210 if test "${with_dvdplay_tree}" = ""
1212 AC_CHECK_HEADERS(dvdplay/dvdplay.h,
1213 [ PLUGINS="${PLUGINS} dvdplay"
1214 LDFLAGS_dvdplay="${LDFLAGS_dvdplay} -ldvdplay ${LDFLAGS_dvdread} ${LDFLAGS_dvdcss}"
1215 CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_dvdread}" ],
1216 [ if test "${enable_dvdplay}" != ""
1218 AC_MSG_WARN([Please get libdvdplay from http://www.videolan.org/.])
1219 AC_MSG_ERROR([cannot find libdvdplay headers])
1222 AC_MSG_CHECKING(for libdvdplay.a in ${with_dvdplay_tree})
1223 real_dvdplay_tree="`cd ${with_dvdplay_tree} 2>/dev/null && pwd`"
1224 if test "${real_dvdplay_tree}" = ""
1226 dnl The given directory can't be found
1228 AC_MSG_ERROR([cannot cd to ${with_dvdplay_tree}])
1230 if test -f "${real_dvdplay_tree}/src/.libs/libdvdplay.a"
1232 dnl Use a custom libdvdplay
1233 AC_MSG_RESULT(${real_dvdplay_tree}/src/.libs/libdvdplay.a)
1234 BUILTINS="${BUILTINS} dvdplay"
1235 LDFLAGS_dvdplay="${LDFLAGS_dvdplay} -L${real_dvdplay_tree}/src/.libs -ldvdplay ${LDFLAGS_dvdread} ${LDFLAGS_dvdcss}"
1236 CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_dvdread} -I${real_dvdplay_tree}/src"
1238 dnl The given libdvdplay wasn't built
1240 AC_MSG_ERROR([cannot find ${real_dvdplay_tree}/src/.libs/libdvdplay.a, make sure you compiled libdvdplay in ${with_dvdplay_tree}])
1244 AC_MSG_CHECKING(for dvdplay headers in ${with_dvdplay})
1245 if test -f ${with_dvdplay}/include/dvdplay/dvdplay.h
1247 dnl Use ${with_dvdplay}/include/dvdplay/dvdplay.h
1249 PLUGINS="${PLUGINS} dvdplay"
1250 LDFLAGS_dvdplay="${LDFLAGS_dvdplay} -L${with_dvdplay}/lib -ldvdplay ${LDFLAGS_dvdread} ${LDFLAGS_dvdcss}"
1251 CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_dvdread} -I${with_dvdplay}/include"
1253 dnl No libdvdplay could be found, sorry
1255 AC_MSG_ERROR([cannot find ${with_dvdplay}/include/dvdplay/dvdplay.h])
1261 dnl libdvbpsi ts demux/mux
1263 AC_ARG_ENABLE(dvbpsi,
1264 [ --enable-dvbpsi dvbpsi ts mux and demux module (default enabled)])
1265 if test "${enable_dvbpsi}" != "no"
1268 [ --with-dvbpsi=PATH libdvbpsi headers and libraries])
1270 [ --with-dvbpsi-tree=PATH libdvbpsi tree for static linking])
1271 case "${with_dvbpsi}" in
1273 if test "${with_dvbpsi_tree}" = ""
1275 AC_CHECK_HEADERS(dvbpsi/dr.h,
1276 [ PLUGINS="${PLUGINS} ts_dvbpsi"
1277 LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} -ldvbpsi"
1278 PLUGINS="${PLUGINS} mux_ts_dvbpsi"
1279 LDFLAGS_mux_ts_dvbpsi="${LDFLAGS_mux_ts_dvbpsi} -ldvbpsi" ],
1280 [ AC_MSG_WARN([cannot find libdvbpsi headers]) ],
1281 [#if defined( HAVE_STDINT_H )
1282 # include <stdint.h>
1283 #elif defined( HAVE_INTTYPES_H )
1284 # include <inttypes.h>
1286 #include <dvbpsi/dvbpsi.h>
1287 #include <dvbpsi/descriptor.h>
1288 #include <dvbpsi/pat.h>
1289 #include <dvbpsi/pmt.h>])
1291 AC_MSG_CHECKING(for libdvbpsi.a in ${with_dvbpsi_tree})
1292 real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
1293 if test "${real_dvbpsi_tree}" = ""
1295 dnl The given directory can't be found
1297 AC_MSG_ERROR([cannot cd to ${with_dvbpsi_tree}])
1299 if test -f "${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
1301 dnl Use a custom libdvbpsi
1302 AC_MSG_RESULT(${real_dvbpsi_tree}/src/.libs/libdvbpsi.a)
1303 BUILTINS="${BUILTINS} ts_dvbpsi"
1304 LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} -L${real_dvbpsi_tree}/src/.libs -ldvbpsi"
1305 CPPFLAGS_ts_dvbpsi="${CPPFLAGS_ts_dvbpsi} -I${real_dvbpsi_tree}/src"
1307 BUILTINS="${BUILTINS} mux_ts_dvbpsi"
1308 LDFLAGS_mux_ts_dvbpsi="${LDFLAGS_mux_ts_dvbpsi} -L${real_dvbpsi_tree}/src/.libs -ldvbpsi"
1309 CPPFLAGS_mux_ts_dvbpsi="${CPPFLAGS_mux_ts_dvbpsi} -I${real_dvbpsi_tree}/src"
1312 dnl The given libdvbpsi wasn't built
1314 AC_MSG_ERROR([cannot find ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a, make sure you compiled libdvbpsi in ${with_dvbpsi_tree}])
1319 dnl Compile without dvbpsi
1322 AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi})
1323 if test "${with_dvbpsi}" = ""
1328 LDFLAGS_test="-L${with_dvbpsi}/lib"
1329 CPPFLAGS_test="-I${with_dvbpsi}/include"
1331 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
1332 AC_CHECK_HEADER([dvbpsi/dr.h],[
1333 PLUGINS="${PLUGINS} ts_dvbpsi"
1334 LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} ${LDFLAGS_test} -ldvbpsi"
1335 CPPFLAGS_ts_dvbpsi="${CPPFLAGS_ts_dvbpsi} ${CPPFLAGS_test}"
1336 PLUGINS="${PLUGINS} mux_ts_dvbpsi"
1337 LDFLAGS_mux_ts_dvbpsi="${LDFLAGS_mux_ts_dvbpsi} ${LDFLAGS_test} -ldvbpsi"
1338 CPPFLAGS_mux_ts_dvbpsi="${CPPFLAGS_mux_ts_dvbpsi} ${CPPFLAGS_test}"
1341 if test "${enable_dvbpsi}" != ""
1343 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])
1346 CPPFLAGS="${CPPFLAGS_save}"
1352 dnl Video4Linux plugin
1355 [ --enable-v4l Video4Linux input support (default disabled)])
1356 if test "${enable_v4l}" = "yes"
1358 AC_CHECK_HEADERS(linux/videodev.h, [
1359 PLUGINS="${PLUGINS} v4l"
1364 dnl special access module for Hauppauge PVR cards
1367 [ --enable-pvr PVR cards access module (default disabled)])
1368 if test "${enable_pvr}" = "yes"
1370 PLUGINS="${PLUGINS} pvr"
1377 [ --enable-vcd VCD support for Linux, FreeBSD, MacOS X and Win32 (default enabled)])
1379 if test "${enable_vcd}" != "no"
1381 AC_MSG_CHECKING(for cdrom_msf0 in linux/cdrom.h)
1382 AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
1384 PLUGINS="${PLUGINS} vcd cdda"
1389 AC_MSG_CHECKING(for scsireq in sys/scsiio.h)
1390 AC_EGREP_HEADER(scsireq,sys/scsiio.h,[
1392 PLUGINS="${PLUGINS} vcd cdda"
1393 AC_DEFINE(HAVE_SCSIREQ_IN_SYS_SCSIIO_H, 1, For NetBSD VCD support)
1398 AC_MSG_CHECKING(for ioc_toc_header in sys/cdio.h)
1399 AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
1401 PLUGINS="${PLUGINS} vcd cdda"
1402 AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
1407 if test "${SYS}" = "bsdi" -o "${SYS}" = "mingw32"
1409 PLUGINS="${PLUGINS} vcd cdda"
1412 if test "${SYS}" = "darwin"
1414 PLUGINS="${PLUGINS} vcd cdda"
1415 LDFLAGS_vcd="${LDFLAGS_vcd} -framework IOKit -framework CoreFoundation"
1416 LDFLAGS_cdda="${LDFLAGS_cdda} -framework IOKit -framework CoreFoundation"
1421 dnl Satellite input module
1423 AC_ARG_ENABLE(satellite,
1424 [ --enable-satellite satellite card support (default disabled)],
1425 [ if test "${enable_satellite}" = "yes"
1427 PLUGINS="${PLUGINS} satellite"
1431 dnl ipv6 plugin - not for QNX yet
1433 if test "${SYS}" != "nto" && test "${SYS}" != "mingw32"
1436 AC_CHECK_FUNCS(inet_pton,[have_ipv6=:],[
1437 AC_CHECK_LIB(resolv,inet_pton,
1439 LDFLAGS_ipv6="${LDFLAGS_ipv6} -lresolv"])
1441 AC_MSG_CHECKING(for sockaddr_in6 in netinet/in.h)
1442 AC_EGREP_HEADER(sockaddr_in6,netinet/in.h,
1443 [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); have_ipv6=false])
1444 if ${have_ipv6}; then
1445 PLUGINS="${PLUGINS} ipv6"
1448 if test "${SYS}" = "mingw32"
1450 AC_MSG_CHECKING(for getaddrinfo in ws2tcpip.h)
1451 AC_EGREP_HEADER(addrinfo,ws2tcpip.h,[AC_MSG_RESULT(yes)
1452 PLUGINS="${PLUGINS} ipv6"],[AC_MSG_RESULT(no)])
1456 dnl ogg demux plugin
1459 [ --enable-ogg Ogg demux support (default enabled)])
1460 if test "${enable_ogg}" != "no"
1462 AC_CHECK_HEADERS(ogg/ogg.h, [
1463 AC_CHECK_LIB( ogg, oggpack_read, [
1464 PLUGINS="${PLUGINS} ogg"
1465 LDFLAGS_ogg="${LDFLAGS_ogg} -logg"
1466 AC_CHECK_LIB( ogg, oggpackB_read, [
1467 CPPFLAGS_ogg="${CPPFLAGS_ogg} -DHAVE_OGGPACKB"])])
1472 dnl matroska demux plugin
1475 [ --enable-mkv Matroska demux support (default disabled)])
1476 if test "${enable_mkv}" = "yes"
1479 dnl matroska headers include ebml headers directly... pouah that stinks
1480 AC_CHECK_HEADERS(EbmlVersion.h matroska/KaxVersion.h, [
1481 PLUGINS="${PLUGINS} mkv"
1482 LDFLAGS_mkv="${LDFLAGS_mkv} -lmatroska -lebml -lstdc++"
1491 AC_ARG_WITH(,[Codec plugins:])
1497 [ --enable-mad libmad module (default enabled)])
1498 if test "${enable_mad}" != "no"
1501 [ --with-mad=PATH path to libmad],[],[])
1502 if test "${with_mad}" != "no" -a "${with_mad}" != ""
1504 CPPFLAGS_mpgatofixed32="${CPPFLAGS_mpgatofixed32} -I${with_mad}/include"
1505 LDFLAGS_mpgatofixed32="${LDFLAGS_mpgatofixed32} -L${with_mad}/lib"
1508 AC_ARG_WITH(mad-tree,
1509 [ --with-mad-tree=PATH mad tree for static linking],[],[])
1510 if test "${with_mad_tree}" != "no" -a "${with_mad_tree}" != ""
1512 real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
1513 if test "${real_mad_tree}" = ""
1515 dnl The given directory can't be found
1517 AC_MSG_ERROR([${with_mad_tree} directory doesn't exist])
1519 dnl Use a custom libmad
1520 AC_MSG_CHECKING(for mad.h in ${real_mad_tree}/libmad)
1521 if test -f ${real_mad_tree}/libmad/mad.h
1524 CPPFLAGS_mpgatofixed32="${CPPFLAGS_mpgatofixed32} -I${real_mad_tree}/libmad"
1525 LDFLAGS_mpgatofixed32="${LDFLAGS_mpgatofixed32} -L${real_mad_tree}/libmad/.libs"
1526 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mpgatofixed32}"
1527 AC_CHECK_LIB(mad, mad_bit_init, [
1528 BUILTINS="${BUILTINS} mpgatofixed32"
1529 LDFLAGS_mpgatofixed32="${LDFLAGS_mpgatofixed32} -lmad"
1530 ],[ AC_MSG_ERROR([the specified tree hasn't been compiled ])
1532 LDFLAGS="${LDFLAGS_save}"
1535 AC_MSG_ERROR([the specified tree doesn't have mad.h])
1538 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mpgatofixed32}"
1539 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mpgatofixed32}"
1540 AC_CHECK_HEADERS(mad.h, ,
1541 [ AC_MSG_ERROR([Could not find libmad on your system: you may get it from http://www.underbit.com/products/mad/. Alternatively you can use --disable-mad to disable the mad plugin.]) ])
1542 AC_CHECK_LIB(mad, mad_bit_init, [
1543 PLUGINS="${PLUGINS} mpgatofixed32"
1544 LDFLAGS_mpgatofixed32="${LDFLAGS_mpgatofixed32} -lmad" ],
1545 [ AC_MSG_ERROR([Cannot find libmad library...]) ])
1546 CPPFLAGS="${CPPFLAGS_save}"
1547 LDFLAGS="${LDFLAGS_save}"
1552 dnl libid3tag support
1554 AC_CHECK_HEADERS(id3tag.h, [
1555 AC_CHECK_HEADERS(zlib.h, [
1556 LDFLAGS_id3tag="${LDFLAGS_id3tag} -lid3tag -lz"
1557 PLUGINS="${PLUGINS} id3tag"]) ])
1560 dnl ffmpeg decoder plugin
1562 AC_ARG_ENABLE(ffmpeg,
1563 [ --enable-ffmpeg ffmpeg codec (default enabled)])
1564 if test "${enable_ffmpeg}" != "no"
1566 AC_ARG_WITH(ffmpeg-tree,
1567 [ --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
1570 dnl test for !(--with-ffmpeg-tree)
1572 if test "${with_ffmpeg_tree}" == "no" -o "${with_ffmpeg_tree}" == "";then
1573 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
1574 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
1575 AC_CHECK_HEADERS(ffmpeg/avcodec.h postproc/postprocess.h)
1576 AC_CHECK_LIB(avcodec, avcodec_init, [
1577 BUILTINS="${BUILTINS} ffmpeg stream_out_transcode"
1578 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lavcodec"
1579 dnl XXX: we don't link with -lavcodec a 2nd time because the OS X
1580 dnl linker would miserably barf on multiple definitions.
1581 LDFLAGS_stream_out_transcode="${LDFLAGS_stream_out_transcode}" ],
1582 [ AC_MSG_ERROR([Could not find ffmpeg on your system: you may get it from http://ffmpeg.sf.net/ (cvs version is recommended). Alternatively you can use --disable-ffmpeg to disable the ffmpeg plugins.]) ])
1583 LDFLAGS="${LDFLAGS_save}"
1584 CPPFLAGS="${CPPFLAGS_save}"
1588 dnl test for --with-ffmpeg-tree
1590 if test "${with_ffmpeg_tree}" != "no" -a "${with_ffmpeg_tree}" != "";then
1591 AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
1592 real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
1593 if test "${real_ffmpeg_tree}" = ""; then
1594 dnl The given directory can't be found
1596 AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
1598 if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"; then
1599 dnl Use a custom libffmpeg
1600 AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
1601 BUILTINS="${BUILTINS} ffmpeg stream_out_transcode"
1602 LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -L${real_ffmpeg_tree}/libavcodec -lavcodec"
1603 CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${real_ffmpeg_tree}/libavcodec"
1605 dnl XXX: we don't link with -lavcodec a 2nd time because the OS X
1606 dnl linker would miserably barf on multiple definitions.
1607 LDFLAGS_stream_out_transcode="${LDFLAGS_stream_out_transcode} -L${real_ffmpeg_tree}/libavcodec"
1608 CPPFLAGS_stream_out_transcode="${CPPFLAGS_stream_out_transcode} -I${real_ffmpeg_tree}/libavcodec"
1610 dnl The given libavcodec wasn't built
1612 AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
1616 dnl Duplicate the ffmpeg CPPFLAGS and LDFLAGS for the encoder
1617 CPPFLAGS_encoder_ffmpeg="${CPPFLAGS_ffmpeg}"
1618 dnl XXX: we don't link with -lavcodec blah blah blah
1619 #LDFLAGS_encoder_ffmpeg="${LDFLAGS_ffmpeg}"
1623 dnl faad decoder plugin
1626 [ --enable-faad faad codec (default disabled)])
1627 if test "${enable_faad}" = "yes"
1629 AC_ARG_WITH(faad-tree,
1630 [ --with-faad-tree=PATH faad tree for static linking])
1631 if test "${with_faad_tree}" != ""
1633 AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
1634 real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
1635 if test "${real_faad_tree}" = ""
1637 dnl The given directory can't be found
1639 AC_MSG_ERROR([cannot cd to ${with_faad_tree}])
1641 if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a"
1643 dnl Use a custom faad
1644 AC_MSG_RESULT(${real_faad_tree}/libfaad/.libs/libfaad.a)
1645 BUILTINS="${BUILTINS} faad"
1646 LDFLAGS_faad="${LDFLAGS_faad} -L${real_faad_tree}/libfaad/.libs -lfaad"
1647 CPPFLAGS_faad="${CPPFLAGS_faad} -I${real_faad_tree}/include"
1648 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_faad}"
1649 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_faad}"
1650 AC_TRY_COMPILE([#include <faad.h>],
1651 [faacDecHandle a; faacDecFrameInfo *b; unsigned char *c;
1652 unsigned long d; faacDecDecode(a,b,c,d);],
1653 [], [AC_DEFINE(HAVE_OLD_FAAD2, 1, Define if FAAD2 < 1.2)])
1654 LDFLAGS="${LDFLAGS_save}"
1655 CPPFLAGS="${CPPFLAGS_save}"
1657 dnl The given libfaad wasn't built
1659 AC_MSG_ERROR([cannot find ${real_faad_tree}/libfaad/.libs/libfaad.a, make sure you compiled libfaad in ${with_faad_tree}])
1662 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_faad}"
1663 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_faad}"
1664 AC_CHECK_HEADERS(faad.h, ,
1665 [ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ])
1666 AC_CHECK_LIB(faad, faacDecOpen, [
1667 PLUGINS="${PLUGINS} faad"
1668 LDFLAGS_faad="${LDFLAGS_faad} -lfaad"
1669 AC_TRY_COMPILE([#include <faad.h>],
1670 [faacDecHandle a; faacDecFrameInfo *b; unsigned char *c;
1671 unsigned long d; faacDecDecode(a,b,c,d);],
1672 [], [AC_DEFINE(HAVE_OLD_FAAD2, 1, Define if FAAD2 < 1.2)]) ],
1673 [ AC_MSG_ERROR([Cannot find libfaad library...]) ])
1674 LDFLAGS="${LDFLAGS_save}"
1675 CPPFLAGS="${CPPFLAGS_save}"
1681 dnl xvid decoder plugin
1684 [ --enable-xvid xvid codec (default disabled)])
1685 if test "${enable_xvid}" = "yes"
1688 [ --with-xvid=PATH path to xvid installation],[],[])
1689 if test "${with_xvid}" != "no" -a "${with_xvid}" != ""
1691 CPPFLAGS_xvid="${CPPFLAGS_xvid} -I${with_xvid}/include"
1692 LDFLAGS_xvid="${LDFLAGS_xvid} -L${with_xvid}/lib"
1694 LDFLAGS_xvid="${LDFLAGS_xvid}"
1696 AC_ARG_WITH(xvid-tree,
1697 [ --with-xvid-tree=PATH xvid tree for static linking])
1698 if test "${with_xvid_tree}" != ""
1700 AC_MSG_CHECKING(for libxvidcore.a in ${with_xvid_tree})
1701 real_xvid_tree="`cd ${with_xvid_tree} 2>/dev/null && pwd`"
1702 if test "${real_xvid_tree}" = ""
1704 dnl The given directory can't be found
1706 AC_MSG_ERROR([cannot cd to ${with_xvid_tree}])
1708 if test -f "${real_xvid_tree}/build/generic/libxvidcore.a"
1710 dnl Use a custom xvid
1711 AC_MSG_RESULT(${real_xvid_tree}/build/generic/libxvidcore.a)
1712 BUILTINS="${BUILTINS} xvid"
1713 LDFLAGS_xvid="${LDFLAGS_xvid} -L${real_xvid_tree}/build/generic -lxvidcore"
1714 CPPFLAGS_xvid="${CPPFLAGS_xvid} -I${real_xvid_tree}/src"
1716 dnl The given libxvidcore wasn't built
1718 AC_MSG_ERROR([cannot find ${real_xvid_tree}/build/generic/libxvidcore.a, make sure you compiled libxvidcore in ${with_xvid_tree}])
1721 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_xvid}"
1722 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_xvid}"
1723 AC_CHECK_HEADERS(xvid.h, ,
1724 [ AC_MSG_ERROR([Cannot find development headers for libxvidcore...]) ])
1725 AC_CHECK_LIB(xvidcore, xvid_init, [
1726 PLUGINS="${PLUGINS} xvid"
1727 LDFLAGS_xvid="${LDFLAGS_xvid} -lxvidcore" ],
1728 [ AC_MSG_ERROR([Cannot find libxvidcore library...]) ])
1729 LDFLAGS="${LDFLAGS_save}"
1730 CPPFLAGS="${CPPFLAGS_save}"
1733 dnl Duplicate the xvid CPPFLAGS and LDFLAGS for the encoder
1734 LDFLAGS_encoder_xvid=${LDFLAGS_xvid}
1735 CPPFLAGS_encoder_xvid=${CPPFLAGS_xvid}
1739 dnl QuickTime plugin
1741 AC_ARG_ENABLE(quicktime,
1742 [ --enable-quicktime QuickTime module (default enabled on MacOS X)])
1743 if test "${enable_quicktime}" != "no" &&
1744 (test "${SYS}" = "darwin" || test "${enable_quicktime}" = "yes")
1746 AC_CHECK_HEADERS(QuickTime/QuickTime.h,
1747 [ BUILTINS="${BUILTINS} quicktime"
1748 LDFLAGS_quicktime="${LDFLAGS_quicktime} -framework QuickTime -framework Carbon"
1749 ], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
1755 AC_CHECK_HEADERS(zlib.h, [
1756 LDFLAGS_mp4="${LDFLAGS_mp4} -lz"
1757 LDFLAGS_skins="${LDFLAGS_skins} -lz"
1758 LDFLAGS_basic_skins="${LDFLAGS_basic_skins} -lz"
1765 AC_CHECK_HEADERS(libtar.h, [
1766 LDFLAGS_skins="${LDFLAGS_skins} -ltar"
1767 LDFLAGS_basic_skins="${LDFLAGS_basic_skins} -ltar"
1773 dnl a52 AC3 decoder plugin
1776 [ --enable-a52 A/52 support with liba52 (default enabled)])
1777 if test "${enable_a52}" != "no"
1780 [ --with-a52=PATH a52 headers and libraries])
1781 AC_ARG_WITH(a52-tree,
1782 [ --with-a52-tree=PATH a52dec tree for static linking ],[],[])
1783 if test "${with_a52_tree}" != "no" -a "${with_a52_tree}" != ""
1785 real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
1786 if test "${real_a52_tree}" = ""
1788 dnl The given directory can't be found
1790 AC_MSG_ERROR([${with_a52_tree} directory doesn't exist])
1792 dnl Use a custom a52dec
1793 AC_MSG_CHECKING(for a52.h in ${real_a52_tree}/include)
1794 if test -f ${real_a52_tree}/include/a52.h
1797 CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} -I${real_a52_tree}"
1798 LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} -L${real_a52_tree}/liba52/.libs"
1799 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_a52tofloat32}"
1800 AC_CHECK_LIB(a52, a52_free, [
1801 BUILTINS="${BUILTINS} a52tofloat32"
1802 LDFLAGS_a52tofloat32="-la52 ${LDFLAGS_a52tofloat32}"
1803 CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} -DUSE_A52DEC_TREE"
1805 if test -f ${real_a52_tree}/liba52/.libs/liba52.a
1807 AC_MSG_ERROR([make sure you have at least a52dec-0.7.3])
1809 AC_MSG_ERROR([the specified tree hasn't been compiled])
1812 LDFLAGS="${LDFLAGS_save}"
1815 AC_MSG_ERROR([the specified tree doesn't have a52.h])
1818 if test "${with_a52}" = ""
1823 LDFLAGS_test="-L${with_a52}/lib"
1824 CPPFLAGS_test="-I${with_a52}/include"
1826 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test} ${CPPFLAGS_a52tofloat32}"
1827 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_test} ${LDFLAGS_a52tofloat32}"
1828 AC_CHECK_HEADERS(a52dec/a52.h, [
1829 AC_CHECK_LIB(a52, a52_free, [
1830 PLUGINS="${PLUGINS} a52tofloat32"
1831 LDFLAGS_a52tofloat32="${LDFLAGS_test} -la52 ${LDFLAGS_a52tofloat32}"
1832 CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} ${CPPFLAGS_test}"
1834 AC_MSG_ERROR([Could not find liba52 on your system: you may get it from http://liba52.sf.net/. Alternatively you can use --disable-a52 to disable the a52 plugin.])
1837 CPPFLAGS="${CPPFLAGS_save}"
1838 LDFLAGS="${LDFLAGS_save}"
1846 [ --enable-dv DV decoder support (deprecated in favor of ffmpeg) (default disabled)])
1847 if test "${enable_dv}" = "yes"
1849 AC_CHECK_HEADERS(libdv/dv.h, [
1850 PLUGINS="${PLUGINS} dv"
1851 LDFLAGS_dv="${LDFLAGS_dv} -ldv"
1859 [ --enable-flac flac decoder support (default disabled)])
1860 if test "${enable_flac}" = "yes"
1862 AC_CHECK_HEADERS(FLAC/stream_decoder.h, [
1863 PLUGINS="${PLUGINS} flac flacdec"
1864 LDFLAGS_flacdec="${LDFLAGS_flacdec} -lFLAC"
1871 AC_ARG_ENABLE(libmpeg2,
1872 [ --enable-libmpeg2 libmpeg2 decoder support (default enabled)])
1873 if test "${enable_libmpeg2}" != "no"
1875 AC_ARG_WITH(libmpeg2-tree,
1876 [ --with-libmpeg2-tree=PATH libmpeg2 tree for static linking])
1877 if test "${with_libmpeg2_tree}" != ""
1879 AC_MSG_CHECKING(for libmpeg2.a in ${with_libmpeg2_tree})
1880 real_libmpeg2_tree="`cd ${with_libmpeg2_tree} 2>/dev/null && pwd`"
1881 if test "${real_libmpeg2_tree}" = ""
1883 dnl The given directory can't be found
1885 AC_MSG_ERROR([cannot cd to ${with_libmpeg2_tree}])
1887 if test -f "${real_libmpeg2_tree}/libmpeg2/.libs/libmpeg2.a"
1889 dnl Use a custom libmpeg2
1890 AC_MSG_RESULT(${real_libmpeg2_tree}/libmpeg2/.libs/libmpeg2.a)
1891 PLUGINS="${PLUGINS} libmpeg2"
1892 LDFLAGS_libmpeg2="${LDFLAGS_libmpeg2} -L${real_libmpeg2_tree}/libmpeg2/.libs -lmpeg2"
1893 CFLAGS_libmpeg2="${CFLAGS_libmpeg2} -I${real_libmpeg2_tree}/include"
1894 eval "`cd ${real_libmpeg2_tree}/include && ln -sf . mpeg2dec 2>/dev/null`"
1896 dnl The given libmpeg2 wasn't built
1898 AC_MSG_ERROR([cannot find ${real_libmpeg2_tree}/libmpeg2/.libs/libmpeg2.a, make sure you compiled libmpeg2 in ${with_libmpeg2_tree}])
1901 AC_CHECK_HEADERS(mpeg2dec/mpeg2.h, [
1902 AC_MSG_CHECKING(for libmpeg2 version >= 0.3.2)
1904 [#include <mpeg2dec/mpeg2.h>
1905 #ifdef MPEG2_RELEASE
1906 #if MPEG2_RELEASE >= MPEG2_VERSION(0,3,2)
1910 [AC_MSG_RESULT([yes])
1911 PLUGINS="${PLUGINS} libmpeg2"
1912 LDFLAGS_libmpeg2="${LDFLAGS_libmpeg2} -lmpeg2"],
1913 [AC_MSG_RESULT([no])
1914 AC_MSG_ERROR([Your libmpeg2 is too old (you need the cvs version): you may get a more recent one from http://libmpeg2.sf.net/. Alternatively you can use --disable-libmpeg2 to disable the libmpeg2 plugin.])])],
1916 [AC_MSG_ERROR([Could not find libmpeg2 on your system: you may get it from http://libmpeg2.sf.net/ (you need the cvs version). Alternatively you can use --disable-libmpeg2 to disable the libmpeg2 plugin.])]
1924 AC_ARG_ENABLE(vorbis,
1925 [ --enable-vorbis Vorbis decoder support (default enabled)])
1926 if test "${enable_vorbis}" != "no"
1928 AC_CHECK_HEADERS(vorbis/codec.h, [
1929 PLUGINS="${PLUGINS} vorbis"
1930 LDFLAGS_vorbis="${LDFLAGS_vorbis} -lvorbis -logg"
1937 AC_ARG_ENABLE(tremor,
1938 [ --enable-tremor Tremor decoder support (default disabled)])
1939 if test "${enable_tremor}" = "yes"
1941 AC_CHECK_HEADERS(tremor/ivorbiscodec.h, [
1942 PLUGINS="${PLUGINS} tremor"
1943 LDFLAGS_tremor="${LDFLAGS_tremor} -lvorbisidec -logg"
1948 dnl tarkin decoder plugin
1950 AC_ARG_ENABLE(tarkin,
1951 [ --enable-tarkin experimental tarkin codec (default disabled)])
1952 if test "${enable_tarkin}" = "yes"
1954 AC_ARG_WITH(tarkin-tree,
1955 [ --with-tarkin-tree=PATH tarkin tree for static linking])
1956 if test "${with_tarkin_tree}" != ""
1958 AC_MSG_CHECKING(for tarkin.o in ${with_tarkin_tree})
1959 real_tarkin_tree="`cd ${with_tarkin_tree} 2>/dev/null && pwd`"
1960 if test -f "${real_tarkin_tree}/tarkin.o"
1962 BUILTINS="${BUILTINS} tarkin"
1963 CPPFLAGS_tarkin="${CPPFLAGS_tarkin} -I${real_tarkin_tree}"
1964 LDFLAGS_tarkin="${LDFLAGS_tarkin} ${real_tarkin_tree}/mem.o ${real_tarkin_tree}/pnm.o ${real_tarkin_tree}/wavelet.o ${real_tarkin_tree}/wavelet_xform.o ${real_tarkin_tree}/wavelet_coeff.o ${real_tarkin_tree}/yuv.o ${real_tarkin_tree}/tarkin.o ${real_tarkin_tree}/info.o -logg"
1967 dnl The given tarkin tree wasn't built
1969 AC_MSG_ERROR([cannot find ${real_tarkin_tree}/tarkin.o,
1970 make sure you compiled tarkin in ${with_tarkin_tree}])
1976 dnl theora decoder plugin
1978 AC_ARG_ENABLE(theora,
1979 [ --enable-theora experimental theora codec (default disabled)])
1980 if test "${enable_theora}" = "yes"
1982 AC_CHECK_HEADERS(theora/theora.h, [
1983 AC_CHECK_LIB(theora, theora_granule_time, [
1984 BUILTINS="${BUILTINS} theora"
1985 LDFLAGS_theora="${LDFLAGS_theora} -ltheora -logg" ],[
1986 AC_MSG_ERROR([libtheora doesn't appear to be installed on you system.
1987 You also need to check that you have a libogg posterior to the 1.0 release.])],
1996 AC_ARG_WITH(,[Video plugins:])
1999 if test "${SYS}" != "mingw32"
2001 CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
2002 AC_CHECK_HEADERS(X11/extensions/dpms.h, [
2003 AC_MSG_CHECKING(for DPMSInfo in X11/extensions/dpms.h)
2004 AC_EGREP_HEADER(DPMSInfo,X11/extensions/dpms.h,[
2006 AC_DEFINE(DPMSINFO_IN_DPMS_H, 1,
2007 Define if <X11/extensions/dpms.h> defines DPMSInfo.)
2012 #include <X11/Xlib.h>
2014 CPPFLAGS="${CPPFLAGS_save}"
2019 dnl (enabled by default except on win32)
2022 [ --enable-x11 X11 support (default enabled)])
2023 if test "${enable_x11}" != "no" &&
2024 (test "${SYS}" != "mingw32" || test "${enable_x11}" = "yes"); then
2025 CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
2026 AC_CHECK_HEADERS(X11/Xlib.h, [
2027 PLUGINS="${PLUGINS} x11"
2028 LDFLAGS_x11="${LDFLAGS_x11} -L${x_libraries} -lX11 -lXext"
2029 CPPFLAGS_x11="${CPPFLAGS_x11} -I${x_includes}"
2030 AC_CHECK_HEADERS(X11/extensions/Xinerama.h, [
2031 CFLAGS="${CFLAGS_save} -L${x_libraries} -lX11 -lXext"
2032 AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
2033 AC_DEFINE(HAVE_XINERAMA,1,[Define this if you have libXinerama installed])
2034 LDFLAGS_x11="${LDFLAGS_x11} -lXinerama")
2035 CFLAGS="${CFLAGS_save}"
2038 CPPFLAGS="${CPPFLAGS_save}"
2043 dnl (enabled by default except on win32)
2045 AC_ARG_ENABLE(xvideo,
2046 [ --enable-xvideo XVideo support (default enabled)])
2047 if test "${enable_xvideo}" != "no" &&
2048 (test "${SYS}" != "mingw32" || test "${enable_xvideo}" = "yes"); then
2049 CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
2050 AC_CHECK_HEADERS(X11/extensions/Xv.h, [
2051 CFLAGS="${CFLAGS_save} -L${x_libraries} -lX11 -lXext"
2052 AC_CHECK_LIB(Xv_pic,XvPutImage,
2053 # We have Xv_pic, that's good, we can build an xvideo.so plugin !
2054 PLUGINS="${PLUGINS} xvideo"
2055 LDFLAGS_xvideo="${LDFLAGS_xvideo} -L${x_libraries} -lX11 -lXext -lXv_pic"
2056 CPPFLAGS_xvideo="${CPPFLAGS_xvideo} -I${x_includes}",
2057 AC_CHECK_LIB(Xv,XvPutImage,
2058 # We don't have Xv_pic, but we have Xv, let's make xvideo.a as builtin
2059 PLUGINS="${PLUGINS} xvideo"
2060 LDFLAGS_xvideo="${LDFLAGS_xvideo} -L${x_libraries} -lX11 -lXext -lXv"
2061 CPPFLAGS_xvideo="${CPPFLAGS_xvideo} -I${x_includes}",
2062 # Otherwise... well, do nothing.
2066 AC_CHECK_HEADERS(X11/extensions/Xinerama.h, [
2067 AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
2068 AC_DEFINE(HAVE_XINERAMA,1,[Define this if you have libXinerama installed])
2069 LDFLAGS_xvideo="${LDFLAGS_xvideo} -lXinerama")
2071 CFLAGS="${CFLAGS_save}"
2073 CPPFLAGS="${CPPFLAGS_save}")
2080 [ --enable-sdl SDL support (default enabled)])
2081 if test "${enable_sdl}" != "no"
2084 AC_ARG_WITH(sdl-config-path,
2085 [ --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)],
2086 [ if test "${with_sdl_config_path}" != "no"
2088 SDL_PATH="${with_sdl_config_path}:${PATH}"
2090 AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no, ${SDL_PATH})
2091 SDL_CONFIG="${SDL12_CONFIG}"
2092 SDL_HEADER="SDL12/SDL.h"
2093 if test "${SDL_CONFIG}" = "no"
2095 AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no, ${SDL_PATH})
2096 SDL_CONFIG=${SDL11_CONFIG}
2097 SDL_HEADER="SDL11/SDL.h"
2099 if test "${SDL_CONFIG}" = "no"
2101 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, ${SDL_PATH})
2102 SDL_HEADER="SDL/SDL.h"
2104 # check for cross-compiling
2106 AC_ARG_WITH(sdl-prefix,
2107 [ --with-sdl-prefix=PATH path to libsdl (needed for cross-compiling),
2109 --with-sdl-prefix=/usr/local/arm/2.95.3/arm-linux/usr)],[],[])
2110 if test "${with_sdl_prefix}" != "no" -a "${with_sdl_prefix}" != ""
2112 SDL_PREFIX="--prefix=${with_sdl_prefix}"
2114 if test "${SDL_CONFIG}" != "no"
2116 PLUGINS="${PLUGINS} vout_sdl aout_sdl"
2117 CFLAGS_vout_sdl="${CFLAGS_vout_sdl} `${SDL_CONFIG} ${SDL_PREFIX} --cflags | sed 's,SDL,,'`"
2118 LDFLAGS_vout_sdl="${LDFLAGS_vout_sdl} `${SDL_CONFIG} ${SDL_PREFIX} --libs | sed 's,-rdynamic,,'`"
2119 CFLAGS_aout_sdl="${CFLAGS_aout_sdl} `${SDL_CONFIG} ${SDL_PREFIX} --cflags | sed 's,SDL,,'`"
2120 LDFLAGS_aout_sdl="${LDFLAGS_aout_sdl} `${SDL_CONFIG} ${SDL_PREFIX} --libs | sed 's,-rdynamic,,'`"
2121 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_vout_sdl}"
2122 AC_CHECK_HEADERS(${SDL_HEADER}, AC_DEFINE_UNQUOTED(SDL_INCLUDE_FILE,
2123 <${SDL_HEADER}>, Indicate whether we should use SDL/SDL.h or SDL11/SDL.h),
2124 [ AC_CHECK_HEADERS(SDL.h, AC_DEFINE(SDL_INCLUDE_FILE, <SDL.h>,
2125 As a last resort we also test for SDL.h presence),
2126 [ AC_MSG_ERROR([The development package for SDL is not installed.
2127 Please install it and try again. Alternatively you can also configure with
2130 CPPFLAGS="${CPPFLAGS_save}"
2131 if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
2133 AC_MSG_ERROR([The development package for SDL is not installed.
2134 Please install it and try again. Alternatively you can also configure with
2137 elif test "${enable_sdl}" = "yes"
2139 AC_MSG_ERROR([I couldn't find the SDL package. You can download libSDL
2140 from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
2148 AC_ARG_ENABLE(freetype,
2149 [ --enable-freetype freetype support (default enabled)])
2150 if test "${enable_freetype}" != "no"
2152 FREETYPE_PATH="${PATH}"
2153 AC_ARG_WITH(freetype-config-path,
2154 [ --with-freetype-config-path=PATH freetype-config path (default search in \$PATH)],
2155 [ if test "${with_freetype_config_path}" != "no"
2157 FREETYPE_PATH="${with_freetype_config_path}:${PATH}"
2159 AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no, ${FREETYPE_PATH})
2161 if test "${FREETYPE_CONFIG}" != "no"
2163 PLUGINS="${PLUGINS} osdtext"
2164 CFLAGS_osdtext="${CFLAGS_osdtext} `${FREETYPE_CONFIG} --cflags`"
2165 LDFLAGS_osdtext="${LDFLAGS_osdtext} `${FREETYPE_CONFIG} --libs`"
2166 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_freetype}"
2167 elif test "${enable_freetype}" = "yes"
2169 AC_MSG_ERROR([I couldn't find the freetype package. You can download libfreetype2
2170 from http://www.freetype.org/, or configure with --disable-freetype. Have a nice day.
2176 dnl Qt Embedded module
2177 dnl (disabled by default)
2180 [ --enable-qte QT Embedded support (default disabled)])
2181 if test "${enable_qte}" = "yes"
2184 [ --with-qte=PATH Qt Embedded headers and libraries])
2185 if test "${with_qte}" != "no" -a "${with_qte}" != ""
2187 LDFLAGS_qte="${LDFLAGS_qte} -L${with_qte}/lib `echo -L${with_qte}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte"
2188 CPPFLAGS_qte="${CPPFLAGS_qte} -I${with_qte}/include `echo -I${with_qte}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti"
2190 LDFLAGS_qte="${LDFLAGS_qte} -L${QTDIR}/lib `echo -L${QTDIR}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte"
2191 CPPFLAGS_qte="${CPPFLAGS_qte} -I${QTDIR}/include `echo -I${QTDIR}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti"
2193 PLUGINS="${PLUGINS} qte"
2195 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_qte}"
2196 AC_CHECK_HEADERS(qt.h jpeglib.h, ,[
2197 AC_MSG_ERROR([echo "Cannot find QT Embedded development headers."])
2199 CPPFLAGS="${CPPFLAGS_save}"
2203 dnl Windows DirectX module
2205 AC_ARG_ENABLE(directx,
2206 [ --enable-directx Win32 DirectX support (default enabled on Win32)])
2207 if test "${enable_directx}" != "no"
2209 if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
2211 AC_ARG_WITH(directx,
2212 [ --with-directx=PATH Win32 DirectX headers])
2213 if test "${with_directx}" = ""
2215 AC_CHECK_HEADERS(ddraw.h,
2216 [ PLUGINS="${PLUGINS} vout_directx aout_directx"
2217 LDFLAGS_vout_directx="${LDFLAGS_directx} -lgdi32" ])
2219 AC_MSG_CHECKING(for directX headers in ${with_directx})
2220 if test -f ${with_directx}/ddraw.h
2222 PLUGINS="${PLUGINS} vout_directx aout_directx"
2223 LDFLAGS_vout_directx="${LDFLAGS_directx} -lgdi32"
2224 CPPFLAGS_vout_directx="${CPPFLAGS_vout_directx} -I${with_directx}"
2225 CPPFLAGS_aout_directx="${CPPFLAGS_aout_directx} -I${with_directx}"
2229 AC_MSG_ERROR([Cannot find ${with_directx}/ddraw.h!])
2236 dnl Linux framebuffer module
2239 [ --enable-fb Linux framebuffer support (default enabled on Linux)])
2240 if test "${enable_fb}" != "no"
2242 AC_CHECK_HEADERS(linux/fb.h, [
2243 PLUGINS="${PLUGINS} fb"
2248 dnl Linux MGA module
2251 [ --enable-mga Linux kernel Matrox support (default disabled)],
2252 [ if test "${enable_mga}" = "yes"
2254 PLUGINS="${PLUGINS} mga xmga"
2260 AC_ARG_ENABLE(svgalib,
2261 [ --enable-svgalib SVGAlib support (default disabled)])
2262 if test "${enable_svgalib}" = "yes"
2264 PLUGINS="${PLUGINS} svgalib"
2265 LDFLAGS_svgalib="${LDFLAGS_svgalib} -lvgagl -lvga"
2272 [ --enable-ggi GGI support (default disabled)])
2273 if test "${enable_ggi}" = "yes"
2275 PLUGINS="${PLUGINS} ggi"
2276 LDFLAGS_ggi="${LDFLAGS_ggi} -lggi"
2278 [ --with-ggi=PATH path to libggi],
2279 [ if test "${with_ggi}" != "no" -a "${with_ggi}" != ""
2281 CPPFLAGS_ggi="${CPPFLAGS_ggi} -I${with_ggi}/include"
2282 LDFLAGS_ggi="${LDFLAGS_ggi} -L${with_ggi}/lib"
2289 AC_ARG_ENABLE(glide,
2290 [ --enable-glide Glide (3dfx) support (default disabled)])
2291 if test "${enable_glide}" = "yes"
2293 PLUGINS="${PLUGINS} glide"
2294 LDFLAGS_glide="${LDFLAGS_glide} -lglide2x -lm"
2295 CPPFLAGS_glide="${CPPFLAGS_glide} -I/usr/include/glide"
2297 [ --with-glide=PATH path to libglide],
2298 [ if test "${with_glide}" != "no" -a "${with_glide}" != ""
2300 CPPFLAGS_glide="${CPPFLAGS_glide} -I${with_glide}/include"
2301 LDFLAGS_glide="${LDFLAGS_glide} -L${with_glide}/lib"
2309 [ --enable-aa aalib output (default disabled)])
2310 if test "${enable_aa}" = "yes"
2312 AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
2313 if test "${have_aa}" = "true"
2315 PLUGINS="${PLUGINS} aa"
2316 LDFLAGS_aa="${LDFLAGS_aa} -laa"
2321 dnl win32 GDI plugin
2323 AC_ARG_ENABLE(wingdi,
2324 [ --enable-wingdi Win32 GDI module (default enabled on Win32)])
2325 if test "${enable_wingdi}" != "no"; then
2326 if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"; then
2327 PLUGINS="${PLUGINS} wingdi"
2328 LDFLAGS_wingdi="${LDFLAGS_wingdi} -lgdi32"
2336 AC_ARG_WITH(,[Audio plugins:])
2339 dnl OSS /dev/dsp module (enabled by default except on win32)
2342 [ --enable-oss Linux OSS /dev/dsp support (enabled on Linux)])
2344 if test "${enable_oss}" != "no" &&
2345 (test "${SYS}" != "mingw32" || test "${enable_oss}" = "yes")
2347 AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h, [
2348 PLUGINS="${PLUGINS} oss"
2349 AC_CHECK_LIB(ossaudio,main,LDFLAGS_oss="${LDFLAGS_oss} -lossaudio")
2357 [ --enable-esd Esound library support (default disabled)],
2358 [if test "${enable_esd}" = "yes"
2360 AC_PATH_PROG(ESD_CONFIG, esd-config, no)
2361 if test "${ESD_CONFIG}" != "no"
2363 PLUGINS="${PLUGINS} esd"
2364 CFLAGS_esd="${CFLAGS_esd} `${ESD_CONFIG} --cflags`"
2365 LDFLAGS_esd="${LDFLAGS_esd} `${ESD_CONFIG} --libs`"
2373 [ --enable-arts aRts sound server (default disabled)],
2374 [if test "${enable_arts}" = "yes"
2376 AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
2377 if test "${ARTS_CONFIG}" != "no"
2379 PLUGINS="${PLUGINS} arts"
2380 CFLAGS_arts="${CFLAGS_arts} `${ARTS_CONFIG} --cflags`"
2381 LDFLAGS_arts="${LDFLAGS_arts} `${ARTS_CONFIG} --libs `"
2389 [ --enable-alsa ALSA sound support for Linux (default disabled)],
2390 [if test "${enable_alsa}" = "yes"
2392 AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
2393 if test "${have_alsa}" = "true"
2395 AC_TRY_COMPILE([#define ALSA_PCM_NEW_HW_PARAMS_API
2396 #define ALSA_PCM_NEW_SW_PARAMS_API
2397 #include <alsa/asoundlib.h>],
2398 [void foo() { snd_pcm_hw_params_get_period_time(0,0,0); }],
2399 AC_DEFINE(HAVE_ALSA_NEW_API, 1, Define if ALSA is at least rc4))
2400 PLUGINS="${PLUGINS} alsa"
2401 LDFLAGS_alsa="${LDFLAGS_alsa} -lasound -lm -ldl"
2403 AC_MSG_ERROR([Could not find ALSA development headers])
2408 dnl win32 waveOut plugin
2410 AC_ARG_ENABLE(waveout,
2411 [ --enable-waveout Win32 waveOut module (default enabled on Win32)])
2412 if test "${enable_waveout}" != "no"; then
2413 if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"; then
2414 PLUGINS="${PLUGINS} waveout"
2415 LDFLAGS_waveout="-lwinmm"
2420 dnl CoreAudio plugin
2422 AC_ARG_ENABLE(coreaudio,
2423 [ --enable-coreaudio CoreAudio module (default enabled on MacOS X)])
2424 if test "${enable_coreaudio}" != "no" &&
2425 (test "${SYS}" = "darwin" || test "${enable_coreaudio}" = "yes")
2427 AC_CHECK_HEADERS(CoreAudio/CoreAudio.h,
2428 [ BUILTINS="${BUILTINS} coreaudio"
2429 LDFLAGS_coreaudio="${LDFLAGS_coreaudio} -framework CoreAudio"
2430 AC_MSG_CHECKING(for kAudioConverterPrimeMethod in AudioToolbox/AudioConverter.h)
2431 AC_EGREP_HEADER(kAudioConverterPrimeMethod,AudioToolbox/AudioConverter.h,[
2433 PLUGINS="${PLUGINS} coreaudio_resampler"
2434 LDFLAGS_coreaudio_resampler="${LDFLAGS_coreaudio_resampler} -framework AudioToolbox"
2435 ],[ AC_MSG_RESULT(no) ])
2436 ], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
2440 dnl Interface plugins
2443 AC_ARG_WITH(,[Interface plugins:])
2445 dnl special case for BeOS
2446 if test "${SYS}" = "beos"
2448 PLUGINS="${PLUGINS} beos"
2454 AC_ARG_ENABLE(skins,
2455 [ --enable-skins Skins interface module (default enabled on Win32)])
2456 if test "${enable_skins}" != "no"; then
2457 WXWINDOWS_PATH="${PATH}"
2458 AC_ARG_WITH(skins-wx-config-path,
2459 [ --with-skins-wx-config-path=PATH wx-config path for the skins plugin (default search in \$PATH)],
2460 [ if test "${with_skins_wx_config_path}" != "no"
2462 WXWINDOWS_PATH="${with_skins_wx_config_path}:${PATH}"
2464 # look for wx-config
2465 AC_PATH_PROG(WX_CONFIG_SKINS, wx-config, no, ${WXWINDOWS_PATH})
2466 if test "${WX_CONFIG_SKINS}" != "no"
2468 if expr 2.3.0 \> `${WX_CONFIG_SKINS} --version` >/dev/null
2470 AC_MSG_ERROR([Your development package for wxWindows is too old, you need at least version 2.3.0. Please upgrade and try again. Alternatively you can also configure with --disable-skins.])
2472 CPPFLAGS_skins="${CPPFLAGS_skins} `${WX_CONFIG_SKINS} --cxxflags` -DWX_SKINS"
2473 LDFLAGS_skins="${LDFLAGS_skins} `${WX_CONFIG_SKINS} --libs`"
2476 if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"; then
2477 PLUGINS="${PLUGINS} skins"
2478 CPPFLAGS_skins="${CPPFLAGS_skins} -O2 -U_OFF_T_ -U_off_t -fno-rtti -Imodules/gui/skins"
2479 LDFLAGS_skins="${LDFLAGS_skins} -loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -ladvapi32 -lwsock32 -lstdc++ -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32"
2481 if test "${enable_skins}" = "yes"; then
2482 IMLIB2_PATH="${PATH}"
2483 AC_PATH_PROG(IMLIB2_CONFIG_SKINS, imlib2-config, no, ${IMLIB2_PATH})
2484 if test "${IMLIB2_CONFIG_SKINS}" = "no"; then
2485 AC_MSG_ERROR([Couldn't find the imlib2 package. You can download imlib2 from http://enlightenment.org/, or configure with --disable-skins.])
2488 PLUGINS="${PLUGINS} skins"
2489 CPPFLAGS_skins="${CPPFLAGS_skins} -O2 -fno-rtti -Imodules/gui/skins -I${x_includes} `${IMLIB2_CONFIG_SKINS} --cflags` -DX11_SKINS"
2490 LDFLAGS_skins="${LDFLAGS_skins} -lstdc++ -L${x_libraries} -lXext -lX11 `${IMLIB2_CONFIG_SKINS} --libs`"
2491 PLUGINS="${PLUGINS} skins"
2497 dnl Basic skins module (i.e. without wxWindows dialogs)
2499 AC_ARG_ENABLE(basic-skins,
2500 [ --enable-basic-skins Skins interface module without wxWindows dialogs (default disabled)])
2501 if test "${enable_basic_skins}" = "yes"; then
2502 if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"; then
2504 CPPFLAGS_basic_skins="${CPPFLAGS_basic_skins} -O2 -U_OFF_T_ -U_off_t -fno-rtti -Imodules/gui/skins"
2505 LDFLAGS_basic_skins="${LDFLAGS_basic_skins} -loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -ladvapi32 -lwsock32 -lstdc++ -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32"
2508 IMLIB2_PATH="${PATH}"
2509 AC_PATH_PROG(IMLIB2_CONFIG_SKINS, imlib2-config, no, ${IMLIB2_PATH})
2510 if test "${IMLIB2_CONFIG_SKINS}" = "no"; then
2511 AC_MSG_ERROR([Couldn't find the imlib2 package. You can download imlib2 from http://enlightenment.org/, or configure with --disable-basic-skins.])
2514 CPPFLAGS_basic_skins="${CPPFLAGS_basic_skins} -O2 -fno-rtti -Imodules/gui/skins -I${x_includes} `${IMLIB2_CONFIG_SKINS} --cflags` -DX11_SKINS"
2515 LDFLAGS_basic_skins="${LDFLAGS_basic_skins} -lstdc++ -L${x_libraries} -lXext -lX11 `${IMLIB2_CONFIG_SKINS} --libs`"
2518 PLUGINS="${PLUGINS} basic_skins"
2519 CPPFLAGS_basic_skins="${CPPFLAGS_basic_skins} -DBASIC_SKINS"
2526 [ --enable-gtk Gtk+ support (default enabled)])
2527 if test "${enable_gtk}" != "no"
2530 AC_ARG_WITH(gtk-config-path,
2531 [ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
2532 [ if test "${with_gtk_config_path}" != "no"
2534 GTK_PATH="${with_gtk_config_path}:${PATH}"
2536 # look for gtk-config
2537 AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
2538 GTK_CONFIG=${GTK12_CONFIG}
2539 if test "${GTK_CONFIG}" = "no"
2541 AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
2543 if test "${GTK_CONFIG}" != "no"
2545 if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
2547 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.])
2549 if test "${SYS}" != "mingw32"; then
2550 CFLAGS_gtk="${CFLAGS_gtk} `${GTK_CONFIG} --cflags gtk gthread`"
2551 LDFLAGS_gtk="${LDFLAGS_gtk} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
2553 CFLAGS_gtk="${CFLAGS_gtk} `${GTK_CONFIG} --cflags gtk`"
2554 LDFLAGS_gtk="${LDFLAGS_gtk} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
2556 # now look for the gtk.h header
2557 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gtk}"
2558 ac_cv_gtk_headers=yes
2559 AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
2560 ac_cv_gtk_headers=no
2561 echo "Cannot find gtk development headers."
2563 if test "${ac_cv_gtk_headers}" = "yes"
2565 PLUGINS="${PLUGINS} gtk"
2566 if test "${SYS}" != "mingw32"; then
2569 ALIASES="${ALIASES} gvlc"
2571 CPPFLAGS="${CPPFLAGS_save}"
2579 [ --enable-gtk2 Gtk2 support (default disabled)])
2580 if test "${enable_gtk2}" = "yes"
2582 PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])
2583 CFLAGS_gtk2="${CFLAGS_gtk2} ${GTK2_CFLAGS}"
2584 LDFLAGS_gtk2="${LDFLAGS_gtk2} ${GTK2_LIBS}"
2585 PLUGINS="${PLUGINS} gtk2"
2586 if test "${SYS}" != "mingw32"; then
2592 dnl Familiar module uses Gtk+ library
2594 AC_ARG_ENABLE(familiar,
2595 [ --enable-familiar Familiar Gtk+ support (default disabled)])
2596 if test "${enable_familiar}" = "yes"
2599 AC_ARG_WITH(gtk-config-path,
2600 [ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
2601 [ if test "${with_gtk_config_path}" != "no"
2603 GTK_PATH="${with_gtk_config_path}:${PATH}"
2605 # look for gtk-config
2606 AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
2607 GTK_CONFIG=${GTK12_CONFIG}
2608 if test "${GTK_CONFIG}" = "no"
2610 AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
2612 # check for cross-compiling
2614 AC_ARG_WITH(gtk-prefix,
2615 [ --with-gtk-prefix=PATH path to libgtk (needed for cross-compiling),
2617 --with-gtk-prefix=/usr/local/arm/2.95.3/arm-linux/usr)],[],[])
2618 if test "${with_gtk_prefix}" != "no" -a "${with_gtk_prefix}" != ""
2620 GTK_PREFIX="--prefix=${with_gtk_prefix}"
2622 if test "${GTK_CONFIG}" != "no"
2624 if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
2626 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.])
2628 CFLAGS_familiar="${CFLAGS_familiar} `${GTK_CONFIG} ${GTK_PREFIX} --cflags gtk gthread`"
2629 LDFLAGS_familiar="${LDFLAGS_familiar} `${GTK_CONFIG} ${GTK_PREFIX} --libs gtk gthread | sed 's,-rdynamic,,'`"
2630 # now look for the gtk.h header
2631 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_familiar}"
2632 ac_cv_gtk_headers=yes
2633 AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
2634 ac_cv_gtk_headers=no
2635 echo "Cannot find gtk development headers."
2637 if test "${ac_cv_gtk_headers}" = "yes"
2639 PLUGINS="${PLUGINS} familiar"
2641 CPPFLAGS="${CPPFLAGS_save}"
2643 # now look for gpe support
2644 AC_ARG_WITH(gpe-prefix,
2645 [ --with-gpe-prefix=PATH gpe installation path prefix (default search in \$PATH)],[],[])
2646 if test "${with_gpe_prefix}" != "no" -a "${with_gpe_prefix}" != ""
2648 CFLAGS_gpe="-I${with_gpe_prefix}/include"
2649 LDFLAGS_gpe="-lXi -lgdk_pixbuf -L${with_gpe_prefix}/lib -lgpewidget"
2650 # now look for gpe/init.h header file
2651 CFLAGS_save="${CFLAGS}"
2652 LDFLAGS_save="${LDFLAGS}"
2653 CFLAGS="${CFLAGS_familiar} ${CFLAGS_gpe}"
2654 LDFLAGS="${LDFLAGS_familiar} ${LDFLAGS_gpe}"
2655 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_familiar} ${CFLAGS_gpe}"
2656 ac_cv_gpe_headers=yes
2657 AC_CHECK_HEADERS(gpe/init.h, ,
2658 [ ac_cv_gpe_headers=no
2659 AC_MSG_ERROR([Cannot find development headers for libgpewidget...]) ])
2660 CFLAGS="${CFLAGS_save}"
2661 LDFLAGS="${LDFLAG_save}"
2662 if test "${ac_cv_gpe_headers}" = "yes"
2664 CFLAGS_familiar="${CFLAGS_familiar} ${CFLAGS_gpe}"
2665 LDFLAGS_familiar="${LDFLAGS_familiar} ${LDFLAGS_gpe}"
2669 fi # end gpe support
2670 fi # end gtk+ support
2676 AC_ARG_ENABLE(gnome,
2677 [ --enable-gnome Gnome interface support (default disabled)],
2678 [if test "${enable_gnome}" = "yes"; then
2679 # look for gnome-config
2680 AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
2681 if test -x ${GNOME_CONFIG}
2683 CFLAGS_gnome="${CFLAGS_gnome} `${GNOME_CONFIG} --cflags gtk gnomeui`"
2684 LDFLAGS_gnome="${LDFLAGS_gnome} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
2686 # now look for the gnome.h header
2687 CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gnome}"
2688 AC_CHECK_HEADERS(gnome.h, [
2689 PLUGINS="${PLUGINS} gnome"
2692 ALIASES="${ALIASES} gnome-vlc"
2693 dnl We need this because of some moronic gnomesupport.h flavours
2694 AC_MSG_CHECKING(for strndup in gnome.h)
2695 AC_EGREP_HEADER(strndup,gnome.h,[
2697 AC_DEFINE(STRNDUP_IN_GNOME_H, 1,
2698 Define if <gnome.h> defines strndup.)],[
2701 AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
2702 developement tools or remove the --enable-gnome option])
2704 CPPFLAGS="${CPPFLAGS_save}"
2710 AC_ARG_ENABLE(gnome2,
2711 [ --enable-gnome2 Gnome2 support (default disabled)])
2712 if test "${enable_gnome2}" = "yes"
2714 PKG_CHECK_MODULES(GNOME2, [libgnomeui-2.0])
2715 CFLAGS_gnome2="${CFLAGS_gnome2} ${GNOME2_CFLAGS}"
2716 LDFLAGS_gnome2="${LDFLAGS_gnome2} ${GNOME2_LIBS}"
2717 PLUGINS="${PLUGINS} gnome2"
2718 if test "${SYS}" != "mingw32"; then
2719 NEED_GNOME2_MAIN=yes
2724 dnl wxWindows module
2726 AC_ARG_ENABLE(wxwindows,
2727 [ --enable-wxwindows wxWindows support (default enabled)])
2728 if test "${enable_wxwindows}" != "no"
2730 WXWINDOWS_PATH="${PATH}"
2731 AC_ARG_WITH(wx-config-path,
2732 [ --with-wx-config-path=PATH wx-config path (default search in \$PATH)],
2733 [ if test "${with_wx_config_path}" != "no"
2735 WXWINDOWS_PATH="${with_wx_config_path}:${PATH}"
2737 # look for wx-config
2738 AC_PATH_PROG(WX_CONFIG, wx-config, no, ${WXWINDOWS_PATH})
2739 if test "${WX_CONFIG}" != "no"
2741 if expr 2.3.0 \> `${WX_CONFIG} --version` >/dev/null
2743 AC_MSG_ERROR([Your development package for wxWindows is too old, you need at least version 2.3.0. Please upgrade and try again. Alternatively you can also configure with --disable-wxwindows.])
2745 CXXFLAGS_wxwindows="${CXXFLAGS_wxwindows} `${WX_CONFIG} --cxxflags`"
2746 LDFLAGS_wxwindows="${LDFLAGS_wxwindows} `${WX_CONFIG} --libs`"
2747 # now look for the wxprec.h header
2748 CPPFLAGS="${CPPFLAGS_save} ${CXXFLAGS_wxwindows}"
2749 ac_cv_wx_headers=yes
2750 AC_CHECK_HEADERS(wx/wxprec.h, , [
2752 echo "Cannot find wxWindows development headers."
2754 if test "${ac_cv_wx_headers}" = "yes"
2756 PLUGINS="${PLUGINS} wxwindows"
2757 ALIASES="${ALIASES} wxvlc"
2759 CPPFLAGS="${CPPFLAGS_save}"
2767 [ --enable-qt Qt interface support (default disabled)],
2768 [if test "${enable_qt}" = "yes"; then
2769 PLUGINS="${PLUGINS} qt"
2770 ALIASES="${ALIASES} qvlc"
2771 LDFLAGS_qt="${LDFLAGS_qt} -L${QTDIR}/lib"
2772 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_qt}"
2773 AC_CHECK_LIB(qt-mt,main,[
2774 LDFLAGS_qt="${LDFLAGS_qt} -lqt-mt"
2776 AC_CHECK_LIB(qt,main,[
2777 LDFLAGS_qt="${LDFLAGS_qt} -lqt"
2780 LDFLAGS="${LDFLAGS_save}"
2781 CPPFLAGS_qt="${CPPFLAGS_qt} -I/usr/include/qt3 -I/usr/include/qt -I${QTDIR}/include"
2782 if test -x ${QTDIR}/bin/moc
2784 MOC=${QTDIR}/bin/moc
2794 [ --enable-kde KDE interface support (default disabled)],
2795 [if test "${enable_kde}" = "yes"; then
2796 PLUGINS="${PLUGINS} kde"
2797 ALIASES="${ALIASES} kvlc"
2798 LDFLAGS_kde="${LDFLAGS_kde} -L${KDEDIR}/lib"
2799 dnl Check for -lkfile (only in KDE 2) or -lkdeui -lkio (KDE 3)
2800 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
2801 AC_CHECK_LIB(kfile,main,[
2802 LDFLAGS_kde="${LDFLAGS_kde} -lkfile"
2804 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
2805 AC_CHECK_LIB(kdeui,main,[
2806 LDFLAGS_kde="${LDFLAGS_kde} -lkdeui"
2808 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
2809 AC_CHECK_LIB(kio,main,[
2810 LDFLAGS_kde="${LDFLAGS_kde} -lkio"
2812 LDFLAGS="${LDFLAGS_save}"
2813 CPPFLAGS_kde="${CPPFLAGS_kde} -I/usr/include/kde -I/usr/include/qt3 -I/usr/include/qt"
2814 CPPFLAGS_kde="${CPPFLAGS_kde} -I${KDEDIR}/include -I${QTDIR}/include"
2815 if test -x ${QTDIR}/bin/moc
2817 MOC=${QTDIR}/bin/moc
2824 dnl Opie QT embedded module
2827 [ --enable-opie Qt embedded interface support (default disabled)],
2828 [if test "${enable_opie}" = "yes"; then
2830 [ --with-qte=PATH Qt Embedded headers and libraries])
2831 if test "${with_qte}" != "no" -a "${with_qte}" != ""
2833 LDFLAGS_qte="-L${with_qte}/lib `echo -L${with_qte}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte"
2834 CPPFLAGS_qte="-I${with_qte}/include `echo -I${with_qte}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti"
2836 LDFLAGS_qte="-L${QTDIR}/lib `echo -L${QTDIR}/lib | sed 's,opt/QtPalmtop,usr,'`"
2837 CPPFLAGS_qte="-I${QTDIR}/include `echo -I${QTDIR}/include | sed 's,opt/QtPalmtop,usr,'`"
2839 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_qte}"
2840 AC_CHECK_HEADERS(qt.h jpeglib.h, ,[
2841 AC_MSG_ERROR([echo "Cannot find QT Embedded development headers."])
2843 CPPFLAGS="${CPPFLAGS_save}"
2845 PLUGINS="${PLUGINS} opie"
2847 LDFLAGS_opie="${LDFLAGS_opie} -lqpe ${LDFLAGS_qte}"
2848 CPPFLAGS_opie="${CPPFLAGS_opie} ${CPPFLAGS_qte}"
2849 if test "${with_qte}" != "no" -a "${with_qte}" != ""
2851 MOC=${with_qte}/bin/moc
2853 MOC=${QTDIR}/bin/moc
2860 AC_ARG_ENABLE(macosx,
2861 [ --enable-macosx MacOS X support (default enabled on MacOS X)],
2862 [if test "${enable_macosx}" = "yes"
2864 BUILTINS="${BUILTINS} macosx"
2865 LDFLAGS_macosx="${LDFLAGS_macosx} -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
2867 [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
2868 BUILTINS="${BUILTINS} macosx"
2869 LDFLAGS_macosx="${LDFLAGS_macosx} -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
2876 [ --enable-qnx QNX RTOS support (default enabled on QNX RTOS)])
2877 if test "${enable_qnx}" != "no"
2879 AC_CHECK_HEADERS(Ph.h, [
2880 PLUGINS="${PLUGINS} qnx"
2881 LDFLAGS_qnx="${LDFLAGS_qnx} -lasound -lph"
2888 AC_ARG_ENABLE(ncurses,
2889 [ --enable-ncurses ncurses interface support (default disabled)],
2890 [if test "${enable_ncurses}" = "yes"; then
2891 PLUGINS="${PLUGINS} ncurses"
2892 LDFLAGS_ncurses="${LDFLAGS_ncurses} -lncurses"
2899 [ --enable-xosd xosd interface support (default disabled)])
2900 if test "${enable_xosd}" = "yes"
2902 AC_CHECK_HEADER(xosd.h, have_xosd="true", have_xosd="false")
2903 AC_CHECK_LIB(xosd,xosd_set_offset,
2904 AC_DEFINE(HAVE_XOSD_VERSION_1, 1, Define if <xosd.h> is 1.0.x),
2905 AC_CHECK_LIB(xosd,xosd_set_horizontal_offset,
2906 AC_DEFINE(HAVE_XOSD_VERSION_2, 1, Define if <xosd.h> is 2.0.x),
2907 AC_TRY_COMPILE([#include <xosd.h>],
2908 [void foo() { xosd_init("foo","bar",12,XOSD_top,2,12,42); }],,
2909 AC_DEFINE(HAVE_XOSD_VERSION_0, 1, Define if <xosd.h> is pre-1.0.0))))
2910 if test "${have_xosd}" = "true"
2912 PLUGINS="${PLUGINS} xosd"
2913 LDFLAGS_xosd="${LDFLAGS_xosd} -lxosd"
2918 dnl SLP access plugin
2921 [ --enable-slp SLP service discovery support (default enabled)])
2922 if test "${enable_slp}" != "no"
2925 [ --with-slp=PATH libslp headers and libraries])
2926 if test "${with_slp}" = ""
2928 AC_CHECK_HEADER(slp.h, have_slp="true", have_slp="false")
2929 if test "${have_slp}" = "true"
2931 PLUGINS="${PLUGINS} slp"
2932 LDFLAGS_slp="-lslp ${LDFLAGS_slp}"
2935 AC_MSG_CHECKING(for slp headers in ${with_slp})
2936 if test -f ${with_slp}/slp.h
2938 dnl Use ${with_slp}/libslp/slp.h
2940 PLUGINS="${PLUGINS} slp"
2941 LDFLAGS_slp="-L${with_slp} -lslp ${LDFLAGS_slp}"
2942 CPPFLAGS_slp="${CPPFLAGS_slp} -I${with_slp}"
2944 dnl No libslp could be found, sorry
2946 AC_MSG_ERROR([cannot find ${with_slp}/slp.h])
2955 [ --enable-lirc lirc support (default disabled)])
2956 if test "${enable_lirc}" = "yes"
2958 AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
2959 if test "${have_lirc}" = "true"
2961 PLUGINS="${PLUGINS} lirc"
2962 LDFLAGS_lirc="${LDFLAGS_lirc} -llirc_client"
2966 AC_ARG_WITH(,[Misc options:])
2969 dnl Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
2971 dnl We give the user the opportunity to specify
2972 dnl --with-words=big or --with-words=little ; otherwise, try to guess
2975 [ --with-words=endianness set endianness (big or little)])
2976 case "${with_words}" in
2978 ac_cv_c_bigendian=yes
2981 ac_cv_c_bigendian=no
2984 dnl Try to guess endianness by matching patterns on a compiled
2985 dnl binary, by looking for an ASCII or EBCDIC string
2986 AC_CACHE_CHECK([whether the byte order is big-endian],
2987 [ac_cv_c_bigendian],
2988 [ac_cv_c_bigendian="unknown"
2989 [cat >conftest.c <<EOF
2990 short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
2991 short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
2992 void _a(void) { char*s = (char*)am; s = (char *)ai; }
2993 short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
2994 short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
2995 void _e(void) { char*s = (char*)em; s = (char*)ei; }
2996 int main(void) { _a(); _e(); return 0; }
2999 if test -f conftest.c
3001 if ${CC-cc} -c conftest.c -o conftest.o >>config.log 2>&1 \
3002 && test -f conftest.o
3004 if test "`strings conftest.o | grep BIGenDianSyS`"
3006 ac_cv_c_bigendian="yes"
3008 if test "`strings conftest.o | grep LiTTleEnDian`"
3010 ac_cv_c_bigendian="no"
3015 if test "${ac_cv_c_bigendian}" = "unknown"
3017 AC_MSG_ERROR([Could not guess endianness, please use --with-words])
3021 dnl Now we know what to use for endianness, just put it in the header
3022 if test "${ac_cv_c_bigendian}" = "yes"
3024 AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system)
3031 AC_ARG_ENABLE(mozilla,
3032 [ --enable-mozilla build a vlc-based Mozilla plugin (default disabled)])
3033 if test "${enable_mozilla}" = "yes"
3035 AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
3036 if test "${MOZILLA_CONFIG}" != "no"
3038 if test "${SYS}" != "mingw32"; then
3039 LDFLAGS="${LDFLAGS_save} -L${x_libraries}"
3040 AC_CHECK_LIB(Xt,XtStrings,[
3041 LDFLAGS_mozilla="${LDFLAGS_mozilla} -L${x_libraries} -lXt"
3043 LDFLAGS="${LDFLAGS_save}"
3046 dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490
3047 [CPPFLAGS_mozilla="${CPPFLAGS_mozilla} `${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`"]
3048 #[CPPFLAGS_mozilla="${CPPFLAGS_mozilla} `${MOZILLA_CONFIG} --cflags plugin xpcom java --defines | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`"]
3049 LDFLAGS_mozilla="${LDFLAGS_mozilla} `${MOZILLA_CONFIG} --libs plugin xpcom`"
3050 dnl Not necessarily in ${PATH}
3051 if test "${XPIDL}" = "" -o ! -x "${XPIDL}"
3053 XPIDL="/usr/lib/mozilla/xpidl"
3057 AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
3062 AC_ARG_ENABLE(testsuite,
3063 [ --enable-testsuite build test modules (default disabled)])
3064 if test "${enable_testsuite}" = "yes"
3066 TESTS="test1 test2 test3 test4"
3068 dnl we define those so that bootstrap sets the right linker
3069 CXXFLAGS_test2="${CXXFLAGS_test2}"
3070 OBJCFLAGS_test3="${OBJCFLAGS_test3}"
3071 dnl this one is needed until automake knows what to do
3072 LDFLAGS_test3="${LDFLAGS_test3} -lobjc"
3074 PLUGINS="${PLUGINS} ${TESTS}"
3075 #BUILTINS="${BUILTINS} ${TESTS}"
3081 if test "${NEED_GTK_MAIN}" != "no"
3083 PLUGINS="${PLUGINS} gtk_main"
3084 CFLAGS_gtk="${CFLAGS_gtk} -DNEED_GTK_MAIN"
3085 CFLAGS_familiar="${CFLAGS_familiar} -DNEED_GTK_MAIN"
3086 CFLAGS_gtk_main="${CFLAGS_gtk_main} ${CFLAGS_gtk} ${CFLAGS_familiar}"
3087 LDFLAGS_gtk_main="${LDFLAGS_gtk_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar}"
3090 if test "${NEED_GNOME_MAIN}" != "no"
3092 PLUGINS="${PLUGINS} gnome_main"
3093 CFLAGS_gnome_main="${CFLAGS_gnome_main} ${CFLAGS_gtk} ${CFLAGS_familiar} ${CFLAGS_gnome}"
3094 LDFLAGS_gnome_main="${LDFLAGS_gnome_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar} ${LDFLAGS_gnome}"
3097 if test "${NEED_GTK2_MAIN}" != "no"
3099 PLUGINS="${PLUGINS} gtk2_main"
3100 CFLAGS_gtk2="${CFLAGS_gtk2} -DNEED_GTK2_MAIN"
3101 CFLAGS_gtk2_main="${CFLAGS_gtk2_main} ${CFLAGS_gtk2}"
3102 LDFLAGS_gtk2_main="${LDFLAGS_gtk2_main} ${LDFLAGS_gtk2}"
3105 if test "${NEED_GNOME2_MAIN}" != "no"
3107 PLUGINS="${PLUGINS} gnome2_main"
3108 CFLAGS_gnome2_main="${CFLAGS_gnome2_main} ${CFLAGS_gtk2} ${CFLAGS_gnome2}"
3109 LDFLAGS_gnome2_main="${LDFLAGS_gnome2_main} ${LDFLAGS_gtk2} ${LDFLAGS_gnome2}"
3115 if test "${NEED_QTE_MAIN}" != "no"
3117 PLUGINS="${PLUGINS} qte_main"
3118 CPPFLAGS_qte="${CPPFLAGS_qte} -DNEED_QTE_MAIN"
3119 CPPFLAGS_opie="${CPPFLAGS_opie} -DNEED_QTE_MAIN"
3120 CFLAGS_vout_sdl="${CFLAGS_vout_sdl} -DNEED_QTE_MAIN"
3121 CPPFLAGS_qte_main="${CFLAGS_qte_main} ${CPPFLAGS_qte}"
3122 LDFLAGS_qte_main="${LDFLAGS_qte_main} ${LDFLAGS_qte}"
3127 dnl Plugin and builtin checks
3129 builtin_support=false
3132 dnl Support for plugins - this must be AT THE END
3133 AC_ARG_ENABLE(plugins,
3134 [ --disable-plugins make all plugins built-in (default plugins enabled)],
3135 [if test "${enable_plugins}" = "no"
3137 plugin_support=false
3140 dnl Automagically disable plugins if there is no system support for
3141 dnl dynamically loadable files (.so, .dll, .dylib).
3142 dnl don't forget vlc-win32 still can load .dll as plugins
3143 if test "${ac_cv_header_dlfcn_h}" = "no" -a "${ac_cv_header_image_h}" = "no" -a "${SYS}" != "mingw32"
3145 echo "*** Your system doesn't have plugin support. All plugins will be built"
3147 plugin_support=false
3150 dnl Export automake variables
3151 if ${plugin_support}
3153 for plugin in `echo ${PLUGINS}`
3155 eval "${plugin}_p=yes"
3158 BUILTINS="${BUILTINS} ${PLUGINS}"
3161 AM_CONDITIONAL(HAVE_PLUGINS, ${plugin_support})
3163 [if echo "${BUILTINS}" | grep '[^ ]' >/dev/null 2>&1
3166 for builtin in `echo ${BUILTINS}`
3168 eval "${builtin}_b=yes"
3171 AM_CONDITIONAL(HAVE_BUILTINS, ${builtin_support})
3173 dnl Import substitution variables generated by bootstrap
3177 dnl Stuff used by the program
3179 AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION} ${CODENAME}", [Simple version string])
3180 AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VLC media player - version ${VERSION} ${CODENAME} - (c) 1996-2003 VideoLAN", [Copyright string])
3181 AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
3183 VLC_SYMBOL="`echo ${VERSION} | sed -e 'y/.-/__/'`"
3184 AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module functions])
3185 AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
3186 AC_DEFINE_UNQUOTED(LIBEXT, "${LIBEXT}", [Dynamic object extension])
3188 DATA_PATH="${ac_tool_prefix}/share/vlc"
3190 PLUGIN_PATH="${ac_tool_prefix}/lib/vlc"
3191 AC_SUBST(PLUGIN_PATH)
3196 CPPFLAGS="${CPPFLAGS_save}"
3197 CFLAGS="${CFLAGS_save}"
3198 CXXFLAGS="${CXXFLAGS_save}"
3199 OBJCFLAGS="${OBJCFLAGS_save}"
3200 LDFLAGS="${LDFLAGS_save}"
3203 dnl Fool automake (see Makefile.am)
3205 AUTOMAKE_SUCKS="\$(L_builtin) \$(LDFLAGS_builtin)"
3206 AC_SUBST(AUTOMAKE_SUCKS)
3209 dnl Create the vlc-config script
3211 LDFLAGS_libvlc="${LDFLAGS_vlc} ${LDFLAGS_builtins}"
3212 for i in `echo "${BUILTINS}" | sed -e 's@[^ ]*/@@g'` ; do LDFLAGS_libvlc="${LDFLAGS_libvlc} ${libdir}/vlc/${i}.a `eval echo '$'{LDFLAGS_${i}}`" ; done
3215 dnl Configuration is finished
3228 AC_SUBST(ALL_LINGUAS)
3230 AC_SUBST(CFLAGS_TUNING)
3231 AC_SUBST(CFLAGS_OPTIM)
3232 AC_SUBST(CFLAGS_OPTIM_NODEBUG)
3233 AC_SUBST(CFLAGS_NOOPTIM)
3236 AC_SUBST(CFLAGS_vlc)
3237 AC_SUBST(CFLAGS_pics)
3238 AC_SUBST(CXXFLAGS_pics)
3239 AC_SUBST(CFLAGS_plugins)
3240 AC_SUBST(CXXFLAGS_plugins)
3241 AC_SUBST(CFLAGS_builtins)
3242 AC_SUBST(CPPFLAGS_mozilla)
3244 AC_SUBST(LDFLAGS_vlc)
3245 AC_SUBST(LDFLAGS_libvlc)
3246 AC_SUBST(LDFLAGS_plugins)
3247 AC_SUBST(LDFLAGS_builtins)
3248 AC_SUBST(LDFLAGS_mozilla)
3265 chmod a+x vlc-config
3270 --------------------
3271 vlc version : ${VERSION}
3273 architecture : ${ARCH}
3275 test "${DEBUG_TRUE}" = "" && printf "debug "
3276 test "${CPROF_TRUE}" = "" && printf "cprof "
3277 test "${GPROF_TRUE}" = "" && printf "gprof "
3278 test "${OPTIM_TRUE}" = "" && printf "optim "
3279 test "${RELEASE_TRUE}" = "" && printf "release " || printf "devel "
3281 vlc aliases :${ALIASES}
3283 To build vlc and its plugins, type \`make'.