1 dnl Autoconf settings for vlc and libdvdcss
2 AC_INIT(include/common.h)
3 AC_CONFIG_HEADER(include/defs.h)
8 if test -r src/interface/main.c; then
13 AC_SUBST(VLC_CODENAME)
17 if test -r extras/libdvdcss/libdvdcss.c; then
19 LIBDVDCSS_VERSION=0.0.2
20 AC_SUBST(LIBDVDCSS_VERSION)
23 dnl Save CFLAGS and LDFLAGS
24 save_CFLAGS="${CFLAGS}"
25 save_LDFLAGS="${LDFLAGS}"
36 dnl Check for endianness if not cross-compiling
37 if test x${cross_compiling} != xyes; then
41 dnl Check for system libs needed
42 AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol)
43 AC_CHECK_FUNCS(setenv putenv)
44 AC_CHECK_FUNC(connect,,[
45 AC_CHECK_LIB(socket,connect,LIB="${LIB} -lsocket")
47 AC_CHECK_FUNC(gethostbyname,,[
48 AC_CHECK_LIB(nsl,gethostbyname,LIB="${LIB} -lnsl")
50 AC_CHECK_FUNC(nanosleep,,[
51 AC_CHECK_LIB(rt,nanosleep,LIB="${LIB} -lrt",[
52 AC_CHECK_LIB(posix4,nanosleep,LIB="${LIB} -lposix4")
55 AC_CHECK_FUNCS(usleep)
56 AC_CHECK_FUNC(inet_aton,,[
57 AC_CHECK_LIB(resolv,inet_aton,LIB="${LIB} -lresolv")
59 AC_CHECK_FUNCS(vasprintf)
62 AC_CHECK_FUNCS(sigrelse)
66 AC_CHECK_FUNC(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
67 [ # FreeBSD has a gnugetopt library for this:
68 AC_CHECK_LIB([gnugetopt],[getopt_long],
69 [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) LIB="${LIB} -lgnugetopt"],
74 AC_CHECK_LIB(dl,dlopen,LIB="${LIB} -ldl")
75 AC_CHECK_LIB(m,pow,LIB_YUV="${LIB_YUV} -lm")
76 AC_CHECK_LIB(dvd,dvd_cdrom_ioctl,LIB_LIBDVDCSS="${LIB_LIBDVDCSS} -ldvd")
78 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
79 CFLAGS="${CFLAGS} -I/usr/local/include"
81 dnl Check for pthreads - borrowed from XMMS
83 AC_CHECK_LIB(pthread,pthread_attr_init,THREAD_LIB="-lpthread")
84 if test "x${THREAD_LIB}" = xerror; then
85 AC_CHECK_LIB(pthreads,pthread_attr_init,THREAD_LIB="-lpthreads")
87 if test "x${THREAD_LIB}" = xerror; then
88 AC_CHECK_LIB(c_r,pthread_attr_init,THREAD_LIB="-lc_r")
90 if test "x${THREAD_LIB}" = xerror; then
92 AC_CHECK_FUNC(pthread_attr_init)
95 dnl Check for misc headers
96 AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
97 AC_DEFINE(PTHREAD_COND_T_IN_PTHREAD_H, 1,
98 Define if <pthread.h> defines pthread_cond_t.)])
99 AC_EGREP_HEADER(strncasecmp,strings.h,[
100 AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
101 Define if <strings.h> defines strncasecmp.)])
103 dnl Check for headers
104 AC_CHECK_HEADERS(stddef.h getopt.h strings.h)
105 AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/time.h)
106 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h)
107 AC_CHECK_HEADERS(dlfcn.h image.h)
108 AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
109 AC_CHECK_HEADERS(machine/param.h)
111 dnl Check for threads library
112 AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
114 dnl Check for ntohl, etc.
115 CFLAGS="${save_CFLAGS} -Wall -Werror"
116 AC_MSG_CHECKING([for ntohl in sys/param.h])
117 AC_TRY_COMPILE([#include <sys/param.h>
118 void foo() { int meuh; ntohl(meuh); }],,
119 AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
120 AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
122 dnl Check for inline function size limit
123 CFLAGS="${save_CFLAGS} -finline-limit=31337"
124 AC_MSG_CHECKING([if \$CC accepts -finline-limit])
126 save_CFLAGS="${save_CFLAGS} -finline-limit=31337"; AC_MSG_RESULT(yes),
129 dnl Check for Darwin plugin linking flags
130 CFLAGS="${save_CFLAGS} -bundle -undefined suppress"
131 AC_MSG_CHECKING([if \$CC accepts -bundle -undefined suppress])
133 PLCFLAGS="${PLCFLAGS} -bundle -undefined suppress"; AC_MSG_RESULT(yes),
136 dnl Check for standard plugin linking flags
137 CFLAGS="${save_CFLAGS} -shared"
138 AC_MSG_CHECKING([if \$CC accepts -shared])
140 PLCFLAGS="${PLCFLAGS} -shared"; AC_MSG_RESULT(yes),
143 dnl Check for standard soname setting
144 if test x"${SOFLAGS}" = x; then
145 try_SOFLAGS="-Wl,-soname -Wl,"
146 LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
147 AC_MSG_CHECKING([if linker accepts ${try_SOFLAGS}foo.so.0])
149 SOFLAGS="${try_SOFLAGS}"; AC_MSG_RESULT(yes),
153 dnl Check for SunOS soname setting
154 if test x"${SOFLAGS}" = x; then
155 try_SOFLAGS="-Wl,-h -Wl,"
156 LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
157 AC_MSG_CHECKING([if linker accepts ${try_SOFLAGS}foo.so.0])
159 SOFLAGS="${try_SOFLAGS}"; AC_MSG_RESULT(yes),
163 dnl End of the bizarre compilation tests
164 CFLAGS="${save_CFLAGS}"
165 LDFLAGS="${save_LDFLAGS}"
167 dnl Check for boolean_t
168 AC_MSG_CHECKING([for boolean_t in sys/types.h])
169 AC_TRY_COMPILE([#include <sys/types.h>
170 void quux() { boolean_t foo; }],,
171 AC_DEFINE(BOOLEAN_T_IN_SYS_TYPES_H, 1, Define if <sys/types.h> defines boolean_t.)
172 AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
173 AC_MSG_CHECKING([for boolean_t in pthread.h])
174 AC_TRY_COMPILE([#include <pthread.h>
175 void quux() { boolean_t foo; }],,
176 AC_DEFINE(BOOLEAN_T_IN_PTHREAD_H, 1, Define if <pthread.h> defines boolean_t.)
177 AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
179 dnl Checks for typedefs, structures, and compiler characteristics.
189 BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion imdct downmix"
193 dnl Accelerated modules
195 MMX_MODULES="yuvmmx idctmmx motionmmx"
196 MMXEXT_MODULES="idctmmxext motionmmxext imdct3dn imdctsse downmix3dn downmixsse"
198 AC_MSG_CHECKING([if \$CC groks MMX inline assembly])
199 AC_TRY_COMPILE([void quux(){void *p;asm("packuswb %%mm1,%%mm2"::"r"(p));}],,
200 ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
201 AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
203 AC_MSG_CHECKING([if \$CC groks MMX EXT or SSE inline assembly])
204 AC_TRY_COMPILE([void quux(){void *p;asm("maskmovq %%mm1,%%mm2"::"r"(p));}],,
205 ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
206 AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
209 dnl libdvdcss: check for DVD ioctls
213 CAN_BUILD_LIBDVDCSS=0
216 AC_CHECK_HEADERS(winioctl.h,[
217 CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
220 dnl for Un*x and BeOS
221 AC_CHECK_HEADERS(sys/ioctl.h,[
222 CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
223 AC_CHECK_HEADERS(sys/cdio.h sys/dvdio.h linux/cdrom.h dvd.h)
227 dnl Old FreeBSD: sys/cdio.h
229 AC_EGREP_HEADER(dvd_struct,sys/dvdio.h,[
230 AC_DEFINE(DVD_STRUCT_IN_SYS_DVDIO_H, 1,
231 Define if <sys/dvdio.h> defines dvd_struct.)
235 dnl Newer FreeBSD: sys/dvdio.h
237 AC_EGREP_HEADER(dvd_struct,sys/cdio.h,[
238 AC_DEFINE(DVD_STRUCT_IN_SYS_CDIO_H, 1,
239 Define if <sys/cdio.h> defines dvd_struct.)
243 dnl Linux: linux/cdrom.h
245 AC_EGREP_HEADER(dvd_struct,linux/cdrom.h,[
246 AC_DEFINE(DVD_STRUCT_IN_LINUX_CDROM_H, 1,
247 Define if <linux/cdrom.h> defines DVD_STRUCT.)
253 AC_EGREP_HEADER(dvd_struct,dvd.h,[
254 AC_DEFINE(DVD_STRUCT_IN_DVD_H, 1,
255 Define if <dvd.h> defines DVD_STRUCT.)
259 dnl Final tests to check what was detected
261 if test x$LINUX_DVD_STRUCT = x1; then
262 AC_DEFINE(HAVE_LINUX_DVD_STRUCT, 1,
263 Define if Linux-like dvd_struct is defined.)
265 if test x$BSD_DVD_STRUCT = x1; then
266 AC_DEFINE(HAVE_BSD_DVD_STRUCT, 1,
267 Define if BSD-like dvd_struct is defined.)
274 dnl Check the operating system
289 dnl PentiumPro acceleration
292 [ --disable-ppro Disable PentiumPro optimizations (default enabled for x86)],
293 [ if test x$enableval = xyes; then ARCH="${ARCH} ppro"; fi ],
294 [ if test x${host_cpu} = xi686; then ARCH="${ARCH} ppro"; fi ])
300 [ --disable-mmx Disable MMX optimizations (default enabled for x86)],
301 [ if test x$enableval = xyes; then ARCH="${ARCH} mmx";
302 BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ],
303 [ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86 -o x${host_cpu} = xi386; then ARCH="${ARCH} mmx";
304 BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ])
307 dnl AltiVec acceleration
309 AC_ARG_ENABLE(altivec,
310 [ --enable-altivec Enable altivec optimizations (default disabled since it is broken)],
311 [ if test x$enableval = xyes; then ARCH="${ARCH} altivec"
312 BUILTINS="${BUILTINS} idctaltivec"
313 LIB_IDCTALTIVEC="-framework vecLib"
315 #[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH="${ARCH} altivec"; PLUGINS="${PLUGINS} idctaltivec"; fi ])
322 [ --enable-debug Enable debug mode (default disabled)],
323 [ if test x$enableval = xyes; then DEBUG=1; fi ])
326 dnl Enable/disable statistics
330 [ --enable-stats Enable printing of statistics (default disabled)],
331 [ if test x$enableval = xyes; then STATS=1; fi ])
338 [ --enable-trace Enable trace mode (default disabled)],
339 [ if test x$enableval = xyes; then TRACE=1; fi ])
345 AC_ARG_ENABLE(profiling,
346 [ --enable-profiling Enable gprof profiling (default disabled)],
347 [ if test x$enableval = xyes; then PROFILING=1; fi ])
350 dnl Enable/disable optimizations
352 AC_ARG_ENABLE(optimizations,
353 [ --disable-optimizations Disable compiler optimizations (default enabled)],
354 [ if test x$enableval = xno; then OPTIMS=0; fi ],
358 dnl GNU portable threads
361 [ --enable-pth Enable GNU Pth support (default disabled)],
362 [ if test x$enableval = xyes; then
363 AC_CHECK_LIB(pth,pth_init)
364 AC_EGREP_HEADER(pth_init,pth.h,[
365 AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
366 Define if <pth.h> defines pth_init)
371 LIB="${LIB} ${THREAD_LIB}"
374 dnl DVD module: check for installed libdvdcss or local libdvdcss
380 [ --with-dvdcss[=name] way to use libdvdcss, either 'yes' or 'no', or 'local-static', 'local-shared', or a path to another libdvdcss such as '/usr/local' (default 'local-static')],
381 [ case "x${withval}" in
383 # local libdvdcss, statically linked
384 if test x${CAN_BUILD_LIBDVDCSS} = x1
388 BUILTINS="${BUILTINS} dvd"
389 CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
390 LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
391 LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
395 # local libdvdcss, dynamically linked
396 if test x${CAN_BUILD_LIBDVDCSS} = x1
399 BUILTINS="${BUILTINS} dvd"
400 CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
401 LIB_DVD="${LIB_DVD} -Llib -ldvdcss"
402 LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L../../lib -ldvdcss"
406 # don't use libdvdcss at all, build a DVD module that can dlopen() it
408 BUILTINS="${BUILTINS} dvd"
409 OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
410 CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
411 CFLAGS_DVD="${CFLAGS_DVD} -DLIBDVDCSS_VERSION=\"${LIBDVDCSS_VERSION}\""
412 LIB_DVD="${LIB_DVD} -ldl"
413 LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
417 BUILTINS="${BUILTINS} dvd"
418 if test "x$withval" != "xyes"
420 LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L"$withval"/lib"
421 CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
423 LIB_DVD="${LIB_DVD} -ldvdcss"
424 LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldvdcss"
426 # user didn't decide, we choose to use local libdvdcss and link statically
427 # if libdvdcss is in the archive, or to use the dummy replacement otherwise.
428 [ if test x${CAN_BUILD_LIBDVDCSS} = x1
432 BUILTINS="${BUILTINS} dvd"
433 CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
434 LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
435 LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
437 # XXX: no check for libdl is done, don't try this at home !
439 BUILTINS="${BUILTINS} dvd"
440 OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
441 CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
442 LIB_DVD="${LIB_DVD} -ldl"
443 LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
450 [ --disable-dummy dummy module (default enabled)])
452 if test x$enable_dummy != xno
454 BUILTINS="${BUILTINS} dummy"
461 [ --disable-null Null module (default enabled)])
463 if test x$enable_null != xno
465 BUILTINS="${BUILTINS} null"
472 [ --disable-rc rc module (default enabled)])
474 if test x$enable_rc != xno
476 BUILTINS="${BUILTINS} rc"
479 dnl special case for BeOS
480 if test x$SYS = xbeos
482 BUILTINS="${BUILTINS} beos"
483 LIB_BEOS="-lbe -lgame -lroot -ltracker"
484 PLCFLAGS="${PLCFLAGS} -nostart"
490 dnl OSS /dev/dsp module
493 [ --disable-dsp Linux /dev/dsp support (default enabled)])
495 if test x$enable_dsp != xno
499 PLUGINS="${PLUGINS} dsp"
507 [ --enable-esd Esound library support (default disabled)],
508 [if test x$enable_esd = xyes
510 AC_PATH_PROG(ESD_CONFIG, esd-config, no)
511 if test x${ESD_CONFIG} != xno
513 PLUGINS="${PLUGINS} esd"
514 LIB_ESD="`${ESD_CONFIG} --libs`"
521 AC_ARG_ENABLE(darwin,
522 [ --enable-darwin Darwin sound support (default disabled)],
523 [if test x$enable_darwin = xyes; then
524 PLUGINS="${PLUGINS} darwin"
525 LIB_DARWIN="-framework CoreAudio"
531 AC_ARG_ENABLE(macosx,
532 [ --enable-macosx Mac OS X interface support (default enabled in Mac OS X)],
533 [if test x$enable_macosx = xyes
535 BUILTINS="${BUILTINS} macosx"
536 LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
537 LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
538 LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
540 [AC_CHECK_HEADERS(Carbon/Carbon.h,
541 BUILTINS="${BUILTINS} macosx"
542 LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
543 LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
544 LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
551 [ --disable-qnx QNX RTOS support (default enabled in QNX RTOS)])
552 if test x$enable_qnx != xno
554 AC_CHECK_HEADERS(Ph.h, [
555 PLUGINS="${PLUGINS} qnx"
556 LIB_QNX="-lasound -lph"
561 dnl Linux framebuffer module
564 [ --enable-fb Linux framebuffer support (default disabled)],
565 [ if test x$enable_fb = xyes
567 PLUGINS="${PLUGINS} fb"
574 [ --with-ggi[=name] GGI support (default disabled)],
575 [ if test "x$withval" != "xno"
577 PLUGINS="${PLUGINS} ggi"
578 if test "x$withval" != "xyes"
590 [ --disable-sdl SDL support (default enabled)])
591 if test "x$enable_sdl" != "xno"
593 AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no)
594 SDL_CONFIG=${SDL12_CONFIG}
595 SDL_HEADER="SDL12/SDL.h"
596 if test x${SDL_CONFIG} = xno
598 AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no)
599 SDL_CONFIG=${SDL11_CONFIG}
600 SDL_HEADER="SDL11/SDL.h"
602 if test x${SDL_CONFIG} = xno
604 AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
605 SDL_HEADER="SDL/SDL.h"
607 if test x${SDL_CONFIG} != xno
609 PLUGINS="${PLUGINS} sdl"
610 CFLAGS_SDL="`${SDL_CONFIG} --cflags`"
611 LIB_SDL="`${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
613 CFLAGS="$CFLAGS $CFLAGS_SDL"
614 AC_CHECK_HEADERS(${SDL_HEADER}, AC_DEFINE_UNQUOTED(SDL_INCLUDE_FILE,
615 <${SDL_HEADER}>, Indicate whether we should use SDL/SDL.h or SDL11/SDL.h),
616 [ echo "The development package for SDL is not installed. Please install it"
617 echo "and try again. Alternatively you can also configure with --disable-sdl."
620 if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
622 echo "You need SDL version 1.1.5 or later. Install it and try again."
623 echo "Alternatively, you can also configure with --disable-sdl."
626 elif test "x$enable_sdl" = "xyes"
628 echo "I couldn't find the SDL package. You can download libSDL from"
629 echo "http://www.libsdl.org/, or configure with --disable-sdl. Have a"
636 dnl Windows DirectX module
639 [ --with-directx[=name] Windows DirectX support (default enabled)],
640 [ if test "x$withval" != "xno"
642 PLUGINS="${PLUGINS} directx"
643 if test "x$withval" != "xyes"
645 LIB_DIRECTX="${LIB_DIRECTX} -L"$withval"/lib -lgdi32 -ldxguid"
646 INCLUDE="${INCLUDE} -I"$withval"/include"
648 AC_CHECK_HEADERS(directx.h, , [echo "Cannot find DirectX headers !"; exit])
649 LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
652 if test "x$withval" = "x"
654 AC_CHECK_HEADERS(directx.h,
655 [PLUGINS="${PLUGINS} directx"
656 LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"])
663 [ --with-glide[=name] Glide (3dfx) support (default disabled)],
664 [ if test "x$withval" != "xno"
666 PLUGINS="${PLUGINS} glide"
667 if test "x$withval" != "xyes"
669 LIB_GLIDE="-l"$withval" -lm"
671 LIB_GLIDE="-lglide2x -lm"
678 AC_ARG_ENABLE(ncurses,
679 [ --enable-ncurses ncurses interface support (default disabled)],
680 [if test x$enable_ncurses = xyes; then
681 PLUGINS="${PLUGINS} ncurses"
682 LIB_NCURSES="-lncurses"
689 [ --enable-qt Qt interface support (default disabled)],
690 [if test x$enable_qt = xyes; then
691 PLUGINS="${PLUGINS} qt"
692 ALIASES="${ALIASES} qvlc"
693 LIB_QT="-lqt -L${QTDIR}/lib"
694 if test -x ${QTDIR}/bin/moc
706 [ --enable-kde KDE interface support (default disabled)],
707 [if test x$enable_kde = xyes; then
708 PLUGINS="${PLUGINS} kde"
709 ALIASES="${ALIASES} kvlc"
710 LIB_KDE="-L${KDEDIR}/lib -lkfile"
711 if test -x ${QTDIR}/bin/moc
723 [ --enable-gnome Gnome interface support (default disabled)],
724 [if test x$enable_gnome = xyes; then
725 PLUGINS="${PLUGINS} gnome"
726 ALIASES="${ALIASES} gnome-vlc"
727 LIB_GNOME="`gnome-config --libs gnomeui | sed 's,-rdynamic,,'`"
734 [ --disable-gtk Gtk+ support (default enabled)])
735 if test x$enable_gtk != xno
737 # look for gtk-config
738 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
739 if test -x ${GTK_CONFIG}
741 CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
742 LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
744 # now look for the gtk.h header
745 saved_CPPFLAGS=$CPPFLAGS
746 CPPFLAGS="$CPPFLAGS $CFLAGS_GTK"
747 AC_CHECK_HEADERS(gtk/gtk.h, [
748 PLUGINS="${PLUGINS} gtk"
749 ALIASES="${ALIASES} gvlc"
751 CPPFLAGS=$saved_CPPFLAGS
758 [ --disable-x11 X11 support (default enabled)])
759 if test x$enable_x11 != xno; then
760 if test x$x_includes = xNONE; then
761 x_includes=/usr/X11R6/include
763 if test x$x_libraries = xNONE; then
764 x_libraries=/usr/X11R6/lib
766 saved_CPPFLAGS=$CPPFLAGS
767 CPPFLAGS="$CPPFLAGS -I$x_includes"
768 AC_CHECK_HEADERS(X11/Xlib.h, [
769 PLUGINS="${PLUGINS} x11"
770 LIB_X11="-L$x_libraries -lX11 -lXext"
771 CFLAGS_X11="-I$x_includes"
773 CPPFLAGS=$saved_CPPFLAGS)
779 AC_ARG_ENABLE(xvideo,
780 [ --disable-xvideo XVideo support (default enabled)])
781 if test x$enable_xvideo != xno; then
782 if test x$x_includes = xNONE; then
783 x_includes=/usr/X11R6/include
785 if test x$x_libraries = xNONE; then
786 x_libraries=/usr/X11R6/lib
788 saved_CPPFLAGS=$CPPFLAGS
789 CPPFLAGS="$CPPFLAGS -I$x_includes"
790 AC_CHECK_HEADERS(X11/extensions/Xv.h, [
791 PLUGINS="${PLUGINS} xvideo"
792 LIB_XVIDEO="-L$x_libraries -lX11 -lXext -lXv"
793 CFLAGS_X11="-I$x_includes"
795 CPPFLAGS=$saved_CPPFLAGS)
802 [ --enable-alsa Alsa sound drivers support (Only for linux) (default disabled)],
803 [if test x$enable_alsa = xyes
805 AC_CHECK_HEADER(sys/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
806 if test x$have_alsa = xtrue
808 PLUGINS="${PLUGINS} alsa"
813 dnl end of non-BeOS stuff
817 dnl Configuration is finished
845 AC_SUBST(LIB_DVD_PLUGIN)
851 AC_SUBST(LIB_IDCTALTIVEC)
852 AC_SUBST(LIB_LIBDVDCSS)
856 AC_SUBST(LIB_NCURSES)
860 AC_SUBST(LIB_DIRECTX)
873 AC_SUBST(LOCAL_LIBDVDCSS)
875 AC_OUTPUT([Makefile.opts include/config.h])
881 architecture : ${ARCH}
882 optimizations : ${OPTIMS}"
884 if test x${HAVE_VLC} = x1
889 vlc version : ${VLC_VERSION}
890 debug mode : ${DEBUG}
891 statistics : ${STATS}
892 trace mode : ${TRACE}
893 profiling : ${PROFILING}
894 need builtin getopt : ${GETOPT}
895 built-in modules :${BUILTINS}
896 plugin modules :${PLUGINS}
897 vlc aliases :${ALIASES}"
901 libdvdcss configuration
902 -----------------------
903 can be built : ${CAN_BUILD_LIBDVDCSS}
904 will be built : ${LOCAL_LIBDVDCSS}"
905 if test x${LOCAL_LIBDVDCSS} = x1
907 echo "link statically : ${STATIC_LIBDVDCSS}"
909 echo "use dummy replacement : ${DUMMY_LIBDVDCSS}"
913 You may now tune Makefile.opts at your convenience, for instance to choose
914 which modules get compiled as plugins.
916 if test x${HAVE_VLC} = x1
918 echo "To build vlc and its plugins, type \`make vlc'."
920 if test x${HAVE_LIBDVDCSS} = x1
922 echo "To build libdvdcss only, type \`make libdvdcss'."