2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([xbmc], [12.9.8], [http://trac.xbmc.org])
6 AC_CONFIG_HEADERS([xbmc/config.h])
8 m4_include([m4/ax_python_devel.m4])
9 m4_include([m4/xbmc_arch.m4])
11 AC_CONFIG_AUX_DIR([build-aux])
12 AM_INIT_AUTOMAKE([foreign])
16 echo "$@" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz
19 # check for enabling additional players
20 AC_DEFUN([XB_ADD_PLAYER],
22 AC_MSG_CHECKING([for $2])
26 AC_DEFINE([HAS_$1], 1, [using $2])
27 AC_MSG_RESULT([enabling $2])
30 AC_MSG_RESULT([$2 is not enabled])
34 # check for enabling additional codecs
35 AC_DEFUN([XB_ADD_CODEC],
37 AC_MSG_CHECKING([for $2])
41 AC_DEFINE([HAS_$1], 1, [using $2])
42 AC_MSG_RESULT([enabling $2])
45 AC_MSG_RESULT([$2 is not enabled])
49 # check for library basenames
50 AC_DEFUN([XB_FIND_SONAME],
52 if echo "$host" | grep -q freebsd ; then
53 AC_MSG_CHECKING([for lib$2 soname])
54 $1_SONAME=[`ldconfig -r | sed -n "s;.* \(/.*lib$2\.so.*\)$;\1;p" | head -n 1`]
55 if test x$$1_SONAME != x ; then
56 $1_SONAME=[`basename $$1_SONAME`]
58 elif [[ "$host_vendor" != "apple" ]]; then
59 AC_MSG_CHECKING([for lib$2 soname])
60 $1_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS -l$2 -Wl,-M 2>/dev/null | grep "^LOAD.*$2" | awk '{V=2; print $V}')
61 if [[ -z $$1_FILENAME ]]; then
62 #try gold linker syntax
63 $1_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS -l$2 -Wl,-t 3>&1 1>&2 2>&3 | grep "lib$2")
65 if [[ ! -z $$1_FILENAME ]]; then
66 $1_SONAME=$($OBJDUMP -p $$1_FILENAME | grep "SONAME.*$2" | awk '{V=2; print $V}')
69 AC_MSG_CHECKING([for lib$2 dylib])
70 gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
71 env_lib_path=[`echo $LDFLAGS | sed 's/-L[ ]*//g'`]
72 if test "$cross_compiling" = yes; then
75 host_lib_path="/usr/lib /usr/local/lib"
77 for path in $gcc_lib_path $env_lib_path $host_lib_path; do
78 lib=[`ls -- $path/lib$2.dylib 2>/dev/null`]
79 if test x$lib != x; then
80 # we want the path/name that is embedded in the dylib
81 $1_SONAME=[`otool -L $lib | grep -v lib$2.dylib | grep lib$2 | awk '{V=1; print $V}'`]
82 $1_SONAME=[`basename $$1_SONAME`]
86 if [[ -z "$$1_SONAME" ]]; then
88 if test -z "$3" || test "x${$3}" = "xyes"; then
89 AC_MSG_ERROR([Unable to determine soname of lib$2 library])
91 AC_MSG_WARN([Unable to determine soname of lib$2 library])
93 AC_MSG_WARN([lib$2 support disabled])
96 AC_MSG_RESULT([$$1_SONAME])
101 # Function to push and pop libs and includes for a command
102 AC_DEFUN([XB_PUSH_FLAGS], [
104 SAVE_INCLUDES="$INCLUDES"
109 INCLUDES="$SAVE_INCLUDES"
112 # General message strings
113 configure_debug="ERROR: this is a configure debug statement"
114 missing_library="Could not find a required library. Please see the README for your platform."
115 missing_headers="Could not find some required headers. Please see the README for your platform."
116 missing_program="Could not find a required program. Please see the README for your platform."
117 xrandr_not_found="== Could not find libXRandR. SDL will be used for resolution support. =="
118 xrandr_disabled="== XRandR support disabled. SDL will be used for resolution support. =="
119 waveform_enabled="== WAVEFORM enabled =="
120 waveform_disabled="== WAVEFORM disabled =="
121 spectrum_enabled="== SPECTRUM enabled =="
122 spectrum_disabled="== SPECTRUM disabled =="
123 goom_enabled="== GOOM enabled. =="
124 goom_disabled="== GOOM disabled. =="
125 alsa_disabled="== ALSA support disabled. =="
126 rsxs_enabled="== RSXS enabled. =="
127 rsxs_disabled="== RSXS disabled. =="
128 fishbmc_enabled="== FishBMC enabled. =="
129 fishbmc_disabled="== FishBMC disabled. =="
130 projectm_enabled="== ProjectM enabled. =="
131 projectm_disabled="== ProjectM disabled. =="
132 x11_enabled="== X11 enabled. =="
133 x11_disabled="== X11 disabled. =="
134 pulse_not_found="== Could not find libpulse. PulseAudio support disabled. =="
135 pulse_disabled="== PulseAudio support manually disabled. =="
136 dvdcss_enabled="== DVDCSS support enabled. =="
137 dvdcss_disabled="== DVDCSS support disabled. =="
138 hal_not_found="== Could not find hal. HAL support disabled. =="
139 halstorage_not_found="== Could not find hal-storage. HAL support disabled. =="
140 hal_disabled="== HAL support disabled. =="
141 avahi_not_found="== Could not find libavahi-common or libavahi-client. Avahi support disabled. =="
142 avahi_disabled="== Avahi support disabled. =="
143 mdnsembedded_not_found="== Could not find mDNSEmbedded. Might prevent zeroconf support. =="
144 mdnsembedded_disabled="== mDNSEmbedded support disabled. =="
145 vdpau_not_found="== Could not find libvdpau. VDPAU support disabled. =="
146 vdpau_disabled="== VDPAU support manually disabled. =="
147 vaapi_not_found="== Could not find libva. VAAPI support disabled. =="
148 vaapi_disabled="== VAAPI support manually disabled. =="
149 crystalhd_not_found="== Could not find libcrystalhd. CrystalHD support disabled. =="
150 crystalhd_disabled="== CrystalHD support manually disabled. =="
151 vtbdecoder_enabled="== VTBDecoder support enabled. =="
152 vtbdecoder_disabled="== VTBDecoder support manually disabled. =="
153 openmax_disabled="== OpenMax support manually disabled. =="
154 openmax_not_found="== Could not find libnvomx. OpenMax support disabled. =="
155 ssh_not_found="== Could not find libssh. =="
156 ssh_disabled="== SSH SFTP disabled. =="
157 librtmp_not_found="== Could not find libRTMP. RTMP support disabled. =="
158 librtmp_disabled="== RTMP support disabled. =="
159 libnfs_not_found="== Could not find libnfs. NFS client support disabled. =="
160 libnfs_disabled="== NFS support disabled. =="
161 libafpclient_not_found="== Could not find libafpclient. AFP client support disabled. =="
162 libafpclient_disabled="== AFP support disabled. =="
163 libshairport_not_found="== Could not find libshairport. =="
164 libshairplay_not_found="== Could not find libshairplay. =="
165 samba_disabled="== SAMBA support disabled. =="
166 libplist_not_found="== Could not find libplist. AirPlay support disabled. =="
167 libplist_disabled="== AirPlay support disabled. =="
168 alsa_not_found="== Could not find ALSA. ALSA support disabled. =="
169 dbus_not_found="== Could not find DBUS. DBUS support disabled. =="
170 libcap_disabled="== Capabilities detection support disabled. =="
171 libcap_not_found="== Could not find libcap. Capabilities detection support disabled. =="
172 gtest_enabled="== Google Test Framework will be configured. =="
173 gtest_disabled="== Google Test Framework will not be configured. =="
175 libudev_not_found="== Could not find libudev. Will use polling to check for device changes. =="
176 libudev_disabled="== udev support disabled. Will use polling to check for device changes. =="
177 libusb_not_found="== Could not find libusb. Plug and play USB device support will not be available. =="
178 libusb_disabled="== libusb disabled. Plug and play USB device support will not be available. =="
179 libusb_disabled_udev_found="== libusb disabled. =="
180 libcec_enabled="== libcec enabled. =="
181 libcec_disabled="== libcec disabled. CEC adapter support will not be available. =="
183 # External library message strings
184 external_libraries_enabled="== Use of all supported external libraries enabled. =="
185 external_libraries_disabled="== Use of all supported external libraries disabled. =="
186 external_ffmpeg_enabled="== Use of external ffmpeg enabled. =="
187 external_ffmpeg_disabled="== Use of external ffmpeg disabled. =="
188 ffmpeg_vdpau_not_supported="== External ffmpeg doesn't support VDPAU. VDPAU support disabled. =="
189 dashes="------------------------"
190 final_message="\n XBMC Configuration:"
191 final_message="\n$dashes$final_message\n$dashes"
193 AC_ARG_ENABLE([shared-lib],
194 [AS_HELP_STRING([--enable-shared-lib],
195 [build libxbmc. helpful for tests (default is no)])],
196 [build_shared_lib=$enableval],
197 [build_shared_lib=no])
199 AC_ARG_ENABLE([debug],
200 [AS_HELP_STRING([--enable-debug],
201 [enable debugging information (default is yes)])],
202 [use_debug=$enableval],
206 [AS_HELP_STRING([--with-arch],
207 [build with given arch passing to internal ffmpeg (default is no, needed for crosscompiling)])],
211 AC_ARG_WITH([platform],
212 [AS_HELP_STRING([--with-platform],
213 [use a pre-configured config for common arm boards])],
214 [use_platform=$withval],
218 [AS_HELP_STRING([--with-cpu],
219 [build with given cpu passing to ffmpeg (default is no)])],
223 AC_ARG_ENABLE([neon],
224 [AS_HELP_STRING([--enable-neon],
225 [enable neon passing to ffmpeg (default is no)])],
226 [use_neon=$enableval],
229 AC_ARG_ENABLE([optimizations],
230 [AS_HELP_STRING([--enable-optimizations],
231 [enable optimization (default is yes)])],
232 [use_optimizations=$enableval],
233 [use_optimizations=yes])
236 [AS_HELP_STRING([--enable-gl],
237 [enable OpenGL rendering (default is yes)])],
241 AC_ARG_ENABLE([gles],
242 [AS_HELP_STRING([--enable-gles],
243 [enable OpenGLES rendering (default is no)])],
244 [use_gles=$enableval],
248 [AS_HELP_STRING([--enable-sdl],
249 [enable SDL (default is auto)])],
250 [use_sdl=$enableval],
253 AC_ARG_ENABLE([vdpau],
254 [AS_HELP_STRING([--enable-vdpau],
255 [enable VDPAU decoding (default is auto)])],
256 [use_vdpau=$enableval],
259 AC_ARG_ENABLE([vaapi],
260 [AS_HELP_STRING([--enable-vaapi],
261 [enable VAAPI decoding (default is auto)])],
262 [use_vaapi=$enableval],
265 AC_ARG_ENABLE([crystalhd],
266 [AS_HELP_STRING([--enable-crystalhd],
267 [enable CrystalHD decoding (default is auto)])],
268 [use_crystalhd=$enableval],
269 [use_crystalhd=auto])
271 AC_ARG_ENABLE([vtbdecoder],
272 [AS_HELP_STRING([--enable-vtbdecoder],
273 [enable VTBDecoder decoding (default is auto)])],
274 [use_vtbdecoder=$enableval],
275 [use_vtbdecoder=auto])
277 AC_ARG_ENABLE([openmax],
278 [AS_HELP_STRING([--enable-openmax],
279 [enable OpenMax decoding (default is auto, requires OpenGLES)])],
280 [use_openmax=$enableval],
283 AC_ARG_ENABLE([tegra],
284 [AS_HELP_STRING([--enable-tegra],
285 [enable Tegra2 arm (default is no)])],
286 [use_tegra=$enableval],
289 AC_ARG_ENABLE([profiling],
290 [AS_HELP_STRING([--enable-profiling],
291 [enable gprof profiling (default is no)])],
292 [use_profiling=$enableval],
295 AC_ARG_ENABLE([joystick],
296 [AS_HELP_STRING([--enable-joystick],
297 [enable SDL joystick support (default is yes)])],
298 [use_joystick=$enableval],
301 AC_ARG_ENABLE([xrandr],
302 [AS_HELP_STRING([--enable-xrandr],
303 [enable XRandR support (default is yes)])],
304 [use_xrandr=$enableval],
307 AC_ARG_ENABLE([waveform],
308 [AS_HELP_STRING([--enable-waveform],
309 [enable Waveform visualisation (default is yes)])],
310 [use_waveform=$enableval],
313 AC_ARG_ENABLE([spectrum],
314 [AS_HELP_STRING([--enable-spectrum],
315 [enable Spectrum visualisation (default is yes)])],
316 [use_spectrum=$enableval],
319 AC_ARG_ENABLE([goom],
320 [AS_HELP_STRING([--enable-goom],
321 [enable GOOM visualisation (default is no)])],
322 [use_goom=$enableval],
325 AC_ARG_ENABLE([rsxs],
326 [AS_HELP_STRING([--enable-rsxs],
327 [enable really slick X screensavers (default is yes)])],
328 [use_rsxs=$enableval],
331 AC_ARG_ENABLE([fishbmc],
332 [AS_HELP_STRING([--enable-fishbmc],
333 [enable FishBMC visualisation (default is yes)])],
334 [use_fishbmc=$enableval],
337 AC_ARG_ENABLE([projectm],
338 [AS_HELP_STRING([--enable-projectm],
339 [enable ProjectM visualisation (default is yes)])],
340 [use_projectm=$enableval],
344 [AS_HELP_STRING([--enable-x11],
345 [enable x11 (default is yes) 'Linux Only'])],
346 [use_x11=$enableval],
349 AC_ARG_ENABLE([ccache],
350 [AS_HELP_STRING([--enable-ccache],
351 [enable building with ccache feature (default is auto)])],
352 [use_ccache=$enableval],
355 AC_ARG_ENABLE([alsa],
356 [AS_HELP_STRING([--disable-alsa],
357 [disable ALSA support (only for linux/freebsd)])],
358 [use_alsa=$enableval],
361 AC_ARG_ENABLE([pulse],
362 [AS_HELP_STRING([--enable-pulse],
363 [enable PulseAudio support (default is no)])],
364 [use_pulse=$enableval],
368 [AS_HELP_STRING([--disable-ssh],
369 [disable SSH SFTP support (default is enabled)])],
370 [use_ssh=$enableval],
373 AC_ARG_ENABLE([rtmp],
374 [AS_HELP_STRING([--enable-rtmp],
375 [enable RTMP support via librtmp (default is auto)])],
376 [use_librtmp=$enableval],
379 AC_ARG_ENABLE([samba],
380 [AS_HELP_STRING([--disable-samba],
381 [disable SAMBA support (default is enabled)])],
382 [use_samba=$enableval],
386 [AS_HELP_STRING([--enable-nfs],
387 [enable NFS support via libnfs (default is auto)])],
388 [use_libnfs=$enableval],
391 AC_ARG_ENABLE([afpclient],
392 [AS_HELP_STRING([--enable-afpclient],
393 [enable AFP support via libafpclient (default is auto)])],
394 [use_libafpclient=$enableval],
395 [use_libafpclient=auto])
397 AC_ARG_ENABLE([airplay],
398 [AS_HELP_STRING([--enable-airplay],
399 [enable AirPlay support(default is auto)])],
400 [use_airplay=$enableval],
403 AC_ARG_ENABLE([airtunes],
404 [AS_HELP_STRING([--enable-airtunes],
405 [enable AirTunes support(default is auto)])],
406 [use_airtunes=$enableval],
409 AC_ARG_ENABLE([upnp],
410 [AS_HELP_STRING([--disable-upnp],
411 [disable UPnP support (default is enabled)])],
412 [use_upnp=$enableval],
415 AC_ARG_ENABLE([ffmpeg_libvorbis],
416 [AS_HELP_STRING([--enable-ffmpeg-libvorbis],
417 [enable FFmpeg vorbis encoding (default is no)])],
418 [use_ffmpeg_libvorbis=$enableval],
419 [use_ffmpeg_libvorbis=no])
421 AC_ARG_ENABLE([dvdcss],
422 [AS_HELP_STRING([--enable-dvdcss],
423 [enable DVDCSS support (default is yes)])],
424 [use_dvdcss=$enableval],
428 [AS_HELP_STRING([--enable-mid],
429 [enable MID support (default is no)])],
430 [use_mid=$enableval],
434 [AS_HELP_STRING([--disable-hal],
435 [disable HAL support (default is enabled if hal and hal-storage is found)])],
436 [use_hal=$enableval],
439 AC_ARG_ENABLE([avahi],
440 [AS_HELP_STRING([--disable-avahi],
441 [disable Avahi support (default is enabled if libavahi-common and libavahi-client is found)])],
442 [use_avahi=$enableval],
445 AC_ARG_ENABLE([mdnsembedded],
446 [AS_HELP_STRING([--disable-mdnsembedded],
447 [disable mDNSEmbedded support (default is auto)])],
448 [use_mdnsembedded=$enableval],
449 [use_mdnsembedded=auto])
451 AC_ARG_ENABLE([non-free],
452 [AS_HELP_STRING([--disable-non-free],
453 [disable componentents with non-compliant licenses])],
454 [use_nonfree=$enableval],
457 AC_ARG_ENABLE([asap-codec],
458 [AS_HELP_STRING([--enable-asap-codec],
459 [enable ASAP ADPCM support])],
460 [use_asap=$enableval],
463 AC_ARG_ENABLE([mysql],
464 [AS_HELP_STRING([--disable-mysql],
466 [use_mysql=$enableval],
469 AC_ARG_ENABLE([webserver],
470 [AS_HELP_STRING([--disable-webserver],
471 [disable webserver])],
472 [use_webserver=$enableval],
475 AC_ARG_ENABLE([optical-drive],
476 [AS_HELP_STRING([--disable-optical-drive],
477 [disable optical drive])],
478 [use_optical_drive=$enableval],
479 [use_optical_drive=yes])
481 AC_ARG_ENABLE([libbluray],
482 [AS_HELP_STRING([--enable-libbluray],
483 [enable libbluray support])],
484 [use_libbluray=$enableval],
485 [use_libbluray=auto])
487 AC_ARG_ENABLE([texturepacker],
488 [AS_HELP_STRING([--enable-texturepacker],
489 [enable texturepacker support (default is yes)])],
490 [use_texturepacker=$enableval],
491 [use_texturepacker=auto])
493 AC_ARG_WITH([lirc-device],
494 [AS_HELP_STRING([--with-lirc-device=file],
495 [specify the default LIRC device (default is /dev/lircd)])],
496 [lirc_device=$withval],
497 [lirc_device=/dev/lircd])
498 AC_DEFINE_UNQUOTED([LIRC_DEVICE], ["$lirc_device"], [Default LIRC device])
500 AC_ARG_ENABLE([udev],
501 [AS_HELP_STRING([--enable-udev],
502 [enable udev support (default is auto)])],
503 [use_libudev=$enableval],
506 AC_ARG_ENABLE([libusb],
507 [AS_HELP_STRING([--enable-libusb],
508 [enable libusb support (default is auto)])],
509 [use_libusb=$enableval],
512 AC_ARG_ENABLE([libcec],
513 [AS_HELP_STRING([--enable-libcec],
514 [enable libcec support (default is auto)])],
515 [use_libcec=$enableval],
518 AC_ARG_ENABLE([libmp3lame],
519 [AS_HELP_STRING([--enable-libmp3lame],
520 [enable lame mp3 encoder support (default is auto)])],
521 [use_libmp3lame=$enableval],
522 [use_libmp3lame=auto])
524 AC_ARG_ENABLE([libvorbisenc],
525 [AS_HELP_STRING([--enable-libvorbisenc],
526 [enable vorbis encoder support (default is auto)])],
527 [use_libvorbisenc=$enableval],
528 [use_libvorbisenc=auto])
530 AC_ARG_ENABLE([libcap],
531 [AS_HELP_STRING([--enable-libcap],
532 [enable libcap support (default is auto)])],
533 [use_libcap=$enableval],
536 AC_ARG_ENABLE([player],
537 [AS_HELP_STRING([--enable-player],
538 [enable additional players from a list of comma separated names, (default is none, choices are amlplayer, omxplayer)])],
539 [add_players=$enableval],
542 AC_ARG_ENABLE([gtest],
543 [AS_HELP_STRING([--enable-gtest],
544 [configure Google Test Framework (default is no)])],
545 [configure_gtest=$enableval],
546 [configure_gtest=no])
548 AC_ARG_ENABLE([codec],
549 [AS_HELP_STRING([--enable-codec],
550 [enable additional codecs from a list of comma separated names, (default is none, choices are amcodec, libstagefright)])],
551 [add_codecs=$enableval],
554 ### External libraries options
555 AC_ARG_ENABLE([external-libraries],
556 [AS_HELP_STRING([--enable-external-libraries],
557 [enable use of all supported external libraries (default is no) 'Linux only'])],
558 [use_external_libraries=$enableval],
559 [use_external_libraries=no])
561 AC_ARG_ENABLE([external-ffmpeg],
562 [AS_HELP_STRING([--enable-external-ffmpeg],
563 [enable use of external ffmpeg libraries (default is no) 'Linux only'])],
564 [use_external_ffmpeg=$enableval],
565 [use_external_ffmpeg=$use_external_libraries])
567 AC_ARG_ENABLE([libav-compat],
568 [AS_HELP_STRING([--enable-libav-compat],
569 [build a wrapper around libav to provide the functions needed by XBMC. This is
570 *not* supported by XBMC developers and is provided only for convenience. (default is no) 'Linux only'])],
571 [use_libav_hacks=$enableval],
572 [use_libav_hacks=no])
574 ### End of external library options
576 if test "x$host_vendor" != "xapple"; then
577 DEFAULT_COMPILE_FLAGS="-fPIC -DPIC -D_REENTRANT"
578 DEFAULT_COMPILE_FLAGS="$DEFAULT_COMPILE_FLAGS -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
581 # Checks for programs.
582 PASSED_CXXFLAGS=$CXXFLAGS # Hack to override autoconf default values
584 CXXFLAGS="$PASSED_CXXFLAGS $DEFAULT_COMPILE_FLAGS"
585 PASSED_CFLAGS=$CFLAGS # Hack to override autoconf default values
588 CFLAGS="$PASSED_CFLAGS $DEFAULT_COMPILE_FLAGS"
593 OBJDUMP="${OBJDUMP:-objdump}"
595 # ffmpeg needs the output of uname -s (e.x. linux, darwin) for the target_os
596 # there is no autoconf variable which will give
597 # the correct output format when doing cross compilation
598 # so we have to use our own var here
599 # defaults to the build side target_os
600 # and should be overridden for cross below (see android)
601 ffmpeg_target_os=$(tolower $(uname -s))
603 # host detection and setup
605 i*86*-android-linux-gnu*)
606 target_platform=target_android
610 ffmpeg_target_os=linux
623 ARCH="x86_64-freebsd"
636 use_texturepacker_native=yes
640 PYTHON_LDFLAGS="-L${prefix}/lib -lpython2.6"
641 PYTHON_CPPFLAGS="-I${prefix}/include/python2.6"
642 PYTHON_SITE_PKG="${prefix}/lib/python2.6/site-packages"
643 PYTHON_NOVERSIONCHECK="no-check"
648 use_texturepacker_native=yes
651 powerpc-apple-darwin*)
658 powerpc-*-linux-gnu*)
661 powerpc64-*-linux-gnu*)
662 ARCH="powerpc64-linux"
668 ffmpeg_target_os=linux
675 arm*-*linux-android*)
676 target_platform=target_android
680 ffmpeg_target_os=linux
690 AC_MSG_ERROR(unsupported host ($host))
694 check_sdl_arch=[`file $USE_TEXTUREPACKER_NATIVE_ROOT/lib/libSDL_image.dylib | awk '{print $NF}'`]
695 if test "x$check_sdl_arch" = "xi386" ; then
696 DARWIN_NATIVE_ARCH=-m32
697 elif test "x$check_sdl_arch" = "xx86_64" ; then
698 DARWIN_NATIVE_ARCH=-m64
700 AC_SUBST([DARWIN_NATIVE_ARCH])
702 if test "$target_platform" = "target_android" ; then
704 use_texturepacker_native=yes
705 webserver_checkdepends=yes
706 CFLAGS="$CFLAGS -Wno-psabi"
707 CXXFLAGS="$CXXFLAGS -Wno-psabi"
708 AC_DEFINE(HAS_EGLGLES, [1], [Define if supporting EGL based GLES Framebuffer])
711 case $use_platform in
713 target_platform=target_raspberry_pi
715 use_texturepacker=yes
716 use_texturepacker_native=yes
719 use_hardcoded_tables="yes"
722 AC_DEFINE(HAS_EGLGLES, [1], [Define if supporting EGL based GLES Framebuffer])
723 USE_OMXLIB=1; AC_DEFINE([HAVE_OMXLIB],[1],["Define to 1 if OMX libs is enabled"])
726 ffmpeg_target_os=linux
730 XBMC_SETUP_ARCH_DEFINES()
733 AC_CHECK_PROG(HAVE_GIT,git,"yes","no",)
734 if test "$GIT_REV" = ""; then
735 if test -f VERSION ; then
736 GIT_REV=$(awk 'END{print substr($1,1,16)}' VERSION)
737 elif test "$HAVE_GIT" = "yes"; then
738 GIT_REV=$(git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h %ci" HEAD | awk '{gsub("-", "");print $2"-"$1}')
743 final_message="$final_message\n git Rev.:\t${GIT_REV}"
745 if test "$host_vendor" = "apple"; then
746 echo "#define GIT_REV \"$GIT_REV\"" > git_revision.h
748 SDL_DEFINES="$SDL_DEFINES -D'GIT_REV=\"$GIT_REV\"'"
751 if test "$build_shared_lib" = "yes"; then
752 final_message="$final_message\n Shared lib\tYes"
753 AC_SUBST(USE_LIBXBMC,1)
757 # platform debug flags
758 if test "$use_debug" = "yes"; then
759 final_message="$final_message\n Debugging:\tYes"
760 if test "$use_profiling" = "yes"; then
761 final_message="$final_message\n Profiling:\tYes"
762 DEBUG_FLAGS="-g -pg -D_DEBUG -Wall"
764 final_message="$final_message\n Profiling:\tNo"
765 DEBUG_FLAGS="-g -D_DEBUG -Wall"
768 final_message="$final_message\n Debugging:\tNo"
769 if test "$use_profiling" = "yes"; then
770 final_message="$final_message\n Profiling:\tYes"
771 DEBUG_FLAGS="-pg -DNDEBUG=1"
773 final_message="$final_message\n Profiling:\tNo"
774 DEBUG_FLAGS="-DNDEBUG=1"
777 CFLAGS="$CFLAGS $DEBUG_FLAGS"
778 CXXFLAGS="$CXXFLAGS $DEBUG_FLAGS"
781 if test "$use_optimizations" = "yes"; then
782 final_message="$final_message\n Optimization:\tYes"
783 if test "$target_platform" = "target_raspberry_pi"; then
787 CXXFLAGS="-O2 $CXXFLAGS"
791 final_message="$final_message\n Optimization:\tNo"
795 # platform specific flags
796 if echo "$ARCH" | grep -q "freebsd" ; then
797 LOCALBASE="${LOCALBASE:-/usr/local}"
798 CFLAGS="$CFLAGS -I$LOCALBASE/include"
799 CXXFLAGS="$CXXFLAGS -I$LOCALBASE/include"
800 CPPFLAGS="$CPPFLAGS -I$LOCALBASE/include"
801 LDFLAGS="$LDFLAGS -L$LOCALBASE/lib"
802 FFMPEG_EXTRACFLAGS="-I$LOCALBASE/include"
804 if test "$host_vendor" = "apple" ; then
805 # standard xbmc paths
806 INCLUDES="$INCLUDES -I\$(abs_top_srcdir)/xbmc/osx"
807 if test "$use_arch" != "arm"; then
808 LIBS="$LIBS -framework ApplicationServices"
809 LIBS="$LIBS -framework AudioUnit"
810 LIBS="$LIBS -framework AudioToolbox"
811 LIBS="$LIBS -framework Cocoa"
812 LIBS="$LIBS -framework CoreAudio"
813 LIBS="$LIBS -framework CoreVideo"
814 LIBS="$LIBS -framework CoreServices"
815 LIBS="$LIBS -framework CoreFoundation"
816 LIBS="$LIBS -framework DiskArbitration"
817 LIBS="$LIBS -framework IOKit"
818 LIBS="$LIBS -framework IOSurface"
819 LIBS="$LIBS -framework QuartzCore"
820 LIBS="$LIBS -framework SystemConfiguration"
822 USE_EXTERNAL_FFMPEG=1
823 elif test "$target_platform" = "target_raspberry_pi"; then
826 elif test "$use_arch" = "arm"; then
827 CFLAGS="$CFLAGS -mno-apcs-stack-check"
828 CXXFLAGS="$CXXFLAGS -mno-apcs-stack-check"
829 FFMPEG_EXTRACFLAGS=""
830 if test "$use_tegra" = "yes"; then
831 # Compile for ARMv7a architecture, need to test gcc for vfpv3-d16 support
832 SAVE_CFLAGS="$CFLAGS"
833 CFLAGS="-mfpu=vfpv3-d16"
835 [AC_LANG_SOURCE([int foo;])],
836 [ CFLAGS="$SAVE_CFLAGS -Wno-psabi -Wa,-march=armv7a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mthumb-interwork"
837 CXXFLAGS="$CXXFLAGS -Wno-psabi -Wa,-march=armv7a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mthumb-interwork"
838 FFMPEG_EXTRACFLAGS="$FFMPEG_EXTRACFLAGS -mtune=cortex-a9 -mfpu=vfpv3-d16"
840 [ CFLAGS="$SAVE_CFLAGS -Wa,-march=armv6 -mtune=cortex-a8 -mthumb-interwork"
841 CXXFLAGS="$CXXFLAGS -Wa,-march=armv6 -mtune=cortex-a8 -mthumb-interwork"
844 if test "$use_neon" = "yes"; then
845 CFLAGS="$CFLAGS -mfpu=neon -mvectorize-with-neon-quad"
846 CXXFLAGS="$CXXFLAGS -mfpu=neon -mvectorize-with-neon-quad"
847 FFMPEG_EXTRACFLAGS="$FFMPEG_EXTRACFLAGS -mfpu=neon"
852 # Checks for library functions.
855 AC_FUNC_CLOSEDIR_VOID
856 AC_FUNC_ERROR_AT_LINE
858 AC_PROG_GCC_TRADITIONAL
860 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
864 # Boxee is apparently having compile problems
865 # if HAVE_REALLOC is defined. Sort this later.
867 AC_FUNC_SELECT_ARGTYPES
868 AC_FUNC_SETVBUF_REVERSED
876 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 posix_fadvise])
878 # Check for various sizes
879 AC_CHECK_SIZEOF([int])
880 AC_CHECK_SIZEOF([size_t])
882 # Check for intrinsics
883 AC_MSG_CHECKING([for __sync_add_and_fetch(temp, 1)])
884 AC_TRY_LINK([],[long* temp=0; long ret=__sync_add_and_fetch(temp, 1);],
885 [have_builtin_sync_add_and_fetch=yes],
886 [have_builtin_sync_add_and_fetch=no])
887 AC_MSG_RESULT($have_builtin_sync_add_and_fetch)
888 if test "x$have_builtin_sync_add_and_fetch" = "xyes"; then
889 AC_DEFINE(HAS_BUILTIN_SYNC_ADD_AND_FETCH, 1,
890 [Define to 1 if your compiler supports the __sync_add_and_fetch() intrinsic.])
893 AC_MSG_CHECKING([for __sync_sub_and_fetch(temp, 1)])
894 AC_TRY_LINK([],[long* temp=0; long ret=__sync_sub_and_fetch(temp, 1);],
895 [have_builtin_sync_sub_and_fetch=yes],
896 [have_builtin_sync_sub_and_fetch=no])
897 AC_MSG_RESULT($have_builtin_sync_sub_and_fetch)
898 if test "x$have_builtin_sync_sub_and_fetch" = "xyes"; then
899 AC_DEFINE(HAS_BUILTIN_SYNC_SUB_AND_FETCH, 1,
900 [Define to 1 if your compiler supports the __sync_sub_and_fetch() intrinsic.])
903 AC_MSG_CHECKING([for __sync_val_compare_and_swap(temp, 1, 1)])
904 AC_TRY_LINK([],[long *temp = 0; long ret=__sync_val_compare_and_swap(temp, 1, 1);],
905 [have_builtin_sync_val_compare_and_swap=yes],
906 [have_builtin_sync_val_compare_and_swap=no])
907 AC_MSG_RESULT($have_builtin_sync_val_compare_and_swap)
908 if test "x$have_builtin_sync_val_compare_and_swap" = "xyes"; then
909 AC_DEFINE(HAS_BUILTIN_SYNC_VAL_COMPARE_AND_SWAP, 1,
910 [Define to 1 if your compiler supports the __sync_val_compare_and_swap() intrinsic.])
913 # Add top source directory for all builds so we can use config.h
914 INCLUDES="-I\$(abs_top_srcdir) $INCLUDES"
916 # Check inotify availability
917 AC_CHECK_HEADER([sys/inotify.h], AC_DEFINE([HAVE_INOTIFY],[1],[Define if we have inotify]),)
919 # Checks for boost headers using CXX instead of CC
921 AC_CHECK_HEADER([boost/shared_ptr.hpp],, AC_MSG_ERROR($missing_library))
925 if test -z "$PYTHON_NOVERSIONCHECK"; then
926 AX_PYTHON_DEVEL([>= 2.4])
927 PYTHON_VERSION=$ac_python_version
930 if test -z "$PYTHON_VERSION"; then
931 AC_MSG_ERROR([Can't find a Python version.])
933 LIBS="$LIBS $PYTHON_LDFLAGS"
934 AC_MSG_NOTICE([Using Python $PYTHON_VERSION])
937 # Checks for platforms libraries.
938 if test "$use_gles" = "yes"; then
940 # GLES overwrites GL if both set to yes.
941 if test "$host_vendor" = "apple" ; then
942 AC_DEFINE([HAVE_LIBEGL],[1],["Define to 1 if you have the `EGL' library (-lEGL)."])
943 AC_DEFINE([HAVE_LIBGLESV2],[1],["Define to 1 if you have the `GLESv2' library (-lGLESv2)."])
944 AC_MSG_RESULT(== WARNING: OpenGLES support is assumed.)
946 if test "$target_platform" = "target_raspberry_pi"; then
947 AC_DEFINE([HAVE_LIBEGL],[1],["Define to 1 if you have the `EGL' library (-lEGL)."])
948 AC_DEFINE([HAVE_LIBGLESV2],[1],["Define to 1 if you have the `GLESv2' library (-lGLESv2)."])
949 AC_MSG_RESULT(== WARNING: OpenGLES support is assumed.)
950 LIBS="$LIBS -lEGL -lGLESv2 -lbcm_host -lvcos -lvchiq_arm"
952 AC_CHECK_LIB([EGL], [main],, AC_MSG_ERROR($missing_library))
953 AC_CHECK_LIB([GLESv2],[main],, AC_MSG_ERROR($missing_library))
957 if test "$use_gl" = "yes"; then
958 if test "$host_vendor" = "apple" ; then
959 # linking to OpenGL.framework instead of libGL, libGLU so AC_CHECK_LIB will fail
960 LIBS="$LIBS -framework OpenGL"
961 AC_DEFINE([HAVE_LIBGL],[1],["Define to 1 if you have the `GL' library (-lGL)."])
962 AC_MSG_RESULT(== WARNING: OpenGL support is assumed.)
963 AC_DEFINE([HAVE_LIBGLU],[1],["Define to 1 if you have the `GLU' library (-lGLU)."])
964 AC_MSG_RESULT(== WARNING: OpenGLU support is assumed.)
965 AC_CHECK_LIB([GLEW],[main],, AC_MSG_ERROR($missing_library))
967 AC_CHECK_LIB([GL], [main],, AC_MSG_ERROR($missing_library))
968 AC_CHECK_LIB([GLEW],[main],, AC_MSG_ERROR($missing_library))
969 AC_CHECK_LIB([GLU], [main],, AC_MSG_ERROR($missing_library))
972 AC_MSG_RESULT(== WARNING: OpenGL support is disabled. XBMC will run VERY slow. ==)
973 AC_CHECK_LIB([SDL_gfx],[main])
977 # platform common libraries
978 if test "$use_mysql" = "yes"; then
979 AC_PATH_PROG(MYSQL_CONFIG, mysql_config,"no")
980 if test "x$MYSQL_CONFIG" != "xno"; then
981 AC_DEFINE([HAVE_MYSQL],[1],["Define to 1 if you have the `mysql' library (-lmysqlclient)."])
982 INCLUDES="$INCLUDES `$MYSQL_CONFIG --include`"
983 MYSQL_LIBS=`$MYSQL_CONFIG --libs`
984 LIBS="$LIBS $MYSQL_LIBS"
987 AC_MSG_ERROR($missing_program)
990 AC_CHECK_HEADER([ass/ass.h],, AC_MSG_ERROR($missing_library))
991 AC_CHECK_HEADER([mpeg2dec/mpeg2.h],, AC_MSG_ERROR($missing_library))
992 AC_CHECK_HEADER([mpeg2dec/mpeg2convert.h],, AC_MSG_ERROR($missing_library),
993 AC_INCLUDES_DEFAULT()
994 [#include <mpeg2dec/mpeg2.h>])
995 AC_CHECK_HEADER([mad.h],, AC_MSG_ERROR($missing_library))
996 AC_CHECK_HEADER([jpeglib.h],, AC_MSG_ERROR($missing_library))
997 AC_CHECK_HEADER([samplerate.h],, AC_MSG_ERROR($missing_library))
998 AC_CHECK_HEADER([ogg/ogg.h],, AC_MSG_ERROR($missing_library))
999 AC_CHECK_HEADER([vorbis/vorbisfile.h],, AC_MSG_ERROR($missing_library))
1000 AC_CHECK_HEADER([libmodplug/modplug.h],, AC_MSG_ERROR($missing_library))
1001 AC_CHECK_HEADER([curl/curl.h],, AC_MSG_ERROR($missing_library))
1002 AC_CHECK_HEADER([FLAC/stream_decoder.h],, AC_MSG_ERROR($missing_library))
1004 # we need to check for the header because if it exists we set the openssl
1005 # and gcrypt MT callback hooks. This is mostly so that libcurl operates
1006 # in MT manner correctly.
1007 AC_CHECK_HEADER([openssl/crypto.h], AC_DEFINE([HAVE_OPENSSL],[1],[Define if we have openssl]),)
1008 AC_CHECK_HEADER([gcrypt.h], gcrypt_headers_available=yes,gcrypt_headers_available=no)
1009 if test "$gcrypt_headers_available" = "yes"; then
1010 # if we have the headers then we must have the lib
1011 AC_CHECK_LIB([gpg-error],[main],, AC_MSG_ERROR($missing_library))
1012 AC_CHECK_LIB([gcrypt],[gcry_control],, AC_MSG_ERROR($missing_library))
1013 AC_DEFINE([HAVE_GCRYPT],[1],[Define if we have gcrypt])
1016 AC_CHECK_LIB([bz2], [main],, AC_MSG_ERROR($missing_library))
1017 AC_CHECK_LIB([jpeg], [main],, AC_MSG_ERROR($missing_library)) # check for cximage
1018 AC_CHECK_LIB([tiff], [main],, AC_MSG_ERROR($missing_library))
1019 if echo "$ARCH" | grep -q freebsd; then
1020 AC_CHECK_LIB([pthread], [main],LIBS="-pthread $LIBS", AC_MSG_ERROR($missing_library))
1021 AC_CHECK_LIB([pthread], [pthread_set_name_np],
1022 AC_DEFINE([HAVE_PTHREAD_SET_NAME_NP],[1],["Define to 1 if pthread has pthread_set_name_np"]),
1023 AC_MSG_RESULT([Could not find pthread_set_name_np in pthread]))
1025 if test "$target_platform" != "target_android" ; then
1026 AC_CHECK_LIB([pthread], [main],, AC_MSG_ERROR($missing_library))
1027 AC_CHECK_LIB([pthread], [pthread_setname_np],
1028 AC_DEFINE([HAVE_PTHREAD_SETNAME_NP],[1],["Define to 1 if pthread has pthread_setname_np"]),
1029 AC_MSG_RESULT([Could not find pthread_setname_np in pthread]))
1032 AC_CHECK_LIB([lzo2], [main],, AC_MSG_ERROR($missing_library))
1033 AC_CHECK_LIB([z], [main],, AC_MSG_ERROR($missing_library))
1034 AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR($missing_library))
1035 AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR($missing_library))
1036 if test "$use_mysql" = "yes"; then
1037 AC_CHECK_LIB([mysqlclient], [main],, AC_MSG_ERROR($missing_library))
1039 AC_CHECK_LIB([bluetooth], [hci_devid],, AC_MSG_RESULT([Could not find suitable version of libbluetooth]))
1040 AC_CHECK_LIB([yajl], [main],, AC_MSG_ERROR($missing_library))
1041 AC_CHECK_LIB([tinyxml], [main],, AC_MSG_ERROR($missing_library))
1042 if test "$target_platform" = "target_android" ; then
1043 AC_CHECK_LIB([android], [main],, AC_MSG_ERROR($missing_library))
1044 AC_CHECK_LIB([log], [__android_log_vprint],, AC_MSG_ERROR($missing_library))
1045 AC_CHECK_LIB([jnigraphics], [main],, AC_MSG_ERROR($missing_library))
1047 PKG_CHECK_MODULES([FRIBIDI], [fribidi],
1048 [INCLUDES="$INCLUDES $FRIBIDI_CFLAGS"; LIBS="$LIBS $FRIBIDI_LIBS"],
1049 AC_MSG_ERROR($missing_library))
1050 PKG_CHECK_MODULES([SQLITE3], [sqlite3],
1051 [INCLUDES="$INCLUDES $SQLITE3_CFLAGS"; LIBS="$LIBS $SQLITE3_LIBS"],
1052 AC_MSG_ERROR($missing_library))
1053 PKG_CHECK_MODULES([PNG], [libpng],
1054 [INCLUDES="$INCLUDES $PNG_CFLAGS"; LIBS="$LIBS $PNG_LIBS"],
1055 AC_MSG_ERROR($missing_library))
1056 PKG_CHECK_MODULES([PCRECPP], [libpcrecpp],
1057 [INCLUDES="$INCLUDES $PCRECPP_CFLAGS"; LIBS="$LIBS $PCRECPP_LIBS"]; \
1058 AC_DEFINE([HAVE_LIBPCRECPP],[1],["Define to 1 if libpcrecpp is installed"]),
1059 AC_MSG_ERROR($missing_library))
1060 PKG_CHECK_MODULES([PCRE], [libpcre],
1061 [INCLUDES="$INCLUDES $PCRE_CFLAGS"; LIBS="$LIBS $PCRE_LIBS"]; \
1062 AC_DEFINE([HAVE_LIBPCRE],[1],["Define to 1 if libpcre is installed"]),
1063 AC_MSG_ERROR($missing_library))
1064 PKG_CHECK_MODULES([SAMPLERATE], [samplerate],
1065 [INCLUDES="$INCLUDES $SAMPLERATE_CFLAGS"; LIBS="$LIBS $SAMPLERATE_LIBS"],
1066 AC_MSG_ERROR($missing_library))
1067 PKG_CHECK_MODULES([FREETYPE2], [freetype2],
1068 [INCLUDES="$INCLUDES $FREETYPE2_CFLAGS"; LIBS="$LIBS $FREETYPE2_LIBS"],
1069 AC_MSG_ERROR($missing_library))
1070 PKG_CHECK_MODULES([TAGLIB], [taglib >= 1.8],
1071 [INCLUDES="$INCLUDES $TAGLIB_CFLAGS"; LIBS="$LIBS $TAGLIB_LIBS"],
1072 AC_MSG_ERROR($missing_library))
1074 if test "$use_optical_drive" = "yes"; then
1075 PKG_CHECK_MODULES([CDIO], [libcdio],
1076 [INCLUDES="$INCLUDES $CDIO_CFLAGS"; LIBS="$LIBS $CDIO_LIBS"],
1077 AC_MSG_ERROR($missing_library))
1080 if test "$target_platform" = "target_android" ; then
1081 PKG_CHECK_MODULES([ZIP], [libzip],
1082 [INCLUDES="$INCLUDES $ZIP_CFLAGS"; LIBS="$LIBS $ZIP_LIBS"],
1083 AC_MSG_ERROR($missing_library))
1086 # check for libbluray
1087 AS_CASE([x$use_libbluray],
1089 PKG_CHECK_MODULES([LIBBLURAY],[libbluray >= 0.2.1],[use_libbluray="yes"], AC_MSG_ERROR($missing_library))
1092 PKG_CHECK_MODULES([LIBBLURAY],[libbluray >= 0.2.1],[use_libbluray="yes"], [use_libbluray="no"])
1095 AS_CASE([x$use_libbluray],
1097 INCLUDES="$INCLUDES $LIBBLURAY_CFLAGS";
1098 XB_FIND_SONAME([BLURAY], [bluray], [use_libbluray])
1099 AC_DEFINE([HAVE_LIBBLURAY], 1, [System has libbluray library])
1100 AC_SUBST([HAVE_LIBBLURAY], 1)
1101 AC_CHECK_LIB([bluray], [bd_register_argb_overlay_proc],
1102 AC_CHECK_DECL([BD_EVENT_IDLE],
1103 AC_DEFINE([HAVE_LIBBLURAY_BDJ], 1, [System has libbluray library with bdj support]),,
1104 [[#include <libbluray/bluray.h>]]))
1106 AC_SUBST([HAVE_LIBBLURAY], 0)
1110 #Check to see if libs are needed for functions that are often built-in to libc
1111 AC_SEARCH_LIBS([iconv_open],iconv,,AC_SEARCH_LIBS([libiconv_open],iconv,,AC_MSG_ERROR($missing_library)))
1112 AC_SEARCH_LIBS([dlopen],dl)
1113 AC_SEARCH_LIBS([clock_gettime],rt)
1114 AC_SEARCH_LIBS([dn_expand], resolv)
1115 AC_SEARCH_LIBS([_dn_expand], resolv)
1116 AC_SEARCH_LIBS([__dn_expand],resolv)
1118 # platform dependent libraries
1119 if test "$host_vendor" = "apple" ; then
1120 if test "$use_arch" != "arm"; then
1121 AC_CHECK_LIB([SDL], [main],, AC_MSG_ERROR($missing_library))
1122 AC_DEFINE([HAVE_SDL],[1],["Define to 1 if using sdl"])
1125 if test "$target_platform" != "target_android" ; then
1126 AC_CHECK_LIB([jasper], [main],, AC_MSG_ERROR($missing_library)) # check for cximage
1128 if test "x$use_alsa" != "xno"; then
1129 PKG_CHECK_MODULES([ALSA], [alsa],
1130 [INCLUDES="$INCLUDES $ALSA_CFLAGS"; LIBS="$LIBS $ALSA_LIBS"; use_alsa=yes],
1131 AC_MSG_NOTICE($alsa_not_found); use_alsa=no)
1133 PKG_CHECK_MODULES([DBUS], [dbus-1],
1134 [INCLUDES="$INCLUDES $DBUS_CFLAGS"; LIBS="$LIBS $DBUS_LIBS"; use_dbus=yes]; \
1135 AC_DEFINE([HAVE_DBUS],[1],["Define to 1 if dbus is installed"]),
1136 AC_MSG_NOTICE($missing_library); use_dbus=no)
1137 if test "x$use_sdl" != "xno"; then
1138 PKG_CHECK_MODULES([SDL], [sdl],
1139 [INCLUDES="$INCLUDES $SDL_CFLAGS"; LIBS="$LIBS $SDL_LIBS"],
1140 AC_MSG_ERROR($missing_library))
1141 AC_CHECK_LIB([SDL_image], [main],, AC_MSG_ERROR($missing_library))
1142 AC_DEFINE([HAVE_SDL],[1],["Define to 1 if using sdl"])
1146 XB_FIND_SONAME([MAD], [mad])
1147 XB_FIND_SONAME([OGG], [ogg])
1148 XB_FIND_SONAME([CURL], [curl])
1149 XB_FIND_SONAME([FLAC], [FLAC])
1150 XB_FIND_SONAME([VORBIS], [vorbis])
1151 XB_FIND_SONAME([VORBISFILE], [vorbisfile])
1152 XB_FIND_SONAME([MODPLUG], [modplug])
1153 XB_FIND_SONAME([ASS], [ass])
1154 XB_FIND_SONAME([MPEG2], [mpeg2])
1157 if test "x$use_libmp3lame" != "xno"; then
1158 XB_FIND_SONAME([LAMEENC], [mp3lame], [use_libmp3lame])
1159 if test "x$use_libmp3lame" != "xno"; then
1160 AC_CHECK_HEADER([lame/lame.h],, AC_MSG_ERROR($missing_headers))
1163 AS_CASE([x$use_libmp3lame],
1165 AC_SUBST([HAVE_LIBMP3LAME], 0)
1168 AC_DEFINE([HAVE_LIBMP3LAME], 1, [System has libmp3lame library])
1169 AC_SUBST([HAVE_LIBMP3LAME], 1)
1172 if test "x$use_libvorbisenc" != "xno"; then
1173 XB_FIND_SONAME([VORBISENC], [vorbisenc], [use_libvorbisenc])
1174 if test "x$use_libvorbisenc" != "xno"; then
1175 AC_CHECK_HEADER([vorbis/vorbisenc.h],, AC_MSG_ERROR($missing_headers))
1178 AS_CASE([x$use_libvorbisenc],
1180 AC_SUBST([HAVE_LIBVORBISENC], 0)
1182 AC_DEFINE([HAVE_LIBVORBISENC], 1, [System has libvorbisenc library])
1183 AC_SUBST([HAVE_LIBVORBISENC], 1)
1188 if test "$use_webserver" = "yes"; then
1189 AC_CHECK_LIB([microhttpd], [main],, AC_MSG_ERROR($missing_library))
1193 if test "$use_optical_drive" = "yes"; then
1194 AC_DEFINE([HAS_DVD_DRIVE], [1], [Define to 1 to have optical drive support])
1198 if test "$use_alsa" = "yes" && test "$host_vendor" != "apple"; then
1199 PKG_CHECK_MODULES([ALSA], [alsa],
1200 [INCLUDES="$INCLUDES $ALSA_CFLAGS"; LIBS="$LIBS $ALSA_LIBS"],
1201 AC_MSG_ERROR($missing_library))
1202 AC_DEFINE([HAS_ALSA], [1], [Define to 0 to disable ALSA support])
1205 AC_MSG_RESULT($alsa_disabled)
1209 if test "x$use_pulse" != "xno"; then
1210 if test "$host_vendor" = "apple" ; then
1211 if test "x$use_pulse" = "xyes"; then
1212 AC_MSG_ERROR($pulse_disabled)
1215 AC_MSG_RESULT($pulse_disabled)
1219 AC_CHECK_LIB([pulse],[main],,pulse_found="no")
1220 AC_CHECK_LIB([pulse-simple],[main],,pulse_found="no")
1222 if test "x$pulse_found" != "xno"; then
1224 elif test "x$use_pulse" = "xyes"; then
1225 AC_MSG_ERROR($pulse_not_found)
1229 AC_MSG_RESULT($pulse_not_found)
1233 AC_MSG_RESULT($pulse_disabled)
1238 if test "$host_vendor" = "apple" ; then
1240 AC_MSG_RESULT($hal_disabled)
1242 if test "$use_hal" = "yes"; then
1243 PKG_CHECK_MODULES([HAL], [hal],
1244 [INCLUDES="$INCLUDES $HAL_CFLAGS"; LIBS="$LIBS $HAL_LIBS"],
1245 use_hal=no;AC_MSG_RESULT($hal_not_found))
1246 PKG_CHECK_MODULES([HAL_STORAGE], [hal-storage],
1247 [INCLUDES="$INCLUDES $HAL_STORAGE_CFLAGS"; LIBS="$LIBS $HAL_STORAGE_LIBS"],
1248 use_hal=no;AC_MSG_RESULT($halstorage_not_found))
1250 AC_MSG_RESULT($hal_disabled)
1252 if test "$use_hal" = "yes"; then
1253 AC_DEFINE([HAS_HAL], [1], [Define to 1 if you have HAL installed])
1258 if test "$host_vendor" = "apple" ; then
1260 AC_MSG_RESULT($avahi_disabled)
1262 if test "$use_avahi" = "yes"; then
1263 AC_CHECK_LIB([avahi-common], [main],,
1264 use_avahi=no;AC_MSG_RESULT($avahi_not_found))
1265 if test "$use_avahi" = "yes"; then
1266 #either both libs or none
1267 AC_CHECK_LIB([avahi-client], [main],,
1268 use_avahi=no;AC_MSG_RESULT($avahi_not_found))
1271 AC_MSG_RESULT($avahi_disabled)
1276 if test "$use_mdnsembedded" != "no"; then
1277 AC_CHECK_LIB([mDNSEmbedded], [embedded_mDNSInit],,
1278 [if test "$use_mdnsembedded" = "yes"; then
1279 AC_MSG_ERROR($mdnsembedded_not_found)
1281 elif test "$use_mdnsembedded" != "no"; then
1282 AC_MSG_NOTICE($mdnsembedded_not_found)
1283 use_mdnsembedded="no"
1287 if test $use_mdnsembedded != "no"; then
1291 AC_MSG_RESULT($mdnsembedded_disabled)
1294 AC_SUBST(USE_MDNSEMBEDDED)
1297 if test "$use_x11" = "yes" && test "$host_vendor" != "apple"; then
1298 AC_MSG_NOTICE($x11_enabled)
1299 PKG_CHECK_MODULES([X11], [x11],
1300 [INCLUDES="$INCLUDES $X11_CFLAGS"; LIBS="$LIBS $X11_LIBS"],
1301 AC_MSG_ERROR($missing_library))
1302 PKG_CHECK_MODULES([XEXT], [xext],
1303 [INCLUDES="$INCLUDES $XEXT_CFLAGS"; LIBS="$LIBS $XEXT_LIBS"],
1304 AC_MSG_ERROR($missing_library))
1305 AC_DEFINE([HAVE_X11], [1], [Define to 1 if you have X11 libs installed.])
1307 AC_MSG_RESULT($x11_disabled)
1311 if test "$host_vendor" = "apple" || test "$use_x11" = "no"; then
1313 AC_MSG_RESULT($xrandr_disabled)
1315 if test "$use_xrandr" = "yes" ; then
1316 AC_CHECK_LIB([Xrandr], [main],,
1317 use_xrandr="no";AC_MSG_RESULT($xrandr_not_found))
1319 AC_MSG_RESULT($xrandr_disabled)
1324 if test "$use_waveform" = "yes"; then
1325 AC_MSG_NOTICE($waveform_enabled)
1328 AC_MSG_NOTICE($waveform_disabled)
1333 if test "$use_spectrum" = "yes"; then
1334 AC_MSG_NOTICE($spectrum_enabled)
1337 AC_MSG_NOTICE($spectrum_disabled)
1342 if test "$host_vendor" = "apple" ; then
1343 AC_MSG_NOTICE($goom_disabled)
1346 if test "$use_goom" = "yes" && test "$use_gl" = "yes"; then
1347 AC_MSG_NOTICE($goom_enabled)
1350 AC_MSG_NOTICE($goom_disabled)
1356 if test "$use_rsxs" = "no" || test "$use_gl" = "no"; then
1357 AC_MSG_NOTICE($rsxs_disabled)
1360 AC_MSG_NOTICE($rsxs_enabled)
1362 # darwin osx can do rsxs but does not use x11, so do not pkg-config check for them
1363 if test "$host_vendor" != "apple" ; then
1364 PKG_CHECK_MODULES([XT], [xt],
1365 [INCLUDES="$INCLUDES $XT_CFLAGS"; LIBS="$LIBS $XT_LIBS"],
1366 AC_MSG_ERROR($missing_library))
1367 PKG_CHECK_MODULES([XMU], [xmu],
1368 [INCLUDES="$INCLUDES $XMU_CFLAGS"; LIBS="$LIBS $XMU_LIBS"],
1369 AC_MSG_ERROR($missing_library))
1374 if test "$use_fishbmc" = "no" || test "$use_gl" = "no"; then
1375 AC_MSG_NOTICE($fishbmc_disabled)
1379 AC_MSG_NOTICE($fishbmc_enabled)
1384 if test "$use_projectm" = "no" || test "$use_gl" = "no"; then
1385 AC_MSG_NOTICE($projectm_disabled)
1389 AC_MSG_NOTICE($projectm_enabled)
1395 if [[ -f "addons/skin.touched/addon.xml" ]]; then
1396 use_skin_touched=yes
1398 AC_DEFINE([HAS_SKIN_TOUCHED], [1], [Whether to build skin touched.])
1404 if test "x$use_ssh" = "xno"; then
1405 AC_MSG_NOTICE($ssh_disabled)
1408 AC_CHECK_LIB([ssh], [sftp_tell64],, AC_MSG_ERROR($ssh_not_found))
1409 AC_DEFINE([HAVE_LIBSSH], [1], [Whether to use libSSH library.])
1413 if test "$use_librtmp" != "no"; then
1414 AC_CHECK_HEADERS([librtmp/log.h librtmp/amf.h librtmp/rtmp.h],,
1415 [if test "$use_librtmp" = "yes"; then
1416 AC_MSG_ERROR($librtmp_not_found)
1417 elif test "$use_librtmp" != "no"; then
1418 AC_MSG_NOTICE($librtmp_not_found)
1422 if test "$use_librtmp" != "no"; then
1423 XB_FIND_SONAME([RTMP], [rtmp], [use_librtmp])
1425 if test "$use_librtmp" != "no"; then
1426 AC_DEFINE([HAS_LIBRTMP], [1], [Whether to use libRTMP library.])
1429 AC_MSG_NOTICE($librtmp_disabled)
1433 if test "x$use_samba" != "xno"; then
1434 AC_CHECK_LIB([smbclient], [main],,
1435 use_samba=no;AC_MSG_ERROR($missing_library))
1438 AC_MSG_RESULT($samba_disabled)
1442 if test "x$use_samba" != "xno"; then
1443 AC_DEFINE([HAVE_LIBSMBCLIENT], [1], [Define to 1 if you have Samba installed])
1448 if test "$use_libnfs" != "no"; then
1449 AC_CHECK_HEADERS([nfsc/libnfs.h],,
1450 [if test "$use_libnfs" = "yes"; then
1451 AC_MSG_ERROR($libnfs_not_found)
1453 elif test "$use_libnfs" != "no"; then
1454 AC_MSG_NOTICE($libnfs_not_found)
1459 if test "$use_libnfs" != "no"; then
1460 XB_FIND_SONAME([NFS], [nfs], [use_libnfs])
1462 if test "$use_libnfs" != "no"; then
1463 AC_DEFINE([HAVE_LIBNFS], [1], [Whether to use libnfs library.])
1468 AC_MSG_NOTICE($libnfs_disabled)
1473 if test "x$use_libafpclient" != "xno"; then
1474 AC_CHECK_HEADERS([afpfs-ng/libafpclient.h],,
1475 [if test "x$use_libafpclient" = "xyes"; then
1476 AC_MSG_ERROR($libafpclient_not_found)
1477 elif test "x$use_libafpclient" != "xno"; then
1478 AC_MSG_NOTICE($libafpclient_not_found)
1479 use_libafpclient="no"
1482 if test "x$use_libafpclient" != "xno"; then
1483 XB_FIND_SONAME([AFPCLIENT], [afpclient], [use_libafpclient])
1484 AC_DEFINE([HAVE_LIBAFPCLIENT], [1], [Whether to use libafpclient library.])
1488 AC_MSG_NOTICE($libafpclient_disabled)
1491 # libplist for airplay feature
1493 if test "$use_airplay" != "no"; then
1494 AC_CHECK_HEADER([plist/plist.h],,
1495 [if test "$use_airplay" = "yes"; then
1496 AC_MSG_ERROR($libplist_not_found)
1497 elif test "$use_airplay" != "no"; then
1498 AC_MSG_NOTICE($libplist_not_found)
1503 if test "$use_airplay" != "no"; then
1504 XB_FIND_SONAME([PLIST], [plist], [use_airplay])
1506 AC_DEFINE([HAVE_LIBPLIST],[1],["Define to 1 if you have libplist."])
1510 # libshairplay for AirTunes (prefered lib)
1512 if test "x$use_airtunes" != "xno"; then
1513 AC_CHECK_HEADERS([shairplay/raop.h],,
1514 [if test "x$use_airtunes" = "xyes"; then
1515 AC_MSG_ERROR($libshairplay_not_found)
1516 elif test "x$use_airtunes" != "xno"; then
1517 AC_MSG_NOTICE($libshairplay_not_found)
1522 if test "x$use_airtunes" != "xno"; then
1523 XB_FIND_SONAME([SHAIRPLAY], [shairplay], [use_airtunes])
1526 AC_CHECK_MEMBERS([struct raop_callbacks_s.cls],,,
1527 [[#include <shairplay/raop.h>]])
1528 AC_DEFINE([HAVE_LIBSHAIRPLAY],[1],["Define to 1 if you have libshairplay."])
1531 #libshairport - as a fallback for AirTunes
1532 if test "x$USE_AIRTUNES" == "x0"; then
1533 AC_CHECK_HEADERS([shairport/shairport.h],,
1534 [if test "x$use_airtunes" = "xyes"; then
1535 AC_MSG_ERROR($libshairport_not_found)
1536 elif test "x$use_airtunes" != "xno"; then
1537 AC_MSG_NOTICE($libshairport_not_found)
1542 if test "x$use_airtunes" != "xno"; then
1543 XB_FIND_SONAME([SHAIRPORT], [shairport], [use_airtunes])
1545 AC_CHECK_MEMBERS([struct AudioOutput.ao_set_metadata],,,
1546 [[#include <shairport/shairport.h>]])
1547 AC_DEFINE([HAVE_LIBSHAIRPORT],[1],["Define to 1 if you have libshairport."])
1554 if test "$host_vendor" = "apple" ; then
1556 AC_MSG_NOTICE($libudev_disabled)
1558 if test "$use_libudev" = "auto"; then
1559 PKG_CHECK_MODULES([UDEV],[libudev],,[use_libudev="no";AC_MSG_RESULT($libudev_not_found)])
1560 elif test "$use_libudev" = "yes" ; then
1561 PKG_CHECK_MODULES([UDEV],[libudev],,[use_libudev="no";AC_MSG_ERROR($libudev_not_found)])
1563 AC_MSG_NOTICE($libudev_disabled)
1566 if test "x$use_libudev" != "xno"; then
1567 USE_LIBUDEV=1;INCLUDES="$INCLUDES $UDEV_CFLAGS";LIBS="$LIBS $UDEV_LIBS"
1568 AC_DEFINE([HAVE_LIBUDEV],[1],["Define to 1 if libudev is installed"])
1575 # if libudev is available, we don't need libusb
1576 if test "x$use_libudev" != "xno"; then
1578 AC_MSG_NOTICE($libusb_disabled_udev_found)
1580 if test "$host_vendor" = "apple" ; then
1582 AC_MSG_NOTICE($libusb_disabled)
1584 if echo "$ARCH" | grep -q freebsd ; then
1585 AC_CHECK_LIB([usb],[main],
1586 [use_libusb="yes";USB_LIBS="-lusb"],
1587 [use_libusb="no";AC_MSG_RESULT($libusb_not_found)])
1588 elif test "$use_libusb" = "auto"; then
1589 PKG_CHECK_MODULES([USB],[libusb],,[use_libusb="no";AC_MSG_RESULT($libusb_not_found)])
1590 elif test "$use_libusb" = "yes"; then
1591 PKG_CHECK_MODULES([USB],[libusb],,[use_libusb="no";AC_MSG_ERROR($libusb_not_found)])
1593 AC_MSG_NOTICE($libusb_disabled)
1596 if test "x$use_libusb" != "xno"; then
1597 USE_LIBUSB=1;INCLUDES="$INCLUDES $USB_CFLAGS";LIBS="$LIBS $USB_LIBS"
1598 AC_DEFINE([HAVE_LIBUSB],[1],["Define to 1 if libusb is installed"])
1605 if test "x$use_libcec" != "xno"; then
1606 # libcec is dyloaded, so we need to check for its headers and link any depends.
1607 if test "x$use_libcec" != "xno"; then
1608 if test "x$use_libcec" != "xauto"; then
1609 PKG_CHECK_MODULES([CEC],[libcec >= 2.1.0],,[use_libcec="no";AC_MSG_ERROR($libcec_disabled)])
1611 PKG_CHECK_MODULES([CEC],[libcec >= 2.1.0],,[use_libcec="no";AC_MSG_RESULT($libcec_disabled)])
1614 if test "x$use_libcec" != "xno"; then
1615 INCLUDES="$INCLUDES $CEC_CFLAGS"
1616 USE_LIBCEC=1;AC_DEFINE([HAVE_LIBCEC],[1],["Define to 1 if libcec is installed"])
1617 XB_FIND_SONAME([LIBCEC],[cec],[use_libcec])
1618 AC_MSG_NOTICE($libcec_enabled)
1621 AC_MSG_NOTICE($libcec_disabled)
1626 AC_MSG_NOTICE($libcec_disabled)
1630 if test "$use_libcap" != "no"; then
1631 AC_CHECK_HEADERS([sys/capability.h],,
1632 [if test "$use_libcap" = "yes"; then
1633 AC_MSG_ERROR($libcap_not_found)
1634 elif test "$use_libcap" != "no"; then
1635 AC_MSG_NOTICE($libcap_not_found)
1639 if test "$use_libcap" != "no"; then
1640 AC_CHECK_LIB([cap], main, LIBS="$LIBS -lcap", use_libcap=no)
1642 if test "$use_libcap" != "no"; then
1643 AC_DEFINE([HAVE_LIBCAP], [1], [Whether to use libcap library.])
1646 AC_MSG_NOTICE($libcap_disabled)
1649 ### External libraries checks
1651 # Hacks for supporting libav
1654 if test "$use_libav_hacks" = "yes"; then
1655 export PKG_CONFIG_PATH="${srcdir}/lib/xbmc-libav-hacks/pkgconfig/:$PKG_CONFIG_PATH"
1657 AC_DEFINE([USE_LIBAV_HACKS], [1], [Whether to use libav compatibility hacks.])
1661 if test "$use_external_ffmpeg" = "yes"; then
1662 FFMPEG_LIBNAMES="libavcodec libavfilter libavformat libavutil libpostproc libswscale libswresample"
1664 PKG_CHECK_MODULES([FFMPEG], [$FFMPEG_LIBNAMES],
1665 [INCLUDES="$INCLUDES $FFMPEG_CFLAGS"; LIBS="$LIBS $FFMPEG_LIBS"],
1666 AC_MSG_ERROR($missing_library))
1668 # in case the headers are in a custom directory
1669 SAVE_CPPFLAGS="$CPPFLAGS"
1670 CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS"
1672 AC_CHECK_HEADERS([libavcodec/avcodec.h libavfilter/avfilter.h libavformat/avformat.h libavutil/avutil.h libpostproc/postprocess.h libswscale/swscale.h],,
1673 [AC_MSG_ERROR($missing_headers)])
1675 AC_MSG_NOTICE($external_ffmpeg_enabled)
1676 USE_EXTERNAL_FFMPEG=1
1677 AC_DEFINE([USE_EXTERNAL_FFMPEG], [1], [Whether to use external FFmpeg libraries.])
1679 CPPFLAGS="$SAVE_CPPFLAGS"
1681 AC_MSG_NOTICE($external_ffmpeg_disabled)
1682 USE_EXTERNAL_FFMPEG=0
1685 echo "Checking for SWIG installation"
1686 AC_PATH_PROG(SWIG_EXE, swig, "none")
1687 if test "$SWIG_EXE" = "none"; then
1688 AC_PATH_PROG(SWIG20_EXE, swig2.0, "none")
1689 if test "$SWIG20_EXE" != "none" ; then
1690 SWIG_EXE=$SWIG20_EXE
1693 if test "$SWIG_EXE" = "none"; then
1694 AC_MSG_ERROR($missing_program)
1696 final_message="$final_message\n SWIG Available:\tYes"
1698 echo "Checking for a jre installation"
1699 AC_PATH_PROG(JAVA_EXE, java, "none")
1700 if test "$JAVA_EXE" = "none"; then
1701 AC_MSG_ERROR($missing_program)
1703 final_message="$final_message\n JRE Available:\tYes"
1705 echo "Checking for doxygen installation"
1706 AC_PATH_PROG(DOXYGEN_EXE, doxygen, "none")
1707 if test "$DOXYGEN_EXE" = "none"; then
1708 AC_MSG_WARN([Unable to find doxygen installation. Will not be able to make docstrings for the python api])
1709 final_message="$final_message\n Doxygen Available:\tNo"
1712 final_message="$final_message\n Doxygen Available:\tYes"
1717 if test "x$use_vdpau" != "xno"; then
1718 if test "$host_vendor" = "apple" ; then
1719 if test "x$use_vdpau" = "xyes"; then
1720 AC_MSG_ERROR([VDPAU not supported on this platform])
1723 AC_MSG_NOTICE($vdpau_disabled)
1728 AC_CHECK_HEADER([vdpau/vdpau.h],AC_DEFINE([HAVE_LIBVDPAU], [],
1729 [Define to 1 if you have the 'vdpau' library (-lvdpau).]),
1730 [if test "x$use_vdpau" = "xyes"; then
1732 AC_MSG_ERROR([$vdpau_not_found])
1736 AC_MSG_RESULT($vdpau_not_found)
1741 AC_MSG_NOTICE($vdpau_disabled)
1745 if test "x$use_vaapi" != "xno"; then
1746 if test "$host_vendor" = "apple" ; then
1747 if test "x$use_vaapi" = "xyes"; then
1748 AC_MSG_ERROR([VAAPI not supported on this platform])
1751 AC_MSG_NOTICE($vaapi_disabled)
1755 initial_val=$use_vaapi
1756 AC_CHECK_LIB([va], main, :, use_vaapi=no)
1757 if test "x$use_vaapi" != "xno"; then
1758 AC_CHECK_LIB([va-glx], main, LIBS="-lva -lva-glx $LIBS", use_vaapi=no, -lva)
1761 if test "x$use_vaapi" = "xno"; then
1762 if test "x$initial_val" = "xyes"; then
1763 AC_MSG_ERROR($vaapi_not_found)
1765 AC_MSG_RESULT($vaapi_not_found)
1769 AC_DEFINE([HAVE_LIBVA], [1], [Define to 1 if you have the 'vaapi' libraries (-lva AND -lva-glx)])
1774 AC_MSG_NOTICE($vaapi_disabled)
1779 if test "x$use_crystalhd" != "xno"; then
1780 SAVE_CFLAGS="$CFLAGS"
1781 CFLAGS="-D__LINUX_USER__"
1782 AC_CHECK_HEADER([libcrystalhd/libcrystalhd_if.h], [],
1783 [ if test "x$use_crystalhd" = "xyes"; then
1784 AC_MSG_ERROR($crystalhd_not_found)
1787 AC_MSG_RESULT($crystalhd_not_found)
1791 CFLAGS="$SAVE_CFLAGS"
1792 if test "$host_vendor" != "apple"; then
1793 XB_FIND_SONAME([CRYSTALHD], [crystalhd], [use_crystalhd])
1795 if test "x$use_crystalhd" != "xno"; then
1796 SAVE_CFLAGS="$CFLAGS"
1797 CFLAGS="-D__LINUX_USER__ -lcrystalhd"
1798 # check for new crystalhd lib
1800 [AC_LANG_SOURCE([#include <libcrystalhd/bc_dts_types.h>
1801 #include <libcrystalhd/bc_dts_defs.h>
1802 PBC_INFO_CRYSTAL bCrystalInfo;])],
1803 [ AC_DEFINE([HAVE_LIBCRYSTALHD], [2], [Define to 2 if you have the 'New Broadcom Crystal HD' library.]) ],
1804 [ AC_DEFINE([HAVE_LIBCRYSTALHD], [1], [Define to 1 if you have the 'Old Broadcom Crystal HD' library.]) ])
1805 CFLAGS="$SAVE_CFLAGS"
1809 AC_MSG_NOTICE($crystalhd_disabled)
1814 if test "x$use_vtbdecoder" != "xno"; then
1815 if test "$host_vendor" = "apple" ; then
1816 HAVE_VIDEOTOOLBOXDECODER=1
1817 AC_DEFINE([HAVE_VIDEOTOOLBOXDECODER], [1], [Define to 1 if you have the 'VTBDecoder' library.])
1818 AC_MSG_NOTICE($vtbdecoder_enabled)
1820 if test "x$use_vtbdecoder" = "xyes"; then
1821 AC_MSG_ERROR([VTB Decoder not supported on this platform])
1824 AC_MSG_NOTICE($vtbdecoder_disabled)
1828 AC_MSG_NOTICE($vtbdecoder_disabled)
1832 if test "$host_vendor" = "apple" ; then
1835 AC_MSG_NOTICE($openmax_disabled)
1836 elif test "$target_platform" = "target_raspberry_pi"; then
1839 AC_MSG_NOTICE($openmax_disabled)
1841 if test "$use_gles" = "yes" && test "$use_openmax" = "auto"; then
1842 PKG_CHECK_MODULES([OPENMAX], [libomxil-bellagio],
1843 USE_OPENMAX=1;[INCLUDES="$INCLUDES $OPENMAX_CFLAGS"; LIBS="$LIBS $OPENMAX_LIBS"],
1844 use_openmax=no;USE_OPENMAX=0;AC_MSG_RESULT($openmax_not_found))
1845 elif test "$use_gles" = "yes" && test "$use_openmax" = "yes"; then
1846 PKG_CHECK_MODULES([OPENMAX], [libomxil-bellagio],
1847 USE_OPENMAX=1;[INCLUDES="$INCLUDES $OPENMAX_CFLAGS"; LIBS="$LIBS $OPENMAX_LIBS"],
1848 AC_MSG_ERROR($openmax_not_found))
1850 AC_MSG_NOTICE($openmax_disabled)
1856 # yajl version check (yajl_version.h was added in yajl 2.0)
1857 AC_CHECK_HEADERS([yajl/yajl_version.h], [], [
1858 AC_DEFINE(YAJL_MAJOR, 1, [yajl version 1])
1861 # additional internal players
1862 case $add_players in
1864 AC_CHECK_HEADER([amplayer/player_error.h],, AC_MSG_ERROR($missing_headers))
1865 XB_ADD_PLAYER([AMLPLAYER], [amlplayer])
1868 XB_ADD_PLAYER([OMXPLAYER], [omxplayer])
1872 # additional internal codecs
1875 AC_CHECK_HEADER([amcodec/codec_error.h],, AC_MSG_ERROR($missing_headers))
1876 XB_ADD_CODEC([LIBAMCODEC], [amcodec])
1879 LIBS+="-L${prefix}/opt/android-libs -lstdc++ -lutils -lcutils -lstagefright -lbinder -lui -lgui"
1880 XB_ADD_CODEC([LIBSTAGEFRIGHT], [libstagefright])
1885 # platform specific bin utilities
1886 if test "$build_vendor" != "apple" ; then
1887 AC_CHECK_PROG(HAVE_GAWK,gawk,"yes","no",)
1888 if test "$HAVE_GAWK" = "no" ; then
1889 AC_MSG_ERROR($missing_program)
1893 if test "$use_arch" != "arm" ; then
1894 AC_CHECK_PROG(HAVE_CMAKE,cmake,"yes","no",)
1895 if test "$HAVE_CMAKE" = "no" ; then
1896 AC_MSG_ERROR($missing_program)
1900 AC_CHECK_PROG(HAVE_GPERF,gperf,"yes","no",)
1901 if test "$HAVE_GPERF" = "no" ; then
1902 AC_MSG_ERROR($missing_program)
1905 AC_CHECK_PROG(HAVE_UNZIP,unzip,"yes","no",)
1906 if test "$HAVE_UNZIP" = "no" ; then
1907 AC_MSG_ERROR($missing_program)
1910 AC_CHECK_PROG(HAVE_ZIP,zip,"yes","no",)
1911 if test "$HAVE_ZIP" = "no" ; then
1912 AC_MSG_ERROR($missing_program)
1915 if test "$ARCH" = "i486-linux" || test "$ARCH" = "x86-freebsd"; then
1916 AC_CHECK_PROG(HAVE_NASM,nasm,"yes","no",)
1917 if test "$HAVE_NASM" = "no" ; then
1918 AC_MSG_ERROR($missing_program)
1922 # Checks for header files.
1926 AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h inttypes.h limits.h locale.h \
1927 malloc.h memory.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h \
1928 strings.h sys/file.h sys/ioctl.h sys/mount.h sys/param.h sys/socket.h \
1929 sys/time.h sys/timeb.h sys/vfs.h termios.h unistd.h utime.h wchar.h wctype.h])
1930 AC_CHECK_HEADERS([cdio/iso9660.h],,AC_MSG_ERROR([$missing_headers]))
1932 # Checks for typedefs, structures, and compiler characteristics.
1948 AC_CHECK_MEMBERS([struct stat.st_rdev])
1957 if test "$cross_compiling" = "yes"; then
1958 final_message="$final_message\n Crosscomp.:\tYes"
1960 final_message="$final_message\n Crosscomp.:\tNo"
1963 final_message="$final_message\n target ARCH:\t$use_arch"
1964 final_message="$final_message\n target CPU:\t$use_cpu"
1966 if test "$use_gles" = "yes"; then
1967 final_message="$final_message\n OpenGLES:\tYes"
1972 if test "$use_gl" = "yes"; then
1973 final_message="$final_message\n OpenGL:\tYes"
1976 final_message="$final_message\n OpenGL:\tNo (Very Slow)"
1977 SDL_DEFINES="$SDL_DEFINES -DHAS_SDL_2D"
1982 if test "$use_alsa" = "yes"; then
1984 AC_DEFINE([USE_ALSA],[1],["Define to 1 if alsa is installed"])
1985 final_message="$final_message\n ALSA:\t\tYes"
1988 final_message="$final_message\n ALSA:\t\tNo"
1991 if test "$use_dbus" = "yes"; then
1992 final_message="$final_message\n DBUS:\t\tYes"
1994 final_message="$final_message\n DBUS:\t\tNo"
1997 if test "x$use_vdpau" != "xno"; then
1998 final_message="$final_message\n VDPAU:\tYes"
2000 final_message="$final_message\n VDPAU:\tNo"
2003 if test "x$use_vaapi" != "xno"; then
2004 final_message="$final_message\n VAAPI:\tYes"
2006 final_message="$final_message\n VAAPI:\tNo"
2009 if test "x$use_crystalhd" != "xno"; then
2010 final_message="$final_message\n CrystalHD:\tYes"
2012 final_message="$final_message\n CrystalHD:\tNo"
2015 if test "x$use_vtbdecoder" != "xno"; then
2016 final_message="$final_message\n VTBDecoder:\tYes"
2018 final_message="$final_message\n VTBDecoder:\tNo"
2021 if test "$use_openmax" != "no"; then
2022 final_message="$final_message\n OpenMax:\tYes"
2024 final_message="$final_message\n OpenMax:\tNo"
2027 if test "$use_joystick" = "yes"; then
2028 final_message="$final_message\n Joystick:\tYes"
2029 SDL_DEFINES="$SDL_DEFINES -DHAS_SDL_JOYSTICK"
2031 final_message="$final_message\n Joystick:\tNo"
2034 if test "$use_xrandr" = "yes"; then
2035 final_message="$final_message\n XRandR:\tYes"
2038 final_message="$final_message\n XRandR:\tNo"
2042 if test "$use_waveform" = "yes"; then
2043 final_message="$final_message\n Waveform:\tYes"
2045 final_message="$final_message\n Waveform:\tNo"
2048 if test "$use_spectrum" = "yes"; then
2049 final_message="$final_message\n Spectrum:\tYes"
2051 final_message="$final_message\n Spectrum:\tNo"
2054 if test "$use_goom" = "yes"; then
2055 final_message="$final_message\n GOOM:\t\tYes"
2057 final_message="$final_message\n GOOM:\t\tNo"
2060 if test "$use_rsxs" = "yes"; then
2061 final_message="$final_message\n RSXS:\t\tYes"
2063 final_message="$final_message\n RSXS:\t\tNo"
2066 if test "$use_fishbmc" = "yes"; then
2067 final_message="$final_message\n FishBMC:\tYes"
2069 final_message="$final_message\n FishBMC:\tNo"
2072 if test "$use_projectm" = "yes"; then
2073 final_message="$final_message\n ProjectM:\tYes"
2075 final_message="$final_message\n ProjectM:\tNo"
2078 if test "$use_skin_touched" = "yes"; then
2079 final_message="$final_message\n Skin Touched:\tYes"
2081 final_message="$final_message\n Skin Touched:\tNo"
2084 if test "$use_x11" = "yes"; then
2085 final_message="$final_message\n X11:\t\tYes"
2087 final_message="$final_message\n X11:\t\tNo"
2090 if test "$use_libbluray" = "yes"; then
2091 final_message="$final_message\n Bluray:\tYes"
2093 final_message="$final_message\n Bluray:\tNo"
2096 USE_TEXTUREPACKER_NATIVE=0
2097 if test "x$use_texturepacker" != "xno"; then
2098 final_message="$final_message\n TexturePacker:Yes"
2100 if test "x$use_texturepacker_native" = "xyes"; then
2101 USE_TEXTUREPACKER_NATIVE=1
2102 if [[ ! -d "$USE_TEXTUREPACKER_NATIVE_ROOT" ]]; then
2103 USE_TEXTUREPACKER_NATIVE_ROOT=
2107 final_message="$final_message\n TexturePacker:No"
2111 if test "$use_mid" = "yes"; then
2112 final_message="$final_message\n MID Support:\tYes"
2113 SDL_DEFINES="$SDL_DEFINES -DMID"
2115 final_message="$final_message\n MID Support:\tNo"
2120 if test "x$use_ccache" != "xno"; then
2121 AC_PATH_PROG(CCACHE,ccache,none)
2122 if test "$ac_cv_path_CCACHE" = "none"; then
2123 if test "x$use_ccache" = "xyes"; then
2124 AC_MSG_ERROR([ccache not found.]);
2126 AC_MSG_NOTICE([ccache not found. Falling back to default CC])
2127 final_message="$final_message\n ccache:\tNo"
2130 CC="$ac_cv_path_CCACHE $CC"
2131 CXX="$ac_cv_path_CCACHE $CXX"
2132 AC_MSG_NOTICE(enabling ccache)
2133 final_message="$final_message\n ccache:\tYes"
2136 final_message="$final_message\n ccache:\tNo"
2139 if test "$use_alsa" = "yes"; then
2140 final_message="$final_message\n ALSA Support:\tYes"
2142 final_message="$final_message\n ALSA Support:\tNo"
2145 if test "x$use_pulse" != "xno"; then
2146 XBMC_STANDALONE_SH_PULSE=tools/Linux/xbmc-standalone.sh.pulse
2147 final_message="$final_message\n PulseAudio:\tYes"
2149 XBMC_STANDALONE_SH_PULSE=/dev/null
2150 final_message="$final_message\n PulseAudio:\tNo"
2153 if test "$use_hal" = "yes"; then
2154 final_message="$final_message\n HAL Support:\tYes"
2156 final_message="$final_message\n HAL Support:\tNo"
2160 if test "$use_dvdcss" = "yes"; then
2161 AC_MSG_NOTICE($dvdcss_enabled)
2162 final_message="$final_message\n DVDCSS:\tYes"
2164 SKIP_CONFIG_DVDCSS=0
2165 DVDREAD_CFLAGS="-D_XBMC -DHAVE_DVDCSS_DVDCSS_H"
2167 AC_MSG_NOTICE($dvdcss_disabled)
2168 final_message="$final_message\n DVDCSS:\tNo"
2170 SKIP_CONFIG_DVDCSS=1
2171 DVDREAD_CFLAGS="-D_XBMC -UHAVE_DVDCSS_DVDCSS_H"
2173 if test "$host_vendor" = "apple"; then
2174 DVDREAD_CFLAGS="$DVDREAD_CFLAGS -D__DARWIN__"
2177 # Google Test Framework
2178 if test "$configure_gtest" = "yes"; then
2179 AC_MSG_NOTICE($gtest_enabled)
2180 final_message="$final_message\n Google Test Framework Configured:\tYes"
2184 AC_MSG_NOTICE($gtest_disabled)
2185 final_message="$final_message\n Google Test Framework Configured:\tNo"
2190 if test "$use_avahi" = "yes"; then
2191 final_message="$final_message\n Avahi:\tYes"
2193 final_message="$final_message\n Avahi:\tNo"
2196 if test "$use_mdnsembedded" != "no"; then
2197 final_message="$final_message\n mDNSEmbedded:\tYes"
2199 final_message="$final_message\n mDNSEmbedded:\tNo"
2202 if test "$use_nonfree" = "yes"; then
2203 final_message="$final_message\n Non-free:\tYes"
2205 AC_DEFINE([HAVE_XBMC_NONFREE], [1], [Define to 1 to enable non-free components.])
2208 final_message="$final_message\n Non-free:\tNo"
2211 if test "$use_asap" = "yes"; then
2212 AC_CHECK_PROGS(HAVE_GDC,gdc-4.4 gdc-4.3 gdc,"no")
2213 if test "$HAVE_GDC" = "no"; then
2214 AC_MSG_ERROR($missing_program);
2216 AC_CHECK_PROG(HAVE_FPC,fpc,"yes","no")
2217 if test "$HAVE_FPC" = "no"; then
2218 AC_MSG_ERROR($missing_program);
2221 AC_DEFINE([USE_ASAP_CODEC], [1], [Define to 1 to enable ASAP codec.])
2222 final_message="$final_message\n ASAP Codec:\tYes"
2225 final_message="$final_message\n ASAP Codec:\tNo"
2228 if test "$use_mysql" = "yes"; then
2229 final_message="$final_message\n MySQL:\tYes"
2232 final_message="$final_message\n MySQL:\tNo"
2235 if test "$use_webserver" = "yes"; then
2236 final_message="$final_message\n Webserver:\tYes"
2239 final_message="$final_message\n Webserver:\tNo"
2243 if test "$use_libssh" != "no"; then
2244 final_message="$final_message\n libssh support:\tYes"
2246 final_message="$final_message\n libssh support:\tNo"
2249 if test "$use_librtmp" != "no"; then
2250 final_message="$final_message\n libRTMP support:\tYes"
2252 final_message="$final_message\n libRTMP support:\tNo"
2255 if test "x$use_samba" != "xno"; then
2256 final_message="$final_message\n libsmbclient support:\tYes"
2258 final_message="$final_message\n libsmbclient support:\tNo"
2261 if test "$use_libnfs" != "no"; then
2262 final_message="$final_message\n libnfs client support:Yes"
2264 final_message="$final_message\n libnfs client support:No"
2267 if test "x$use_libafpclient" != "xno"; then
2268 final_message="$final_message\n libafpclient support:\tYes"
2270 final_message="$final_message\n libafpclient support:\tNo"
2273 if test "$use_airplay" != "no"; then
2274 final_message="$final_message\n AirPlay support:\tYes"
2276 final_message="$final_message\n AirPLay support:\tNo"
2279 if test "x$use_airtunes" != "xno"; then
2280 if test "x$USE_LIBSHAIRPORT" == "x1"; then
2281 final_message="$final_message\n AirTunes support (libshairplay):\tYes"
2283 final_message="$final_message\n AirTunes support (libshairport):\tYes"
2286 final_message="$final_message\n AirTunes support:\tNo"
2289 if test "x$use_upnp" != "xno"; then
2290 final_message="$final_message\n UPnP support:\t\tYes"
2292 AC_DEFINE([USE_UPNP], [1], [Define to 1 to enable UPnP support.])
2295 final_message="$final_message\n UPnP support:\t\tNo"
2298 if test "$use_optical_drive" = "yes"; then
2299 final_message="$final_message\n Optical drive:\tYes"
2301 final_message="$final_message\n Optical drive:\tNo"
2304 if test "x$use_libudev" != "xno"; then
2305 final_message="$final_message\n libudev support:\tYes"
2307 final_message="$final_message\n libudev support:\tNo"
2310 if test "x$use_libusb" != "xno"; then
2311 final_message="$final_message\n libusb support:\tYes"
2313 final_message="$final_message\n libusb support:\tNo"
2316 if test "x$use_libcec" != "xno"; then
2317 final_message="$final_message\n libcec support:\tYes"
2319 final_message="$final_message\n libcec support:\tNo"
2322 if test "x$use_libmp3lame" != "xno"; then
2323 final_message="$final_message\n libmp3lame support:\tYes"
2325 final_message="$final_message\n libmp3lame support:\tNo"
2328 if test "x$use_libvorbisenc" != "xno"; then
2329 final_message="$final_message\n libvorbisenc support:\tYes"
2331 final_message="$final_message\n libvorbisenc support:\tNo"
2334 if test "x$use_libcap" != "xno"; then
2335 final_message="$final_message\n libcap support:\tYes"
2337 final_message="$final_message\n libcap support:\tNo"
2340 if test "x$add_players" != "xno"; then
2341 final_message="$final_message\n additional players:\tYes"
2343 final_message="$final_message\n additional players:\tNo"
2346 ### External libraries messages
2348 if test "$use_external_ffmpeg" = "yes"; then
2349 final_message="$final_message\n External FFmpeg:\tYes"
2351 final_message="$final_message\n External FFmpeg:\tNo"
2354 if test "$host_vendor" = "apple" ; then
2355 # built internal but referenced as external, we link directly to them.
2356 # this MUST be the last thing before OUTPUT_FILES as they do not
2357 # exist until after we build FFMpeg.
2358 LIBS="$LIBS -L\$(abs_top_srcdir)/lib/ffmpeg/libavcodec -lavcodec"
2359 LIBS="$LIBS -L\$(abs_top_srcdir)/lib/ffmpeg/libavfilter -lavfilter"
2360 LIBS="$LIBS -L\$(abs_top_srcdir)/lib/ffmpeg/libswresample -lswresample"
2361 LIBS="$LIBS -L\$(abs_top_srcdir)/lib/ffmpeg/libavformat -lavformat"
2362 LIBS="$LIBS -L\$(abs_top_srcdir)/lib/ffmpeg/libavutil -lavutil"
2363 LIBS="$LIBS -L\$(abs_top_srcdir)/lib/ffmpeg/libpostproc -lpostproc"
2364 LIBS="$LIBS -L\$(abs_top_srcdir)/lib/ffmpeg/libswscale -lswscale"
2368 DISABLE_PVR_ADDON_CONFIG=1
2369 if [[ -f "pvr-addons/Makefile.am" ]]; then
2370 final_message="$final_message\n PVR add-ons:\t\tYes"
2372 DISABLE_PVR_ADDON_CONFIG=0
2374 final_message="$final_message\n PVR add-ons:\t\tNo"
2377 OUTPUT_FILES="Makefile \
2379 addons/skin.confluence/media/Makefile \
2381 xbmc/cdrip/Makefile \
2382 xbmc/cores/Makefile \
2383 xbmc/cores/VideoRenderers/Makefile \
2384 xbmc/cores/dvdplayer/Makefile \
2386 lib/libdvd/Makefile \
2387 xbmc/cores/DllLoader/Makefile \
2388 xbmc/cores/DllLoader/exports/Makefile \
2389 xbmc/cores/dvdplayer/DVDCodecs/Makefile \
2390 xbmc/cores/dvdplayer/DVDCodecs/Audio/Makefile \
2391 xbmc/cores/dvdplayer/DVDCodecs/Overlay/Makefile \
2392 xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile \
2393 xbmc/cores/dvdplayer/DVDDemuxers/Makefile \
2394 xbmc/cores/dvdplayer/DVDSubtitles/Makefile \
2395 xbmc/cores/AudioEngine/Makefile \
2396 xbmc/cores/paplayer/Makefile \
2397 xbmc/cores/amlplayer/Makefile \
2398 xbmc/cores/omxplayer/Makefile \
2399 lib/timidity/Makefile \
2400 lib/xbadpcm/Makefile \
2402 lib/nosefart/Makefile \
2403 lib/libsidplay2/Makefile \
2404 lib/vgmstream/Makefile \
2405 lib/snesapu/SNES/SNESAPU/Makefile \
2406 lib/stsound/StSoundLibrary/Makefile \
2407 xbmc/cores/playercorefactory/Makefile \
2408 xbmc/music/karaoke/Makefile \
2410 xbmc/guilib/Makefile \
2411 xbmc/interfaces/Makefile \
2412 xbmc/network/Makefile \
2413 xbmc/network/upnp/Makefile \
2414 lib/libRTV/Makefile \
2415 lib/libexif/Makefile \
2416 lib/libXDAAP/Makefile \
2417 lib/cmyth/Makefile \
2418 lib/libhdhomerun/Makefile \
2419 lib/libsquish/Makefile \
2420 lib/cximage-6.0/Makefile \
2421 lib/libUPnP/Makefile \
2422 xbmc/DllPaths_generated.h \
2423 xbmc/DllPaths_generated_android.h \
2424 xbmc/freebsd/Makefile \
2425 xbmc/linux/Makefile \
2426 xbmc/filesystem/Makefile \
2427 xbmc/screensavers/rsxs-0.9/xbmc/Makefile \
2428 xbmc/visualizations/XBMCProjectM/Makefile \
2429 xbmc/visualizations/Goom/Makefile \
2430 xbmc/visualizations/OpenGLSpectrum/Makefile \
2431 xbmc/visualizations/fishBMC/Makefile \
2432 xbmc/visualizations/WaveForm/Makefile \
2433 lib/addons/library.xbmc.addon/Makefile \
2434 lib/addons/library.xbmc.codec/Makefile \
2435 lib/addons/library.xbmc.gui/Makefile \
2436 lib/addons/library.xbmc.pvr/Makefile \
2437 xbmc/visualizations/EGLHelpers/Makefile \
2438 tools/Linux/xbmc.sh \
2439 tools/Linux/xbmc-standalone.sh \
2440 tools/TexturePacker/Makefile \
2441 tools/EventClients/Clients/OSXRemote/Makefile \
2442 xbmc/peripherals/bus/Makefile \
2443 xbmc/peripherals/devices/Makefile \
2444 xbmc/android/activity/Makefile \
2445 xbmc/android/loader/Makefile \
2446 xbmc/android/jni/Makefile \
2447 xbmc/utils/Makefile \
2448 xbmc/main/Makefile \
2449 project/cmake/xbmc-config.cmake"
2451 if test "$use_skin_touched" = "yes"; then
2452 OUTPUT_FILES="$OUTPUT_FILES addons/skin.touched/media/Makefile"
2455 OUTPUT_FILES="$OUTPUT_FILES \
2456 xbmc/interfaces/python/Makefile \
2457 xbmc/interfaces/python/test/Makefile"
2459 # Line below is used so we can use AM_INIT_AUTOMAKE. The corresponding
2460 # .dummy.am does nothing.
2461 AC_CONFIG_FILES([.dummy])
2463 AC_CONFIG_FILES([${OUTPUT_FILES}])
2464 OUTPUT_FILES="$OUTPUT_FILES \
2470 AC_SUBST(SDL_DEFINES)
2471 AC_SUBST(BUILD_DVDCSS)
2472 AC_SUBST(DISABLE_WAVEFORM)
2473 AC_SUBST(DISABLE_SPECTRUM)
2474 AC_SUBST(DISABLE_GOOM)
2475 AC_SUBST(DISABLE_RSXS)
2476 AC_SUBST(DISABLE_FISHBMC)
2477 AC_SUBST(DISABLE_PROJECTM)
2478 AC_SUBST(USE_SKIN_TOUCHED)
2479 AC_SUBST(USE_EXTERNAL_FFMPEG)
2480 AC_SUBST(USE_LIBAV_HACKS)
2481 AC_SUBST(PYTHON_VERSION)
2482 AC_SUBST(OUTPUT_FILES)
2483 AC_SUBST(HAVE_XBMC_NONFREE)
2484 AC_SUBST(USE_ASAP_CODEC)
2485 AC_SUBST(LIBCURL_BASENAME)
2486 AC_SUBST(LIBFLAC_BASENAME)
2487 AC_SUBST(LIBVORBISFILE_BASENAME)
2488 AC_SUBST(LIBMODPLUG_BASENAME)
2489 AC_SUBST(LIBMAD_BASENAME)
2490 AC_SUBST(LIBOGG_BASENAME)
2491 AC_SUBST(LIBVORBISENC_BASENAME)
2492 AC_SUBST(LIBVORBIS_BASENAME)
2493 AC_SUBST(LIBASS_BASENAME)
2494 AC_SUBST(LIBMEPG2_BASENAME)
2495 AC_SUBST_FILE(XBMC_STANDALONE_SH_PULSE)
2496 AC_SUBST(USE_OPENGL)
2497 AC_SUBST(USE_OPENGLES)
2500 AC_SUBST(USE_CRYSTALHD)
2501 AC_SUBST(USE_LIBSMBCLIENT)
2502 AC_SUBST(USE_LIBNFS)
2503 AC_SUBST(USE_LIBAFPCLIENT)
2504 AC_SUBST(USE_AIRPLAY)
2505 AC_SUBST(USE_OPENMAX)
2507 AC_SUBST(USE_XRANDR)
2509 AC_SUBST(USE_TEXTUREPACKER)
2510 AC_SUBST(USE_TEXTUREPACKER_NATIVE)
2511 AC_SUBST(USE_TEXTUREPACKER_NATIVE_ROOT)
2512 AC_SUBST(USE_AIRTUNES)
2513 AC_SUBST(USE_LIBUDEV)
2514 AC_SUBST(USE_LIBUSB)
2515 AC_SUBST(USE_LIBCEC)
2517 AC_SUBST(USE_WEB_SERVER)
2519 AC_SUBST(USE_OMXLIB)
2520 AC_SUBST(USE_ANDROID)
2521 AC_SUBST(GTEST_CONFIGURED)
2522 AC_SUBST(USE_DOXYGEN)
2523 AC_SUBST(USE_PVR_ADDONS)
2525 # pushd and popd are not available in other shells besides bash, so implement
2526 # our own pushd/popd functions
2531 if [[ -d "$dirname" ]] && [[ -x "$dirname" ]]; then
2533 XB_DIRSTACK="$dirname ${XB_DIRSTACK:-$PWD}"
2536 AC_MSG_ERROR(xb_pushd: unable to change to $dirname)
2541 if [[ -n "$XB_DIRSTACK" ]]; then
2542 XB_DIRSTACK="${XB_DIRSTACK#* }"
2543 cd "${XB_DIRSTACK%% *}"
2546 AC_MSG_ERROR(xb_popd: unable to go back to previous directory)
2550 # Function to run the configure scripts in our submodules
2551 # Consists of three paramaters, the path to the submodule, the configure command
2552 # with appropriate arguments, and a third parameter set to 1 if we are to skip
2553 # running the script, anything else if not.
2554 AC_DEFUN([XB_CONFIG_MODULE],[
2555 AC_CONFIG_COMMANDS_POST([
2556 if [[ $3 != "1" ]]; then
2557 if [[ -d $1 ]]; then
2560 if [[ $? -ne 0 ]]; then
2562 AC_MSG_ERROR([[Submodule $1 failed to configure]])
2567 AC_MSG_ERROR([[Submodule $1 does not exist]])
2570 AC_MSG_NOTICE([[Skipping configuration of submodule $1.]])
2575 XB_CONFIG_MODULE([lib/ffmpeg], [
2576 if test "$host_vendor" = "apple" ; then
2577 ffmpg_config="--target-os=$ffmpeg_target_os"
2578 # handle disables first, we do individual enables later
2579 ffmpg_config="$ffmpg_config --disable-muxers --disable-encoders"
2580 ffmpg_config="$ffmpg_config --disable-devices --disable-doc"
2581 ffmpg_config="$ffmpg_config --disable-ffplay --disable-ffmpeg"
2582 ffmpg_config="$ffmpg_config --disable-ffprobe --disable-ffserver"
2583 ffmpg_config="$ffmpg_config --enable-vda --disable-crystalhd"
2584 ffmpg_config="$ffmpg_config --disable-decoder=mpeg_xvmc"
2586 # handle conditional enables/disables
2587 if test "$use_debug" = "no"; then
2588 ffmpg_config="$ffmpg_config --disable-debug"
2590 if test "$use_cpu" != "no"; then
2591 ffmpg_config="$ffmpg_config --cpu=$use_cpu"
2593 if test "$use_arch" != "no"; then
2594 ffmpg_config="$ffmpg_config --arch=$use_arch --enable-cross-compile"
2596 if test "$use_arch" = "arm"; then
2597 ffmpg_config="$ffmpg_config --enable-pic"
2598 ffmpg_config="$ffmpg_config --disable-armv5te --disable-armv6t2"
2599 if test "$use_neon" = "yes"; then
2600 ffmpg_config="$ffmpg_config --enable-neon"
2602 ffmpg_config="$ffmpg_config --disable-neon"
2605 ffmpg_config="$ffmpg_config --disable-amd3dnow"
2607 if test "$use_ffmpeg_libvorbis" = "yes"; then
2608 ffmpg_config="$ffmpg_config --enable-libvorbis --enable-muxer=ogg --enable-encoder=libvorbis"
2610 ffmpg_config="$ffmpg_config --disable-libvorbis"
2613 # handle individual enables
2614 ffmpg_config="$ffmpg_config --enable-gpl"
2615 ffmpg_config="$ffmpg_config --enable-postproc"
2616 ffmpg_config="$ffmpg_config --enable-static --enable-pthreads"
2617 ffmpg_config="$ffmpg_config --enable-muxer=spdif --enable-muxer=adts --enable-muxer=asf --enable-muxer=ipod"
2618 ffmpg_config="$ffmpg_config --enable-encoder=ac3 --enable-encoder=aac --enable-encoder=wmav2"
2619 ffmpg_config="$ffmpg_config --enable-protocol=http"
2620 ffmpg_config="$ffmpg_config --enable-runtime-cpudetect"
2622 # ffmpeg will not compile with llvm-gcc-4.2, use clang instead
2625 ffmpg_config="$ffmpg_config --cc=clang" ;;
2627 ffmpg_config="$ffmpg_config --cc=$CC" ;;
2630 # extra-cflags must be passed alone or it gets expanded wrong by the ffmpeg configure
2631 FFMPEG_EXTRACFLAGS="$CFLAGS $FFMPEG_EXTRACFLAGS -w -D_DARWIN_C_SOURCE -Dattribute_deprecated="
2633 LDFLAGS="$LDFLAGS" ./configure --extra-cflags="$FFMPEG_EXTRACFLAGS" $ffmpg_config --as="$AS"
2635 # if using llvm-gcc-4.2 as assembler, -MMD is not enough to generate
2636 # dependency files in the right place, replace it with something that works
2639 sed -ie "s#AS_DEPFLAGS=-MMD#AS_DEPFLAGS=-MMD -MF \$(\@:.o=.d) -MT \$\@#" config.mak ;;
2642 # ffmpeg will use yasm found at ${prefix}/bin during configure
2643 # but then hardcodes 'yasm' in config.mak, fix it.
2644 sed -ie "s#YASM=yasm#YASM=${YASM}#" config.mak
2645 sed -ie "s#YASMDEP=yasm#YASMDEP=${YASM}#" config.mak
2646 sed -ie "s# -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 # #" config.mak
2651 LDFLAGS="$(echo "$LDFLAGS" | sed "s/-Wl,-Bsymbolic-functions//g")" \
2653 --extra-cflags="$PASSED_CFLAGS $FFMPEG_EXTRACFLAGS" \
2655 `if test "$use_debug" = "no"; then echo --disable-debug; fi` \
2656 `if test "$cross_compiling" = "yes"; then echo --enable-cross-compile; fi` \
2657 `if test "$use_arch" != "no"; then echo --arch=$use_arch; fi`\
2658 `if test "$use_cpu" != "no"; then echo --cpu=$use_cpu; fi`\
2659 `if test "$use_neon" = "yes"; then echo --enable-neon; else echo --disable-neon; fi`\
2660 --target-os=$ffmpeg_target_os \
2662 --enable-muxer=spdif \
2663 --enable-muxer=adts \
2664 --enable-muxer=asf \
2665 --enable-muxer=ipod \
2666 --disable-encoders \
2667 --enable-encoder=ac3 \
2668 --enable-encoder=aac \
2669 --enable-encoder=wmav2 \
2670 `if test "$use_ffmpeg_libvorbis" = "yes"; then echo --enable-libvorbis --enable-muxer=ogg --enable-encoder=libvorbis; else echo --disable-libvorbis; fi` \
2671 --disable-decoder=mpeg_xvmc \
2675 --disable-ffserver \
2677 --disable-crystalhd \
2682 `if test "x$use_vdpau" != "xno"; then echo --enable-vdpau; else echo --disable-vdpau; fi` \
2683 `if test "x$use_vaapi" != "xno"; then echo --enable-vaapi; else echo --disable-vaapi; fi` \
2684 `if test "$use_optimizations" != "no"; then echo --enable-optimizations; else echo --disable-optimizations; fi` \
2685 --enable-protocol=http \
2687 --enable-runtime-cpudetect \
2688 `if test "$use_hardcoded_tables" = "yes"; then echo --enable-hardcoded-tables; else echo --disable-hardcoded-tables; fi`\
2689 `if test "$target_platform" = "target_android" && test "$host_cpu" = "i686"; then echo --disable-mmx; fi #workaround for gcc 4.6 bug` \
2690 `if test "$target_platform" = "target_android"; then echo "--custom-libname-with-major=\\$(SLIBPREF)\\$(FULLNAME)-\\$(LIBMAJOR)-${ARCH}\\$(SLIBSUF)"; \
2691 else echo "--custom-libname-with-major=\\$(FULLNAME)-\\$(LIBMAJOR)-${ARCH}\\$(SLIBSUF)"; fi` \
2692 `case $host_cpu in i?86*) echo --disable-pic ;; *) echo --enable-pic ;; esac` \
2694 sed -i -e "s#define HAVE_SYMVER 1#define HAVE_SYMVER 0#" config.h &&
2695 sed -i -e "s#define HAVE_SYMVER_GNU_ASM 1#define HAVE_SYMVER_GNU_ASM 0#" config.h
2697 ], [$USE_EXTERNAL_FFMPEG])
2699 XB_CONFIG_MODULE([lib/libdvd/libdvdcss], [
2704 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2705 --host=$host_alias \
2706 --build=$build_alias \
2707 --target=$target_alias \
2711 ], [$SKIP_CONFIG_DVDCSS])
2713 XB_CONFIG_MODULE([lib/libdvd/libdvdread], [
2715 --extra-cflags="$CFLAGS $DVDREAD_CFLAGS -I`pwd`/../libdvdcss/src" \
2716 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2717 --host=$host_alias \
2718 --build=$build_alias \
2719 --target=$target_alias \
2725 $MAKE dvdread-config &&
2726 mkdir -p `pwd`/../includes/dvdread
2727 cp `pwd`/../libdvdread/src/*.h `pwd`/../includes/dvdread
2728 cp `pwd`/../libdvdread/src/dvdread/*.h `pwd`/../includes/dvdread
2731 XB_CONFIG_MODULE([lib/libdvd/libdvdnav], [
2733 --extra-cflags="$CFLAGS $DVDREAD_CFLAGS -I`pwd`/../includes" \
2734 --extra-ldflags="-L`pwd`/../libdvdread/obj" \
2735 --with-dvdread-config="`pwd`/../libdvdread/obj/dvdread-config" \
2736 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2737 --host=$host_alias \
2738 --build=$build_alias \
2739 --target=$target_alias \
2745 XB_CONFIG_MODULE([xbmc/visualizations/XBMCProjectM/libprojectM],[
2747 rm -f CMakeCache.txt && \
2748 CC="$ORIGCC" CXX="$ORIGCXX" LDFLAGS="$LDFLAGS" cmake \
2749 -DCMAKE_BUILD_TYPE=None -DUSE_FTGL:BOOL=OFF \
2750 -DCMAKE_C_FLAGS:STRING="${CPPFLAGS} ${CFLAGS}" \
2751 -DCMAKE_CXX_FLAGS:STRING="${CPPFLAGS} ${CXXFLAGS}" \
2752 -DCMAKE_INSTALL_PREFIX="${prefix}" \
2753 -DCMAKE_INSTALL_LIBDIR:PATH="${libdir}" \
2754 -DINCLUDE_INSTALL_DIR:PATH="${includedir}" \
2755 -DLIB_INSTALL_DIR:PATH="${libdir}" \
2756 -DSYSCONF_INSTALL_DIR:PATH="${sysconfdir}" \
2757 -DSHARE_INSTALL_PREFIX:PATH="${datadir}" . &&
2758 if test "$host_vendor" = "apple" ; then
2759 # cmake has hardcoded paths to macports which bork our darwin depends cross/ppc, remove them
2760 sed -ie "s|-L/opt/local/lib| |" CMakeFiles/projectM.dir/link.txt
2761 sed -ie "s|-L/opt/local/lib| |" CMakeFiles/projectM.dir/flags.make
2762 sed -ie "s|-I/opt/local/include| |" CMakeFiles/projectM.dir/flags.make
2765 ], [$DISABLE_PROJECTM])
2767 XB_CONFIG_MODULE([xbmc/visualizations/Goom/goom2k4-0],[
2770 CXXFLAGS="$CXXFLAGS" \
2771 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2772 --host=$host_alias \
2773 --build=$build_alias \
2774 --target=$target_alias \
2780 XB_CONFIG_MODULE([xbmc/screensavers/rsxs-0.9/], [
2781 if test "$host_vendor" = "apple"; then
2782 TEMPCFLAGS="${CFLAGS} -fgnu89-inline";
2784 TEMPCFLAGS="$CFLAGS";
2789 CFLAGS="$TEMPCFLAGS" \
2790 CXXFLAGS="$CXXFLAGS" \
2791 `if test "$host_vendor" = "apple"; then echo --with-png=${prefix} --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib; fi` \
2792 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2793 --host=$host_alias \
2794 --build=$build_alias \
2795 --target=$target_alias \
2796 --without-xscreensaver \
2799 --disable-fieldlines \
2803 --disable-hyperspace \
2806 if echo "$ARCH" | grep -q freebsd ; then
2807 sed -i.back "s;\(STDBOOL_H = \)stdbool.h;\1;" lib/Makefile
2811 XB_CONFIG_MODULE([lib/cpluff], [
2812 ./configure --disable-nls \
2813 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2814 --host=$host_alias \
2815 --build=$build_alias \
2816 --target=$target_alias CFLAGS="$CFLAGS" CC="$CC" CXX="$CXX" LDFLAGS="$LDFLAGS" LIBS=""
2817 #LDFLAGS="$LDFLAGS -Wl,-read_only_relocs,suppress"
2820 XB_CONFIG_MODULE([lib/gtest], [
2825 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2826 --host=$host_alias \
2827 --build=$build_alias \
2828 --target=$target_alias \
2832 ], [$SKIP_CONFIG_GTEST])
2834 XB_CONFIG_MODULE([pvr-addons], [
2836 --prefix="${prefix}" \
2837 --host=$host_alias \
2838 --build=$build_alias \
2839 --target=$target_alias \
2843 CXXFLAGS="$CXXFLAGS"
2844 ], [$DISABLE_PVR_ADDON_CONFIG])
2848 final_message="$final_message\n prefix:\t$prefix\n$dashes"
2849 echo -e "$final_message\n"