2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([xbmc], [11.0], [http://trac.xbmc.org])
6 AC_CONFIG_HEADERS([xbmc/config.h])
8 m4_include([m4/ax_python_devel.m4])
10 AC_CONFIG_AUX_DIR([build-aux])
11 AM_INIT_AUTOMAKE([foreign])
15 echo "$@" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz
18 # check for library basenames
19 AC_DEFUN([XB_FIND_SONAME],
21 if [[ "$host_vendor" != "apple" ]]; then
22 AC_MSG_CHECKING([for lib$2 soname])
23 $1_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS -l$2 -Wl,-M 2>/dev/null | grep "^LOAD.*$2" | awk '{V=2; print $V}')
24 if [[ ! -z $$1_FILENAME ]]; then
25 $1_SONAME=$(objdump -p $$1_FILENAME | grep "SONAME.*$2" | awk '{V=2; print $V}')
28 AC_MSG_CHECKING([for lib$2 dylib])
29 gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
30 env_lib_path=[`echo $LDFLAGS | sed 's/-L[ ]*//g'`]
31 if test "$cross_compiling" = yes; then
34 host_lib_path="/usr/lib /usr/local/lib"
36 for path in $gcc_lib_path $env_lib_path $host_lib_path; do
37 lib=[`ls -- $path/lib$2.dylib 2>/dev/null`]
38 if test x$lib != x; then
39 # we want the path/name that is embedded in the dylib
40 $1_SONAME=[`otool -L $lib | grep -v lib$2.dylib | grep lib$2 | awk '{V=1; print $V}'`]
41 $1_SONAME=[`basename $$1_SONAME`]
45 if [[ -z "$$1_SONAME" ]]; then
47 if test -z "$3" || test "x${$3}" = "xyes"; then
48 AC_MSG_ERROR([Unable to determine soname of lib$2 library])
50 AC_MSG_WARN([Unable to determine soname of lib$2 library])
52 AC_MSG_WARN([lib$2 support disabled])
55 AC_MSG_RESULT([$$1_SONAME])
60 # Function to push and pop libs and includes for a command
61 AC_DEFUN([XB_PUSH_FLAGS], [
63 SAVE_INCLUDES="$INCLUDES"
68 INCLUDES="$SAVE_INCLUDES"
71 # General message strings
72 configure_debug="ERROR: this is a configure debug statement"
73 missing_library="Could not find a required library. Please see the README for your platform."
74 missing_headers="Could not find some required headers. Please see the README for your platform."
75 missing_program="Could not find a required program. Please see the README for your platform."
76 xrandr_not_found="== Could not find libXRandR. SDL will be used for resolution support. =="
77 xrandr_disabled="== XRandR support disabled. SDL will be used for resolution support. =="
78 goom_enabled="== GOOM enabled. =="
79 goom_disabled="== GOOM disabled. =="
80 rsxs_enabled="== RSXS enabled. =="
81 rsxs_disabled="== RSXS disabled. =="
82 projectm_enabled="== ProjectM enabled. =="
83 projectm_disabled="== ProjectM disabled. =="
84 x11_enabled="== X11 enabled. =="
85 x11_disabled="== X11 disabled. =="
86 pulse_not_found="== Could not find libpulse. PulseAudio support disabled. =="
87 pulse_disabled="== PulseAudio support manually disabled. =="
88 dvdcss_enabled="== DVDCSS support enabled. =="
89 dvdcss_disabled="== DVDCSS support disabled. =="
90 hal_not_found="== Could not find hal. HAL support disabled. =="
91 halstorage_not_found="== Could not find hal-storage. HAL support disabled. =="
92 hal_disabled="== HAL support disabled. =="
93 avahi_not_found="== Could not find libavahi-common or libavahi-client. Avahi support disabled. =="
94 avahi_disabled="== Avahi support disabled. =="
95 vdpau_not_found="== Could not find libvdpau. VDPAU support disabled. =="
96 vdpau_disabled="== VDPAU support manually disabled. =="
97 vaapi_not_found="== Could not find libva. VAAPI support disabled. =="
98 vaapi_disabled="== VAAPI support manually disabled. =="
99 crystalhd_not_found="== Could not find libcrystalhd. CrystalHD support disabled. =="
100 crystalhd_disabled="== CrystalHD support manually disabled. =="
101 vdadecoder_enabled="== VDADecoder support enabled. =="
102 vdadecoder_disabled="== VDADecoder support manually disabled. =="
103 vtbdecoder_enabled="== VTBDecoder support enabled. =="
104 vtbdecoder_disabled="== VTBDecoder support manually disabled. =="
105 openmax_disabled="== OpenMax support manually disabled. =="
106 openmax_not_found="== Could not find libnvomx. OpenMax support disabled. =="
107 ssh_not_found="== Could not find libssh. SSH FTP VFS support disabled. =="
108 librtmp_not_found="== Could not find libRTMP. RTMP support disabled. =="
109 librtmp_disabled="== RTMP support disabled. =="
110 libnfs_not_found="== Could not find libnfs. NFS support disabled. =="
111 libnfs_disabled="== NFS support disabled. =="
112 libafpclient_not_found="== Could not find libafpclient. AFP support disabled. =="
113 libafpclient_disabled="== AFP support disabled. =="
114 libshairport_not_found="== Could not find libshairport. AirTunes support disabled. =="
115 libshairport_disabled="== AirTunes support disabled. =="
116 samba_disabled="== SAMBA support disabled. =="
117 libplist_not_found="== Could not find libplist. AirPlay support disabled. =="
118 libplist_disabled="== AirPlay support disabled. =="
119 alsa_not_found="== Could not find ALSA. ALSA support disabled. =="
120 dbus_not_found="== Could not find DBUS. DBUS support disabled. =="
122 libudev_not_found="== Could not find libudev. Will use polling to check for device changes. =="
123 libudev_disabled="== udev support disabled. Will use polling to check for device changes. =="
124 libusb_not_found="== Could not find libusb. Plug and play USB device support will not be available. =="
125 libusb_disabled="== libusb disabled. Plug and play USB device support will not be available. =="
126 libcec_not_found="== Could not find libcec. CEC device support will not be available. =="
127 libcec_disabled="== libcec disabled. CEC device support will not be available. =="
129 # External library message strings
130 external_libraries_enabled="== Use of all supported external libraries enabled. =="
131 external_libraries_disabled="== Use of all supported external libraries disabled. =="
132 external_ffmpeg_enabled="== Use of external ffmpeg enabled. =="
133 external_ffmpeg_disabled="== Use of external ffmpeg disabled. =="
134 ffmpeg_vdpau_not_supported="== External ffmpeg doesn't support VDPAU. VDPAU support disabled. =="
135 dashes="------------------------"
136 final_message="\n XBMC Configuration:"
137 final_message="\n$dashes$final_message\n$dashes"
140 AC_ARG_ENABLE([debug],
141 [AS_HELP_STRING([--enable-debug],
142 [enable debugging information (default is yes)])],
143 [use_debug=$enableval],
147 [AS_HELP_STRING([--with-arch],
148 [build with given arch passing to internal ffmpeg (default is no, needed for crosscompiling)])],
153 [AS_HELP_STRING([--with-cpu],
154 [build with given cpu passing to ffmpeg (default is no)])],
158 AC_ARG_ENABLE([optimizations],
159 [AS_HELP_STRING([--enable-optimizations],
160 [enable optimization (default is yes)])],
161 [use_optimizations=$enableval],
162 [use_optimizations=yes])
165 [AS_HELP_STRING([--enable-gl],
166 [enable OpenGL rendering (default is yes)])],
170 AC_ARG_ENABLE([gles],
171 [AS_HELP_STRING([--enable-gles],
172 [enable OpenGLES rendering (default is no)])],
173 [use_gles=$enableval],
177 [AS_HELP_STRING([--enable-sdl],
178 [enable SDL (default is auto)])],
179 [use_sdl=$enableval],
182 AC_ARG_ENABLE([vdpau],
183 [AS_HELP_STRING([--enable-vdpau],
184 [enable VDPAU decoding (default is auto)])],
185 [use_vdpau=$enableval],
188 AC_ARG_ENABLE([vaapi],
189 [AS_HELP_STRING([--enable-vaapi],
190 [enable VAAPI decoding (default is auto)])],
191 [use_vaapi=$enableval],
194 AC_ARG_ENABLE([crystalhd],
195 [AS_HELP_STRING([--enable-crystalhd],
196 [enable CrystalHD decoding (default is auto)])],
197 [use_crystalhd=$enableval],
198 [use_crystalhd=auto])
200 AC_ARG_ENABLE([vdadecoder],
201 [AS_HELP_STRING([--enable-vdadecoder],
202 [enable VDADecoder decoding (default is auto)])],
203 [use_vdadecoder=$enableval],
204 [use_vdadecoder=auto])
206 AC_ARG_ENABLE([vtbdecoder],
207 [AS_HELP_STRING([--enable-vtbdecoder],
208 [enable VTBDecoder decoding (default is auto)])],
209 [use_vtbdecoder=$enableval],
210 [use_vtbdecoder=auto])
212 AC_ARG_ENABLE([openmax],
213 [AS_HELP_STRING([--enable-openmax],
214 [enable OpenMax decoding (default is auto, requires OpenGLES)])],
215 [use_openmax=$enableval],
218 AC_ARG_ENABLE([tegra],
219 [AS_HELP_STRING([--enable-tegra],
220 [enable Tegra2 arm (default is no)])],
221 [use_tegra=$enableval],
224 AC_ARG_ENABLE([profiling],
225 [AS_HELP_STRING([--enable-profiling],
226 [enable gprof profiling (default is no)])],
227 [use_profiling=$enableval],
230 AC_ARG_ENABLE([joystick],
231 [AS_HELP_STRING([--enable-joystick],
232 [enable SDL joystick support (default is yes)])],
233 [use_joystick=$enableval],
236 AC_ARG_ENABLE([xrandr],
237 [AS_HELP_STRING([--enable-xrandr],
238 [enable XRandR support (default is yes)])],
239 [use_xrandr=$enableval],
242 AC_ARG_ENABLE([goom],
243 [AS_HELP_STRING([--enable-goom],
244 [enable GOOM visualisation (default is no)])],
245 [use_goom=$enableval],
248 AC_ARG_ENABLE([rsxs],
249 [AS_HELP_STRING([--enable-rsxs],
250 [enable really slick X screensavers (default is yes)])],
251 [use_rsxs=$enableval],
254 AC_ARG_ENABLE([projectm],
255 [AS_HELP_STRING([--enable-projectm],
256 [enable ProjectM visualisation (default is yes)])],
257 [use_projectm=$enableval],
261 [AS_HELP_STRING([--enable-x11],
262 [enable x11 (default is yes) 'Linux Only'])],
263 [use_x11=$enableval],
266 AC_ARG_ENABLE([ccache],
267 [AS_HELP_STRING([--enable-ccache],
268 [enable building with ccache feature (default is auto)])],
269 [use_ccache=$enableval],
272 AC_ARG_ENABLE([pulse],
273 [AS_HELP_STRING([--enable-pulse],
274 [enable PulseAudio support (default is auto)])],
275 [use_pulse=$enableval],
278 AC_ARG_ENABLE([rtmp],
279 [AS_HELP_STRING([--enable-rtmp],
280 [enable RTMP support via librtmp (default is auto)])],
281 [use_librtmp=$enableval],
284 AC_ARG_ENABLE([samba],
285 [AS_HELP_STRING([--disable-samba],
286 [disable SAMBA support (default is enabled)])],
287 [use_samba=$enableval],
291 [AS_HELP_STRING([--enable-nfs],
292 [enable NFS support via libnfs (default is auto)])],
293 [use_libnfs=$enableval],
296 AC_ARG_ENABLE([afpclient],
297 [AS_HELP_STRING([--enable-afpclient],
298 [enable AFP support via libafpclient (default is auto)])],
299 [use_libafpclient=$enableval],
300 [use_libafpclient=auto])
302 AC_ARG_ENABLE([airplay],
303 [AS_HELP_STRING([--enable-airplay],
304 [enable AirPlay support(default is auto)])],
305 [use_airplay=$enableval],
308 AC_ARG_ENABLE([airtunes],
309 [AS_HELP_STRING([--enable-airtunes],
310 [enable AirTunes support(default is auto)])],
311 [use_airtunes=$enableval],
314 AC_ARG_ENABLE([ffmpeg_libvorbis],
315 [AS_HELP_STRING([--enable-ffmpeg-libvorbis],
316 [enable FFmpeg vorbis encoding (default is no)])],
317 [use_ffmpeg_libvorbis=$enableval],
318 [use_ffmpeg_libvorbis=no])
320 AC_ARG_ENABLE([dvdcss],
321 [AS_HELP_STRING([--enable-dvdcss],
322 [enable DVDCSS support (default is yes)])],
323 [use_dvdcss=$enableval],
327 [AS_HELP_STRING([--enable-mid],
328 [enable MID support (default is no)])],
329 [use_mid=$enableval],
333 [AS_HELP_STRING([--disable-hal],
334 [disable HAL support (default is enabled if hal and hal-storage is found)])],
335 [use_hal=$enableval],
338 AC_ARG_ENABLE([avahi],
339 [AS_HELP_STRING([--disable-avahi],
340 [disable Avahi support (default is enabled if libavahi-common and libavahi-client is found)])],
341 [use_avahi=$enableval],
344 AC_ARG_ENABLE([non-free],
345 [AS_HELP_STRING([--disable-non-free],
346 [disable componentents with non-compliant licenses])],
347 [use_nonfree=$enableval],
350 AC_ARG_ENABLE([asap-codec],
351 [AS_HELP_STRING([--enable-asap-codec],
352 [enable ASAP ADPCM support])],
353 [use_asap=$enableval],
356 AC_ARG_ENABLE([webserver],
357 [AS_HELP_STRING([--disable-webserver],
358 [disable webserver])],
359 [use_webserver=$enableval],
362 AC_ARG_ENABLE([optical-drive],
363 [AS_HELP_STRING([--disable-optical-drive],
364 [disable optical drive])],
365 [use_optical_drive=$enableval],
366 [use_optical_drive=yes])
368 AC_ARG_ENABLE([libbluray],
369 [AS_HELP_STRING([--enable-libbluray],
370 [enable libbluray support])],
371 [use_libbluray=$enableval],
372 [use_libbluray=auto])
374 AC_ARG_ENABLE([texturepacker],
375 [AS_HELP_STRING([--enable-texturepacker],
376 [enable texturepacker support (default is yes)])],
377 [use_texturepacker=$enableval],
378 [use_texturepacker=auto])
380 AC_ARG_WITH([lirc-device],
381 [AS_HELP_STRING([--with-lirc-device=file],
382 [specify the default LIRC device (default is /dev/lircd)])],
383 [lirc_device=$withval],
384 [lirc_device=/dev/lircd])
385 AC_DEFINE_UNQUOTED([LIRC_DEVICE], ["$lirc_device"], [Default LIRC device])
387 AC_ARG_ENABLE([udev],
388 [AS_HELP_STRING([--enable-udev],
389 [enable udev support (default is auto)])],
390 [use_libudev=$enableval],
393 AC_ARG_ENABLE([libusb],
394 [AS_HELP_STRING([--enable-libusb],
395 [enable libusb support (default is auto)])],
396 [use_libusb=$enableval],
399 AC_ARG_ENABLE([libcec],
400 [AS_HELP_STRING([--enable-libcec],
401 [enable libcec support (default is auto)])],
402 [use_libcec=$enableval],
405 ### External libraries options
406 AC_ARG_ENABLE([external-libraries],
407 [AS_HELP_STRING([--enable-external-libraries],
408 [enable use of all supported external libraries (default is no) 'Linux only'])],
409 [use_external_libraries=$enableval],
410 [use_external_libraries=no])
412 AC_ARG_ENABLE([external-ffmpeg],
413 [AS_HELP_STRING([--enable-external-ffmpeg],
414 [enable use of external ffmpeg libraries (default is no) 'Linux only'])],
415 [use_external_ffmpeg=$enableval],
416 [use_external_ffmpeg=$use_external_libraries])
418 ### End of external library options
420 if test "x$host_vendor" != "xapple"; then
421 DEFAULT_COMPILE_FLAGS="-fPIC -DPIC -D_REENTRANT"
422 DEFAULT_COMPILE_FLAGS="$DEFAULT_COMPILE_FLAGS -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
425 # Checks for programs.
426 PASSED_CXXFLAGS=$CXXFLAGS # Hack to override autoconf default values
428 CXXFLAGS="$PASSED_CXXFLAGS $DEFAULT_COMPILE_FLAGS"
429 PASSED_CFLAGS=$CFLAGS # Hack to override autoconf default values
432 CFLAGS="$PASSED_CFLAGS $DEFAULT_COMPILE_FLAGS"
438 # host detection and setup
442 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
446 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
457 check_sdl_arch=[`file /opt/local/lib/libSDL_image.dylib | awk '{V=7; print $V}'`]
458 if test "x$check_sdl_arch" = "xi386"; then
459 use_texturepacker_native=yes
460 USE_TEXTUREPACKER_NATIVE_ROOT="/opt/local"
466 AC_SUBST(ARCH_DEFINES, "-D_ARMEL")
468 PYTHON_LDFLAGS="-L${prefix}/lib -lpython2.6"
469 PYTHON_CPPFLAGS="-I${prefix}/include/python2.6"
470 PYTHON_SITE_PKG="${prefix}/lib/python2.6/site-packages"
471 PYTHON_NOVERSIONCHECK="no-check"
472 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_IOS -D_LINUX")
477 use_texturepacker_native=yes
478 USE_TEXTUREPACKER_NATIVE_ROOT="$prefix"
480 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX")
482 powerpc-apple-darwin*)
489 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX")
491 powerpc-*-linux-gnu*)
493 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC")
495 powerpc64-*-linux-gnu*)
496 ARCH="powerpc64-linux"
497 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC64")
503 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_ARMEL")
506 AC_MSG_ERROR(unsupported host ($host))
510 # platform debug flags
511 if test "$use_debug" = "yes"; then
512 final_message="$final_message\n Debugging:\tYes"
513 if test "$use_profiling" = "yes"; then
514 final_message="$final_message\n Profiling:\tYes"
515 DEBUG_FLAGS="-g -pg -D_DEBUG -Wall"
517 final_message="$final_message\n Profiling:\tNo"
518 DEBUG_FLAGS="-g -D_DEBUG -Wall"
521 final_message="$final_message\n Debugging:\tNo"
522 if test "$use_profiling" = "yes"; then
523 final_message="$final_message\n Profiling:\tYes"
524 DEBUG_FLAGS="-pg -DNDEBUG=1"
526 final_message="$final_message\n Profiling:\tNo"
527 DEBUG_FLAGS="-DNDEBUG=1"
530 CFLAGS="$CFLAGS $DEBUG_FLAGS"
531 CXXFLAGS="$CXXFLAGS $DEBUG_FLAGS"
534 if test "$use_optimizations" = "yes"; then
535 final_message="$final_message\n Optimization:\tYes"
536 CXXFLAGS="$CXXFLAGS -O2"
539 final_message="$final_message\n Optimization:\tNo"
543 # platform specific flags
544 if test "$host_vendor" = "apple" ; then
545 # standard xbmc paths
546 INCLUDES="$INCLUDES -I\$(abs_top_srcdir)/xbmc/osx"
547 if test "$use_arch" != "arm"; then
548 LIBS="$LIBS -framework IOKit"
549 LIBS="$LIBS -framework Cocoa"
550 LIBS="$LIBS -framework AppKit"
551 LIBS="$LIBS -framework Carbon"
552 LIBS="$LIBS -framework CoreAudio"
553 LIBS="$LIBS -framework QuickTime"
554 LIBS="$LIBS -framework AudioUnit"
555 LIBS="$LIBS -framework Foundation"
556 LIBS="$LIBS -framework CoreServices"
557 LIBS="$LIBS -framework CoreVideo"
558 LIBS="$LIBS -framework CoreAudio"
559 LIBS="$LIBS -framework AudioToolbox"
560 LIBS="$LIBS -framework CoreFoundation"
561 LIBS="$LIBS -framework DiskArbitration"
562 LIBS="$LIBS -framework ApplicationServices"
564 elif test "$use_arch" = "arm"; then
565 CFLAGS="$CFLAGS -mfloat-abi=softfp -mno-apcs-stack-check"
566 CXXFLAGS="$CXXFLAGS -mfloat-abi=softfp -mno-apcs-stack-check"
567 FFMPEG_EXTRACFLAGS="-mfloat-abi=softfp"
568 if test "$use_tegra" = "yes"; then
569 # Compile for ARMv7a architecture, need to test gcc for vfpv3-d16 support
570 SAVE_CFLAGS="$CFLAGS"
571 CFLAGS="-mfpu=vfpv3-d16"
573 [AC_LANG_SOURCE([int foo;])],
574 [ CFLAGS="$SAVE_CFLAGS -Wno-psabi -Wa,-march=armv7a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mthumb-interwork"
575 CXXFLAGS="$CXXFLAGS -Wno-psabi -Wa,-march=armv7a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mthumb-interwork"
576 FFMPEG_EXTRACFLAGS+=" -mtune=cortex-a9 -mfpu=vfpv3-d16"
578 [ CFLAGS="$SAVE_CFLAGS -Wa,-march=armv6 -mtune=cortex-a8 -mthumb-interwork"
579 CXXFLAGS="$CXXFLAGS -Wa,-march=armv6 -mtune=cortex-a8 -mthumb-interwork"
582 # Compile for ARMv7a architecture, CortexA8 cpu and NEON coprocessor
583 CFLAGS+=" -Wa,-march=armv7a -mcpu=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad"
584 CXXFLAGS+=" -Wa,-march=armv7a -mcpu=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad"
585 FFMPEG_EXTRACFLAGS+=" -mfpu=neon"
589 # Checks for library functions.
592 AC_FUNC_CLOSEDIR_VOID
593 AC_FUNC_ERROR_AT_LINE
595 AC_PROG_GCC_TRADITIONAL
597 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
601 # Boxee is apparently having compile problems
602 # if HAVE_REALLOC is defined. Sort this later.
604 AC_FUNC_SELECT_ARGTYPES
605 AC_FUNC_SETVBUF_REVERSED
613 AC_CHECK_FUNCS([atexit dup2 fdatasync floor fs_stat_dev ftime ftruncate getcwd gethostbyaddr gethostbyname gethostname getpagesize getpass gettimeofday inet_ntoa lchown localeconv memchr memmove memset mkdir modf munmap pow rmdir select setenv setlocale socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strpbrk strrchr strspn strstr strtol strtoul sysinfo tzset utime])
615 # Check for various sizes
616 AC_CHECK_SIZEOF([int])
617 AC_CHECK_SIZEOF([size_t])
619 # Add top source directory for all builds so we can use config.h
620 INCLUDES="$INCLUDES -I\$(abs_top_srcdir)"
622 # Check inotify availability
623 AC_CHECK_HEADER([sys/inotify.h], AC_DEFINE([HAVE_INOTIFY],[1],[Define if we have inotify]),)
625 # Checks for boost headers using CXX instead of CC
627 AC_CHECK_HEADER([boost/shared_ptr.hpp],, AC_MSG_ERROR($missing_library))
630 # Checks for platforms libraries.
631 if test "$use_gles" = "yes"; then
633 # GLES overwrites GL if both set to yes.
634 if test "$host_vendor" = "apple" ; then
635 AC_DEFINE([HAVE_LIBEGL],[1],["Define to 1 if you have the `EGL' library (-lEGL)."])
636 AC_DEFINE([HAVE_LIBGLESV2],[1],["Define to 1 if you have the `GLESv2' library (-lGLESv2)."])
637 AC_MSG_RESULT(== WARNING: OpenGLES support is assumed.)
639 AC_CHECK_LIB([EGL], [main],, AC_MSG_ERROR($missing_library))
640 AC_CHECK_LIB([GLESv2],[main],, AC_MSG_ERROR($missing_library))
643 if test "$use_gl" = "yes"; then
644 if test "$host_vendor" = "apple" ; then
645 # linking to OpenGL.framework instead of libGL, libGLU so AC_CHECK_LIB will fail
646 LIBS="$LIBS -framework OpenGL"
647 AC_DEFINE([HAVE_LIBGL],[1],["Define to 1 if you have the `GL' library (-lGL)."])
648 AC_MSG_RESULT(== WARNING: OpenGL support is assumed.)
649 AC_DEFINE([HAVE_LIBGLU],[1],["Define to 1 if you have the `GLU' library (-lGLU)."])
650 AC_MSG_RESULT(== WARNING: OpenGLU support is assumed.)
651 AC_CHECK_LIB([GLEW],[main],, AC_MSG_ERROR($missing_library))
653 AC_CHECK_LIB([GL], [main],, AC_MSG_ERROR($missing_library))
654 AC_CHECK_LIB([GLEW],[main],, AC_MSG_ERROR($missing_library))
655 AC_CHECK_LIB([GLU], [main],, AC_MSG_ERROR($missing_library))
658 AC_MSG_RESULT(== WARNING: OpenGL support is disabled. XBMC will run VERY slow. ==)
659 AC_CHECK_LIB([SDL_gfx],[main])
663 # platform common libraries
664 AC_CHECK_PROG(MYSQL_CONFIG, mysql_config, "yes", "no")
665 if test $MYSQL_CONFIG = "yes"; then
666 INCLUDES="$INCLUDES `mysql_config --include`"
667 MYSQL_LIBS=`mysql_config --libs`
668 LIBS="$LIBS $MYSQL_LIBS"
671 AC_MSG_ERROR($missing_program)
673 AC_CHECK_HEADER([ass/ass.h],, AC_MSG_ERROR($missing_library))
674 AC_CHECK_HEADER([mpeg2dec/mpeg2.h],, AC_MSG_ERROR($missing_library))
675 AC_CHECK_HEADER([mpeg2dec/mpeg2convert.h],, AC_MSG_ERROR($missing_library),
676 AC_INCLUDES_DEFAULT()
677 [#include <mpeg2dec/mpeg2.h>])
678 AC_CHECK_HEADER([mad.h],, AC_MSG_ERROR($missing_library))
679 AC_CHECK_HEADER([jpeglib.h],, AC_MSG_ERROR($missing_library))
680 AC_CHECK_HEADER([samplerate.h],, AC_MSG_ERROR($missing_library))
681 AC_CHECK_HEADER([ogg/ogg.h],, AC_MSG_ERROR($missing_library))
682 AC_CHECK_HEADER([vorbis/vorbisfile.h],, AC_MSG_ERROR($missing_library))
683 AC_CHECK_HEADER([vorbis/vorbisenc.h],, AC_MSG_ERROR($missing_library))
684 AC_CHECK_HEADER([libmodplug/modplug.h],, AC_MSG_ERROR($missing_library))
685 AC_CHECK_HEADER([curl/curl.h],, AC_MSG_ERROR($missing_library))
686 AC_CHECK_HEADER([FLAC/stream_decoder.h],, AC_MSG_ERROR($missing_library))
687 AC_CHECK_LIB([bz2], [main],, AC_MSG_ERROR($missing_library))
688 AC_CHECK_LIB([jpeg], [main],, AC_MSG_ERROR($missing_library)) # check for cximage
689 AC_CHECK_LIB([tiff], [main],, AC_MSG_ERROR($missing_library))
690 AC_CHECK_LIB([pthread], [main],, AC_MSG_ERROR($missing_library))
691 AC_CHECK_LIB([lzo2], [main],, AC_MSG_ERROR($missing_library))
692 AC_CHECK_LIB([z], [main],, AC_MSG_ERROR($missing_library))
693 AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR($missing_library))
694 AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR($missing_library))
695 AC_CHECK_LIB([mysqlclient], [main],, AC_MSG_ERROR($missing_library))
696 AC_CHECK_LIB([ssh], [sftp_tell64],, AC_MSG_RESULT([Could not find suitable version of libssh]))
697 AC_CHECK_LIB([bluetooth], [hci_devid],, AC_MSG_RESULT([Could not find suitable version of libbluetooth]))
698 AC_CHECK_LIB([yajl], [main],, AC_MSG_ERROR($missing_library))
700 PKG_CHECK_MODULES([FONTCONFIG], [fontconfig],
701 [INCLUDES="$INCLUDES $FONTCONFIG_CFLAGS"; LIBS="$LIBS $FONTCONFIG_LIBS"],
702 AC_MSG_ERROR($missing_library))
703 PKG_CHECK_MODULES([FRIBIDI], [fribidi],
704 [INCLUDES="$INCLUDES $FRIBIDI_CFLAGS"; LIBS="$LIBS $FRIBIDI_LIBS"],
705 AC_MSG_ERROR($missing_library))
706 PKG_CHECK_MODULES([SQLITE3], [sqlite3],
707 [INCLUDES="$INCLUDES $SQLITE3_CFLAGS"; LIBS="$LIBS $SQLITE3_LIBS"],
708 AC_MSG_ERROR($missing_library))
709 PKG_CHECK_MODULES([PNG], [libpng],
710 [INCLUDES="$INCLUDES $PNG_CFLAGS"; LIBS="$LIBS $PNG_LIBS"],
711 AC_MSG_ERROR($missing_library))
712 PKG_CHECK_MODULES([PCRE], [libpcre],
713 [INCLUDES="$INCLUDES $PCRE_CFLAGS"; LIBS="$LIBS $PCRE_LIBS"]; \
714 AC_DEFINE([HAVE_LIBPCRE],[1],["Define to 1 if libpcre is installed"]),
715 AC_MSG_ERROR($missing_library))
716 PKG_CHECK_MODULES([PCRECPP], [libpcrecpp],
717 [INCLUDES="$INCLUDES $PCRECPP_CFLAGS"; LIBS="$LIBS $PCRECPP_LIBS"]; \
718 AC_DEFINE([HAVE_LIBPCRECPP],[1],["Define to 1 if libpcrecpp is installed"]),
719 AC_MSG_ERROR($missing_library))
720 PKG_CHECK_MODULES([CDIO], [libcdio],
721 [INCLUDES="$INCLUDES $CDIO_CFLAGS"; LIBS="$LIBS $CDIO_LIBS"],
722 AC_MSG_ERROR($missing_library))
723 PKG_CHECK_MODULES([SAMPLERATE], [samplerate],
724 [INCLUDES="$INCLUDES $SAMPLERATE_CFLAGS"; LIBS="$LIBS $SAMPLERATE_LIBS"],
725 AC_MSG_ERROR($missing_library))
726 PKG_CHECK_MODULES([FREETYPE2], [freetype2],
727 [INCLUDES="$INCLUDES $FREETYPE2_CFLAGS"; LIBS="$LIBS $FREETYPE2_LIBS"],
728 AC_MSG_ERROR($missing_library))
730 # check for libbluray
731 AS_CASE([x$use_libbluray],
733 PKG_CHECK_MODULES([LIBBLURAY],[libbluray],[use_libbluray="yes"], AC_MSG_ERROR($missing_library))
736 PKG_CHECK_MODULES([LIBBLURAY],[libbluray],[use_libbluray="yes"], [use_libbluray="no"])
739 AS_CASE([x$use_libbluray],
741 INCLUDES="$INCLUDES $LIBBLURAY_CFLAGS";
742 XB_FIND_SONAME([BLURAY], [bluray], [use_libbluray])
743 AC_DEFINE([HAVE_LIBBLURAY], 1, [System has libbluray library])
744 AC_SUBST([HAVE_LIBBLURAY], 1)
750 , AC_MSG_CHECKING([libbluray version])
753 [#include <libbluray/bluray.h>]
754 ,[bd_get_playlist_info(0, 0)])
755 ,[AC_MSG_RESULT(version has old angle api)
756 AC_DEFINE([HAVE_LIBBLURAY_NOANGLE],[],[System has an old api libbluray without angle support])]
757 ,[AC_MSG_RESULT(normal)]
760 AC_MSG_CHECKING([for libbluray log control])
763 [#include <libbluray/bluray.h>
764 #include <libbluray/log_control.h>]
765 ,[bd_set_debug_mask(0)])
768 AC_DEFINE([HAVE_LIBBLURAY_NOLOGCONTROL],[],[System has an old api libbluray without log support])]
772 # AC_DEFINE([HAVE_LIBBLURAY], 0, [System has libbluray library])
773 AC_SUBST([HAVE_LIBBLURAY], 0)
777 # platform dependent libraries
778 if test "$host_vendor" = "apple" ; then
779 AC_CHECK_LIB([iconv], [main],, AC_MSG_ERROR($missing_library))
780 if test "$use_arch" != "arm"; then
781 AC_CHECK_LIB([SDL_mixer],[main],, AC_MSG_ERROR($missing_library))
782 AC_CHECK_LIB([SDL], [main],, AC_MSG_ERROR($missing_library))
783 AC_DEFINE([HAVE_SDL],[1],["Define to 1 if using sdl"])
786 AC_CHECK_LIB([dl], [main],, AC_MSG_ERROR($missing_library))
787 AC_CHECK_LIB([resolv], [main],, AC_MSG_ERROR($missing_library))
788 AC_CHECK_LIB([jasper], [main],, AC_MSG_ERROR($missing_library)) # check for cximage
789 AC_CHECK_LIB([rt], [clock_gettime],, AC_MSG_ERROR($missing_library))
791 PKG_CHECK_MODULES([ALSA], [alsa],
792 [INCLUDES="$INCLUDES $ALSA_CFLAGS"; LIBS="$LIBS $ALSA_LIBS"; use_alsa=yes],
793 AC_MSG_NOTICE($alsa_not_found); use_alsa=no)
794 PKG_CHECK_MODULES([DBUS], [dbus-1],
795 [INCLUDES="$INCLUDES $DBUS_CFLAGS"; LIBS="$LIBS $DBUS_LIBS"; use_dbus=yes]; \
796 AC_DEFINE([HAVE_DBUS],[1],["Define to 1 if dbus is installed"]),
797 AC_MSG_NOTICE($missing_library); use_dbus=no)
799 if test "x$use_sdl" != "xno"; then
800 PKG_CHECK_MODULES([SDL], [sdl],
801 [INCLUDES="$INCLUDES $SDL_CFLAGS"; LIBS="$LIBS $SDL_LIBS"],
802 AC_MSG_ERROR($missing_library))
803 AC_CHECK_LIB([SDL_mixer], [main],, AC_MSG_ERROR($missing_library))
804 AC_CHECK_LIB([SDL_image], [main],, AC_MSG_ERROR($missing_library))
805 AC_DEFINE([HAVE_SDL],[1],["Define to 1 if using sdl"])
809 XB_FIND_SONAME([MAD], [mad])
810 XB_FIND_SONAME([OGG], [ogg])
811 XB_FIND_SONAME([CURL], [curl])
812 XB_FIND_SONAME([FLAC], [FLAC])
813 XB_FIND_SONAME([VORBIS], [vorbis])
814 XB_FIND_SONAME([VORBISENC], [vorbisenc])
815 XB_FIND_SONAME([VORBISFILE], [vorbisfile])
816 XB_FIND_SONAME([MODPLUG], [modplug])
817 XB_FIND_SONAME([ASS], [ass])
818 XB_FIND_SONAME([MPEG2], [mpeg2])
821 if test "$use_webserver" = "yes"; then
822 AC_CHECK_LIB([microhttpd], [main],, AC_MSG_ERROR($missing_library))
826 if test "$use_optical_drive" = "yes"; then
827 AC_DEFINE([HAS_DVD_DRIVE], [1], [Define to 1 to have optical drive support])
831 if test "x$use_pulse" != "xno"; then
832 if test "$host_vendor" = "apple" ; then
833 if test "x$use_pulse" = "xyes"; then
834 AC_MSG_ERROR($pulse_disabled)
837 AC_MSG_RESULT($pulse_disabled)
841 AC_CHECK_LIB([pulse], [main],,
842 [if test "x$use_pulse" = "xyes"; then
843 AC_MSG_ERROR($pulse_not_found)
847 AC_MSG_RESULT($pulse_not_found)
852 AC_MSG_RESULT($pulse_disabled)
857 if test "$host_vendor" = "apple" ; then
859 AC_MSG_RESULT($hal_disabled)
861 if test "$use_hal" = "yes"; then
862 PKG_CHECK_MODULES([HAL], [hal],
863 [INCLUDES="$INCLUDES $HAL_CFLAGS"; LIBS="$LIBS $HAL_LIBS"],
864 use_hal=no;AC_MSG_RESULT($hal_not_found))
865 PKG_CHECK_MODULES([HAL_STORAGE], [hal-storage],
866 [INCLUDES="$INCLUDES $HAL_STORAGE_CFLAGS"; LIBS="$LIBS $HAL_STORAGE_LIBS"],
867 use_hal=no;AC_MSG_RESULT($halstorage_not_found))
869 AC_MSG_RESULT($hal_disabled)
871 if test "$use_hal" = "yes"; then
872 AC_DEFINE([HAS_HAL], [1], [Define to 1 if you have HAL installed])
877 if test "$host_vendor" = "apple" ; then
879 AC_MSG_RESULT($avahi_disabled)
881 if test "$use_avahi" = "yes"; then
882 AC_CHECK_LIB([avahi-common], [main],,
883 use_avahi=no;AC_MSG_RESULT($avahi_not_found))
884 if test "$use_avahi" = "yes"; then
885 #either both libs or none
886 AC_CHECK_LIB([avahi-client], [main],,
887 use_avahi=no;AC_MSG_RESULT($avahi_not_found))
890 AC_MSG_RESULT($avahi_disabled)
895 if test "$use_x11" = "yes" && test "$host_vendor" != "apple"; then
896 AC_MSG_NOTICE($x11_enabled)
897 PKG_CHECK_MODULES([X11], [x11],
898 [INCLUDES="$INCLUDES $X11_CFLAGS"; LIBS="$LIBS $X11_LIBS"],
899 AC_MSG_ERROR($missing_library))
900 PKG_CHECK_MODULES([XEXT], [xext],
901 [INCLUDES="$INCLUDES $XEXT_CFLAGS"; LIBS="$LIBS $XEXT_LIBS"],
902 AC_MSG_ERROR($missing_library))
903 AC_DEFINE([HAVE_X11], [1], [Define to 1 if you have X11 libs installed.])
905 AC_MSG_RESULT($x11_disabled)
909 if test "$host_vendor" = "apple" || test "$use_x11" = "no"; then
911 AC_MSG_RESULT($xrandr_disabled)
913 if test "$use_xrandr" = "yes" ; then
914 AC_CHECK_LIB([Xrandr], [main],,
915 use_xrandr="no";AC_MSG_RESULT($xrandr_not_found))
917 AC_MSG_RESULT($xrandr_disabled)
922 if test "$host_vendor" = "apple" ; then
923 AC_MSG_NOTICE($goom_disabled)
926 if test "$use_goom" = "yes" && test "$use_gl" = "yes"; then
927 AC_MSG_NOTICE($goom_enabled)
930 AC_MSG_NOTICE($goom_disabled)
936 if test "$use_rsxs" = "no" || test "$use_gl" = "no"; then
937 AC_MSG_NOTICE($rsxs_disabled)
940 AC_MSG_NOTICE($rsxs_enabled)
942 # darwin osx can do rsxs but does not use x11, so do not pkg-config check for them
943 if test "$host_vendor" != "apple" ; then
944 PKG_CHECK_MODULES([XT], [xt],
945 [INCLUDES="$INCLUDES $XT_CFLAGS"; LIBS="$LIBS $XT_LIBS"],
946 AC_MSG_ERROR($missing_library))
947 PKG_CHECK_MODULES([XMU], [xmu],
948 [INCLUDES="$INCLUDES $XMU_CFLAGS"; LIBS="$LIBS $XMU_LIBS"],
949 AC_MSG_ERROR($missing_library))
954 if test "$use_projectm" = "no" || test "$use_gl" = "no"; then
955 AC_MSG_NOTICE($projectm_disabled)
958 AC_MSG_NOTICE($projectm_enabled)
963 if test "$use_librtmp" != "no"; then
964 AC_CHECK_HEADERS([librtmp/log.h librtmp/amf.h librtmp/rtmp.h],,
965 [if test "$use_librtmp" = "yes"; then
966 AC_MSG_ERROR($librtmp_not_found)
967 elif test "$use_librtmp" != "no"; then
968 AC_MSG_NOTICE($librtmp_not_found)
972 if test "$use_librtmp" != "no"; then
973 XB_FIND_SONAME([RTMP], [rtmp], [use_librtmp])
975 if test "$use_librtmp" != "no"; then
976 AC_DEFINE([HAS_LIBRTMP], [1], [Whether to use libRTMP library.])
979 AC_MSG_NOTICE($librtmp_disabled)
983 if test "x$use_samba" != "xno"; then
984 AC_CHECK_LIB([smbclient], [main],,
985 use_samba=no;AC_MSG_ERROR($missing_library))
988 AC_MSG_RESULT($samba_disabled)
992 if test "x$use_samba" != "xno"; then
993 AC_DEFINE([HAVE_LIBSMBCLIENT], [1], [Define to 1 if you have Samba installed])
998 if test "$use_libnfs" != "no"; then
999 AC_CHECK_HEADERS([nfsc/libnfs.h],,
1000 [if test "$use_libnfs" = "yes"; then
1001 AC_MSG_ERROR($libnfs_not_found)
1003 elif test "$use_libnfs" != "no"; then
1004 AC_MSG_NOTICE($libnfs_not_found)
1009 if test "$use_libnfs" != "no"; then
1010 XB_FIND_SONAME([NFS], [nfs], [use_libnfs])
1012 if test "$use_libnfs" != "no"; then
1013 AC_DEFINE([HAVE_LIBNFS], [1], [Whether to use libnfs library.])
1018 AC_MSG_NOTICE($libnfs_disabled)
1023 if test "x$use_libafpclient" != "xno"; then
1024 AC_CHECK_HEADERS([afpfs-ng/libafpclient.h],,
1025 [if test "x$use_libafpclient" = "xyes"; then
1026 AC_MSG_ERROR($libafpclient_not_found)
1027 elif test "x$use_libafpclient" != "xno"; then
1028 AC_MSG_NOTICE($libafpclient_not_found)
1029 use_libafpclient="no"
1032 if test "x$use_libafpclient" != "xno"; then
1033 XB_FIND_SONAME([AFPCLIENT], [afpclient], [use_libafpclient])
1034 AC_DEFINE([HAVE_LIBAFPCLIENT], [1], [Whether to use libafpclient library.])
1038 AC_MSG_NOTICE($libafpclient_disabled)
1041 # libplist for airplay feature
1043 if test "$use_airplay" != "no"; then
1044 AC_CHECK_LIB([plist],[main],,
1045 [if test "$use_airplay" = "yes"; then
1046 AC_MSG_ERROR($libplist_not_found)
1047 elif test "$use_airplay" != "no"; then
1048 AC_MSG_NOTICE($libplist_not_found)
1053 if test "$use_airplay" != "no"; then
1054 XB_FIND_SONAME([PLIST], [plist], [use_airplay])
1059 # libshairport for AirTunes
1061 if test "x$use_airtunes" != "xno"; then
1062 AC_CHECK_LIB([shairport], [shairport_set_ao],,
1063 [if test "x$use_airtunes" = "xyes"; then
1064 AC_MSG_ERROR($libshairport_not_found)
1065 elif test "x$use_airtunes" != "xno"; then
1066 AC_MSG_NOTICE($libshairport_not_found)
1071 if test "x$use_airtunes" != "xno"; then
1072 XB_FIND_SONAME([SHAIRPORT], [shairport], [use_airtunes])
1079 if test "$host_vendor" = "apple" ; then
1081 AC_MSG_NOTICE($libusb_disabled)
1083 if test "$use_libusb" = "auto"; then
1084 PKG_CHECK_MODULES([USB], [libusb],
1085 use_libusb="yes"; USE_LIBUSB=1; [INCLUDES="$INCLUDES $USB_CFLAGS"; LIBS="$LIBS $USB_LIBS"; USE_LIBUSB=1]; \
1086 AC_DEFINE([HAVE_LIBUSB],[1],["Define to 1 if libusb is installed"]),
1087 use_libusb="no"; AC_MSG_RESULT($libusb_not_found))
1088 elif test "$use_libusb" = "yes"; then
1089 PKG_CHECK_MODULES([USB], [libusb],
1090 use_libusb="yes"; USE_LIBUSB=1; [INCLUDES="$INCLUDES $USB_CFLAGS"; LIBS="$LIBS $USB_LIBS"; USE_LIBUSB=1]; \
1091 AC_DEFINE([HAVE_LIBUSB],[1],["Define to 1 if libusb is installed"]),
1092 use_libusb="no"; AC_MSG_ERROR($libusb_not_found))
1095 AC_MSG_NOTICE($libusb_disabled)
1101 if test "$use_libusb" = "yes"; then
1102 if test "$host_vendor" = "apple" ; then
1104 AC_MSG_NOTICE($libudev_disabled)
1106 if test "$use_libudev" = "auto"; then
1107 PKG_CHECK_MODULES([UDEV], [libudev],
1108 use_libudev="yes"; use_libusb="no"; USE_LIBUDEV=1; [INCLUDES="$INCLUDES $UDEV_CFLAGS"; LIBS="$LIBS $UDEV_LIBS"]; \
1109 AC_DEFINE([HAVE_LIBUDEV],[1],["Define to 1 if libudev is installed"]),
1110 AC_MSG_RESULT($libudev_not_found))
1111 elif test "$use_libudev" = "yes" ; then
1112 PKG_CHECK_MODULES([UDEV], [libudev],
1113 use_libudev="yes"; use_libusb="no"; USE_LIBUDEV=1; [INCLUDES="$INCLUDES $UDEV_CFLAGS"; LIBS="$LIBS $UDEV_LIBS"]; \
1114 AC_DEFINE([HAVE_LIBUDEV],[1],["Define to 1 if libudev is installed"]),
1115 AC_MSG_ERROR($libudev_not_found))
1118 AC_MSG_NOTICE($libudev_disabled)
1123 AC_MSG_NOTICE($libudev_disabled)
1128 if test "$use_libcec" = "auto"; then
1129 PKG_CHECK_MODULES([CEC], [libcec],
1130 use_libcec="yes"; USE_LIBCEC=1; [INCLUDES="$INCLUDES $CEC_CFLAGS"; LIBS="$LIBS $CEC_LIBS";] \
1131 AC_DEFINE([HAVE_LIBCEC],[1],["Define to 1 if libcec is installed"]),
1132 use_libcec="no"; AC_MSG_RESULT($libcec_not_found))
1133 elif test "$use_libcec" = "yes"; then
1134 PKG_CHECK_MODULES([CEC], [libcec],
1135 use_libcec="yes"; USE_LIBCEC=1; [INCLUDES="$INCLUDES $CEC_CFLAGS"; LIBS="$LIBS $CEC_LIBS";] \
1136 AC_DEFINE([HAVE_LIBCEC],[1],["Define to 1 if libcec is installed"]),
1137 use_libcec="no"; AC_MSG_ERROR($libcec_not_found))
1140 AC_MSG_NOTICE($libcec_disabled)
1143 ### External libraries checks
1145 if test "$use_external_ffmpeg" = "yes"; then
1146 FFMPEG_LIBNAMES="libavcodec libavfilter libavformat libavutil libpostproc libswscale"
1148 # libavcore is optional
1149 PKG_CHECK_EXISTS([libavcore], FFMPEG_LIBNAMES="$FFMPEG_LIBNAMES libavcore")
1151 PKG_CHECK_MODULES([FFMPEG], [$FFMPEG_LIBNAMES],
1152 [INCLUDES="$INCLUDES $FFMPEG_CFLAGS"; LIBS="$LIBS $FFMPEG_LIBS"],
1153 AC_MSG_ERROR($missing_library))
1155 # Determine whether AVPacket and relevant functions are defined in libavformat
1157 AC_CHECK_LIB([avcodec], [av_free_packet],
1158 [AC_MSG_NOTICE(== AVPacket and relevant functions defined in libavcodec. ==)],
1159 [AC_MSG_NOTICE(== AVPacket and relevant functions defined in libavformat. ==)
1160 AC_DEFINE([AVPACKET_IN_AVFORMAT], [1], [Whether AVPacket is in libavformat.])])
1162 # in case the headers are in a custom directory
1163 SAVE_CPPFLAGS="$CPPFLAGS"
1164 CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS"
1166 # Possible places the ffmpeg headers may be
1167 AC_CHECK_HEADERS([libavcodec/avcodec.h libavfilter/avfilter.h libavformat/avformat.h libavutil/avutil.h libpostproc/postprocess.h libswscale/swscale.h],,
1168 [AC_CHECK_HEADERS([ffmpeg/avcodec.h ffmpeg/avfilter.h ffmpeg/avformat.h ffmpeg/avutil.h postproc/postprocess.h ffmpeg/swscale.h],,
1169 [AC_MSG_ERROR($missing_headers)])])
1172 AC_CHECK_HEADERS([libavcore/avcore.h libavcore/samplefmt.h libavutil/mem.h libavutil/samplefmt.h])
1174 # old FFmpeg have this in libavcodec/opt.h instead:
1175 AC_CHECK_HEADERS([libavutil/opt.h])
1177 # We'll support the use of rgb2rgb.h if it exists.
1178 AC_CHECK_HEADERS([libswscale/rgb2rgb.h],,)
1179 AC_CHECK_HEADERS([ffmpeg/rgb2rgb.h],,)
1181 # Check if AVFilterBufferRefVideoProps AVRational member is named
1182 # 'pixel_aspect' or 'sample_aspect_ratio'.
1183 AC_CHECK_MEMBER([AVFilterBufferRefVideoProps.sample_aspect_ratio],
1184 [AC_DEFINE([HAVE_AVFILTERBUFFERREFVIDEOPROPS_SAMPLE_ASPECT_RATIO],
1186 [Define to 1 if AVFilterBufferRefVideoProps has member sample_aspect_ratio.])],
1187 [AC_CHECK_MEMBER([AVFilterBufferRefVideoProps.sample_aspect_ratio],
1188 [AC_DEFINE([HAVE_AVFILTERBUFFERREFVIDEOPROPS_SAMPLE_ASPECT_RATIO],
1190 [Define to 1 if AVFilterBufferRefVideoProps has member sample_aspect_ratio.])],
1192 [[#include <ffmpeg/avfilter.h>]])],
1193 [[#include <libavfilter/avfilter.h>]])
1195 AC_MSG_NOTICE($external_ffmpeg_enabled)
1196 USE_EXTERNAL_FFMPEG=1
1197 AC_DEFINE([USE_EXTERNAL_FFMPEG], [1], [Whether to use external FFmpeg libraries.])
1199 # Disable vdpau support if external libavcodec doesn't have it
1200 AC_CHECK_LIB([avcodec], [ff_vdpau_vc1_decode_picture],,
1201 [if test "x$use_vdpau" = "xyes"; then
1202 AC_MSG_ERROR($ffmpeg_vdpau_not_supported)
1205 AC_MSG_RESULT($ffmpeg_vdpau_not_supported)
1208 # Check for 'PIX_FMT_VDPAU_MPEG4' from libavutil
1209 if test "x$use_vdpau" != "xno"; then
1212 [AC_LANG_SOURCE([ #include <libavutil/pixfmt.h>
1213 int main() { PixelFormat format = PIX_FMT_VDPAU_MPEG4; }])],
1214 [AC_DEFINE([PIX_FMT_VDPAU_MPEG4_IN_AVUTIL], [1],
1215 [Whether AVUtil defines PIX_FMT_VDPAU_MPEG4.])],)
1218 CPPFLAGS="$SAVE_CPPFLAGS"
1220 AC_MSG_NOTICE($external_ffmpeg_disabled)
1221 USE_EXTERNAL_FFMPEG=0
1222 AC_DEFINE([PIX_FMT_VDPAU_MPEG4_IN_AVUTIL], [1], [Whether AVUtil defines PIX_FMT_VDPAU_MPEG4.])
1226 if test -z "$PYTHON_NOVERSIONCHECK"; then
1227 AX_PYTHON_DEVEL([>= 2.4])
1228 PYTHON_VERSION=$ac_python_version
1231 if test -z "$PYTHON_VERSION"; then
1232 AC_MSG_ERROR([Can't find a Python version.])
1234 AC_MSG_NOTICE([Using Python $PYTHON_VERSION])
1238 if test "x$use_vdpau" != "xno"; then
1239 if test "$host_vendor" = "apple" ; then
1240 if test "x$use_vdpau" = "xyes"; then
1241 AC_MSG_ERROR([VDPAU not supported on this platform])
1244 AC_MSG_NOTICE($vdpau_disabled)
1249 AC_CHECK_HEADER([vdpau/vdpau.h],AC_DEFINE([HAVE_LIBVDPAU], [],
1250 [Define to 1 if you have the 'vdpau' library (-lvdpau).]),
1251 [if test "x$use_vdpau" = "xyes"; then
1253 AC_MSG_ERROR([$vdpau_not_found])
1257 AC_MSG_RESULT($vdpau_not_found)
1262 AC_MSG_NOTICE($vdpau_disabled)
1266 if test "x$use_vaapi" != "xno"; then
1267 if test "$host_vendor" = "apple" ; then
1268 if test "x$use_vaapi" = "xyes"; then
1269 AC_MSG_ERROR([VAAPI not supported on this platform])
1272 AC_MSG_NOTICE($vaapi_disabled)
1276 initial_val=$use_vaapi
1277 AC_CHECK_LIB([va], main, :, use_vaapi=no)
1278 if test "x$use_vaapi" != "xno"; then
1279 AC_CHECK_LIB([va-glx], main, LIBS="-lva -lva-glx $LIBS", use_vaapi=no, -lva)
1282 if test "x$use_vaapi" = "xno"; then
1283 if test "x$initial_val" = "xyes"; then
1284 AC_MSG_ERROR($vaapi_not_found)
1286 AC_MSG_RESULT($vaapi_not_found)
1290 AC_DEFINE([HAVE_LIBVA], [1], [Define to 1 if you have the 'vaapi' libraries (-lva AND -lva-glx)])
1295 AC_MSG_NOTICE($vaapi_disabled)
1300 if test "x$use_crystalhd" != "xno"; then
1301 SAVE_CFLAGS="$CFLAGS"
1302 CFLAGS="-D__LINUX_USER__"
1303 AC_CHECK_HEADER([libcrystalhd/libcrystalhd_if.h], [],
1304 [ if test "x$use_crystalhd" = "xyes"; then
1305 AC_MSG_ERROR($crystalhd_not_found)
1308 AC_MSG_RESULT($crystalhd_not_found)
1312 CFLAGS="$SAVE_CFLAGS"
1313 if test "$host_vendor" != "apple"; then
1314 XB_FIND_SONAME([CRYSTALHD], [crystalhd], [use_crystalhd])
1316 if test "x$use_crystalhd" != "xno"; then
1317 SAVE_CFLAGS="$CFLAGS"
1318 CFLAGS="-D__LINUX_USER__ -llibcrystalhd"
1319 # check for new crystalhd lib
1321 [AC_LANG_SOURCE([#include <libcrystalhd/bc_dts_types.h>
1322 #include <libcrystalhd/bc_dts_defs.h>
1323 PBC_INFO_CRYSTAL bCrystalInfo;])],
1324 [ AC_DEFINE([HAVE_LIBCRYSTALHD], [2], [Define to 2 if you have the 'New Broadcom Crystal HD' library.]) ],
1325 [ AC_DEFINE([HAVE_LIBCRYSTALHD], [1], [Define to 1 if you have the 'Old Broadcom Crystal HD' library.]) ])
1326 CFLAGS="$SAVE_CFLAGS"
1330 AC_MSG_NOTICE($crystalhd_disabled)
1335 if test "x$use_vdadecoder" != "xno"; then
1336 if test "$host_vendor" = "apple" ; then
1337 HAVE_LIBVDADECODER=1
1338 AC_DEFINE([HAVE_LIBVDADECODER], [1], [Define to 1 if you have the 'VDADecoder' library.])
1339 AC_MSG_NOTICE($vdadecoder_enabled)
1342 if test "x$use_vdadecoder" = "xyes"; then
1343 AC_MSG_ERROR([VDA Decoder not supported on this platform])
1346 AC_MSG_NOTICE($vdadecoder_disabled)
1351 AC_MSG_NOTICE($vdadecoder_disabled)
1355 if test "x$use_vtbdecoder" != "xno"; then
1356 if test "$host_vendor" = "apple" ; then
1357 HAVE_VIDEOTOOLBOXDECODER=1
1358 AC_DEFINE([HAVE_VIDEOTOOLBOXDECODER], [1], [Define to 1 if you have the 'VTBDecoder' library.])
1359 AC_MSG_NOTICE($vtbdecoder_enabled)
1361 if test "x$use_vtbdecoder" = "xyes"; then
1362 AC_MSG_ERROR([VTB Decoder not supported on this platform])
1365 AC_MSG_NOTICE($vtbdecoder_disabled)
1369 AC_MSG_NOTICE($vtbdecoder_disabled)
1373 if test "$host_vendor" = "apple" ; then
1376 AC_MSG_NOTICE($openmax_disabled)
1378 if test "$use_gles" = "yes" && test "$use_openmax" = "auto"; then
1379 PKG_CHECK_MODULES([OPENMAX], [libomxil-bellagio],
1380 USE_OPENMAX=1;[INCLUDES="$INCLUDES $OPENMAX_CFLAGS"; LIBS="$LIBS $OPENMAX_LIBS"],
1381 use_openmax=no;USE_OPENMAX=0;AC_MSG_RESULT($openmax_not_found))
1382 elif test "$use_gles" = "yes" && test "$use_openmax" = "yes"; then
1383 PKG_CHECK_MODULES([OPENMAX], [libomxil-bellagio],
1384 USE_OPENMAX=1;[INCLUDES="$INCLUDES $OPENMAX_CFLAGS"; LIBS="$LIBS $OPENMAX_LIBS"],
1385 AC_MSG_ERROR($openmax_not_found))
1387 AC_MSG_NOTICE($openmax_disabled)
1393 # yajl version check (yajl_version.h was added in yajl 2.0)
1394 AC_CHECK_HEADERS([yajl/yajl_version.h], [], [
1395 AC_DEFINE(YAJL_MAJOR, 1, [yajl version 1])
1398 # platform specific bin utilities
1399 if test "$host_vendor" != "apple" ; then
1400 AC_CHECK_PROG(HAVE_GAWK,gawk,"yes","no",)
1401 if test "$HAVE_GAWK" = "no" ; then
1402 AC_MSG_ERROR($missing_program)
1406 if test "$use_arch" != "arm" ; then
1407 AC_CHECK_PROG(HAVE_CMAKE,cmake,"yes","no",)
1408 if test "$HAVE_CMAKE" = "no" ; then
1409 AC_MSG_ERROR($missing_program)
1413 AC_CHECK_PROG(HAVE_GPERF,gperf,"yes","no",)
1414 if test "$HAVE_GPERF" = "no" ; then
1415 AC_MSG_ERROR($missing_program)
1418 AC_CHECK_PROG(HAVE_UNZIP,unzip,"yes","no",)
1419 if test "$HAVE_UNZIP" = "no" ; then
1420 AC_MSG_ERROR($missing_program)
1423 AC_CHECK_PROG(HAVE_ZIP,zip,"yes","no",)
1424 if test "$HAVE_ZIP" = "no" ; then
1425 AC_MSG_ERROR($missing_program)
1428 if test "$ARCH" = "i486-linux" || test "$ARCH" = "x86-freebsd"; then
1429 AC_CHECK_PROG(HAVE_NASM,nasm,"yes","no",)
1430 if test "$HAVE_NASM" = "no" ; then
1431 AC_MSG_ERROR($missing_program)
1435 AC_CHECK_PROG(HAVE_GIT,git,"yes","no",)
1437 # Checks for header files.
1441 AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h inttypes.h limits.h locale.h \
1442 malloc.h memory.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h \
1443 strings.h sys/file.h sys/ioctl.h sys/mount.h sys/param.h sys/socket.h \
1444 sys/time.h sys/timeb.h sys/vfs.h termios.h unistd.h utime.h wchar.h wctype.h])
1445 AC_CHECK_HEADERS([cdio/iso9660.h],,AC_MSG_ERROR([$missing_headers]))
1447 # Checks for typedefs, structures, and compiler characteristics.
1463 AC_CHECK_MEMBERS([struct stat.st_rdev])
1472 if test "$cross_compiling" = "yes"; then
1473 final_message="$final_message\n Crosscomp.:\tYes"
1475 final_message="$final_message\n Crosscomp.:\tNo"
1478 final_message="$final_message\n target ARCH:\t$use_arch"
1479 final_message="$final_message\n target CPU:\t$use_cpu"
1481 if test "$use_gles" = "yes"; then
1482 final_message="$final_message\n OpenGLES:\tYes"
1487 if test "$use_gl" = "yes"; then
1488 final_message="$final_message\n OpenGL:\tYes"
1491 final_message="$final_message\n OpenGL:\tNo (Very Slow)"
1492 SDL_DEFINES="-DHAS_SDL_2D"
1497 if test "$use_alsa" = "yes"; then
1499 AC_DEFINE([USE_ALSA],[1],["Define to 1 if alsa is installed"])
1500 final_message="$final_message\n ALSA:\t\tYes"
1503 final_message="$final_message\n ALSA:\t\tNo"
1506 if test "$use_dbus" = "yes"; then
1507 final_message="$final_message\n DBUS:\t\tYes"
1509 final_message="$final_message\n DBUS:\t\tNo"
1512 if test "x$use_vdpau" != "xno"; then
1513 final_message="$final_message\n VDPAU:\tYes"
1515 final_message="$final_message\n VDPAU:\tNo"
1518 if test "x$use_vaapi" != "xno"; then
1519 final_message="$final_message\n VAAPI:\tYes"
1521 final_message="$final_message\n VAAPI:\tNo"
1524 if test "x$use_crystalhd" != "xno"; then
1525 final_message="$final_message\n CrystalHD:\tYes"
1527 final_message="$final_message\n CrystalHD:\tNo"
1530 if test "x$use_vdadecoder" != "xno"; then
1531 final_message="$final_message\n VDADecoder:\tYes"
1533 final_message="$final_message\n VDADecoder:\tNo"
1536 if test "x$use_vtbdecoder" != "xno"; then
1537 final_message="$final_message\n VTBDecoder:\tYes"
1539 final_message="$final_message\n VTBDecoder:\tNo"
1542 if test "$use_openmax" != "no"; then
1543 final_message="$final_message\n OpenMax:\tYes"
1545 final_message="$final_message\n OpenMax:\tNo"
1548 if test "$use_joystick" = "yes"; then
1549 final_message="$final_message\n Joystick:\tYes"
1550 SDL_DEFINES="$SDL_DEFINES -DHAS_SDL_JOYSTICK"
1552 final_message="$final_message\n Joystick:\tNo"
1555 if test "$use_xrandr" = "yes"; then
1556 final_message="$final_message\n XRandR:\tYes"
1559 final_message="$final_message\n XRandR:\tNo"
1563 if test "$use_goom" = "yes"; then
1564 final_message="$final_message\n GOOM:\t\tYes"
1566 final_message="$final_message\n GOOM:\t\tNo"
1569 if test "$use_rsxs" = "yes"; then
1570 final_message="$final_message\n RSXS:\t\tYes"
1572 final_message="$final_message\n RSXS:\t\tNo"
1575 if test "$use_projectm" = "yes"; then
1576 final_message="$final_message\n ProjectM:\tYes"
1578 final_message="$final_message\n ProjectM:\tNo"
1581 if test "$use_x11" = "yes"; then
1582 final_message="$final_message\n X11:\t\tYes"
1584 final_message="$final_message\n X11:\t\tNo"
1587 if test "$use_libbluray" = "yes"; then
1588 final_message="$final_message\n Bluray:\tYes"
1590 final_message="$final_message\n Bluray:\tNo"
1593 USE_TEXTUREPACKER_NATIVE=0
1594 if test "x$use_texturepacker" != "xno"; then
1595 final_message="$final_message\n TexturePacker:Yes"
1597 if test "x$use_texturepacker_native" = "xyes"; then
1598 USE_TEXTUREPACKER_NATIVE=1
1599 if [[ ! -d "$USE_TEXTUREPACKER_NATIVE_ROOT" ]]; then
1600 USE_TEXTUREPACKER_NATIVE_ROOT=
1604 final_message="$final_message\n TexturePacker:No"
1608 if test "$use_mid" = "yes"; then
1609 final_message="$final_message\n MID Support:\tYes"
1610 SDL_DEFINES="$SDL_DEFINES -DMID"
1612 final_message="$final_message\n MID Support:\tNo"
1617 if test "x$use_ccache" != "xno"; then
1618 AC_PATH_PROG(CCACHE,ccache,none)
1619 if test "$ac_cv_path_CCACHE" = "none"; then
1620 if test "x$use_ccache" = "xyes"; then
1621 AC_MSG_ERROR([ccache not found.]);
1623 AC_MSG_NOTICE([ccache not found. Falling back to default CC])
1624 final_message="$final_message\n ccache:\tNo"
1627 CC="$ac_cv_path_CCACHE $CC"
1628 CXX="$ac_cv_path_CCACHE $CXX"
1629 AC_MSG_NOTICE(enabling ccache)
1630 final_message="$final_message\n ccache:\tYes"
1633 final_message="$final_message\n ccache:\tNo"
1636 if test "x$use_pulse" != "xno"; then
1637 XBMC_STANDALONE_SH_PULSE=tools/Linux/xbmc-standalone.sh.pulse
1638 final_message="$final_message\n PulseAudio:\tYes"
1640 XBMC_STANDALONE_SH_PULSE=/dev/null
1641 final_message="$final_message\n PulseAudio:\tNo"
1644 if test "$use_hal" = "yes"; then
1645 final_message="$final_message\n HAL Support:\tYes"
1647 final_message="$final_message\n HAL Support:\tNo"
1651 if test "$use_dvdcss" = "yes"; then
1652 AC_MSG_NOTICE($dvdcss_enabled)
1653 final_message="$final_message\n DVDCSS:\tYes"
1655 SKIP_CONFIG_DVDCSS=0
1656 DVDREAD_CFLAGS="-D_XBMC -DHAVE_DVDCSS_DVDCSS_H"
1658 AC_MSG_NOTICE($dvdcss_disabled)
1659 final_message="$final_message\n DVDCSS:\tNo"
1661 SKIP_CONFIG_DVDCSS=1
1662 DVDREAD_CFLAGS="-D_XBMC -UHAVE_DVDCSS_DVDCSS_H"
1664 if test "$host_vendor" = "apple"; then
1665 DVDREAD_CFLAGS="$DVDREAD_CFLAGS -D__DARWIN__"
1668 if test "$use_avahi" = "yes"; then
1669 final_message="$final_message\n Avahi:\tYes"
1671 final_message="$final_message\n Avahi:\tNo"
1674 if test "$HAVE_GIT" = "yes"; then
1675 GIT_REV=$(git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h %ci" HEAD | awk '{gsub("-", "");print $2"-"$1}')
1677 if test "$GIT_REV" = ""; then
1680 if test "$host_vendor" = "apple"; then
1681 echo "#define GIT_REV \"$GIT_REV\"" > git_revision.h
1683 SDL_DEFINES="$SDL_DEFINES -D'GIT_REV=\"$GIT_REV\"'"
1686 if test "$use_nonfree" = "yes"; then
1687 final_message="$final_message\n Non-free:\tYes"
1689 AC_DEFINE([HAVE_XBMC_NONFREE], [1], [Define to 1 to enable non-free components.])
1692 final_message="$final_message\n Non-free:\tNo"
1695 if test "$use_asap" = "yes"; then
1696 AC_CHECK_PROG(HAVE_GDC,gdc,"yes","no")
1697 if test "$HAVE_GDC" = "no"; then
1698 AC_MSG_ERROR($missing_program);
1700 AC_CHECK_PROG(HAVE_FPC,fpc,"yes","no")
1701 if test "$HAVE_FPC" = "no"; then
1702 AC_MSG_ERROR($missing_program);
1705 AC_DEFINE([USE_ASAP_CODEC], [1], [Define to 1 to enable ASAP codec.])
1706 final_message="$final_message\n ASAP Codec:\tYes"
1709 final_message="$final_message\n ASAP Codec:\tNo"
1712 if test "$use_webserver" = "yes"; then
1713 final_message="$final_message\n Webserver:\tYes"
1715 final_message="$final_message\n Webserver:\tNo"
1718 if test "$use_librtmp" != "no"; then
1719 final_message="$final_message\n libRTMP support:\tYes"
1721 final_message="$final_message\n libRTMP support:\tNo"
1724 if test "x$use_samba" != "xno"; then
1725 final_message="$final_message\n libsmbclient support:\tYes"
1727 final_message="$final_message\n libsmbclient support:\tNo"
1730 if test "$use_libnfs" != "no"; then
1731 final_message="$final_message\n libnfs support:\tYes"
1733 final_message="$final_message\n libnfs support:\tNo"
1736 if test "x$use_libafpclient" != "xno"; then
1737 final_message="$final_message\n libafpclient support:\tYes"
1739 final_message="$final_message\n libafpclient support:\tNo"
1742 if test "$use_airplay" != "no"; then
1743 final_message="$final_message\n AirPlay support:\tYes"
1745 final_message="$final_message\n AirPLay support:\tNo"
1748 if test "x$use_airtunes" != "xno"; then
1749 final_message="$final_message\n AirTunes support:\tYes"
1751 final_message="$final_message\n AirTunes support:\tNo"
1754 if test "$use_optical_drive" = "yes"; then
1755 final_message="$final_message\n Optical drive:\tYes"
1757 final_message="$final_message\n Optical drive:\tNo"
1760 ### External libraries messages
1761 if test "$use_external_ffmpeg" = "yes"; then
1762 final_message="$final_message\n External FFmpeg:\tYes"
1764 final_message="$final_message\n External FFmpeg:\tNo"
1767 OUTPUT_FILES="Makefile \
1769 addons/skin.confluence/media/Makefile \
1771 xbmc/cdrip/Makefile \
1772 xbmc/cores/Makefile \
1773 xbmc/cores/VideoRenderers/Makefile \
1774 xbmc/cores/dvdplayer/Makefile \
1776 lib/libdvd/Makefile \
1777 xbmc/cores/DllLoader/Makefile \
1778 xbmc/cores/dvdplayer/DVDCodecs/Makefile \
1779 xbmc/cores/dvdplayer/DVDCodecs/Audio/Makefile \
1780 xbmc/cores/dvdplayer/DVDCodecs/Overlay/Makefile \
1781 xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile \
1782 xbmc/cores/dvdplayer/DVDDemuxers/Makefile \
1783 xbmc/cores/dvdplayer/DVDSubtitles/Makefile \
1784 xbmc/cores/AudioRenderers/Makefile \
1785 xbmc/cores/paplayer/Makefile \
1786 lib/timidity/Makefile \
1787 lib/xbadpcm/Makefile \
1789 lib/nosefart/Makefile \
1790 lib/libsidplay2/Makefile \
1791 lib/vgmstream/Makefile \
1792 lib/snesapu/SNES/SNESAPU/Makefile \
1793 lib/stsound/StSoundLibrary/Makefile \
1794 xbmc/cores/playercorefactory/Makefile \
1795 xbmc/music/karaoke/Makefile \
1797 xbmc/guilib/Makefile \
1798 xbmc/interfaces/Makefile \
1799 xbmc/network/Makefile \
1800 lib/libRTV/Makefile \
1801 lib/libexif/Makefile \
1802 lib/libXDAAP/Makefile \
1803 lib/cmyth/Makefile \
1804 lib/libhdhomerun/Makefile \
1805 lib/libsquish/Makefile \
1806 lib/libid3tag/Makefile \
1807 lib/cximage-6.0/Makefile \
1808 lib/addons/script.module.pil/Makefile \
1809 xbmc/interfaces/python/Makefile \
1810 xbmc/interfaces/python/xbmcmodule/Makefile \
1811 lib/libUPnP/Makefile \
1812 xbmc/DllPaths_generated.h \
1813 xbmc/linux/Makefile \
1814 xbmc/filesystem/Makefile \
1815 xbmc/screensavers/rsxs-0.9/xbmc/Makefile \
1816 xbmc/visualizations/XBMCProjectM/Makefile \
1817 xbmc/visualizations/Goom/Makefile \
1818 xbmc/visualizations/OpenGLSpectrum/Makefile \
1819 xbmc/visualizations/WaveForm/Makefile \
1820 xbmc/visualizations/iTunes/Makefile \
1821 tools/Linux/xbmc.sh \
1822 tools/Linux/xbmc-standalone.sh \
1823 tools/TexturePacker/Makefile \
1824 tools/EventClients/Clients/OSXRemote/Makefile \
1825 xbmc/peripherals/bus/Makefile \
1826 xbmc/peripherals/devices/Makefile"
1828 # Line below is used so we can use AM_INIT_AUTOMAKE. The corresponding
1829 # .dummy.am does nothing.
1830 AC_CONFIG_FILES([.dummy])
1832 AC_CONFIG_FILES([${OUTPUT_FILES}])
1833 OUTPUT_FILES="$OUTPUT_FILES \
1839 AC_SUBST(SDL_DEFINES)
1840 AC_SUBST(BUILD_DVDCSS)
1841 AC_SUBST(DISABLE_GOOM)
1842 AC_SUBST(DISABLE_RSXS)
1843 AC_SUBST(DISABLE_PROJECTM)
1844 AC_SUBST(USE_EXTERNAL_FFMPEG)
1845 AC_SUBST(PYTHON_VERSION)
1846 AC_SUBST(OUTPUT_FILES)
1847 AC_SUBST(HAVE_XBMC_NONFREE)
1848 AC_SUBST(USE_ASAP_CODEC)
1849 AC_SUBST(LIBCURL_BASENAME)
1850 AC_SUBST(LIBFLAC_BASENAME)
1851 AC_SUBST(LIBVORBISFILE_BASENAME)
1852 AC_SUBST(LIBMODPLUG_BASENAME)
1853 AC_SUBST(LIBMAD_BASENAME)
1854 AC_SUBST(LIBOGG_BASENAME)
1855 AC_SUBST(LIBVORBISENC_BASENAME)
1856 AC_SUBST(LIBVORBIS_BASENAME)
1857 AC_SUBST(LIBASS_BASENAME)
1858 AC_SUBST(LIBMEPG2_BASENAME)
1859 AC_SUBST_FILE(XBMC_STANDALONE_SH_PULSE)
1860 AC_SUBST(USE_OPENGL)
1861 AC_SUBST(USE_OPENGLES)
1864 AC_SUBST(USE_CRYSTALHD)
1865 AC_SUBST(USE_LIBSMBCLIENT)
1866 AC_SUBST(USE_LIBNFS)
1867 AC_SUBST(USE_LIBAFPCLIENT)
1868 AC_SUBST(USE_AIRPLAY)
1870 AC_SUBST(USE_OPENMAX)
1872 AC_SUBST(USE_XRANDR)
1874 AC_SUBST(USE_TEXTUREPACKER)
1875 AC_SUBST(USE_TEXTUREPACKER_NATIVE)
1876 AC_SUBST(USE_TEXTUREPACKER_NATIVE_ROOT)
1877 AC_SUBST(USE_AIRTUNES)
1878 AC_SUBST(USE_LIBUDEV)
1879 AC_SUBST(USE_LIBUSB)
1880 AC_SUBST(USE_LIBCEC)
1882 # pushd and popd are not available in other shells besides bash, so implement
1883 # our own pushd/popd functions
1888 if [[ -d "$dirname" ]] && [[ -x "$dirname" ]]; then
1890 XB_DIRSTACK="$dirname ${XB_DIRSTACK:-$PWD}"
1893 AC_MSG_ERROR(xb_pushd: unable to change to $dirname)
1898 if [[ -n "$XB_DIRSTACK" ]]; then
1899 XB_DIRSTACK="${XB_DIRSTACK#* }"
1900 cd "${XB_DIRSTACK%% *}"
1903 AC_MSG_ERROR(xb_popd: unable to go back to previous directory)
1907 # Function to run the configure scripts in our submodules
1908 # Consists of three paramaters, the path to the submodule, the configure command
1909 # with appropriate arguments, and a third parameter set to 1 if we are to skip
1910 # running the script, anything else if not.
1911 AC_DEFUN([XB_CONFIG_MODULE],[
1912 AC_CONFIG_COMMANDS_POST([
1913 if [[ $3 != "1" ]]; then
1914 if [[ -d $1 ]]; then
1917 if [[ $? -ne 0 ]]; then
1919 AC_MSG_ERROR([[Submodule $1 failed to configure]])
1924 AC_MSG_ERROR([[Submodule $1 does not exist]])
1927 AC_MSG_NOTICE([[Skipping configuration of submodule $1.]])
1932 XB_CONFIG_MODULE([lib/ffmpeg], [
1933 if test "$host_vendor" = "apple" ; then
1935 --extra-cflags="$CFLAGS $FFMPEG_EXTRACFLAGS -w -D_DARWIN_C_SOURCE -Dattribute_deprecated=" \
1936 `if test "$use_arch" != "no"; then echo --enable-cross-compile; fi` \
1937 `if test "$use_arch" != "no"; then echo --arch=$use_arch; fi`\
1938 `if test "$use_cpu" != "no"; then echo --cpu=$use_cpu; fi`\
1939 --target-os=$(tolower $(uname -s)) \
1940 --disable-amd3dnow \
1943 `if test "$use_arch" != "yes"; then echo --enable-neon; fi`\
1945 `if test "$use_debug" = "no"; then echo --disable-debug; fi` \
1947 --enable-muxer=spdif \
1948 --enable-muxer=adts \
1949 --disable-encoders \
1950 --enable-encoder=ac3 \
1951 --enable-encoder=aac \
1952 `if test "$use_ffmpeg_libvorbis" = "yes"; then echo --enable-libvorbis --enable-muxer=ogg --enable-encoder=libvorbis; else echo --disable-libvorbis; fi` \
1956 --disable-ffserver \
1960 --disable-decoder=mpeg_xvmc \
1963 --enable-protocol=http \
1965 --enable-runtime-cpudetect \
1967 sed -i "" -e "s#YASM=yasm#YASM=${prefix}/bin/yasm#" config.mak &&
1968 sed -i "" -e "s#YASMDEP=yasm#YASMDEP=${prefix}/bin/yasm#" config.mak &&
1969 sed -i "" -e "s# -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 # #" config.mak
1970 if test "$use_arch" = "ppc"; then
1971 sed -i "" -e "s/HAVE_GNU_AS 1/HAVE_GNU_AS 0/" config.h
1972 sed -i "" -e "s/^HAVE_GNU_AS=yes/!HAVE_GNU_AS=yes/" config.mak
1976 LDFLAGS="$(echo "$LDFLAGS" | sed "s/-Wl,-Bsymbolic-functions//g")" \
1978 --extra-cflags="$PASSED_CFLAGS $FFMPEG_EXTRACFLAGS" \
1980 `if test "$use_debug" = "no"; then echo --disable-debug; fi` \
1981 `if test "$cross_compiling" = "yes"; then echo --enable-cross-compile; fi` \
1982 `if test "$use_arch" != "no"; then echo --arch=$use_arch; fi`\
1983 `if test "$use_cpu" != "no"; then echo --cpu=$use_cpu; fi`\
1984 --target-os=$(tolower $(uname -s)) \
1986 --enable-muxer=spdif \
1987 --enable-muxer=adts \
1988 --disable-encoders \
1989 --enable-encoder=ac3 \
1990 --enable-encoder=aac \
1991 `if test "$use_ffmpeg_libvorbis" = "yes"; then echo --enable-libvorbis --enable-muxer=ogg --enable-encoder=libvorbis; else echo --disable-libvorbis; fi` \
1992 --disable-decoder=mpeg_xvmc \
1996 --disable-ffserver \
2002 `if test "x$use_vdpau" != "xno"; then echo --enable-vdpau; else echo --disable-vdpau; fi` \
2003 `if test "x$use_vaapi" != "xno"; then echo --enable-vaapi; else echo --disable-vaapi; fi` \
2004 --enable-protocol=http \
2006 --enable-runtime-cpudetect \
2007 --custom-libname-with-major="\$(FULLNAME)-\$(LIBMAJOR)-${ARCH}\$(SLIBSUF)" \
2008 `case $host_cpu in i?86*) echo --disable-pic ;; *) echo --enable-pic ;; esac` \
2010 sed -i -e "s#define HAVE_SYMVER 1#define HAVE_SYMVER 0#" config.h &&
2011 sed -i -e "s#define HAVE_SYMVER_GNU_ASM 1#define HAVE_SYMVER_GNU_ASM 0#" config.h
2013 ], [$USE_EXTERNAL_FFMPEG])
2015 XB_CONFIG_MODULE([lib/libdvd/libdvdcss], [
2020 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2021 --host=$host_alias \
2022 --build=$build_alias \
2023 --target=$target_alias \
2027 ], [$SKIP_CONFIG_DVDCSS])
2029 XB_CONFIG_MODULE([lib/libdvd/libdvdread], [
2031 --extra-cflags="$CFLAGS $DVDREAD_CFLAGS -I`pwd`/../libdvdcss/src" \
2032 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2033 --host=$host_alias \
2034 --build=$build_alias \
2035 --target=$target_alias \
2041 $MAKE dvdread-config &&
2042 mkdir -p `pwd`/../includes/dvdread
2043 cp `pwd`/../libdvdread/src/*.h `pwd`/../includes/dvdread
2046 XB_CONFIG_MODULE([lib/libdvd/libdvdnav], [
2048 --extra-cflags="$CFLAGS $DVDREAD_CFLAGS -I`pwd`/../includes" \
2049 --extra-ldflags="-L`pwd`/../libdvdread/obj" \
2050 --with-dvdread-config="`pwd`/../libdvdread/obj/dvdread-config" \
2051 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2052 --host=$host_alias \
2053 --build=$build_alias \
2054 --target=$target_alias \
2060 XB_CONFIG_MODULE([lib/libid3tag/libid3tag],[
2065 CXXFLAGS="$CXXFLAGS" \
2066 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2067 --host=$host_alias \
2068 --build=$build_alias \
2069 --target=$target_alias \
2074 XB_CONFIG_MODULE([xbmc/visualizations/XBMCProjectM/libprojectM],[
2076 rm -f CMakeCache.txt && CC="$ORIGCC" CXX="$ORIGCXX" cmake \
2077 -DCMAKE_BUILD_TYPE=None -DUSE_FTGL:BOOL=OFF \
2078 -DCMAKE_C_FLAGS:STRING="${CPPFLAGS} ${CFLAGS}" \
2079 -DCMAKE_CXX_FLAGS:STRING="${CPPFLAGS} ${CXXFLAGS}" \
2080 -DCMAKE_INSTALL_PREFIX="${prefix}" \
2081 -DCMAKE_INSTALL_LIBDIR:PATH="${libdir}" \
2082 -DINCLUDE_INSTALL_DIR:PATH="${includedir}" \
2083 -DLIB_INSTALL_DIR:PATH="${libdir}" \
2084 -DSYSCONF_INSTALL_DIR:PATH="${sysconfdir}" \
2085 -DSHARE_INSTALL_PREFIX:PATH="${datadir}" . &&
2086 if test "$host_vendor" = "apple" ; then
2087 # cmake has hardcoded paths to macports which bork our darwin depends cross/ppc, remove them
2088 sed -i "" -e "s|-L/opt/local/lib| |" CMakeFiles/projectM.dir/link.txt
2089 sed -i "" -e "s|-L/opt/local/lib| |" CMakeFiles/projectM.dir/flags.make
2090 sed -i "" -e "s|-I/opt/local/include| |" CMakeFiles/projectM.dir/flags.make
2093 ], [$DISABLE_PROJECTM])
2095 XB_CONFIG_MODULE([xbmc/visualizations/Goom/goom2k4-0],[
2098 CXXFLAGS="$CXXFLAGS" \
2099 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2100 --host=$host_alias \
2101 --build=$build_alias \
2102 --target=$target_alias \
2108 XB_CONFIG_MODULE([xbmc/screensavers/rsxs-0.9/], [
2113 CXXFLAGS="$CXXFLAGS" \
2114 `if test "$host_vendor" = "apple"; then echo --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib; fi` \
2115 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2116 --host=$host_alias \
2117 --build=$build_alias \
2118 --target=$target_alias \
2119 --without-xscreensaver \
2122 --disable-fieldlines \
2126 --disable-hyperspace \
2131 XB_CONFIG_MODULE([lib/libapetag], [
2133 `if test "$host_vendor" = "apple"; then echo --disable-shared; fi` \
2134 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2135 --host=$host_alias \
2136 --build=$build_alias \
2137 --target=$target_alias CFLAGS="$CFLAGS" CC="$CC" CXX="$CXX"
2140 XB_CONFIG_MODULE([lib/cpluff], [
2141 ./configure --disable-nls \
2142 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2143 --host=$host_alias \
2144 --build=$build_alias \
2145 --target=$target_alias CFLAGS="$CFLAGS" CC="$CC" CXX="$CXX"
2146 #LDFLAGS="$LDFLAGS -Wl,-read_only_relocs,suppress"
2151 final_message="$final_message\n prefix:\t$prefix\n$dashes"
2152 echo -e "$final_message\n"