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 client support disabled. =="
111 libnfs_disabled="== NFS support disabled. =="
112 libafpclient_not_found="== Could not find libafpclient. AFP client 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_enabled="== libCEC enabled. =="
127 libcec_disabled="== libCEC disabled. CEC adapter support will not be available. =="
128 libcec_internal="== Using internal libCEC. =="
129 libcec_external_missing="== libCEC was not found on your system. =="
131 # External library message strings
132 external_libraries_enabled="== Use of all supported external libraries enabled. =="
133 external_libraries_disabled="== Use of all supported external libraries disabled. =="
134 external_ffmpeg_enabled="== Use of external ffmpeg enabled. =="
135 external_ffmpeg_disabled="== Use of external ffmpeg disabled. =="
136 ffmpeg_vdpau_not_supported="== External ffmpeg doesn't support VDPAU. VDPAU support disabled. =="
137 dashes="------------------------"
138 final_message="\n XBMC Configuration:"
139 final_message="\n$dashes$final_message\n$dashes"
142 AC_ARG_ENABLE([debug],
143 [AS_HELP_STRING([--enable-debug],
144 [enable debugging information (default is yes)])],
145 [use_debug=$enableval],
149 [AS_HELP_STRING([--with-arch],
150 [build with given arch passing to internal ffmpeg (default is no, needed for crosscompiling)])],
155 [AS_HELP_STRING([--with-cpu],
156 [build with given cpu passing to ffmpeg (default is no)])],
160 AC_ARG_ENABLE([optimizations],
161 [AS_HELP_STRING([--enable-optimizations],
162 [enable optimization (default is yes)])],
163 [use_optimizations=$enableval],
164 [use_optimizations=yes])
167 [AS_HELP_STRING([--enable-gl],
168 [enable OpenGL rendering (default is yes)])],
172 AC_ARG_ENABLE([gles],
173 [AS_HELP_STRING([--enable-gles],
174 [enable OpenGLES rendering (default is no)])],
175 [use_gles=$enableval],
179 [AS_HELP_STRING([--enable-sdl],
180 [enable SDL (default is auto)])],
181 [use_sdl=$enableval],
184 AC_ARG_ENABLE([vdpau],
185 [AS_HELP_STRING([--enable-vdpau],
186 [enable VDPAU decoding (default is auto)])],
187 [use_vdpau=$enableval],
190 AC_ARG_ENABLE([vaapi],
191 [AS_HELP_STRING([--enable-vaapi],
192 [enable VAAPI decoding (default is auto)])],
193 [use_vaapi=$enableval],
196 AC_ARG_ENABLE([crystalhd],
197 [AS_HELP_STRING([--enable-crystalhd],
198 [enable CrystalHD decoding (default is auto)])],
199 [use_crystalhd=$enableval],
200 [use_crystalhd=auto])
202 AC_ARG_ENABLE([vdadecoder],
203 [AS_HELP_STRING([--enable-vdadecoder],
204 [enable VDADecoder decoding (default is auto)])],
205 [use_vdadecoder=$enableval],
206 [use_vdadecoder=auto])
208 AC_ARG_ENABLE([vtbdecoder],
209 [AS_HELP_STRING([--enable-vtbdecoder],
210 [enable VTBDecoder decoding (default is auto)])],
211 [use_vtbdecoder=$enableval],
212 [use_vtbdecoder=auto])
214 AC_ARG_ENABLE([openmax],
215 [AS_HELP_STRING([--enable-openmax],
216 [enable OpenMax decoding (default is auto, requires OpenGLES)])],
217 [use_openmax=$enableval],
220 AC_ARG_ENABLE([tegra],
221 [AS_HELP_STRING([--enable-tegra],
222 [enable Tegra2 arm (default is no)])],
223 [use_tegra=$enableval],
226 AC_ARG_ENABLE([profiling],
227 [AS_HELP_STRING([--enable-profiling],
228 [enable gprof profiling (default is no)])],
229 [use_profiling=$enableval],
232 AC_ARG_ENABLE([joystick],
233 [AS_HELP_STRING([--enable-joystick],
234 [enable SDL joystick support (default is yes)])],
235 [use_joystick=$enableval],
238 AC_ARG_ENABLE([xrandr],
239 [AS_HELP_STRING([--enable-xrandr],
240 [enable XRandR support (default is yes)])],
241 [use_xrandr=$enableval],
244 AC_ARG_ENABLE([goom],
245 [AS_HELP_STRING([--enable-goom],
246 [enable GOOM visualisation (default is no)])],
247 [use_goom=$enableval],
250 AC_ARG_ENABLE([rsxs],
251 [AS_HELP_STRING([--enable-rsxs],
252 [enable really slick X screensavers (default is yes)])],
253 [use_rsxs=$enableval],
256 AC_ARG_ENABLE([projectm],
257 [AS_HELP_STRING([--enable-projectm],
258 [enable ProjectM visualisation (default is yes)])],
259 [use_projectm=$enableval],
263 [AS_HELP_STRING([--enable-x11],
264 [enable x11 (default is yes) 'Linux Only'])],
265 [use_x11=$enableval],
268 AC_ARG_ENABLE([ccache],
269 [AS_HELP_STRING([--enable-ccache],
270 [enable building with ccache feature (default is auto)])],
271 [use_ccache=$enableval],
274 AC_ARG_ENABLE([pulse],
275 [AS_HELP_STRING([--enable-pulse],
276 [enable PulseAudio support (default is auto)])],
277 [use_pulse=$enableval],
280 AC_ARG_ENABLE([rtmp],
281 [AS_HELP_STRING([--enable-rtmp],
282 [enable RTMP support via librtmp (default is auto)])],
283 [use_librtmp=$enableval],
286 AC_ARG_ENABLE([samba],
287 [AS_HELP_STRING([--disable-samba],
288 [disable SAMBA support (default is enabled)])],
289 [use_samba=$enableval],
293 [AS_HELP_STRING([--enable-nfs],
294 [enable NFS support via libnfs (default is auto)])],
295 [use_libnfs=$enableval],
298 AC_ARG_ENABLE([afpclient],
299 [AS_HELP_STRING([--enable-afpclient],
300 [enable AFP support via libafpclient (default is auto)])],
301 [use_libafpclient=$enableval],
302 [use_libafpclient=auto])
304 AC_ARG_ENABLE([airplay],
305 [AS_HELP_STRING([--enable-airplay],
306 [enable AirPlay support(default is auto)])],
307 [use_airplay=$enableval],
310 AC_ARG_ENABLE([airtunes],
311 [AS_HELP_STRING([--enable-airtunes],
312 [enable AirTunes support(default is auto)])],
313 [use_airtunes=$enableval],
316 AC_ARG_ENABLE([ffmpeg_libvorbis],
317 [AS_HELP_STRING([--enable-ffmpeg-libvorbis],
318 [enable FFmpeg vorbis encoding (default is no)])],
319 [use_ffmpeg_libvorbis=$enableval],
320 [use_ffmpeg_libvorbis=no])
322 AC_ARG_ENABLE([dvdcss],
323 [AS_HELP_STRING([--enable-dvdcss],
324 [enable DVDCSS support (default is yes)])],
325 [use_dvdcss=$enableval],
329 [AS_HELP_STRING([--enable-mid],
330 [enable MID support (default is no)])],
331 [use_mid=$enableval],
335 [AS_HELP_STRING([--disable-hal],
336 [disable HAL support (default is enabled if hal and hal-storage is found)])],
337 [use_hal=$enableval],
340 AC_ARG_ENABLE([avahi],
341 [AS_HELP_STRING([--disable-avahi],
342 [disable Avahi support (default is enabled if libavahi-common and libavahi-client is found)])],
343 [use_avahi=$enableval],
346 AC_ARG_ENABLE([non-free],
347 [AS_HELP_STRING([--disable-non-free],
348 [disable componentents with non-compliant licenses])],
349 [use_nonfree=$enableval],
352 AC_ARG_ENABLE([asap-codec],
353 [AS_HELP_STRING([--enable-asap-codec],
354 [enable ASAP ADPCM support])],
355 [use_asap=$enableval],
358 AC_ARG_ENABLE([webserver],
359 [AS_HELP_STRING([--disable-webserver],
360 [disable webserver])],
361 [use_webserver=$enableval],
364 AC_ARG_ENABLE([optical-drive],
365 [AS_HELP_STRING([--disable-optical-drive],
366 [disable optical drive])],
367 [use_optical_drive=$enableval],
368 [use_optical_drive=yes])
370 AC_ARG_ENABLE([libbluray],
371 [AS_HELP_STRING([--enable-libbluray],
372 [enable libbluray support])],
373 [use_libbluray=$enableval],
374 [use_libbluray=auto])
376 AC_ARG_ENABLE([texturepacker],
377 [AS_HELP_STRING([--enable-texturepacker],
378 [enable texturepacker support (default is yes)])],
379 [use_texturepacker=$enableval],
380 [use_texturepacker=auto])
382 AC_ARG_WITH([lirc-device],
383 [AS_HELP_STRING([--with-lirc-device=file],
384 [specify the default LIRC device (default is /dev/lircd)])],
385 [lirc_device=$withval],
386 [lirc_device=/dev/lircd])
387 AC_DEFINE_UNQUOTED([LIRC_DEVICE], ["$lirc_device"], [Default LIRC device])
389 AC_ARG_ENABLE([udev],
390 [AS_HELP_STRING([--enable-udev],
391 [enable udev support (default is auto)])],
392 [use_libudev=$enableval],
395 AC_ARG_ENABLE([libusb],
396 [AS_HELP_STRING([--enable-libusb],
397 [enable libusb support (default is auto)])],
398 [use_libusb=$enableval],
401 AC_ARG_ENABLE([libcec],
402 [AS_HELP_STRING([--enable-libcec],
403 [enable libcec support (default is no)])],
404 [use_libcec=$enableval],
407 ### External libraries options
408 AC_ARG_ENABLE([external-libraries],
409 [AS_HELP_STRING([--enable-external-libraries],
410 [enable use of all supported external libraries (default is no) 'Linux only'])],
411 [use_external_libraries=$enableval],
412 [use_external_libraries=no])
414 AC_ARG_ENABLE([external-libcec],
415 [AS_HELP_STRING([--enable-external-libcec],
416 [external libcec support (default is no) 'Linux only'])],
417 [use_external_libcec=$enableval],
418 [use_external_libcec=no])
420 AC_ARG_ENABLE([external-ffmpeg],
421 [AS_HELP_STRING([--enable-external-ffmpeg],
422 [enable use of external ffmpeg libraries (default is no) 'Linux only'])],
423 [use_external_ffmpeg=$enableval],
424 [use_external_ffmpeg=$use_external_libraries])
426 ### End of external library options
428 if test "x$host_vendor" != "xapple"; then
429 DEFAULT_COMPILE_FLAGS="-fPIC -DPIC -D_REENTRANT"
430 DEFAULT_COMPILE_FLAGS="$DEFAULT_COMPILE_FLAGS -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
433 # Checks for programs.
434 PASSED_CXXFLAGS=$CXXFLAGS # Hack to override autoconf default values
436 CXXFLAGS="$PASSED_CXXFLAGS $DEFAULT_COMPILE_FLAGS"
437 PASSED_CFLAGS=$CFLAGS # Hack to override autoconf default values
440 CFLAGS="$PASSED_CFLAGS $DEFAULT_COMPILE_FLAGS"
446 # host detection and setup
450 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
454 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
465 check_sdl_arch=[`file /opt/local/lib/libSDL_image.dylib | awk '{V=7; print $V}'`]
466 if test "x$check_sdl_arch" = "xi386"; then
467 use_texturepacker_native=yes
468 USE_TEXTUREPACKER_NATIVE_ROOT="/opt/local"
474 AC_SUBST(ARCH_DEFINES, "-D_ARMEL")
476 PYTHON_LDFLAGS="-L${prefix}/lib -lpython2.6"
477 PYTHON_CPPFLAGS="-I${prefix}/include/python2.6"
478 PYTHON_SITE_PKG="${prefix}/lib/python2.6/site-packages"
479 PYTHON_NOVERSIONCHECK="no-check"
480 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_IOS -D_LINUX")
485 use_texturepacker_native=yes
486 USE_TEXTUREPACKER_NATIVE_ROOT="$prefix"
488 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX")
490 powerpc-apple-darwin*)
497 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX")
499 powerpc-*-linux-gnu*)
501 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC")
503 powerpc64-*-linux-gnu*)
504 ARCH="powerpc64-linux"
505 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC64")
511 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_ARMEL")
514 AC_MSG_ERROR(unsupported host ($host))
518 # platform debug flags
519 if test "$use_debug" = "yes"; then
520 final_message="$final_message\n Debugging:\tYes"
521 if test "$use_profiling" = "yes"; then
522 final_message="$final_message\n Profiling:\tYes"
523 DEBUG_FLAGS="-g -pg -D_DEBUG -Wall"
525 final_message="$final_message\n Profiling:\tNo"
526 DEBUG_FLAGS="-g -D_DEBUG -Wall"
529 final_message="$final_message\n Debugging:\tNo"
530 if test "$use_profiling" = "yes"; then
531 final_message="$final_message\n Profiling:\tYes"
532 DEBUG_FLAGS="-pg -DNDEBUG=1"
534 final_message="$final_message\n Profiling:\tNo"
535 DEBUG_FLAGS="-DNDEBUG=1"
538 CFLAGS="$CFLAGS $DEBUG_FLAGS"
539 CXXFLAGS="$CXXFLAGS $DEBUG_FLAGS"
542 if test "$use_optimizations" = "yes"; then
543 final_message="$final_message\n Optimization:\tYes"
544 CXXFLAGS="$CXXFLAGS -O2"
547 final_message="$final_message\n Optimization:\tNo"
551 # platform specific flags
552 if test "$host_vendor" = "apple" ; then
553 # standard xbmc paths
554 INCLUDES="$INCLUDES -I\$(abs_top_srcdir)/xbmc/osx"
555 if test "$use_arch" != "arm"; then
556 LIBS="$LIBS -framework IOKit"
557 LIBS="$LIBS -framework Cocoa"
558 LIBS="$LIBS -framework AppKit"
559 LIBS="$LIBS -framework Carbon"
560 LIBS="$LIBS -framework CoreAudio"
561 LIBS="$LIBS -framework QuickTime"
562 LIBS="$LIBS -framework AudioUnit"
563 LIBS="$LIBS -framework Foundation"
564 LIBS="$LIBS -framework CoreServices"
565 LIBS="$LIBS -framework CoreVideo"
566 LIBS="$LIBS -framework CoreAudio"
567 LIBS="$LIBS -framework AudioToolbox"
568 LIBS="$LIBS -framework CoreFoundation"
569 LIBS="$LIBS -framework DiskArbitration"
570 LIBS="$LIBS -framework ApplicationServices"
572 elif test "$use_arch" = "arm"; then
573 CFLAGS="$CFLAGS -mfloat-abi=softfp -mno-apcs-stack-check"
574 CXXFLAGS="$CXXFLAGS -mfloat-abi=softfp -mno-apcs-stack-check"
575 FFMPEG_EXTRACFLAGS="-mfloat-abi=softfp"
576 if test "$use_tegra" = "yes"; then
577 # Compile for ARMv7a architecture, need to test gcc for vfpv3-d16 support
578 SAVE_CFLAGS="$CFLAGS"
579 CFLAGS="-mfpu=vfpv3-d16"
581 [AC_LANG_SOURCE([int foo;])],
582 [ CFLAGS="$SAVE_CFLAGS -Wno-psabi -Wa,-march=armv7a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mthumb-interwork"
583 CXXFLAGS="$CXXFLAGS -Wno-psabi -Wa,-march=armv7a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mthumb-interwork"
584 FFMPEG_EXTRACFLAGS+=" -mtune=cortex-a9 -mfpu=vfpv3-d16"
586 [ CFLAGS="$SAVE_CFLAGS -Wa,-march=armv6 -mtune=cortex-a8 -mthumb-interwork"
587 CXXFLAGS="$CXXFLAGS -Wa,-march=armv6 -mtune=cortex-a8 -mthumb-interwork"
590 # Compile for ARMv7a architecture, CortexA8 cpu and NEON coprocessor
591 CFLAGS+=" -Wa,-march=armv7a -mcpu=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad"
592 CXXFLAGS+=" -Wa,-march=armv7a -mcpu=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad"
593 FFMPEG_EXTRACFLAGS+=" -mfpu=neon"
597 # Checks for library functions.
600 AC_FUNC_CLOSEDIR_VOID
601 AC_FUNC_ERROR_AT_LINE
603 AC_PROG_GCC_TRADITIONAL
605 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
609 # Boxee is apparently having compile problems
610 # if HAVE_REALLOC is defined. Sort this later.
612 AC_FUNC_SELECT_ARGTYPES
613 AC_FUNC_SETVBUF_REVERSED
621 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])
623 # Check for various sizes
624 AC_CHECK_SIZEOF([int])
625 AC_CHECK_SIZEOF([size_t])
627 # Add top source directory for all builds so we can use config.h
628 INCLUDES="$INCLUDES -I\$(abs_top_srcdir)"
630 # Check inotify availability
631 AC_CHECK_HEADER([sys/inotify.h], AC_DEFINE([HAVE_INOTIFY],[1],[Define if we have inotify]),)
633 # Checks for boost headers using CXX instead of CC
635 AC_CHECK_HEADER([boost/shared_ptr.hpp],, AC_MSG_ERROR($missing_library))
638 # Checks for platforms libraries.
639 if test "$use_gles" = "yes"; then
641 # GLES overwrites GL if both set to yes.
642 if test "$host_vendor" = "apple" ; then
643 AC_DEFINE([HAVE_LIBEGL],[1],["Define to 1 if you have the `EGL' library (-lEGL)."])
644 AC_DEFINE([HAVE_LIBGLESV2],[1],["Define to 1 if you have the `GLESv2' library (-lGLESv2)."])
645 AC_MSG_RESULT(== WARNING: OpenGLES support is assumed.)
647 AC_CHECK_LIB([EGL], [main],, AC_MSG_ERROR($missing_library))
648 AC_CHECK_LIB([GLESv2],[main],, AC_MSG_ERROR($missing_library))
651 if test "$use_gl" = "yes"; then
652 if test "$host_vendor" = "apple" ; then
653 # linking to OpenGL.framework instead of libGL, libGLU so AC_CHECK_LIB will fail
654 LIBS="$LIBS -framework OpenGL"
655 AC_DEFINE([HAVE_LIBGL],[1],["Define to 1 if you have the `GL' library (-lGL)."])
656 AC_MSG_RESULT(== WARNING: OpenGL support is assumed.)
657 AC_DEFINE([HAVE_LIBGLU],[1],["Define to 1 if you have the `GLU' library (-lGLU)."])
658 AC_MSG_RESULT(== WARNING: OpenGLU support is assumed.)
659 AC_CHECK_LIB([GLEW],[main],, AC_MSG_ERROR($missing_library))
661 AC_CHECK_LIB([GL], [main],, AC_MSG_ERROR($missing_library))
662 AC_CHECK_LIB([GLEW],[main],, AC_MSG_ERROR($missing_library))
663 AC_CHECK_LIB([GLU], [main],, AC_MSG_ERROR($missing_library))
666 AC_MSG_RESULT(== WARNING: OpenGL support is disabled. XBMC will run VERY slow. ==)
667 AC_CHECK_LIB([SDL_gfx],[main])
671 # platform common libraries
672 AC_CHECK_PROG(MYSQL_CONFIG, mysql_config, "yes", "no")
673 if test $MYSQL_CONFIG = "yes"; then
674 INCLUDES="$INCLUDES `mysql_config --include`"
675 MYSQL_LIBS=`mysql_config --libs`
676 LIBS="$LIBS $MYSQL_LIBS"
679 AC_MSG_ERROR($missing_program)
681 AC_CHECK_HEADER([ass/ass.h],, AC_MSG_ERROR($missing_library))
682 AC_CHECK_HEADER([mpeg2dec/mpeg2.h],, AC_MSG_ERROR($missing_library))
683 AC_CHECK_HEADER([mpeg2dec/mpeg2convert.h],, AC_MSG_ERROR($missing_library),
684 AC_INCLUDES_DEFAULT()
685 [#include <mpeg2dec/mpeg2.h>])
686 AC_CHECK_HEADER([mad.h],, AC_MSG_ERROR($missing_library))
687 AC_CHECK_HEADER([jpeglib.h],, AC_MSG_ERROR($missing_library))
688 AC_CHECK_HEADER([samplerate.h],, AC_MSG_ERROR($missing_library))
689 AC_CHECK_HEADER([ogg/ogg.h],, AC_MSG_ERROR($missing_library))
690 AC_CHECK_HEADER([vorbis/vorbisfile.h],, AC_MSG_ERROR($missing_library))
691 AC_CHECK_HEADER([vorbis/vorbisenc.h],, AC_MSG_ERROR($missing_library))
692 AC_CHECK_HEADER([libmodplug/modplug.h],, AC_MSG_ERROR($missing_library))
693 AC_CHECK_HEADER([curl/curl.h],, AC_MSG_ERROR($missing_library))
694 AC_CHECK_HEADER([FLAC/stream_decoder.h],, AC_MSG_ERROR($missing_library))
695 AC_CHECK_LIB([bz2], [main],, AC_MSG_ERROR($missing_library))
696 AC_CHECK_LIB([jpeg], [main],, AC_MSG_ERROR($missing_library)) # check for cximage
697 AC_CHECK_LIB([tiff], [main],, AC_MSG_ERROR($missing_library))
698 AC_CHECK_LIB([pthread], [main],, AC_MSG_ERROR($missing_library))
699 AC_CHECK_LIB([lzo2], [main],, AC_MSG_ERROR($missing_library))
700 AC_CHECK_LIB([z], [main],, AC_MSG_ERROR($missing_library))
701 AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR($missing_library))
702 AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR($missing_library))
703 AC_CHECK_LIB([mysqlclient], [main],, AC_MSG_ERROR($missing_library))
704 AC_CHECK_LIB([ssh], [sftp_tell64],, AC_MSG_RESULT([Could not find suitable version of libssh]))
705 AC_CHECK_LIB([bluetooth], [hci_devid],, AC_MSG_RESULT([Could not find suitable version of libbluetooth]))
706 AC_CHECK_LIB([yajl], [main],, AC_MSG_ERROR($missing_library))
708 PKG_CHECK_MODULES([FONTCONFIG], [fontconfig],
709 [INCLUDES="$INCLUDES $FONTCONFIG_CFLAGS"; LIBS="$LIBS $FONTCONFIG_LIBS"],
710 AC_MSG_ERROR($missing_library))
711 PKG_CHECK_MODULES([FRIBIDI], [fribidi],
712 [INCLUDES="$INCLUDES $FRIBIDI_CFLAGS"; LIBS="$LIBS $FRIBIDI_LIBS"],
713 AC_MSG_ERROR($missing_library))
714 PKG_CHECK_MODULES([SQLITE3], [sqlite3],
715 [INCLUDES="$INCLUDES $SQLITE3_CFLAGS"; LIBS="$LIBS $SQLITE3_LIBS"],
716 AC_MSG_ERROR($missing_library))
717 PKG_CHECK_MODULES([PNG], [libpng],
718 [INCLUDES="$INCLUDES $PNG_CFLAGS"; LIBS="$LIBS $PNG_LIBS"],
719 AC_MSG_ERROR($missing_library))
720 PKG_CHECK_MODULES([PCRE], [libpcre],
721 [INCLUDES="$INCLUDES $PCRE_CFLAGS"; LIBS="$LIBS $PCRE_LIBS"]; \
722 AC_DEFINE([HAVE_LIBPCRE],[1],["Define to 1 if libpcre is installed"]),
723 AC_MSG_ERROR($missing_library))
724 PKG_CHECK_MODULES([PCRECPP], [libpcrecpp],
725 [INCLUDES="$INCLUDES $PCRECPP_CFLAGS"; LIBS="$LIBS $PCRECPP_LIBS"]; \
726 AC_DEFINE([HAVE_LIBPCRECPP],[1],["Define to 1 if libpcrecpp is installed"]),
727 AC_MSG_ERROR($missing_library))
728 PKG_CHECK_MODULES([CDIO], [libcdio],
729 [INCLUDES="$INCLUDES $CDIO_CFLAGS"; LIBS="$LIBS $CDIO_LIBS"],
730 AC_MSG_ERROR($missing_library))
731 PKG_CHECK_MODULES([SAMPLERATE], [samplerate],
732 [INCLUDES="$INCLUDES $SAMPLERATE_CFLAGS"; LIBS="$LIBS $SAMPLERATE_LIBS"],
733 AC_MSG_ERROR($missing_library))
734 PKG_CHECK_MODULES([FREETYPE2], [freetype2],
735 [INCLUDES="$INCLUDES $FREETYPE2_CFLAGS"; LIBS="$LIBS $FREETYPE2_LIBS"],
736 AC_MSG_ERROR($missing_library))
738 # check for libbluray
739 AS_CASE([x$use_libbluray],
741 PKG_CHECK_MODULES([LIBBLURAY],[libbluray],[use_libbluray="yes"], AC_MSG_ERROR($missing_library))
744 PKG_CHECK_MODULES([LIBBLURAY],[libbluray],[use_libbluray="yes"], [use_libbluray="no"])
747 AS_CASE([x$use_libbluray],
749 INCLUDES="$INCLUDES $LIBBLURAY_CFLAGS";
750 XB_FIND_SONAME([BLURAY], [bluray], [use_libbluray])
751 AC_DEFINE([HAVE_LIBBLURAY], 1, [System has libbluray library])
752 AC_SUBST([HAVE_LIBBLURAY], 1)
758 , AC_MSG_CHECKING([libbluray version])
761 [#include <libbluray/bluray.h>]
762 ,[bd_get_playlist_info(0, 0)])
763 ,[AC_MSG_RESULT(version has old angle api)
764 AC_DEFINE([HAVE_LIBBLURAY_NOANGLE],[],[System has an old api libbluray without angle support])]
765 ,[AC_MSG_RESULT(normal)]
768 AC_MSG_CHECKING([for libbluray log control])
771 [#include <libbluray/bluray.h>
772 #include <libbluray/log_control.h>]
773 ,[bd_set_debug_mask(0)])
776 AC_DEFINE([HAVE_LIBBLURAY_NOLOGCONTROL],[],[System has an old api libbluray without log support])]
780 # AC_DEFINE([HAVE_LIBBLURAY], 0, [System has libbluray library])
781 AC_SUBST([HAVE_LIBBLURAY], 0)
785 # platform dependent libraries
786 if test "$host_vendor" = "apple" ; then
787 AC_CHECK_LIB([iconv], [main],, AC_MSG_ERROR($missing_library))
788 if test "$use_arch" != "arm"; then
789 AC_CHECK_LIB([SDL_mixer],[main],, AC_MSG_ERROR($missing_library))
790 AC_CHECK_LIB([SDL], [main],, AC_MSG_ERROR($missing_library))
791 AC_DEFINE([HAVE_SDL],[1],["Define to 1 if using sdl"])
794 AC_CHECK_LIB([dl], [main],, AC_MSG_ERROR($missing_library))
795 AC_CHECK_LIB([resolv], [main],, AC_MSG_ERROR($missing_library))
796 AC_CHECK_LIB([jasper], [main],, AC_MSG_ERROR($missing_library)) # check for cximage
797 AC_CHECK_LIB([rt], [clock_gettime],, AC_MSG_ERROR($missing_library))
799 PKG_CHECK_MODULES([ALSA], [alsa],
800 [INCLUDES="$INCLUDES $ALSA_CFLAGS"; LIBS="$LIBS $ALSA_LIBS"; use_alsa=yes],
801 AC_MSG_NOTICE($alsa_not_found); use_alsa=no)
802 PKG_CHECK_MODULES([DBUS], [dbus-1],
803 [INCLUDES="$INCLUDES $DBUS_CFLAGS"; LIBS="$LIBS $DBUS_LIBS"; use_dbus=yes]; \
804 AC_DEFINE([HAVE_DBUS],[1],["Define to 1 if dbus is installed"]),
805 AC_MSG_NOTICE($missing_library); use_dbus=no)
807 if test "x$use_sdl" != "xno"; then
808 PKG_CHECK_MODULES([SDL], [sdl],
809 [INCLUDES="$INCLUDES $SDL_CFLAGS"; LIBS="$LIBS $SDL_LIBS"],
810 AC_MSG_ERROR($missing_library))
811 AC_CHECK_LIB([SDL_mixer], [main],, AC_MSG_ERROR($missing_library))
812 AC_CHECK_LIB([SDL_image], [main],, AC_MSG_ERROR($missing_library))
813 AC_DEFINE([HAVE_SDL],[1],["Define to 1 if using sdl"])
817 XB_FIND_SONAME([MAD], [mad])
818 XB_FIND_SONAME([OGG], [ogg])
819 XB_FIND_SONAME([CURL], [curl])
820 XB_FIND_SONAME([FLAC], [FLAC])
821 XB_FIND_SONAME([VORBIS], [vorbis])
822 XB_FIND_SONAME([VORBISENC], [vorbisenc])
823 XB_FIND_SONAME([VORBISFILE], [vorbisfile])
824 XB_FIND_SONAME([MODPLUG], [modplug])
825 XB_FIND_SONAME([ASS], [ass])
826 XB_FIND_SONAME([MPEG2], [mpeg2])
829 if test "$use_webserver" = "yes"; then
830 AC_CHECK_LIB([microhttpd], [main],, AC_MSG_ERROR($missing_library))
834 if test "$use_optical_drive" = "yes"; then
835 AC_DEFINE([HAS_DVD_DRIVE], [1], [Define to 1 to have optical drive support])
839 if test "x$use_pulse" != "xno"; then
840 if test "$host_vendor" = "apple" ; then
841 if test "x$use_pulse" = "xyes"; then
842 AC_MSG_ERROR($pulse_disabled)
845 AC_MSG_RESULT($pulse_disabled)
849 AC_CHECK_LIB([pulse], [main],,
850 [if test "x$use_pulse" = "xyes"; then
851 AC_MSG_ERROR($pulse_not_found)
855 AC_MSG_RESULT($pulse_not_found)
860 AC_MSG_RESULT($pulse_disabled)
865 if test "$host_vendor" = "apple" ; then
867 AC_MSG_RESULT($hal_disabled)
869 if test "$use_hal" = "yes"; then
870 PKG_CHECK_MODULES([HAL], [hal],
871 [INCLUDES="$INCLUDES $HAL_CFLAGS"; LIBS="$LIBS $HAL_LIBS"],
872 use_hal=no;AC_MSG_RESULT($hal_not_found))
873 PKG_CHECK_MODULES([HAL_STORAGE], [hal-storage],
874 [INCLUDES="$INCLUDES $HAL_STORAGE_CFLAGS"; LIBS="$LIBS $HAL_STORAGE_LIBS"],
875 use_hal=no;AC_MSG_RESULT($halstorage_not_found))
877 AC_MSG_RESULT($hal_disabled)
879 if test "$use_hal" = "yes"; then
880 AC_DEFINE([HAS_HAL], [1], [Define to 1 if you have HAL installed])
885 if test "$host_vendor" = "apple" ; then
887 AC_MSG_RESULT($avahi_disabled)
889 if test "$use_avahi" = "yes"; then
890 AC_CHECK_LIB([avahi-common], [main],,
891 use_avahi=no;AC_MSG_RESULT($avahi_not_found))
892 if test "$use_avahi" = "yes"; then
893 #either both libs or none
894 AC_CHECK_LIB([avahi-client], [main],,
895 use_avahi=no;AC_MSG_RESULT($avahi_not_found))
898 AC_MSG_RESULT($avahi_disabled)
903 if test "$use_x11" = "yes" && test "$host_vendor" != "apple"; then
904 AC_MSG_NOTICE($x11_enabled)
905 PKG_CHECK_MODULES([X11], [x11],
906 [INCLUDES="$INCLUDES $X11_CFLAGS"; LIBS="$LIBS $X11_LIBS"],
907 AC_MSG_ERROR($missing_library))
908 PKG_CHECK_MODULES([XEXT], [xext],
909 [INCLUDES="$INCLUDES $XEXT_CFLAGS"; LIBS="$LIBS $XEXT_LIBS"],
910 AC_MSG_ERROR($missing_library))
911 AC_DEFINE([HAVE_X11], [1], [Define to 1 if you have X11 libs installed.])
913 AC_MSG_RESULT($x11_disabled)
917 if test "$host_vendor" = "apple" || test "$use_x11" = "no"; then
919 AC_MSG_RESULT($xrandr_disabled)
921 if test "$use_xrandr" = "yes" ; then
922 AC_CHECK_LIB([Xrandr], [main],,
923 use_xrandr="no";AC_MSG_RESULT($xrandr_not_found))
925 AC_MSG_RESULT($xrandr_disabled)
930 if test "$host_vendor" = "apple" ; then
931 AC_MSG_NOTICE($goom_disabled)
934 if test "$use_goom" = "yes" && test "$use_gl" = "yes"; then
935 AC_MSG_NOTICE($goom_enabled)
938 AC_MSG_NOTICE($goom_disabled)
944 if test "$use_rsxs" = "no" || test "$use_gl" = "no"; then
945 AC_MSG_NOTICE($rsxs_disabled)
948 AC_MSG_NOTICE($rsxs_enabled)
950 # darwin osx can do rsxs but does not use x11, so do not pkg-config check for them
951 if test "$host_vendor" != "apple" ; then
952 PKG_CHECK_MODULES([XT], [xt],
953 [INCLUDES="$INCLUDES $XT_CFLAGS"; LIBS="$LIBS $XT_LIBS"],
954 AC_MSG_ERROR($missing_library))
955 PKG_CHECK_MODULES([XMU], [xmu],
956 [INCLUDES="$INCLUDES $XMU_CFLAGS"; LIBS="$LIBS $XMU_LIBS"],
957 AC_MSG_ERROR($missing_library))
962 if test "$use_projectm" = "no" || test "$use_gl" = "no"; then
963 AC_MSG_NOTICE($projectm_disabled)
966 AC_MSG_NOTICE($projectm_enabled)
972 if [[ -f "addons/skin.touched/addon.xml" ]]; then
975 AC_DEFINE([HAS_SKIN_TOUCHED], [1], [Whether to build skin touched.])
982 if test "$use_librtmp" != "no"; then
983 AC_CHECK_HEADERS([librtmp/log.h librtmp/amf.h librtmp/rtmp.h],,
984 [if test "$use_librtmp" = "yes"; then
985 AC_MSG_ERROR($librtmp_not_found)
986 elif test "$use_librtmp" != "no"; then
987 AC_MSG_NOTICE($librtmp_not_found)
991 if test "$use_librtmp" != "no"; then
992 XB_FIND_SONAME([RTMP], [rtmp], [use_librtmp])
994 if test "$use_librtmp" != "no"; then
995 AC_DEFINE([HAS_LIBRTMP], [1], [Whether to use libRTMP library.])
998 AC_MSG_NOTICE($librtmp_disabled)
1002 if test "x$use_samba" != "xno"; then
1003 AC_CHECK_LIB([smbclient], [main],,
1004 use_samba=no;AC_MSG_ERROR($missing_library))
1007 AC_MSG_RESULT($samba_disabled)
1011 if test "x$use_samba" != "xno"; then
1012 AC_DEFINE([HAVE_LIBSMBCLIENT], [1], [Define to 1 if you have Samba installed])
1017 if test "$use_libnfs" != "no"; then
1018 AC_CHECK_HEADERS([nfsc/libnfs.h],,
1019 [if test "$use_libnfs" = "yes"; then
1020 AC_MSG_ERROR($libnfs_not_found)
1022 elif test "$use_libnfs" != "no"; then
1023 AC_MSG_NOTICE($libnfs_not_found)
1028 if test "$use_libnfs" != "no"; then
1029 XB_FIND_SONAME([NFS], [nfs], [use_libnfs])
1031 if test "$use_libnfs" != "no"; then
1032 AC_DEFINE([HAVE_LIBNFS], [1], [Whether to use libnfs library.])
1037 AC_MSG_NOTICE($libnfs_disabled)
1042 if test "x$use_libafpclient" != "xno"; then
1043 AC_CHECK_HEADERS([afpfs-ng/libafpclient.h],,
1044 [if test "x$use_libafpclient" = "xyes"; then
1045 AC_MSG_ERROR($libafpclient_not_found)
1046 elif test "x$use_libafpclient" != "xno"; then
1047 AC_MSG_NOTICE($libafpclient_not_found)
1048 use_libafpclient="no"
1051 if test "x$use_libafpclient" != "xno"; then
1052 XB_FIND_SONAME([AFPCLIENT], [afpclient], [use_libafpclient])
1053 AC_DEFINE([HAVE_LIBAFPCLIENT], [1], [Whether to use libafpclient library.])
1057 AC_MSG_NOTICE($libafpclient_disabled)
1060 # libplist for airplay feature
1062 if test "$use_airplay" != "no"; then
1063 AC_CHECK_LIB([plist],[main],,
1064 [if test "$use_airplay" = "yes"; then
1065 AC_MSG_ERROR($libplist_not_found)
1066 elif test "$use_airplay" != "no"; then
1067 AC_MSG_NOTICE($libplist_not_found)
1072 if test "$use_airplay" != "no"; then
1073 XB_FIND_SONAME([PLIST], [plist], [use_airplay])
1078 # libshairport for AirTunes
1080 if test "x$use_airtunes" != "xno"; then
1081 AC_CHECK_LIB([shairport], [shairport_set_ao],,
1082 [if test "x$use_airtunes" = "xyes"; then
1083 AC_MSG_ERROR($libshairport_not_found)
1084 elif test "x$use_airtunes" != "xno"; then
1085 AC_MSG_NOTICE($libshairport_not_found)
1090 if test "x$use_airtunes" != "xno"; then
1091 XB_FIND_SONAME([SHAIRPORT], [shairport], [use_airtunes])
1098 if test "$host_vendor" = "apple" ; then
1100 AC_MSG_NOTICE($libudev_disabled)
1102 if test "$use_libudev" = "auto"; then
1103 PKG_CHECK_MODULES([UDEV], [libudev],
1104 use_libudev="yes"; use_libusb="no"; USE_LIBUDEV=1; [INCLUDES="$INCLUDES $UDEV_CFLAGS"; LIBS="$LIBS $UDEV_LIBS"]; \
1105 AC_DEFINE([HAVE_LIBUDEV],[1],["Define to 1 if libudev is installed"]),
1106 AC_MSG_RESULT($libudev_not_found))
1107 elif test "$use_libudev" = "yes" ; then
1108 PKG_CHECK_MODULES([UDEV], [libudev],
1109 use_libudev="yes"; use_libusb="no"; USE_LIBUDEV=1; [INCLUDES="$INCLUDES $UDEV_CFLAGS"; LIBS="$LIBS $UDEV_LIBS"]; \
1110 AC_DEFINE([HAVE_LIBUDEV],[1],["Define to 1 if libudev is installed"]),
1111 AC_MSG_ERROR($libudev_not_found))
1113 AC_MSG_NOTICE($libudev_disabled)
1119 if test "$use_libudev" != "yes"; then
1120 if test "$host_vendor" = "apple" ; then
1122 AC_MSG_NOTICE($libusb_disabled)
1124 if test "$use_libusb" = "auto"; then
1125 PKG_CHECK_MODULES([USB], [libusb],
1126 use_libusb="yes"; USE_LIBUSB=1; [INCLUDES="$INCLUDES $USB_CFLAGS"; LIBS="$LIBS $USB_LIBS"; USE_LIBUSB=1]; \
1127 AC_DEFINE([HAVE_LIBUSB],[1],["Define to 1 if libusb is installed"]),
1128 use_libusb="no"; AC_MSG_RESULT($libusb_not_found))
1129 elif test "$use_libusb" = "yes"; then
1130 PKG_CHECK_MODULES([USB], [libusb],
1131 use_libusb="yes"; USE_LIBUSB=1; [INCLUDES="$INCLUDES $USB_CFLAGS"; LIBS="$LIBS $USB_LIBS"; USE_LIBUSB=1]; \
1132 AC_DEFINE([HAVE_LIBUSB],[1],["Define to 1 if libusb is installed"]),
1133 use_libusb="no"; AC_MSG_ERROR($libusb_not_found))
1135 AC_MSG_NOTICE($libusb_disabled)
1144 if test "$use_libcec" = "yes"; then
1145 USE_LIBCEC=1; AC_DEFINE([HAVE_LIBCEC],[1],["Define to 1 if libCEC is installed"])
1146 AC_MSG_NOTICE($libcec_enabled)
1149 AC_MSG_NOTICE($libcec_disabled)
1152 ### External libraries checks
1155 USE_EXTERNAL_LIBCEC=0
1156 if test "$use_libcec" = "yes"; then
1157 if test "$use_external_libcec" = "yes"; then
1158 USE_EXTERNAL_LIBCEC=1; PKG_CHECK_MODULES([CEC], [libcec],
1159 [INCLUDES="$INCLUDES $CEC_CFLAGS"; LIBS="$LIBS $CEC_LIBS"],
1160 AC_MSG_ERROR($libcec_external_missing))
1162 [INCLUDES="$INCLUDES -I\$(abs_top_srcdir)/lib/libcec/include"]
1163 AC_MSG_NOTICE($libcec_internal)
1168 if test "$use_external_ffmpeg" = "yes"; then
1169 FFMPEG_LIBNAMES="libavcodec libavfilter libavformat libavutil libpostproc libswscale"
1171 # libavcore is optional
1172 PKG_CHECK_EXISTS([libavcore], FFMPEG_LIBNAMES="$FFMPEG_LIBNAMES libavcore")
1174 PKG_CHECK_MODULES([FFMPEG], [$FFMPEG_LIBNAMES],
1175 [INCLUDES="$INCLUDES $FFMPEG_CFLAGS"; LIBS="$LIBS $FFMPEG_LIBS"],
1176 AC_MSG_ERROR($missing_library))
1178 # Determine whether AVPacket and relevant functions are defined in libavformat
1180 AC_CHECK_LIB([avcodec], [av_free_packet],
1181 [AC_MSG_NOTICE(== AVPacket and relevant functions defined in libavcodec. ==)],
1182 [AC_MSG_NOTICE(== AVPacket and relevant functions defined in libavformat. ==)
1183 AC_DEFINE([AVPACKET_IN_AVFORMAT], [1], [Whether AVPacket is in libavformat.])])
1185 # in case the headers are in a custom directory
1186 SAVE_CPPFLAGS="$CPPFLAGS"
1187 CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS"
1189 # Possible places the ffmpeg headers may be
1190 AC_CHECK_HEADERS([libavcodec/avcodec.h libavfilter/avfilter.h libavformat/avformat.h libavutil/avutil.h libpostproc/postprocess.h libswscale/swscale.h],,
1191 [AC_CHECK_HEADERS([ffmpeg/avcodec.h ffmpeg/avfilter.h ffmpeg/avformat.h ffmpeg/avutil.h postproc/postprocess.h ffmpeg/swscale.h],,
1192 [AC_MSG_ERROR($missing_headers)])])
1195 AC_CHECK_HEADERS([libavcore/avcore.h libavcore/samplefmt.h libavutil/mem.h libavutil/samplefmt.h])
1197 # old FFmpeg have this in libavcodec/opt.h instead:
1198 AC_CHECK_HEADERS([libavutil/opt.h])
1200 # We'll support the use of rgb2rgb.h if it exists.
1201 AC_CHECK_HEADERS([libswscale/rgb2rgb.h],,)
1202 AC_CHECK_HEADERS([ffmpeg/rgb2rgb.h],,)
1204 # Check if AVFilterBufferRefVideoProps AVRational member is named
1205 # 'pixel_aspect' or 'sample_aspect_ratio'.
1206 AC_CHECK_MEMBER([AVFilterBufferRefVideoProps.sample_aspect_ratio],
1207 [AC_DEFINE([HAVE_AVFILTERBUFFERREFVIDEOPROPS_SAMPLE_ASPECT_RATIO],
1209 [Define to 1 if AVFilterBufferRefVideoProps has member sample_aspect_ratio.])],
1210 [AC_CHECK_MEMBER([AVFilterBufferRefVideoProps.sample_aspect_ratio],
1211 [AC_DEFINE([HAVE_AVFILTERBUFFERREFVIDEOPROPS_SAMPLE_ASPECT_RATIO],
1213 [Define to 1 if AVFilterBufferRefVideoProps has member sample_aspect_ratio.])],
1215 [[#include <ffmpeg/avfilter.h>]])],
1216 [[#include <libavfilter/avfilter.h>]])
1218 AC_MSG_NOTICE($external_ffmpeg_enabled)
1219 USE_EXTERNAL_FFMPEG=1
1220 AC_DEFINE([USE_EXTERNAL_FFMPEG], [1], [Whether to use external FFmpeg libraries.])
1222 # Disable vdpau support if external libavcodec doesn't have it
1223 AC_CHECK_LIB([avcodec], [ff_vdpau_vc1_decode_picture],,
1224 [if test "x$use_vdpau" = "xyes"; then
1225 AC_MSG_ERROR($ffmpeg_vdpau_not_supported)
1228 AC_MSG_RESULT($ffmpeg_vdpau_not_supported)
1231 # Check for 'PIX_FMT_VDPAU_MPEG4' from libavutil
1232 if test "x$use_vdpau" != "xno"; then
1235 [AC_LANG_SOURCE([ #include <libavutil/pixfmt.h>
1236 int main() { PixelFormat format = PIX_FMT_VDPAU_MPEG4; }])],
1237 [AC_DEFINE([PIX_FMT_VDPAU_MPEG4_IN_AVUTIL], [1],
1238 [Whether AVUtil defines PIX_FMT_VDPAU_MPEG4.])],)
1241 CPPFLAGS="$SAVE_CPPFLAGS"
1243 AC_MSG_NOTICE($external_ffmpeg_disabled)
1244 USE_EXTERNAL_FFMPEG=0
1245 AC_DEFINE([PIX_FMT_VDPAU_MPEG4_IN_AVUTIL], [1], [Whether AVUtil defines PIX_FMT_VDPAU_MPEG4.])
1249 if test -z "$PYTHON_NOVERSIONCHECK"; then
1250 AX_PYTHON_DEVEL([>= 2.4])
1251 PYTHON_VERSION=$ac_python_version
1254 if test -z "$PYTHON_VERSION"; then
1255 AC_MSG_ERROR([Can't find a Python version.])
1257 AC_MSG_NOTICE([Using Python $PYTHON_VERSION])
1261 if test "x$use_vdpau" != "xno"; then
1262 if test "$host_vendor" = "apple" ; then
1263 if test "x$use_vdpau" = "xyes"; then
1264 AC_MSG_ERROR([VDPAU not supported on this platform])
1267 AC_MSG_NOTICE($vdpau_disabled)
1272 AC_CHECK_HEADER([vdpau/vdpau.h],AC_DEFINE([HAVE_LIBVDPAU], [],
1273 [Define to 1 if you have the 'vdpau' library (-lvdpau).]),
1274 [if test "x$use_vdpau" = "xyes"; then
1276 AC_MSG_ERROR([$vdpau_not_found])
1280 AC_MSG_RESULT($vdpau_not_found)
1285 AC_MSG_NOTICE($vdpau_disabled)
1289 if test "x$use_vaapi" != "xno"; then
1290 if test "$host_vendor" = "apple" ; then
1291 if test "x$use_vaapi" = "xyes"; then
1292 AC_MSG_ERROR([VAAPI not supported on this platform])
1295 AC_MSG_NOTICE($vaapi_disabled)
1299 initial_val=$use_vaapi
1300 AC_CHECK_LIB([va], main, :, use_vaapi=no)
1301 if test "x$use_vaapi" != "xno"; then
1302 AC_CHECK_LIB([va-glx], main, LIBS="-lva -lva-glx $LIBS", use_vaapi=no, -lva)
1305 if test "x$use_vaapi" = "xno"; then
1306 if test "x$initial_val" = "xyes"; then
1307 AC_MSG_ERROR($vaapi_not_found)
1309 AC_MSG_RESULT($vaapi_not_found)
1313 AC_DEFINE([HAVE_LIBVA], [1], [Define to 1 if you have the 'vaapi' libraries (-lva AND -lva-glx)])
1318 AC_MSG_NOTICE($vaapi_disabled)
1323 if test "x$use_crystalhd" != "xno"; then
1324 SAVE_CFLAGS="$CFLAGS"
1325 CFLAGS="-D__LINUX_USER__"
1326 AC_CHECK_HEADER([libcrystalhd/libcrystalhd_if.h], [],
1327 [ if test "x$use_crystalhd" = "xyes"; then
1328 AC_MSG_ERROR($crystalhd_not_found)
1331 AC_MSG_RESULT($crystalhd_not_found)
1335 CFLAGS="$SAVE_CFLAGS"
1336 if test "$host_vendor" != "apple"; then
1337 XB_FIND_SONAME([CRYSTALHD], [crystalhd], [use_crystalhd])
1339 if test "x$use_crystalhd" != "xno"; then
1340 SAVE_CFLAGS="$CFLAGS"
1341 CFLAGS="-D__LINUX_USER__ -llibcrystalhd"
1342 # check for new crystalhd lib
1344 [AC_LANG_SOURCE([#include <libcrystalhd/bc_dts_types.h>
1345 #include <libcrystalhd/bc_dts_defs.h>
1346 PBC_INFO_CRYSTAL bCrystalInfo;])],
1347 [ AC_DEFINE([HAVE_LIBCRYSTALHD], [2], [Define to 2 if you have the 'New Broadcom Crystal HD' library.]) ],
1348 [ AC_DEFINE([HAVE_LIBCRYSTALHD], [1], [Define to 1 if you have the 'Old Broadcom Crystal HD' library.]) ])
1349 CFLAGS="$SAVE_CFLAGS"
1353 AC_MSG_NOTICE($crystalhd_disabled)
1358 if test "x$use_vdadecoder" != "xno"; then
1359 if test "$host_vendor" = "apple" ; then
1360 HAVE_LIBVDADECODER=1
1361 AC_DEFINE([HAVE_LIBVDADECODER], [1], [Define to 1 if you have the 'VDADecoder' library.])
1362 AC_MSG_NOTICE($vdadecoder_enabled)
1365 if test "x$use_vdadecoder" = "xyes"; then
1366 AC_MSG_ERROR([VDA Decoder not supported on this platform])
1369 AC_MSG_NOTICE($vdadecoder_disabled)
1374 AC_MSG_NOTICE($vdadecoder_disabled)
1378 if test "x$use_vtbdecoder" != "xno"; then
1379 if test "$host_vendor" = "apple" ; then
1380 HAVE_VIDEOTOOLBOXDECODER=1
1381 AC_DEFINE([HAVE_VIDEOTOOLBOXDECODER], [1], [Define to 1 if you have the 'VTBDecoder' library.])
1382 AC_MSG_NOTICE($vtbdecoder_enabled)
1384 if test "x$use_vtbdecoder" = "xyes"; then
1385 AC_MSG_ERROR([VTB Decoder not supported on this platform])
1388 AC_MSG_NOTICE($vtbdecoder_disabled)
1392 AC_MSG_NOTICE($vtbdecoder_disabled)
1396 if test "$host_vendor" = "apple" ; then
1399 AC_MSG_NOTICE($openmax_disabled)
1401 if test "$use_gles" = "yes" && test "$use_openmax" = "auto"; then
1402 PKG_CHECK_MODULES([OPENMAX], [libomxil-bellagio],
1403 USE_OPENMAX=1;[INCLUDES="$INCLUDES $OPENMAX_CFLAGS"; LIBS="$LIBS $OPENMAX_LIBS"],
1404 use_openmax=no;USE_OPENMAX=0;AC_MSG_RESULT($openmax_not_found))
1405 elif test "$use_gles" = "yes" && test "$use_openmax" = "yes"; then
1406 PKG_CHECK_MODULES([OPENMAX], [libomxil-bellagio],
1407 USE_OPENMAX=1;[INCLUDES="$INCLUDES $OPENMAX_CFLAGS"; LIBS="$LIBS $OPENMAX_LIBS"],
1408 AC_MSG_ERROR($openmax_not_found))
1410 AC_MSG_NOTICE($openmax_disabled)
1416 # yajl version check (yajl_version.h was added in yajl 2.0)
1417 AC_CHECK_HEADERS([yajl/yajl_version.h], [], [
1418 AC_DEFINE(YAJL_MAJOR, 1, [yajl version 1])
1421 # platform specific bin utilities
1422 if test "$host_vendor" != "apple" ; then
1423 AC_CHECK_PROG(HAVE_GAWK,gawk,"yes","no",)
1424 if test "$HAVE_GAWK" = "no" ; then
1425 AC_MSG_ERROR($missing_program)
1429 if test "$use_arch" != "arm" ; then
1430 AC_CHECK_PROG(HAVE_CMAKE,cmake,"yes","no",)
1431 if test "$HAVE_CMAKE" = "no" ; then
1432 AC_MSG_ERROR($missing_program)
1436 AC_CHECK_PROG(HAVE_GPERF,gperf,"yes","no",)
1437 if test "$HAVE_GPERF" = "no" ; then
1438 AC_MSG_ERROR($missing_program)
1441 AC_CHECK_PROG(HAVE_UNZIP,unzip,"yes","no",)
1442 if test "$HAVE_UNZIP" = "no" ; then
1443 AC_MSG_ERROR($missing_program)
1446 AC_CHECK_PROG(HAVE_ZIP,zip,"yes","no",)
1447 if test "$HAVE_ZIP" = "no" ; then
1448 AC_MSG_ERROR($missing_program)
1451 if test "$ARCH" = "i486-linux" || test "$ARCH" = "x86-freebsd"; then
1452 AC_CHECK_PROG(HAVE_NASM,nasm,"yes","no",)
1453 if test "$HAVE_NASM" = "no" ; then
1454 AC_MSG_ERROR($missing_program)
1458 AC_CHECK_PROG(HAVE_GIT,git,"yes","no",)
1460 # Checks for header files.
1464 AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h inttypes.h limits.h locale.h \
1465 malloc.h memory.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h \
1466 strings.h sys/file.h sys/ioctl.h sys/mount.h sys/param.h sys/socket.h \
1467 sys/time.h sys/timeb.h sys/vfs.h termios.h unistd.h utime.h wchar.h wctype.h])
1468 AC_CHECK_HEADERS([cdio/iso9660.h],,AC_MSG_ERROR([$missing_headers]))
1470 # Checks for typedefs, structures, and compiler characteristics.
1486 AC_CHECK_MEMBERS([struct stat.st_rdev])
1495 if test "$cross_compiling" = "yes"; then
1496 final_message="$final_message\n Crosscomp.:\tYes"
1498 final_message="$final_message\n Crosscomp.:\tNo"
1501 final_message="$final_message\n target ARCH:\t$use_arch"
1502 final_message="$final_message\n target CPU:\t$use_cpu"
1504 if test "$use_gles" = "yes"; then
1505 final_message="$final_message\n OpenGLES:\tYes"
1510 if test "$use_gl" = "yes"; then
1511 final_message="$final_message\n OpenGL:\tYes"
1514 final_message="$final_message\n OpenGL:\tNo (Very Slow)"
1515 SDL_DEFINES="-DHAS_SDL_2D"
1520 if test "$use_alsa" = "yes"; then
1522 AC_DEFINE([USE_ALSA],[1],["Define to 1 if alsa is installed"])
1523 final_message="$final_message\n ALSA:\t\tYes"
1526 final_message="$final_message\n ALSA:\t\tNo"
1529 if test "$use_dbus" = "yes"; then
1530 final_message="$final_message\n DBUS:\t\tYes"
1532 final_message="$final_message\n DBUS:\t\tNo"
1535 if test "x$use_vdpau" != "xno"; then
1536 final_message="$final_message\n VDPAU:\tYes"
1538 final_message="$final_message\n VDPAU:\tNo"
1541 if test "x$use_vaapi" != "xno"; then
1542 final_message="$final_message\n VAAPI:\tYes"
1544 final_message="$final_message\n VAAPI:\tNo"
1547 if test "x$use_crystalhd" != "xno"; then
1548 final_message="$final_message\n CrystalHD:\tYes"
1550 final_message="$final_message\n CrystalHD:\tNo"
1553 if test "x$use_vdadecoder" != "xno"; then
1554 final_message="$final_message\n VDADecoder:\tYes"
1556 final_message="$final_message\n VDADecoder:\tNo"
1559 if test "x$use_vtbdecoder" != "xno"; then
1560 final_message="$final_message\n VTBDecoder:\tYes"
1562 final_message="$final_message\n VTBDecoder:\tNo"
1565 if test "$use_openmax" != "no"; then
1566 final_message="$final_message\n OpenMax:\tYes"
1568 final_message="$final_message\n OpenMax:\tNo"
1571 if test "$use_joystick" = "yes"; then
1572 final_message="$final_message\n Joystick:\tYes"
1573 SDL_DEFINES="$SDL_DEFINES -DHAS_SDL_JOYSTICK"
1575 final_message="$final_message\n Joystick:\tNo"
1578 if test "$use_xrandr" = "yes"; then
1579 final_message="$final_message\n XRandR:\tYes"
1582 final_message="$final_message\n XRandR:\tNo"
1586 if test "$use_goom" = "yes"; then
1587 final_message="$final_message\n GOOM:\t\tYes"
1589 final_message="$final_message\n GOOM:\t\tNo"
1592 if test "$use_rsxs" = "yes"; then
1593 final_message="$final_message\n RSXS:\t\tYes"
1595 final_message="$final_message\n RSXS:\t\tNo"
1598 if test "$use_projectm" = "yes"; then
1599 final_message="$final_message\n ProjectM:\tYes"
1601 final_message="$final_message\n ProjectM:\tNo"
1604 if test "$use_skin_touched" = "yes"; then
1605 final_message="$final_message\n Skin Touched:\tYes"
1607 final_message="$final_message\n Skin Touched:\tNo"
1610 if test "$use_x11" = "yes"; then
1611 final_message="$final_message\n X11:\t\tYes"
1613 final_message="$final_message\n X11:\t\tNo"
1616 if test "$use_libbluray" = "yes"; then
1617 final_message="$final_message\n Bluray:\tYes"
1619 final_message="$final_message\n Bluray:\tNo"
1622 USE_TEXTUREPACKER_NATIVE=0
1623 if test "x$use_texturepacker" != "xno"; then
1624 final_message="$final_message\n TexturePacker:Yes"
1626 if test "x$use_texturepacker_native" = "xyes"; then
1627 USE_TEXTUREPACKER_NATIVE=1
1628 if [[ ! -d "$USE_TEXTUREPACKER_NATIVE_ROOT" ]]; then
1629 USE_TEXTUREPACKER_NATIVE_ROOT=
1633 final_message="$final_message\n TexturePacker:No"
1637 if test "$use_mid" = "yes"; then
1638 final_message="$final_message\n MID Support:\tYes"
1639 SDL_DEFINES="$SDL_DEFINES -DMID"
1641 final_message="$final_message\n MID Support:\tNo"
1646 if test "x$use_ccache" != "xno"; then
1647 AC_PATH_PROG(CCACHE,ccache,none)
1648 if test "$ac_cv_path_CCACHE" = "none"; then
1649 if test "x$use_ccache" = "xyes"; then
1650 AC_MSG_ERROR([ccache not found.]);
1652 AC_MSG_NOTICE([ccache not found. Falling back to default CC])
1653 final_message="$final_message\n ccache:\tNo"
1656 CC="$ac_cv_path_CCACHE $CC"
1657 CXX="$ac_cv_path_CCACHE $CXX"
1658 AC_MSG_NOTICE(enabling ccache)
1659 final_message="$final_message\n ccache:\tYes"
1662 final_message="$final_message\n ccache:\tNo"
1665 if test "x$use_pulse" != "xno"; then
1666 XBMC_STANDALONE_SH_PULSE=tools/Linux/xbmc-standalone.sh.pulse
1667 final_message="$final_message\n PulseAudio:\tYes"
1669 XBMC_STANDALONE_SH_PULSE=/dev/null
1670 final_message="$final_message\n PulseAudio:\tNo"
1673 if test "$use_hal" = "yes"; then
1674 final_message="$final_message\n HAL Support:\tYes"
1676 final_message="$final_message\n HAL Support:\tNo"
1680 if test "$use_dvdcss" = "yes"; then
1681 AC_MSG_NOTICE($dvdcss_enabled)
1682 final_message="$final_message\n DVDCSS:\tYes"
1684 SKIP_CONFIG_DVDCSS=0
1685 DVDREAD_CFLAGS="-D_XBMC -DHAVE_DVDCSS_DVDCSS_H"
1687 AC_MSG_NOTICE($dvdcss_disabled)
1688 final_message="$final_message\n DVDCSS:\tNo"
1690 SKIP_CONFIG_DVDCSS=1
1691 DVDREAD_CFLAGS="-D_XBMC -UHAVE_DVDCSS_DVDCSS_H"
1693 if test "$host_vendor" = "apple"; then
1694 DVDREAD_CFLAGS="$DVDREAD_CFLAGS -D__DARWIN__"
1697 if test "$use_avahi" = "yes"; then
1698 final_message="$final_message\n Avahi:\tYes"
1700 final_message="$final_message\n Avahi:\tNo"
1703 if test "$HAVE_GIT" = "yes"; then
1704 GIT_REV=$(git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h %ci" HEAD | awk '{gsub("-", "");print $2"-"$1}')
1706 if test "$GIT_REV" = ""; then
1709 if test "$host_vendor" = "apple"; then
1710 echo "#define GIT_REV \"$GIT_REV\"" > git_revision.h
1712 SDL_DEFINES="$SDL_DEFINES -D'GIT_REV=\"$GIT_REV\"'"
1715 if test "$use_nonfree" = "yes"; then
1716 final_message="$final_message\n Non-free:\tYes"
1718 AC_DEFINE([HAVE_XBMC_NONFREE], [1], [Define to 1 to enable non-free components.])
1721 final_message="$final_message\n Non-free:\tNo"
1724 if test "$use_asap" = "yes"; then
1725 AC_CHECK_PROG(HAVE_GDC,gdc,"yes","no")
1726 if test "$HAVE_GDC" = "no"; then
1727 AC_MSG_ERROR($missing_program);
1729 AC_CHECK_PROG(HAVE_FPC,fpc,"yes","no")
1730 if test "$HAVE_FPC" = "no"; then
1731 AC_MSG_ERROR($missing_program);
1734 AC_DEFINE([USE_ASAP_CODEC], [1], [Define to 1 to enable ASAP codec.])
1735 final_message="$final_message\n ASAP Codec:\tYes"
1738 final_message="$final_message\n ASAP Codec:\tNo"
1741 if test "$use_webserver" = "yes"; then
1742 final_message="$final_message\n Webserver:\tYes"
1744 final_message="$final_message\n Webserver:\tNo"
1747 if test "$use_librtmp" != "no"; then
1748 final_message="$final_message\n libRTMP support:\tYes"
1750 final_message="$final_message\n libRTMP support:\tNo"
1753 if test "x$use_samba" != "xno"; then
1754 final_message="$final_message\n libsmbclient support:\tYes"
1756 final_message="$final_message\n libsmbclient support:\tNo"
1759 if test "$use_libnfs" != "no"; then
1760 final_message="$final_message\n libnfs client support:Yes"
1762 final_message="$final_message\n libnfs client support:No"
1765 if test "x$use_libafpclient" != "xno"; then
1766 final_message="$final_message\n libafpclient support:\tYes"
1768 final_message="$final_message\n libafpclient support:\tNo"
1771 if test "$use_airplay" != "no"; then
1772 final_message="$final_message\n AirPlay support:\tYes"
1774 final_message="$final_message\n AirPLay support:\tNo"
1777 if test "x$use_airtunes" != "xno"; then
1778 final_message="$final_message\n AirTunes support:\tYes"
1780 final_message="$final_message\n AirTunes support:\tNo"
1783 if test "$use_optical_drive" = "yes"; then
1784 final_message="$final_message\n Optical drive:\tYes"
1786 final_message="$final_message\n Optical drive:\tNo"
1789 if test "x$use_libudev" != "xno"; then
1790 final_message="$final_message\n libudev support:\tYes"
1792 final_message="$final_message\n libudev support:\tNo"
1795 if test "x$use_libusb" != "xno"; then
1796 final_message="$final_message\n libusb support:\tYes"
1798 final_message="$final_message\n libusb support:\tNo"
1801 if test "$use_libcec" = "yes"; then
1802 final_message="$final_message\n libCEC support:\tYes"
1804 final_message="$final_message\n libCEC support:\tNo"
1807 ### External libraries messages
1808 if test "$use_external_libcec" = "yes"; then
1809 final_message="$final_message\n External libCEC:\tYes"
1811 final_message="$final_message\n External libCEC:\tNo"
1814 if test "$use_external_ffmpeg" = "yes"; then
1815 final_message="$final_message\n External FFmpeg:\tYes"
1817 final_message="$final_message\n External FFmpeg:\tNo"
1820 OUTPUT_FILES="Makefile \
1822 addons/skin.confluence/media/Makefile \
1824 xbmc/cdrip/Makefile \
1825 xbmc/cores/Makefile \
1826 xbmc/cores/VideoRenderers/Makefile \
1827 xbmc/cores/dvdplayer/Makefile \
1829 lib/libdvd/Makefile \
1830 xbmc/cores/DllLoader/Makefile \
1831 xbmc/cores/dvdplayer/DVDCodecs/Makefile \
1832 xbmc/cores/dvdplayer/DVDCodecs/Audio/Makefile \
1833 xbmc/cores/dvdplayer/DVDCodecs/Overlay/Makefile \
1834 xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile \
1835 xbmc/cores/dvdplayer/DVDDemuxers/Makefile \
1836 xbmc/cores/dvdplayer/DVDSubtitles/Makefile \
1837 xbmc/cores/AudioRenderers/Makefile \
1838 xbmc/cores/paplayer/Makefile \
1839 lib/timidity/Makefile \
1840 lib/xbadpcm/Makefile \
1842 lib/nosefart/Makefile \
1843 lib/libsidplay2/Makefile \
1844 lib/vgmstream/Makefile \
1845 lib/snesapu/SNES/SNESAPU/Makefile \
1846 lib/stsound/StSoundLibrary/Makefile \
1847 xbmc/cores/playercorefactory/Makefile \
1848 xbmc/music/karaoke/Makefile \
1850 xbmc/guilib/Makefile \
1851 xbmc/interfaces/Makefile \
1852 xbmc/network/Makefile \
1853 lib/libRTV/Makefile \
1854 lib/libexif/Makefile \
1855 lib/libXDAAP/Makefile \
1856 lib/cmyth/Makefile \
1857 lib/libhdhomerun/Makefile \
1858 lib/libsquish/Makefile \
1859 lib/libid3tag/Makefile \
1860 lib/cximage-6.0/Makefile \
1861 lib/addons/script.module.pil/Makefile \
1862 xbmc/interfaces/python/Makefile \
1863 xbmc/interfaces/python/xbmcmodule/Makefile \
1864 lib/libUPnP/Makefile \
1865 xbmc/DllPaths_generated.h \
1866 xbmc/linux/Makefile \
1867 xbmc/filesystem/Makefile \
1868 xbmc/screensavers/rsxs-0.9/xbmc/Makefile \
1869 xbmc/visualizations/XBMCProjectM/Makefile \
1870 xbmc/visualizations/Goom/Makefile \
1871 xbmc/visualizations/OpenGLSpectrum/Makefile \
1872 xbmc/visualizations/WaveForm/Makefile \
1873 xbmc/visualizations/iTunes/Makefile \
1874 tools/Linux/xbmc.sh \
1875 tools/Linux/xbmc-standalone.sh \
1876 tools/TexturePacker/Makefile \
1877 tools/EventClients/Clients/OSXRemote/Makefile \
1878 xbmc/peripherals/bus/Makefile \
1879 xbmc/peripherals/devices/Makefile \
1880 lib/libcec/Makefile"
1882 if test "$use_skin_touched" = "yes"; then
1883 OUTPUT_FILES+=" addons/skin.touched/media/Makefile"
1886 # Line below is used so we can use AM_INIT_AUTOMAKE. The corresponding
1887 # .dummy.am does nothing.
1888 AC_CONFIG_FILES([.dummy])
1890 AC_CONFIG_FILES([${OUTPUT_FILES}])
1891 OUTPUT_FILES="$OUTPUT_FILES \
1897 AC_SUBST(SDL_DEFINES)
1898 AC_SUBST(BUILD_DVDCSS)
1899 AC_SUBST(DISABLE_GOOM)
1900 AC_SUBST(DISABLE_RSXS)
1901 AC_SUBST(DISABLE_PROJECTM)
1902 AC_SUBST(USE_SKIN_TOUCHED)
1903 AC_SUBST(USE_EXTERNAL_FFMPEG)
1904 AC_SUBST(PYTHON_VERSION)
1905 AC_SUBST(OUTPUT_FILES)
1906 AC_SUBST(HAVE_XBMC_NONFREE)
1907 AC_SUBST(USE_ASAP_CODEC)
1908 AC_SUBST(LIBCURL_BASENAME)
1909 AC_SUBST(LIBFLAC_BASENAME)
1910 AC_SUBST(LIBVORBISFILE_BASENAME)
1911 AC_SUBST(LIBMODPLUG_BASENAME)
1912 AC_SUBST(LIBMAD_BASENAME)
1913 AC_SUBST(LIBOGG_BASENAME)
1914 AC_SUBST(LIBVORBISENC_BASENAME)
1915 AC_SUBST(LIBVORBIS_BASENAME)
1916 AC_SUBST(LIBASS_BASENAME)
1917 AC_SUBST(LIBMEPG2_BASENAME)
1918 AC_SUBST_FILE(XBMC_STANDALONE_SH_PULSE)
1919 AC_SUBST(USE_OPENGL)
1920 AC_SUBST(USE_OPENGLES)
1923 AC_SUBST(USE_CRYSTALHD)
1924 AC_SUBST(USE_LIBSMBCLIENT)
1925 AC_SUBST(USE_LIBNFS)
1926 AC_SUBST(USE_LIBAFPCLIENT)
1927 AC_SUBST(USE_AIRPLAY)
1929 AC_SUBST(USE_OPENMAX)
1931 AC_SUBST(USE_XRANDR)
1933 AC_SUBST(USE_TEXTUREPACKER)
1934 AC_SUBST(USE_TEXTUREPACKER_NATIVE)
1935 AC_SUBST(USE_TEXTUREPACKER_NATIVE_ROOT)
1936 AC_SUBST(USE_AIRTUNES)
1937 AC_SUBST(USE_LIBUDEV)
1938 AC_SUBST(USE_LIBUSB)
1939 AC_SUBST(USE_LIBCEC)
1940 AC_SUBST(USE_EXTERNAL_LIBCEC)
1943 # pushd and popd are not available in other shells besides bash, so implement
1944 # our own pushd/popd functions
1949 if [[ -d "$dirname" ]] && [[ -x "$dirname" ]]; then
1951 XB_DIRSTACK="$dirname ${XB_DIRSTACK:-$PWD}"
1954 AC_MSG_ERROR(xb_pushd: unable to change to $dirname)
1959 if [[ -n "$XB_DIRSTACK" ]]; then
1960 XB_DIRSTACK="${XB_DIRSTACK#* }"
1961 cd "${XB_DIRSTACK%% *}"
1964 AC_MSG_ERROR(xb_popd: unable to go back to previous directory)
1968 # Function to run the configure scripts in our submodules
1969 # Consists of three paramaters, the path to the submodule, the configure command
1970 # with appropriate arguments, and a third parameter set to 1 if we are to skip
1971 # running the script, anything else if not.
1972 AC_DEFUN([XB_CONFIG_MODULE],[
1973 AC_CONFIG_COMMANDS_POST([
1974 if [[ $3 != "1" ]]; then
1975 if [[ -d $1 ]]; then
1978 if [[ $? -ne 0 ]]; then
1980 AC_MSG_ERROR([[Submodule $1 failed to configure]])
1985 AC_MSG_ERROR([[Submodule $1 does not exist]])
1988 AC_MSG_NOTICE([[Skipping configuration of submodule $1.]])
1993 XB_CONFIG_MODULE([lib/ffmpeg], [
1994 if test "$host_vendor" = "apple" ; then
1996 --extra-cflags="$CFLAGS $FFMPEG_EXTRACFLAGS -w -D_DARWIN_C_SOURCE -Dattribute_deprecated=" \
1997 `if test "$use_arch" != "no"; then echo --enable-cross-compile; fi` \
1998 `if test "$use_arch" != "no"; then echo --arch=$use_arch; fi`\
1999 `if test "$use_cpu" != "no"; then echo --cpu=$use_cpu; fi`\
2000 --target-os=$(tolower $(uname -s)) \
2001 --disable-amd3dnow \
2004 `if test "$use_arch" != "yes"; then echo --enable-neon; fi`\
2006 `if test "$use_debug" = "no"; then echo --disable-debug; fi` \
2008 --enable-muxer=spdif \
2009 --enable-muxer=adts \
2010 --disable-encoders \
2011 --enable-encoder=ac3 \
2012 --enable-encoder=aac \
2013 `if test "$use_ffmpeg_libvorbis" = "yes"; then echo --enable-libvorbis --enable-muxer=ogg --enable-encoder=libvorbis; else echo --disable-libvorbis; fi` \
2017 --disable-ffserver \
2021 --disable-decoder=mpeg_xvmc \
2024 --enable-protocol=http \
2026 --enable-runtime-cpudetect \
2028 sed -i "" -e "s#YASM=yasm#YASM=${prefix}/bin/yasm#" config.mak &&
2029 sed -i "" -e "s#YASMDEP=yasm#YASMDEP=${prefix}/bin/yasm#" config.mak &&
2030 sed -i "" -e "s# -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 # #" config.mak
2031 if test "$use_arch" = "ppc"; then
2032 sed -i "" -e "s/HAVE_GNU_AS 1/HAVE_GNU_AS 0/" config.h
2033 sed -i "" -e "s/^HAVE_GNU_AS=yes/!HAVE_GNU_AS=yes/" config.mak
2037 LDFLAGS="$(echo "$LDFLAGS" | sed "s/-Wl,-Bsymbolic-functions//g")" \
2039 --extra-cflags="$PASSED_CFLAGS $FFMPEG_EXTRACFLAGS" \
2041 `if test "$use_debug" = "no"; then echo --disable-debug; fi` \
2042 `if test "$cross_compiling" = "yes"; then echo --enable-cross-compile; fi` \
2043 `if test "$use_arch" != "no"; then echo --arch=$use_arch; fi`\
2044 `if test "$use_cpu" != "no"; then echo --cpu=$use_cpu; fi`\
2045 --target-os=$(tolower $(uname -s)) \
2047 --enable-muxer=spdif \
2048 --enable-muxer=adts \
2049 --disable-encoders \
2050 --enable-encoder=ac3 \
2051 --enable-encoder=aac \
2052 `if test "$use_ffmpeg_libvorbis" = "yes"; then echo --enable-libvorbis --enable-muxer=ogg --enable-encoder=libvorbis; else echo --disable-libvorbis; fi` \
2053 --disable-decoder=mpeg_xvmc \
2057 --disable-ffserver \
2063 `if test "x$use_vdpau" != "xno"; then echo --enable-vdpau; else echo --disable-vdpau; fi` \
2064 `if test "x$use_vaapi" != "xno"; then echo --enable-vaapi; else echo --disable-vaapi; fi` \
2065 --enable-protocol=http \
2067 --enable-runtime-cpudetect \
2068 --custom-libname-with-major="\$(FULLNAME)-\$(LIBMAJOR)-${ARCH}\$(SLIBSUF)" \
2069 `case $host_cpu in i?86*) echo --disable-pic ;; *) echo --enable-pic ;; esac` \
2071 sed -i -e "s#define HAVE_SYMVER 1#define HAVE_SYMVER 0#" config.h &&
2072 sed -i -e "s#define HAVE_SYMVER_GNU_ASM 1#define HAVE_SYMVER_GNU_ASM 0#" config.h
2074 ], [$USE_EXTERNAL_FFMPEG])
2076 XB_CONFIG_MODULE([lib/libdvd/libdvdcss], [
2081 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2082 --host=$host_alias \
2083 --build=$build_alias \
2084 --target=$target_alias \
2088 ], [$SKIP_CONFIG_DVDCSS])
2090 XB_CONFIG_MODULE([lib/libdvd/libdvdread], [
2092 --extra-cflags="$CFLAGS $DVDREAD_CFLAGS -I`pwd`/../libdvdcss/src" \
2093 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2094 --host=$host_alias \
2095 --build=$build_alias \
2096 --target=$target_alias \
2102 $MAKE dvdread-config &&
2103 mkdir -p `pwd`/../includes/dvdread
2104 cp `pwd`/../libdvdread/src/*.h `pwd`/../includes/dvdread
2107 XB_CONFIG_MODULE([lib/libdvd/libdvdnav], [
2109 --extra-cflags="$CFLAGS $DVDREAD_CFLAGS -I`pwd`/../includes" \
2110 --extra-ldflags="-L`pwd`/../libdvdread/obj" \
2111 --with-dvdread-config="`pwd`/../libdvdread/obj/dvdread-config" \
2112 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2113 --host=$host_alias \
2114 --build=$build_alias \
2115 --target=$target_alias \
2121 XB_CONFIG_MODULE([lib/libid3tag/libid3tag],[
2126 CXXFLAGS="$CXXFLAGS" \
2127 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2128 --host=$host_alias \
2129 --build=$build_alias \
2130 --target=$target_alias \
2135 XB_CONFIG_MODULE([xbmc/visualizations/XBMCProjectM/libprojectM],[
2137 rm -f CMakeCache.txt && CC="$ORIGCC" CXX="$ORIGCXX" cmake \
2138 -DCMAKE_BUILD_TYPE=None -DUSE_FTGL:BOOL=OFF \
2139 -DCMAKE_C_FLAGS:STRING="${CPPFLAGS} ${CFLAGS}" \
2140 -DCMAKE_CXX_FLAGS:STRING="${CPPFLAGS} ${CXXFLAGS}" \
2141 -DCMAKE_INSTALL_PREFIX="${prefix}" \
2142 -DCMAKE_INSTALL_LIBDIR:PATH="${libdir}" \
2143 -DINCLUDE_INSTALL_DIR:PATH="${includedir}" \
2144 -DLIB_INSTALL_DIR:PATH="${libdir}" \
2145 -DSYSCONF_INSTALL_DIR:PATH="${sysconfdir}" \
2146 -DSHARE_INSTALL_PREFIX:PATH="${datadir}" . &&
2147 if test "$host_vendor" = "apple" ; then
2148 # cmake has hardcoded paths to macports which bork our darwin depends cross/ppc, remove them
2149 sed -i "" -e "s|-L/opt/local/lib| |" CMakeFiles/projectM.dir/link.txt
2150 sed -i "" -e "s|-L/opt/local/lib| |" CMakeFiles/projectM.dir/flags.make
2151 sed -i "" -e "s|-I/opt/local/include| |" CMakeFiles/projectM.dir/flags.make
2154 ], [$DISABLE_PROJECTM])
2156 XB_CONFIG_MODULE([xbmc/visualizations/Goom/goom2k4-0],[
2159 CXXFLAGS="$CXXFLAGS" \
2160 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2161 --host=$host_alias \
2162 --build=$build_alias \
2163 --target=$target_alias \
2169 XB_CONFIG_MODULE([xbmc/screensavers/rsxs-0.9/], [
2174 CXXFLAGS="$CXXFLAGS" \
2175 `if test "$host_vendor" = "apple"; then echo --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib; fi` \
2176 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2177 --host=$host_alias \
2178 --build=$build_alias \
2179 --target=$target_alias \
2180 --without-xscreensaver \
2183 --disable-fieldlines \
2187 --disable-hyperspace \
2192 XB_CONFIG_MODULE([lib/libapetag], [
2194 `if test "$host_vendor" = "apple"; then echo --disable-shared; fi` \
2195 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2196 --host=$host_alias \
2197 --build=$build_alias \
2198 --target=$target_alias CFLAGS="$CFLAGS" CC="$CC" CXX="$CXX"
2201 XB_CONFIG_MODULE([lib/cpluff], [
2202 ./configure --disable-nls \
2203 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2204 --host=$host_alias \
2205 --build=$build_alias \
2206 --target=$target_alias CFLAGS="$CFLAGS" CC="$CC" CXX="$CXX"
2207 #LDFLAGS="$LDFLAGS -Wl,-read_only_relocs,suppress"
2210 XB_CONFIG_MODULE([lib/libcec], [
2211 if test "$use_libcec" = "yes" && test "$use_external_libcec" = "no" ; then
2212 cd libcec ; ./configure \
2213 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2214 --host=$host_alias \
2215 --build=$build_alias \
2216 --target=$target_alias CFLAGS="$CFLAGS" CC="$CC" CXX="$CXX"
2222 final_message="$final_message\n prefix:\t$prefix\n$dashes"
2223 echo -e "$final_message\n"