2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([kodi], [16.0.992], [http://trac.kodi.tv])
6 AC_CONFIG_HEADERS([xbmc/config.h])
8 m4_include([m4/ax_prog_cc_for_build.m4])
9 m4_include([m4/ax_prog_cxx_for_build.m4])
10 m4_include([m4/ax_cxx_compile_stdcxx_11.m4])
11 m4_include([m4/ax_python_devel.m4])
12 m4_include([m4/xbmc_arch.m4])
14 AC_CONFIG_AUX_DIR([build-aux])
15 AM_INIT_AUTOMAKE([foreign])
19 echo "$@" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz
22 # workaround for autotools that don't set this
23 abs_top_srcdir=${abs_top_srcdir=$(cd $srcdir; pwd)}
25 # check for enabling additional players
26 AC_DEFUN([XB_ADD_PLAYER],
28 AC_MSG_CHECKING([for $2])
32 AC_DEFINE([HAS_$1], 1, [using $2])
33 AC_MSG_RESULT([enabling $2])
36 AC_MSG_RESULT([$2 is not enabled])
40 # check for enabling additional codecs
41 AC_DEFUN([XB_ADD_CODEC],
43 AC_MSG_CHECKING([for $2])
48 AC_DEFINE([HAS_$1], 1, [using $2])
49 AC_MSG_RESULT([enabling $2])
52 AC_MSG_RESULT([$2 is not enabled])
56 # check for library basenames
57 AC_DEFUN([XB_FIND_SONAME],
59 if echo "$host" | grep -q freebsd ; then
60 AC_MSG_CHECKING([for lib$2 soname])
61 $1_SONAME=[`ldconfig -r | sed -n "s;.* \(/.*lib$2\.so.*\)$;\1;p" | head -n 1`]
62 if test x$$1_SONAME != x ; then
63 $1_SONAME=[`basename $$1_SONAME`]
65 elif [[ "$host_vendor" != "apple" ]]; then
66 AC_MSG_CHECKING([for lib$2 soname])
67 $1_FILENAME=$($CC -nostdlib -o /dev/null $CFLAGS $LDFLAGS $4 -l$2 -Wl,-M 2>/dev/null | grep "^LOAD.*$2" | awk '{V=2; print $V}')
68 if [[ -z $$1_FILENAME ]]; then
69 #try gold linker syntax
70 $1_FILENAME=$($CC -nostdlib -o /dev/null $CFLAGS $LDFLAGS $4 -l$2 -Wl,-t 3>&1 1>&2 2>&3 | grep "lib$2")
72 if [[ ! -z $$1_FILENAME ]]; then
73 $1_SONAME=$($OBJDUMP -p $$1_FILENAME | grep "SONAME.*$2" | awk '{V=2; print $V}')
76 AC_MSG_CHECKING([for lib$2 dylib])
77 gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
78 env_lib_path=[`echo $LDFLAGS | sed 's/-L[ ]*//g'`]
79 if test "$cross_compiling" = yes; then
82 host_lib_path="/usr/lib /usr/local/lib"
84 for path in $gcc_lib_path $env_lib_path $host_lib_path; do
85 lib=[`ls -- $path/lib$2.dylib 2>/dev/null`]
86 if test x$lib != x; then
87 # we want the path/name that is embedded in the dylib
88 $1_FILENAME=[`otool -L $lib | grep -v lib$2.dylib | grep lib$2 | awk '{V=1; print $V}'`]
89 $1_SONAME=[`basename $$1_FILENAME`]
93 if [[ -z "$$1_SONAME" ]]; then
95 if test -z "$3" || test "x${$3}" = "xyes"; then
96 AC_MSG_ERROR([Unable to determine soname of lib$2 library])
98 AC_MSG_WARN([Unable to determine soname of lib$2 library])
100 AC_MSG_WARN([lib$2 support disabled])
103 AC_MSG_RESULT([$$1_SONAME])
108 # Function to push and pop libs and includes for a command
109 AC_DEFUN([XB_PUSH_FLAGS], [
111 SAVE_INCLUDES="$INCLUDES"
116 INCLUDES="$SAVE_INCLUDES"
119 # version can be overridden by setting the following as ENV vars when running configure
120 APP_NAME=${APP_NAME-$(${AWK} '/APP_NAME/ {print $2}' version.txt)}
121 APP_NAME_LC=$(echo $APP_NAME | ${AWK} '{print tolower($0)}')
122 APP_NAME_UC=$(echo $APP_NAME | ${AWK} '{print toupper($0)}')
123 APP_VERSION_MAJOR=${APP_VERSION_MAJOR-$(${AWK} '/VERSION_MAJOR/ {print $2}' version.txt)}
124 APP_VERSION_MINOR=${APP_VERSION_MINOR-$(${AWK} '/VERSION_MINOR/ {print $2}' version.txt)}
125 APP_VERSION_TAG=${APP_VERSION_TAG-$(${AWK} '/VERSION_TAG/ {print $2}' version.txt)}
126 APP_VERSION_TAG_LC=$(echo $APP_VERSION_TAG | ${AWK} '{print tolower($0)}')
127 APP_VERSION_CODE=${APP_VERSION_CODE-$(${AWK} '/VERSION_CODE/ {print $2}' version.txt)}
128 APP_ADDON_API=${APP_ADDON_API-$(${AWK} '/ADDON_API/ {print $2}' version.txt)}
129 if test "$APP_NAME" != "" && test "$APP_VERSION_MAJOR" != "" && test "$APP_VERSION_MINOR" != "" \
130 && test "$APP_VERSION_CODE" != "" && test "$APP_ADDON_API" != ""; then
131 APP_VERSION=${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}
132 if test "$APP_VERSION_TAG" != ""; then
133 APP_VERSION=${APP_VERSION}-${APP_VERSION_TAG}
137 AC_SUBST(APP_NAME_LC)
138 AC_SUBST(APP_NAME_UC)
139 AC_SUBST(APP_VERSION)
140 AC_SUBST(APP_VERSION_MAJOR)
141 AC_SUBST(APP_VERSION_MINOR)
142 AC_SUBST(APP_VERSION_TAG)
143 AC_SUBST(APP_VERSION_TAG_LC)
144 AC_SUBST(APP_VERSION_CODE)
145 AC_SUBST(APP_ADDON_API)
147 dashes="------------------------"
148 final_message="\n ${APP_NAME} Configuration:"
149 final_message="\n$dashes$final_message\n$dashes"
150 final_message="$final_message\n ${APP_NAME} Version:\t${APP_VERSION}"
152 AC_MSG_ERROR(could not detect application Version, make sure version.txt is complete)
156 AC_CHECK_PROG(HAVE_GIT,git,"yes","no",)
157 if test "$GIT_REV" = ""; then
158 if test -f VERSION ; then
159 GIT_REV=$(awk 'END{print substr($1,1,16)}' VERSION)
160 elif test "$HAVE_GIT" = "yes" -a -d ${abs_top_srcdir}/.git; then
161 GIT_REV=$(git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h %ci" HEAD | awk '{gsub("-", "");print $2"-"$1}')
166 final_message="$final_message\n git Rev.:\t${GIT_REV}"
168 # General message strings
169 configure_debug="ERROR: this is a configure debug statement"
170 missing_library="Could not find a required library. Please see the README for your platform."
171 missing_headers="Could not find some required headers. Please see the README for your platform."
172 missing_program="Could not find a required program. Please see the README for your platform."
173 alsa_disabled="== ALSA support disabled. =="
174 dbus_disabled="== DBUS support disabled. =="
175 wayland_enabled="== Wayland enabled. =="
176 wayland_disabled="== Wayland disabled. =="
177 x11_enabled="== X11 enabled. =="
178 x11_disabled="== X11 disabled. =="
179 pulse_not_found="== Could not find libpulse. PulseAudio support disabled. =="
180 pulse_disabled="== PulseAudio support disabled. =="
181 dvdcss_enabled="== DVDCSS support enabled. =="
182 dvdcss_disabled="== DVDCSS support disabled. =="
183 avahi_not_found="== Could not find libavahi-common or libavahi-client. Avahi support disabled. =="
184 avahi_disabled="== Avahi support disabled. =="
185 mdnsembedded_not_found="== Could not find mDNSEmbedded. Might prevent zeroconf support. =="
186 mdnsembedded_disabled="== mDNSEmbedded support disabled. =="
187 vdpau_not_found="== Could not find libvdpau. VDPAU support disabled. =="
188 vdpau_disabled="== VDPAU support manually disabled. =="
189 vaapi_not_found="== Could not find libva. VAAPI support disabled. =="
190 vaapi_disabled="== VAAPI support manually disabled. =="
191 vtbdecoder_enabled="== VTBDecoder support enabled. =="
192 vtbdecoder_disabled="== VTBDecoder support manually disabled. =="
193 openmax_disabled="== OpenMax support manually disabled. =="
194 openmax_not_found="== Could not find OpenMax headers. OpenMax support disabled. =="
195 ssh_not_found="== Could not find libssh. =="
196 ssh_disabled="== SSH SFTP disabled. =="
197 librtmp_not_found="== Could not find libRTMP. RTMP support disabled. =="
198 librtmp_disabled="== RTMP support disabled. =="
199 libnfs_not_found="== Could not find libnfs. NFS client support disabled. =="
200 libnfs_disabled="== NFS support disabled. =="
201 libgif_not_found="== Could not find libgif. libgif support disabled. =="
202 libgif_disabled="== libgif support disabled. =="
203 libshairplay_not_found="== Could not find libshairplay. =="
204 samba_disabled="== SAMBA support disabled. =="
205 libplist_not_found="== Could not find libplist. AirPlay support disabled. =="
206 libplist_disabled="== AirPlay support disabled. =="
207 alsa_not_found="== Could not find ALSA. ALSA support disabled. =="
208 dbus_not_found="== Could not find DBUS. DBUS support disabled. =="
209 sdl_joystick_not_found="== Could not find SDL2. Joystick support disabled. =="
210 libcap_disabled="== Capabilities detection support disabled. =="
211 libcap_not_found="== Could not find libcap. Capabilities detection support disabled. =="
212 gtest_enabled="== Google Test Framework will be configured. =="
213 gtest_disabled="== Google Test Framework will not be configured. =="
214 breakpad_enabled="== Google Breakpad will be configured. =="
215 breakpad_disabled="== Google Breakpad Framework will not be configured. =="
217 libudev_not_found="== Could not find libudev. Will use polling to check for device changes. =="
218 libudev_disabled="== udev support disabled. Will use polling to check for device changes. =="
219 libusb_not_found="== Could not find libusb. Plug and play USB device support will not be available. =="
220 libusb_disabled="== libusb disabled. Plug and play USB device support will not be available. =="
221 libusb_disabled_udev_found="== libusb disabled. =="
222 libcec_enabled="== libcec enabled. =="
223 libcec_disabled="== libcec disabled. CEC adapter support will not be available. =="
225 AC_ARG_WITH([ffmpeg],
226 [AS_HELP_STRING([--with-ffmpeg],
227 [ffmpeg options: auto (search pkg-config or auto build), force (always build ffmpeg), shared (link dynamically), path_to_ffmpeg [default=force]])],
228 [ffmpeg_dir=$with_ffmpeg],
231 AC_ARG_ENABLE([shared-lib],
232 [AS_HELP_STRING([--enable-shared-lib],
233 [build lib${APP_NAME_LC}. helpful for tests (default is no)])],
234 [build_shared_lib=$enableval],
235 [build_shared_lib=no])
237 AC_ARG_ENABLE([debug],
238 [AS_HELP_STRING([--enable-debug],
239 [enable debugging information (default is yes)])],
240 [use_debug=$enableval],
243 AC_ARG_WITH([platform],
244 [AS_HELP_STRING([--with-platform],
245 [use a pre-configured config for common arm boards])],
246 [use_platform=$withval],
249 AC_ARG_ENABLE([optimizations],
250 [AS_HELP_STRING([--enable-optimizations],
251 [enable optimization (default is yes)])],
252 [use_optimizations=$enableval],
253 [use_optimizations=yes])
256 [AS_HELP_STRING([--enable-gl],
257 [enable OpenGL rendering (default is yes)])],
261 AC_ARG_ENABLE([gles],
262 [AS_HELP_STRING([--enable-gles],
263 [enable OpenGLES rendering (default is no)])],
264 [use_gles=$enableval],
267 AC_ARG_ENABLE([vdpau],
268 [AS_HELP_STRING([--enable-vdpau],
269 [enable VDPAU decoding (default is auto)])],
270 [use_vdpau=$enableval],
273 AC_ARG_ENABLE([vaapi],
274 [AS_HELP_STRING([--enable-vaapi],
275 [enable VAAPI decoding (default is auto)])],
276 [use_vaapi=$enableval],
279 AC_ARG_ENABLE([vtbdecoder],
280 [AS_HELP_STRING([--enable-vtbdecoder],
281 [enable VTBDecoder decoding (default is auto)])],
282 [use_vtbdecoder=$enableval],
283 [use_vtbdecoder=auto])
285 AC_ARG_ENABLE([openmax],
286 [AS_HELP_STRING([--enable-openmax],
287 [enable OpenMax decoding (default is auto, requires OpenGLES)])],
288 [use_openmax=$enableval],
291 AC_ARG_ENABLE([tegra],
292 [AS_HELP_STRING([--enable-tegra],
293 [enable Tegra2 arm (default is no)])],
294 [use_tegra=$enableval],
297 AC_ARG_ENABLE([profiling],
298 [AS_HELP_STRING([--enable-profiling],
299 [enable gprof profiling (default is no)])],
300 [use_profiling=$enableval],
303 AC_ARG_ENABLE([joystick],
304 [AS_HELP_STRING([--enable-joystick],
305 [enable SDL joystick support (default is auto)])],
306 [use_joystick=$enableval],
309 AC_ARG_ENABLE([wayland],
310 [AS_HELP_STRING([--enable-wayland],
311 [enable wayland (default is no) 'Linux Only'])],
312 [use_wayland=$enableval],
316 [AS_HELP_STRING([--enable-x11],
317 [enable x11 (default is yes) 'Linux Only'])],
318 [use_x11=$enableval],
321 AC_ARG_ENABLE([ccache],
322 [AS_HELP_STRING([--enable-ccache],
323 [enable building with ccache feature (default is auto)])],
324 [use_ccache=$enableval],
327 AC_ARG_ENABLE([alsa],
328 [AS_HELP_STRING([--disable-alsa],
329 [disable ALSA support (only for linux/freebsd)])],
330 [use_alsa=$enableval],
333 AC_ARG_ENABLE([dbus],
334 [AS_HELP_STRING([--disable-dbus],
335 [disable DBUS support])],
336 [use_dbus=$enableval],
339 AC_ARG_ENABLE([pulse],
340 [AS_HELP_STRING([--enable-pulse],
341 [enable PulseAudio support (default is auto)])],
342 [use_pulse=$enableval],
346 [AS_HELP_STRING([--disable-ssh],
347 [disable SSH SFTP support (default is enabled)])],
348 [use_ssh=$enableval],
351 AC_ARG_ENABLE([rtmp],
352 [AS_HELP_STRING([--enable-rtmp],
353 [enable RTMP support via librtmp (default is auto)])],
354 [use_librtmp=$enableval],
357 AC_ARG_ENABLE([samba],
358 [AS_HELP_STRING([--disable-samba],
359 [disable SAMBA support (default is enabled)])],
360 [use_samba=$enableval],
364 [AS_HELP_STRING([--enable-nfs],
365 [enable NFS support via libnfs (default is auto)])],
366 [use_libnfs=$enableval],
370 [AS_HELP_STRING([--enable-gif],
371 [enable gif support via libgif (default is auto)])],
372 [use_libgif=$enableval],
375 AC_ARG_ENABLE([airplay],
376 [AS_HELP_STRING([--enable-airplay],
377 [enable AirPlay support(default is auto)])],
378 [use_airplay=$enableval],
381 AC_ARG_ENABLE([airtunes],
382 [AS_HELP_STRING([--enable-airtunes],
383 [enable AirTunes support(default is auto)])],
384 [use_airtunes=$enableval],
387 AC_ARG_ENABLE([upnp],
388 [AS_HELP_STRING([--disable-upnp],
389 [disable UPnP support (default is enabled)])],
390 [use_upnp=$enableval],
393 AC_ARG_ENABLE([dvdcss],
394 [AS_HELP_STRING([--enable-dvdcss],
395 [enable DVDCSS support (default is yes)])],
396 [use_dvdcss=$enableval],
400 [AS_HELP_STRING([--enable-mid],
401 [enable MID support (default is no)])],
402 [use_mid=$enableval],
405 AC_ARG_ENABLE([avahi],
406 [AS_HELP_STRING([--disable-avahi],
407 [disable Avahi support (default is enabled if libavahi-common and libavahi-client is found)])],
408 [use_avahi=$enableval],
411 AC_ARG_ENABLE([mdnsembedded],
412 [AS_HELP_STRING([--disable-mdnsembedded],
413 [disable mDNSEmbedded support (default is auto)])],
414 [use_mdnsembedded=$enableval],
415 [use_mdnsembedded=auto])
417 AC_ARG_ENABLE([non-free],
418 [AS_HELP_STRING([--disable-non-free],
419 [disable componentents with non-compliant licenses])],
420 [use_nonfree=$enableval],
423 AC_ARG_ENABLE([asap-codec],
424 [AS_HELP_STRING([--enable-asap-codec],
425 [enable ASAP ADPCM support])],
426 [use_asap=$enableval],
429 AC_ARG_ENABLE([mysql],
430 [AS_HELP_STRING([--disable-mysql],
432 [use_mysql=$enableval],
435 AC_ARG_ENABLE([webserver],
436 [AS_HELP_STRING([--disable-webserver],
437 [disable webserver])],
438 [use_webserver=$enableval],
441 AC_ARG_ENABLE([optical-drive],
442 [AS_HELP_STRING([--disable-optical-drive],
443 [disable optical drive])],
444 [use_optical_drive=$enableval],
445 [use_optical_drive=yes])
447 AC_ARG_ENABLE([libbluray],
448 [AS_HELP_STRING([--enable-libbluray],
449 [enable libbluray support])],
450 [use_libbluray=$enableval],
451 [use_libbluray=auto])
453 AC_ARG_ENABLE([texturepacker],
454 [AS_HELP_STRING([--enable-texturepacker],
455 [enable texturepacker support (default is auto)])],
456 [use_texturepacker=$enableval],
457 [use_texturepacker=auto])
459 AC_ARG_ENABLE([lirc],
460 [AS_HELP_STRING([--disable-lirc],
461 [disable lirc support (default is enabled)])],
462 [AC_MSG_RESULT("Lirc disabled")],
463 [AC_DEFINE([HAVE_LIRC], [1], ["Lirc enabled"])])
465 AC_ARG_WITH([lirc-device],
466 [AS_HELP_STRING([--with-lirc-device=file],
467 [specify the default LIRC device (default is /dev/lircd)])],
468 [lirc_device=$withval],
469 [lirc_device=/dev/lircd])
470 AC_DEFINE_UNQUOTED([LIRC_DEVICE], ["$lirc_device"], [Default LIRC device])
472 AC_ARG_ENABLE([udev],
473 [AS_HELP_STRING([--enable-udev],
474 [enable udev support (default is auto)])],
475 [use_libudev=$enableval],
478 AC_ARG_ENABLE([libusb],
479 [AS_HELP_STRING([--enable-libusb],
480 [enable libusb support (default is auto)])],
481 [use_libusb=$enableval],
484 AC_ARG_ENABLE([libcec],
485 [AS_HELP_STRING([--enable-libcec],
486 [enable libcec support (default is auto)])],
487 [use_libcec=$enableval],
490 AC_ARG_ENABLE([libcap],
491 [AS_HELP_STRING([--enable-libcap],
492 [enable libcap support (default is auto)])],
493 [use_libcap=$enableval],
496 AC_ARG_ENABLE([player],
497 [AS_HELP_STRING([--enable-player],
498 [enable additional players from a list of comma separated names, (default is none, choices are omxplayer)])],
499 [add_players=$enableval],
502 AC_ARG_ENABLE([gtest],
503 [AS_HELP_STRING([--enable-gtest],
504 [configure Google Test Framework (default is yes)])],
505 [configure_gtest=$enableval],
506 [configure_gtest=yes])
508 AC_ARG_ENABLE([breakpad],
509 [AS_HELP_STRING([--enable-breakpad],
510 [configure Google Breakpad (default is no)])],
511 [use_breakpad=$enableval],
514 AC_ARG_ENABLE([codec],
515 [AS_HELP_STRING([--enable-codec],
516 [enable additional codecs from a list of comma separated names, (default is none, choices are amcodec, libstagefright and imxvpu)])],
517 [add_codecs=$enableval],
520 AC_ARG_ENABLE([libav-compat],
521 [AS_HELP_STRING([--enable-libav-compat],
522 [build a wrapper around libav to provide the functions needed by ${APP_NAME}. This is
523 *not* supported by ${APP_NAME} developers and is provided only for convenience. (default is no) 'Linux only'])],
524 [use_libav_hacks=$enableval],
525 [use_libav_hacks=no])
527 ### End of external library options
529 if test "x$host_vendor" != "xapple"; then
530 DEFAULT_COMPILE_FLAGS="-fPIC -DPIC -D_REENTRANT"
531 DEFAULT_COMPILE_FLAGS="$DEFAULT_COMPILE_FLAGS -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
534 # Checks for programs.
535 PASSED_CFLAGS=$CFLAGS # Hack to override autoconf default values
538 CFLAGS="$PASSED_CFLAGS $DEFAULT_COMPILE_FLAGS"
539 PASSED_CXXFLAGS=$CXXFLAGS # Hack to override autoconf default values
541 AX_PROG_CXX_FOR_BUILD
542 CXXFLAGS="$PASSED_CXXFLAGS $DEFAULT_COMPILE_FLAGS"
543 AX_CXX_COMPILE_STDCXX_11(,[optional])
550 OBJDUMP="${OBJDUMP:-objdump}"
551 READELF="${READELF:-readelf}"
554 # host detection and setup
556 i*86*-linux-android*)
557 target_platform=target_android
567 i*86*-linux-gnu*|i*86*-*-linux-uclibc*)
568 target_platform=target_linux
570 if test "$use_cpu" = "no" -a "$cross_compiling" = "yes"; then
575 # Workaround a build issue on i386 with gcc 4.9:
576 # including <algorithm> pulls in SSE intrinsics.
577 # possible GCC bug? ideas welcome
578 if test "$GCC_CXX" = "yes"; then
579 GCC_VERSION=$($CXX -dumpversion)
580 GCC_MAJOR_VER=$(echo $GCC_VERSION | awk -F"." '{print $1}')
581 GCC_MINOR_VER=$(echo $GCC_VERSION | awk -F"." '{print $2}')
583 if (test "$GCC_MAJOR_VER" -eq "4" && test "$GCC_MINOR_VER" -ge "9") || (test "$GCC_MAJOR_VER" -gt "4"); then
584 CXXFLAGS="$CXXFLAGS -msse"
585 AC_MSG_NOTICE("detected gcc version $GCC_VERSION - enabling SSE")
589 x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*)
590 target_platform=target_linux
592 if test "$use_cpu" = "no" -a "$cross_compiling" = "yes"; then
599 target_platform=target_linux
604 target_platform=target_linux
605 ARCH="x86_64-freebsd"
620 PYTHON_LDFLAGS="-L${prefix}/lib -lpython2.6"
621 PYTHON_CPPFLAGS="-I${prefix}/include/python2.6"
622 PYTHON_SITE_PKG="${prefix}/lib/python2.6/site-packages"
623 PYTHON_NOVERSIONCHECK="no-check"
624 DEPENDS_ROOT_FOR_XCODE=$(echo ${prefix%/*})
625 AC_SUBST([DEPENDS_ROOT_FOR_XCODE])
631 DEPENDS_ROOT_FOR_XCODE=$(echo ${prefix%/*})
632 AC_SUBST([DEPENDS_ROOT_FOR_XCODE])
634 powerpc-apple-darwin*)
639 DEPENDS_ROOT_FOR_XCODE=$(echo ${prefix%/*})
640 AC_SUBST([DEPENDS_ROOT_FOR_XCODE])
642 powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*)
645 powerpc64-*-linux-gnu*|powerpc64-*-linux-uclibc*)
646 ARCH="powerpc64-linux"
648 arm*-*-linux-gnu*|arm*-*-linux-uclibc*)
649 target_platform=target_linux
659 arm*-*linux-android*)
660 target_platform=target_android
673 target_platform=target_linux
684 AC_MSG_ERROR(unsupported host ($host))
688 if test "$target_platform" = "target_android" ; then
690 webserver_checkdepends=yes
691 CFLAGS="$CFLAGS -Wno-psabi"
692 DROID_DVDLIB_SEEK64="-D_FILE_OFFSET_BITS=64 -D_OFF_T_DEFINED_ -Doff_t=off64_t -Dlseek=lseek64"
693 CXXFLAGS="$CXXFLAGS -Wno-psabi"
694 AC_DEFINE(HAS_EGLGLES, [1], [Define if supporting EGL based GLES Framebuffer])
697 case $use_platform in
699 target_platform=target_raspberry_pi
703 use_hardcoded_tables="yes"
706 AC_DEFINE(HAS_EGLGLES, [1], [Define if supporting EGL based GLES Framebuffer])
707 USE_OMXLIB=1; AC_DEFINE([HAVE_OMXLIB],[1],["Define to 1 if OMX libs is enabled"])
708 USE_MMAL=1; AC_DEFINE([HAS_MMAL],[1],["Define to 1 if MMAL libs is enabled"])
714 if test "$host_vendor" = "apple"; then
724 XBMC_SETUP_ARCH_DEFINES()
726 # detect soname version
728 if test "$host_vendor" = "apple"; then
729 echo "#define GIT_REV \"$GIT_REV\"" > git_revision.h
731 SDL_DEFINES="$SDL_DEFINES -D'GIT_REV=\"$GIT_REV\"'"
734 if test "$build_shared_lib" = "yes"; then
735 final_message="$final_message\n Shared lib\tYes"
736 AC_SUBST(USE_LIBXBMC,1)
740 # platform debug flags
741 if test "$use_debug" = "yes"; then
742 final_message="$final_message\n Debugging:\tYes"
743 if test "$use_profiling" = "yes"; then
744 final_message="$final_message\n Profiling:\tYes"
745 DEBUG_FLAGS="-g -pg -D_DEBUG -Wall"
747 final_message="$final_message\n Profiling:\tNo"
748 DEBUG_FLAGS="-g -D_DEBUG -Wall"
751 final_message="$final_message\n Debugging:\tNo"
752 if test "$use_profiling" = "yes"; then
753 final_message="$final_message\n Profiling:\tYes"
754 DEBUG_FLAGS="-pg -DNDEBUG=1"
756 final_message="$final_message\n Profiling:\tNo"
757 if test "$use_breakpad" = "yes"; then
758 DEBUG_FLAGS="-g -DNDEBUG=1"
760 DEBUG_FLAGS="-DNDEBUG=1"
764 CFLAGS="$DEBUG_FLAGS $CFLAGS"
765 CXXFLAGS="$DEBUG_FLAGS $CXXFLAGS"
768 if test "$use_optimizations" = "yes"; then
769 final_message="$final_message\n Optimization:\tYes"
770 CXXFLAGS="-O2 $CXXFLAGS"
773 final_message="$final_message\n Optimization:\tNo"
777 # platform specific flags
778 if echo "$ARCH" | grep -q "freebsd" ; then
779 LOCALBASE="${LOCALBASE:-/usr/local}"
780 CFLAGS="$CFLAGS -I$LOCALBASE/include"
781 CXXFLAGS="$CXXFLAGS -I$LOCALBASE/include"
782 CPPFLAGS="$CPPFLAGS -I$LOCALBASE/include"
783 LDFLAGS="$LDFLAGS -L$LOCALBASE/lib"
785 if test "$host_vendor" = "apple" ; then
786 # standard application paths
787 INCLUDES="$INCLUDES -I\$(abs_top_srcdir)/xbmc/osx"
788 if test "$use_arch" != "arm"; then
789 LIBS="$LIBS -framework ApplicationServices"
790 LIBS="$LIBS -framework AudioUnit"
791 LIBS="$LIBS -framework AudioToolbox"
792 LIBS="$LIBS -framework Cocoa"
793 LIBS="$LIBS -framework CoreAudio"
794 LIBS="$LIBS -framework CoreVideo"
795 LIBS="$LIBS -framework CoreServices"
796 LIBS="$LIBS -framework CoreFoundation"
797 LIBS="$LIBS -framework DiskArbitration"
798 LIBS="$LIBS -framework IOKit"
799 LIBS="$LIBS -framework IOSurface"
800 LIBS="$LIBS -framework QuartzCore"
801 LIBS="$LIBS -framework SystemConfiguration"
802 LIBS="$LIBS -framework VideoDecodeAcceleration"
805 LIBS="$LIBS -framework CoreFoundation"
807 elif test "$target_platform" = "target_raspberry_pi"; then
810 elif test "$use_arch" = "arm"; then
811 CFLAGS="$CFLAGS -mno-apcs-stack-check"
812 CXXFLAGS="$CXXFLAGS -mno-apcs-stack-check"
813 if test "$use_tegra" = "yes"; then
814 # Compile for ARMv7a architecture, need to test gcc for vfpv3-d16 support
815 SAVE_CFLAGS="$CFLAGS"
816 CFLAGS="-mfpu=vfpv3-d16"
818 [AC_LANG_SOURCE([int foo;])],
819 [ CFLAGS="$SAVE_CFLAGS -Wno-psabi -Wa,-march=armv7a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mthumb-interwork"
820 CXXFLAGS="$CXXFLAGS -Wno-psabi -Wa,-march=armv7a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mthumb-interwork"
822 [ CFLAGS="$SAVE_CFLAGS -Wa,-march=armv6 -mtune=cortex-a8 -mthumb-interwork"
823 CXXFLAGS="$CXXFLAGS -Wa,-march=armv6 -mtune=cortex-a8 -mthumb-interwork"
826 if test "$use_neon" = "yes"; then
827 CFLAGS="$CFLAGS -mfpu=neon -mvectorize-with-neon-quad"
828 CXXFLAGS="$CXXFLAGS -mfpu=neon -mvectorize-with-neon-quad"
834 if test "$ARCH" = "x86_64-linux" || test "$ARCH" = "i486-linux"; then
835 SAVE_CFLAGS="$CFLAGS"
838 [AC_LANG_SOURCE([int foo;])],
843 CFLAGS="$SAVE_CFLAGS"
846 # Checks for library functions.
849 AC_FUNC_CLOSEDIR_VOID
850 AC_FUNC_ERROR_AT_LINE
852 AC_PROG_GCC_TRADITIONAL
854 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
858 # Boxee is apparently having compile problems
859 # if HAVE_REALLOC is defined. Sort this later.
861 AC_FUNC_SELECT_ARGTYPES
862 AC_FUNC_SETVBUF_REVERSED
870 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 localtime_r])
872 # Check for various sizes
873 AC_CHECK_SIZEOF([int])
874 AC_CHECK_SIZEOF([size_t])
876 # Check for intrinsics
877 AC_MSG_CHECKING([for __sync_add_and_fetch(temp, 1)])
878 AC_TRY_LINK([],[long* temp=0; long ret=__sync_add_and_fetch(temp, 1);],
879 [have_builtin_sync_add_and_fetch=yes],
880 [have_builtin_sync_add_and_fetch=no])
881 AC_MSG_RESULT($have_builtin_sync_add_and_fetch)
882 if test "x$have_builtin_sync_add_and_fetch" = "xyes"; then
883 AC_DEFINE(HAS_BUILTIN_SYNC_ADD_AND_FETCH, 1,
884 [Define to 1 if your compiler supports the __sync_add_and_fetch() intrinsic.])
887 AC_MSG_CHECKING([for __sync_sub_and_fetch(temp, 1)])
888 AC_TRY_LINK([],[long* temp=0; long ret=__sync_sub_and_fetch(temp, 1);],
889 [have_builtin_sync_sub_and_fetch=yes],
890 [have_builtin_sync_sub_and_fetch=no])
891 AC_MSG_RESULT($have_builtin_sync_sub_and_fetch)
892 if test "x$have_builtin_sync_sub_and_fetch" = "xyes"; then
893 AC_DEFINE(HAS_BUILTIN_SYNC_SUB_AND_FETCH, 1,
894 [Define to 1 if your compiler supports the __sync_sub_and_fetch() intrinsic.])
897 AC_MSG_CHECKING([for __sync_val_compare_and_swap(temp, 1, 1)])
898 AC_TRY_LINK([],[long *temp = 0; long ret=__sync_val_compare_and_swap(temp, 1, 1);],
899 [have_builtin_sync_val_compare_and_swap=yes],
900 [have_builtin_sync_val_compare_and_swap=no])
901 AC_MSG_RESULT($have_builtin_sync_val_compare_and_swap)
902 if test "x$have_builtin_sync_val_compare_and_swap" = "xyes"; then
903 AC_DEFINE(HAS_BUILTIN_SYNC_VAL_COMPARE_AND_SWAP, 1,
904 [Define to 1 if your compiler supports the __sync_val_compare_and_swap() intrinsic.])
907 # Check for u16string/u32string declarations
909 AC_CHECK_TYPES([std::u16string, std::u32string], [], [], [[#include <string>]])
910 AC_CHECK_TYPES([char16_t, char32_t])
911 AC_CHECK_SIZEOF([wchar_t])
914 # Check inotify availability
915 AC_CHECK_HEADER([sys/inotify.h], AC_DEFINE([HAVE_INOTIFY],[1],[Define if we have inotify]),)
917 # Checks for boost headers using CXX instead of CC
919 AC_CHECK_HEADER([boost/circular_buffer.hpp],, AC_MSG_ERROR($missing_library))
923 if test -z "$PYTHON_NOVERSIONCHECK"; then
924 AX_PYTHON_DEVEL([>= '2.6'])
925 AX_PYTHON_DEVEL([< '3.0'])
926 PYTHON_VERSION=$ac_python_version
929 if test -z "$PYTHON_VERSION"; then
930 AC_MSG_ERROR([Can't find a Python version.])
932 LIBS="$LIBS $PYTHON_LDFLAGS"
933 AC_MSG_NOTICE([Using Python $PYTHON_VERSION])
937 if test "$use_wayland" = "yes"; then
938 AC_MSG_NOTICE($wayland_enabled)
939 PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client],
940 [INCLUDES="$INCLUDES $WAYLAND_CLIENT_CFLAGS";
941 WAYLAND_CLIENT_LIBRARY_LINE=`LIBRARY=\`${PKG_CONFIG} --libs-only-l wayland-client\`; echo ${LIBRARY:2}`;
942 XB_FIND_SONAME([WAYLAND_CLIENT_LIBRARY], ${WAYLAND_CLIENT_LIBRARY_LINE})],
943 AC_MSG_ERROR($missing_library))
944 PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl],
945 [INCLUDES="$INCLUDES $WAYLAND_EGL_CFLAGS";
946 WAYLAND_EGL_LIBRARY_LINE=`LIBRARY=\`${PKG_CONFIG} --libs-only-l wayland-egl\`; echo ${LIBRARY:2:11}`
947 XB_FIND_SONAME([WAYLAND_EGL_LIBRARY], ${WAYLAND_EGL_LIBRARY_LINE})],
948 AC_MSG_ERROR($missing_library))
949 PKG_CHECK_MODULES([XKBCOMMON], [xkbcommon],
950 [INCLUDES="$INCLUDES $XKBCOMMON_CFLAGS";
951 XKBCOMMON_LIBRARY_LINE=`LIBRARY=\`${PKG_CONFIG} --libs-only-l xkbcommon\`; echo ${LIBRARY:2}`;
952 XB_FIND_SONAME([XKBCOMMON_LIBRARY], $XKBCOMMON_LIBRARY_LINE)],
953 AC_MSG_ERROR($missing_library))
954 AC_DEFINE([HAVE_WAYLAND], [1], [Define to 1 if you have Wayland libs installed.])
955 AC_DEFINE([HAVE_XKBCOMMON], [1], [Define to 1 if you have libxkbcommon installed.])
957 # If we are also building with tests then we want to build
958 # wayland tests as well
959 if test "$configure_gtest" = "yes"; then
961 PKG_CHECK_MODULES([PIXMAN],
962 [pixman-1],have_pixman=yes,
963 [AC_MSG_WARN($missing_library); have_pixman=no])
964 PKG_CHECK_MODULES([WESTON],
965 [weston >= 1.1.90],[have_weston_sdk=yes],
966 [have_weston_sdk=no; AC_MSG_WARN($missing_library)])
968 AC_CHECK_PROG(WAYLAND_SCANNER, wayland-scanner, "wayland-scanner", "no")
969 if test "x$WAYLAND_SCANNER" == "xno"; then
970 AC_MSG_WARN($missing_program)
972 if test "x$have_weston_sdk" == "xyes" && test "x$have_pixman" = "xyes"; then
973 AC_SUBST(WAYLAND_TEST_INCLUDES,"$WAYLAND_CLIENT_CFLAGS $XKBCOMMON_CFLAGS $PIXMAN_CFLAGS $WESTON_CFLAGS")
974 AC_SUBST(WAYLAND_TEST_LIBS,"$WAYLAND_CLIENT_LIBS $XKBCOMMON_LIBS $PIXMAN_LIBS $WESTON_LIBS")
975 AC_DEFINE([HAVE_WESTON_SDK], [1], [Define to 1 if Weston SDK is installed.])
976 AC_SUBST(USE_WAYLAND_TEST_EXTENSION, 1)
978 AC_SUBST(WAYLAND_SCANNER)
979 AC_DEFINE([HAVE_WAYLAND_XBMC_PROTO],[1],["Define to 1 if the wayland test-protocol will be built"])
983 # Disable SDL and X11 builds
987 # Wayland requires the EGL "window system" which in turn only supports
988 # the OpenGL ES API, so enable gles support
991 AC_MSG_RESULT($wayland_disabled)
994 # Checks for platforms libraries.
995 if test "$use_gles" = "yes"; then
997 # GLES overwrites GL if both set to yes.
998 if test "$host_vendor" = "apple" ; then
999 AC_DEFINE([HAVE_LIBEGL],[1],["Define to 1 if you have the `EGL' library (-lEGL)."])
1000 AC_DEFINE([HAVE_LIBGLESV2],[1],["Define to 1 if you have the `GLESv2' library (-lGLESv2)."])
1001 AC_MSG_RESULT(== WARNING: OpenGLES support is assumed.)
1003 if test "$target_platform" = "target_raspberry_pi"; then
1004 AC_DEFINE([HAVE_LIBEGL],[1],["Define to 1 if you have the `EGL' library (-lEGL)."])
1005 AC_DEFINE([HAVE_LIBGLESV2],[1],["Define to 1 if you have the `GLESv2' library (-lGLESv2)."])
1006 AC_MSG_RESULT(== WARNING: OpenGLES support is assumed.)
1007 LIBS="$LIBS -lEGL -lGLESv2 -lbcm_host -lvcos -lvchiq_arm -lmmal -lmmal_core -lmmal_util"
1009 AC_CHECK_LIB([EGL], [main],, AC_MSG_ERROR($missing_library))
1010 AC_CHECK_LIB([GLESv2],[main],, AC_MSG_ERROR($missing_library))
1014 if test "$use_gl" = "yes"; then
1015 if test "$host_vendor" = "apple" ; then
1016 # linking to OpenGL.framework instead of libGL, libGLU so AC_CHECK_LIB will fail
1017 LIBS="$LIBS -framework OpenGL"
1018 AC_DEFINE([HAVE_LIBGL],[1],["Define to 1 if you have the `GL' library (-lGL)."])
1019 AC_MSG_RESULT(== WARNING: OpenGL support is assumed.)
1020 AC_DEFINE([HAVE_LIBGLU],[1],["Define to 1 if you have the `GLU' library (-lGLU)."])
1021 AC_MSG_RESULT(== WARNING: OpenGLU support is assumed.)
1022 AC_CHECK_LIB([GLEW],[main],, AC_MSG_ERROR($missing_library))
1024 AC_CHECK_LIB([GL], [main],, AC_MSG_ERROR($missing_library))
1025 AC_CHECK_LIB([GLEW],[main],, AC_MSG_ERROR($missing_library))
1026 AC_CHECK_LIB([GLU], [main],, AC_MSG_ERROR($missing_library))
1029 AC_MSG_RESULT(== WARNING: OpenGL support is disabled. ${APP_NAME} will run VERY slow. ==)
1030 AC_CHECK_LIB([SDL2_gfx],[main])
1034 # platform common libraries
1035 if test "$use_mysql" = "yes"; then
1036 AC_PATH_PROG(MYSQL_CONFIG, mysql_config,"no")
1037 if test "x$MYSQL_CONFIG" != "xno"; then
1038 AC_DEFINE([HAVE_MYSQL],[1],["Define to 1 if you have the `mysql' library (-lmysqlclient)."])
1039 INCLUDES="$INCLUDES `$MYSQL_CONFIG --include`"
1040 MYSQL_LIBS=`$MYSQL_CONFIG --libs`
1041 LIBS="$LIBS $MYSQL_LIBS"
1042 AC_SUBST(MYSQL_LIBS)
1044 AC_MSG_ERROR($missing_program)
1047 AC_CHECK_HEADER([ass/ass.h],, AC_MSG_ERROR($missing_library))
1048 AC_CHECK_HEADER([mpeg2dec/mpeg2.h],, AC_MSG_ERROR($missing_library))
1049 AC_CHECK_HEADER([mpeg2dec/mpeg2convert.h],, AC_MSG_ERROR($missing_library),
1050 AC_INCLUDES_DEFAULT()
1051 [#include <mpeg2dec/mpeg2.h>])
1052 AC_CHECK_HEADER([jpeglib.h],, AC_MSG_ERROR($missing_library))
1053 AC_CHECK_HEADER([ogg/ogg.h],, AC_MSG_ERROR($missing_library))
1054 AC_CHECK_HEADER([vorbis/vorbisfile.h],, AC_MSG_ERROR($missing_library))
1055 PKG_CHECK_MODULES([LIBDCADEC], [dcadec],, AC_MSG_ERROR([libdcadec not found]))
1057 PKG_CHECK_MODULES([LIBCURL], [libcurl],, AC_MSG_ERROR([libcurl not found]))
1058 XB_FIND_SONAME([CURL], [curl])
1059 AC_MSG_CHECKING([for CRYPTO_set_locking_callback(0) in $CURL_SONAME])
1060 if test "$host_vendor" = "apple" ; then
1062 searchpattern="T [_]?CRYPTO_set_locking_call"
1064 libchecker="$READELF -s"
1065 searchpattern="CRYPTO_set_locking_call"
1067 if test $($libchecker $CURL_FILENAME | grep -Eq "${searchpattern}" ; echo $?) -eq 0 ; then
1069 AC_DEFINE([HAS_CURL_STATIC], [1], [Whether OpenSSL inside libcurl is static.])
1074 AC_CHECK_HEADER([openssl/crypto.h], AC_DEFINE([HAVE_OPENSSL],[1],[Define if we have openssl]),)
1075 AC_CHECK_HEADER([gcrypt.h], gcrypt_headers_available=yes,gcrypt_headers_available=no)
1076 if test "$gcrypt_headers_available" = "yes"; then
1077 # if we have the headers then we must have the lib
1078 AC_CHECK_LIB([gpg-error],[main],, AC_MSG_ERROR($missing_library))
1079 AC_CHECK_LIB([gcrypt],[gcry_control],, AC_MSG_ERROR($missing_library))
1080 AC_DEFINE([HAVE_GCRYPT],[1],[Define if we have gcrypt])
1082 PKG_CHECK_MODULES([GNUTLS], [gnutls], [have_gnutls=yes];AC_DEFINE([HAVE_GNUTLS], [1], [Define if we have gnutls]), AC_MSG_WARN("gnutls not found"))
1084 AC_CHECK_LIB([bz2], [main],, AC_MSG_ERROR($missing_library))
1085 AC_CHECK_LIB([jpeg], [main],, AC_MSG_ERROR($missing_library)) # check for cximage
1086 AC_CHECK_LIB([tiff], [main],, AC_MSG_ERROR($missing_library))
1087 if echo "$ARCH" | grep -q freebsd; then
1088 AC_CHECK_LIB([pthread], [main],LIBS="-pthread $LIBS", AC_MSG_ERROR($missing_library))
1089 AC_CHECK_LIB([pthread], [pthread_set_name_np],
1090 AC_DEFINE([HAVE_PTHREAD_SET_NAME_NP],[1],["Define to 1 if pthread has pthread_set_name_np"]),
1091 AC_MSG_RESULT([Could not find pthread_set_name_np in pthread]))
1093 if test "$target_platform" != "target_android" ; then
1094 AC_CHECK_LIB([pthread], [main],, AC_MSG_ERROR($missing_library))
1095 AC_CHECK_LIB([pthread], [pthread_setname_np],
1096 AC_DEFINE([HAVE_PTHREAD_SETNAME_NP],[1],["Define to 1 if pthread has pthread_setname_np"]),
1097 AC_MSG_RESULT([Could not find pthread_setname_np in pthread]))
1100 AC_CHECK_LIB([lzo2], [main],, AC_MSG_ERROR($missing_library))
1101 AC_CHECK_LIB([z], [main],, AC_MSG_ERROR($missing_library))
1102 AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR($missing_library))
1103 AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR($missing_library))
1104 if test "$use_mysql" = "yes"; then
1105 AC_CHECK_LIB([mysqlclient], [main],, AC_MSG_ERROR($missing_library))
1107 AC_CHECK_LIB([bluetooth], [hci_devid],, AC_MSG_RESULT([Could not find suitable version of libbluetooth]))
1110 PKG_CHECK_MODULES([TINYXML], [tinyxml >= 2.6.2],
1111 [INCLUDES="$INCLUDES $TINYXML_CFLAGS"; LIBS="$LIBS $TINYXML_LIBS"],
1115 #include <tinyxml.h>
1118 if (TIXML_MAJOR_VERSION < 2) exit(1);
1119 if (TIXML_MAJOR_VERSION == 2 && ( TIXML_MINOR_VERSION < 6 || ( TIXML_MINOR_VERSION == 6 && TIXML_PATCH_VERSION < 2 ))) exit(1);
1121 ]])],[AC_CHECK_LIB([tinyxml], [main],, AC_MSG_ERROR("tinyxml >= 2.6.2 not found"))], [AC_MSG_ERROR([tinyxml >= 2.6.2 not found])]
1125 if test "${target_platform}" = "target_linux" || test "${target_platform}" = "target_raspberry_pi" || test "${target_platform}" = "target_android"; then
1126 PKG_CHECK_MODULES([UUID], [uuid],, AC_MSG_ERROR(libuuid not found))
1129 AC_MSG_CHECKING("for libcrossguid")
1132 LIBS="$LIBS -lcrossguid $UUID_LIBS"
1135 [#include <guid.h>],
1137 [AC_MSG_RESULT(yes); SAVED_LIBS="$SAVED_LIBS $LDFLAGS -lcrossguid $UUID_LIBS"],
1138 [AC_MSG_ERROR(crossguid not found)])
1142 PKG_CHECK_MODULES([YAJL], [yajl >= 2],
1143 [INCLUDES="$INCLUDES $YAJL_CFLAGS"; LIBS="$LIBS $YAJL_LIBS"; YAJL_FOUND="true"],
1146 #include <yajl/yajl_version.h>
1147 #if !defined YAJL_MAJOR || YAJL_MAJOR < 2
1148 #error yajl version < 2;
1150 ]])],, [AC_MSG_ERROR([libyajl >= 2.0.0 not found])]
1153 if test "$YAJL_FOUND" != "true"; then
1154 AC_CHECK_LIB([yajl], [main],, [AC_MSG_ERROR("libyajl >= 2.0.0 not found")])
1155 AC_CHECK_HEADERS([yajl/yajl_common.h], [AC_MSG_NOTICE(libyajl2 found)], [AC_MSG_ERROR("yajl/yajl_common.h not found")])
1158 if test "$target_platform" = "target_android" ; then
1159 AC_CHECK_LIB([android], [main],, AC_MSG_ERROR($missing_library))
1160 AC_CHECK_LIB([log], [__android_log_vprint],, AC_MSG_ERROR($missing_library))
1161 AC_CHECK_LIB([jnigraphics], [main],, AC_MSG_ERROR($missing_library))
1163 PKG_CHECK_MODULES([LIBXML], [libxml-2.0],
1164 [INCLUDES="$INCLUDES $LIBXML_CFLAGS"; LIBS="$LIBS $LIBXML_LIBS"],
1165 AC_MSG_ERROR($missing_library))
1166 PKG_CHECK_MODULES([LIBXSLT], [libxslt],
1167 [INCLUDES="$INCLUDES $LIBXSLT_CFLAGS"; LIBS="$LIBS $LIBXSLT_LIBS"],
1168 AC_MSG_ERROR($missing_library))
1169 PKG_CHECK_MODULES([FRIBIDI], [fribidi],
1170 [INCLUDES="$INCLUDES $FRIBIDI_CFLAGS"; LIBS="$LIBS $FRIBIDI_LIBS"],
1171 AC_MSG_ERROR($missing_library))
1172 PKG_CHECK_MODULES([SQLITE3], [sqlite3],
1173 [INCLUDES="$INCLUDES $SQLITE3_CFLAGS"; LIBS="$LIBS $SQLITE3_LIBS"],
1174 AC_MSG_ERROR($missing_library))
1175 PKG_CHECK_MODULES([PNG], [libpng],
1176 [INCLUDES="$INCLUDES $PNG_CFLAGS"; LIBS="$LIBS $PNG_LIBS"],
1177 AC_MSG_ERROR($missing_library))
1178 PKG_CHECK_MODULES([PCRECPP], [libpcrecpp],
1179 [INCLUDES="$INCLUDES $PCRECPP_CFLAGS"; LIBS="$LIBS $PCRECPP_LIBS"]; \
1180 AC_DEFINE([HAVE_LIBPCRECPP],[1],["Define to 1 if libpcrecpp is installed"]),
1181 AC_MSG_ERROR($missing_library))
1182 PKG_CHECK_MODULES([PCRE], [libpcre],
1183 [INCLUDES="$INCLUDES $PCRE_CFLAGS"; LIBS="$LIBS $PCRE_LIBS"]; \
1184 AC_DEFINE([HAVE_LIBPCRE],[1],["Define to 1 if libpcre is installed"]),
1185 AC_MSG_ERROR($missing_library))
1186 PKG_CHECK_MODULES([FREETYPE2], [freetype2],
1187 [INCLUDES="$INCLUDES $FREETYPE2_CFLAGS"; LIBS="$LIBS $FREETYPE2_LIBS"],
1188 AC_MSG_ERROR($missing_library))
1189 PKG_CHECK_MODULES([TAGLIB], [taglib >= 1.8],
1190 [INCLUDES="$INCLUDES $TAGLIB_CFLAGS"; LIBS="$LIBS $TAGLIB_LIBS"],
1191 AC_MSG_ERROR($missing_library))
1193 if test "$use_optical_drive" = "yes"; then
1194 PKG_CHECK_MODULES([CDIO], [libcdio],
1195 [INCLUDES="$INCLUDES $CDIO_CFLAGS"; LIBS="$LIBS $CDIO_LIBS"],
1196 AC_MSG_ERROR($missing_library))
1199 if test "$target_platform" = "target_android" ; then
1200 PKG_CHECK_MODULES([ZIP], [libzip],
1201 [INCLUDES="$INCLUDES $ZIP_CFLAGS"; LIBS="$LIBS $ZIP_LIBS"],
1202 AC_MSG_ERROR($missing_library))
1205 # check for libbluray
1206 AS_CASE([x$use_libbluray],
1208 PKG_CHECK_MODULES([LIBBLURAY],[libbluray >= 0.7.0],[use_libbluray="yes"], AC_MSG_ERROR($missing_library))
1211 PKG_CHECK_MODULES([LIBBLURAY],[libbluray >= 0.7.0],[use_libbluray="yes"], [use_libbluray="no"])
1214 AS_CASE([x$use_libbluray],
1216 INCLUDES="$INCLUDES $LIBBLURAY_CFLAGS";
1217 LIBBLURAY_LIB_BASENAME=`$PKG_CONFIG --libs-only-L "libbluray >= 0.7.0"`;
1218 XB_FIND_SONAME([BLURAY], [bluray], [use_libbluray], [$LIBBLURAY_LIB_BASENAME])
1219 AC_DEFINE([HAVE_LIBBLURAY], 1, [System has libbluray library])
1220 AC_SUBST([HAVE_LIBBLURAY], 1)
1221 AC_CHECK_LIB([bluray], [bd_register_argb_overlay_proc],
1222 AC_CHECK_DECL([BD_EVENT_IDLE],
1223 AC_DEFINE([HAVE_LIBBLURAY_BDJ], 1, [System has libbluray library with bdj support]),,
1224 [[#include <libbluray/bluray.h>]]))
1226 AC_SUBST([HAVE_LIBBLURAY], 0)
1230 #Check to see if libs are needed for functions that are often built-in to libc
1231 AC_SEARCH_LIBS([iconv_open],iconv,,AC_SEARCH_LIBS([libiconv_open],iconv,,AC_MSG_ERROR($missing_library)))
1232 AC_SEARCH_LIBS([dlopen],dl)
1233 AC_SEARCH_LIBS([clock_gettime],rt)
1234 AC_SEARCH_LIBS([dn_expand], resolv)
1235 AC_SEARCH_LIBS([_dn_expand], resolv)
1236 AC_SEARCH_LIBS([__dn_expand],resolv)
1238 # platform dependent libraries
1239 if test "$host_vendor" = "apple" ; then
1240 if test "$use_arch" != "arm"; then
1241 AC_CHECK_LIB([SDL], [main],, AC_MSG_ERROR($missing_library))
1242 AC_DEFINE([HAVE_SDL],[1],["Define to 1 if using sdl"])
1243 AC_DEFINE([HAVE_SDL_VERSION],[1],["SDL major version"])
1246 if test "$target_platform" != "target_android" ; then
1247 AC_CHECK_LIB([jasper], [main],, AC_MSG_ERROR($missing_library)) # check for cximage
1249 if test "x$use_alsa" != "xno"; then
1250 PKG_CHECK_MODULES([ALSA], [alsa],
1251 [INCLUDES="$INCLUDES $ALSA_CFLAGS"; LIBS="$LIBS $ALSA_LIBS"; use_alsa=yes],
1252 AC_MSG_NOTICE($alsa_not_found); use_alsa=no)
1254 if test "x$use_dbus" != "xno"; then
1255 PKG_CHECK_MODULES([DBUS], [dbus-1],
1256 [INCLUDES="$INCLUDES $DBUS_CFLAGS"; LIBS="$LIBS $DBUS_LIBS"; use_dbus=yes]; \
1257 AC_DEFINE([HAVE_DBUS],[1],["Define to 1 if dbus is installed"]),
1258 AC_MSG_NOTICE($missing_library); use_dbus=no)
1260 AC_MSG_NOTICE($dbus_disabled)
1262 #case "$host_vendor" != "apple"; determine availability of SDL or SDL2
1264 if test "$use_joystick" != "no"; then
1265 PKG_CHECK_MODULES([SDL2], [sdl2],
1266 [AC_DEFINE([HAVE_SDL_VERSION],[2],["SDL major version"])
1267 AC_DEFINE([HAVE_SDL],[1],["Define to 1 if using sdl"])
1268 INCLUDES="$INCLUDES $SDL2_CFLAGS"; LIBS="$LIBS $SDL2_LIBS"; use_joystick="yes"],
1269 [if test "$use_joystick" = "yes"; then
1270 AC_MSG_ERROR($sdl_joystick_not_found)
1271 elif test "$use_joystick" != "no"; then
1272 AC_MSG_NOTICE($sdl_joystick_not_found)
1277 AC_MSG_RESULT($sdl_joystick_not_found)
1281 XB_FIND_SONAME([ASS], [ass])
1282 XB_FIND_SONAME([MPEG2], [mpeg2])
1285 if test "$use_webserver" = "yes"; then
1286 AC_CHECK_LIB([microhttpd], [main],, AC_MSG_ERROR($missing_library))
1290 if test "$use_optical_drive" = "yes"; then
1291 AC_DEFINE([HAS_DVD_DRIVE], [1], [Define to 1 to have optical drive support])
1295 if test "$use_alsa" = "yes"; then
1296 PKG_CHECK_MODULES([ALSA], [alsa],
1297 [INCLUDES="$INCLUDES $ALSA_CFLAGS"; LIBS="$LIBS $ALSA_LIBS"],
1298 AC_MSG_ERROR($missing_library))
1299 AC_DEFINE([HAS_ALSA], [1], [Define to 0 to disable ALSA support])
1302 AC_MSG_RESULT($alsa_disabled)
1306 if test "x$use_pulse" != "xno"; then
1307 if test "$host_vendor" = "apple" ; then
1308 if test "x$use_pulse" = "xyes"; then
1309 AC_MSG_ERROR($pulse_disabled)
1312 AC_MSG_RESULT($pulse_disabled)
1316 PKG_CHECK_MODULES([PULSE], [libpulse >= 1.0],
1317 [INCLUDES="$INCLUDES $PULSE_CFLAGS"; LIBS="$LIBS $PULSE_LIBS"; USE_PULSE=1;
1318 HAVE_LIBPULSE=1; AC_DEFINE([HAVE_LIBPULSE],[1],[Pulse audio enabled])],
1319 [pulse_found="no"; USE_PULSE=0; HAVE_LIBPULSE=0])
1321 if test "$pulse_found" = "no"; then
1322 if test "x$use_pulse" = "xyes"; then
1323 AC_MSG_ERROR($pulse_not_found)
1326 AC_MSG_RESULT($pulse_disabled)
1331 AC_MSG_RESULT($pulse_disabled)
1336 if test "$use_avahi" = "yes"; then
1337 AC_CHECK_LIB([avahi-common], [main],,
1338 use_avahi=no;AC_MSG_RESULT($avahi_not_found))
1339 if test "$use_avahi" = "yes"; then
1340 #either both libs or none
1341 AC_CHECK_LIB([avahi-client], [main],,
1342 use_avahi=no;AC_MSG_RESULT($avahi_not_found))
1345 AC_MSG_RESULT($avahi_disabled)
1349 if test "$use_mdnsembedded" != "no"; then
1350 AC_CHECK_LIB([mDNSEmbedded], [embedded_mDNSInit],,
1351 [if test "$use_mdnsembedded" = "yes"; then
1352 AC_MSG_ERROR($mdnsembedded_not_found)
1354 elif test "$use_mdnsembedded" != "no"; then
1355 AC_MSG_NOTICE($mdnsembedded_not_found)
1356 use_mdnsembedded="no"
1360 if test $use_mdnsembedded != "no"; then
1364 AC_MSG_RESULT($mdnsembedded_disabled)
1367 AC_SUBST(USE_MDNSEMBEDDED)
1370 if test "$use_x11" = "yes"; then
1371 AC_MSG_NOTICE($x11_enabled)
1372 PKG_CHECK_MODULES([X11], [x11],
1373 [INCLUDES="$INCLUDES $X11_CFLAGS"; LIBS="$LIBS $X11_LIBS"],
1374 AC_MSG_ERROR($missing_library))
1375 PKG_CHECK_MODULES([XEXT], [xext],
1376 [INCLUDES="$INCLUDES $XEXT_CFLAGS"; LIBS="$LIBS $XEXT_LIBS"],
1377 AC_MSG_ERROR($missing_library))
1378 PKG_CHECK_MODULES([XRANDR], [xrandr],
1379 [INCLUDES="$INCLUDES $XRANDR_CFLAGS"; LIBS="$LIBS $XRANDR_LIBS"],
1380 AC_MSG_ERROR($missing_library))
1381 PKG_CHECK_MODULES([DRM], [libdrm],
1382 [INCLUDES="$INCLUDES $DRM_CFLAGS"; LIBS="$LIBS $DRM_LIBS"],
1383 AC_MSG_ERROR($missing_library))
1384 AC_DEFINE([HAVE_X11], [1], [Define to 1 if you have X11 libs installed.])
1386 AC_MSG_RESULT($x11_disabled)
1391 if [[ -f "addons/skin.re-touched/addon.xml" ]]; then
1394 AC_DEFINE([HAS_TOUCH_SKIN], [1], [Whether to build the touch skin.])
1400 if test "x$use_ssh" = "xno"; then
1401 AC_MSG_NOTICE($ssh_disabled)
1404 AC_CHECK_LIB([ssh], [sftp_tell64],, AC_MSG_ERROR($ssh_not_found))
1405 AC_DEFINE([HAVE_LIBSSH], [1], [Whether to use libSSH library.])
1409 if test "$use_librtmp" != "no"; then
1410 AC_CHECK_HEADERS([librtmp/log.h librtmp/amf.h librtmp/rtmp.h],,
1411 [if test "$use_librtmp" = "yes"; then
1412 AC_MSG_ERROR($librtmp_not_found)
1413 elif test "$use_librtmp" != "no"; then
1414 AC_MSG_NOTICE($librtmp_not_found)
1418 if test "$use_librtmp" != "no"; then
1419 XB_FIND_SONAME([RTMP], [rtmp], [use_librtmp])
1421 if test "$use_librtmp" != "no"; then
1422 AC_DEFINE([HAS_LIBRTMP], [1], [Whether to use libRTMP library.])
1425 AC_MSG_NOTICE($librtmp_disabled)
1429 if test "x$use_samba" != "xno"; then
1430 PKG_CHECK_MODULES([SAMBA], [smbclient],
1431 [INCLUDES="$INCLUDES $SAMBA_CFLAGS"; LIBS="$LIBS $SAMBA_LIBS"],
1432 [AC_CHECK_LIB([smbclient], [main],,
1433 use_samba=no;AC_MSG_ERROR($missing_library))
1437 AC_MSG_RESULT($samba_disabled)
1441 if test "x$use_samba" != "xno"; then
1442 AC_DEFINE([HAVE_LIBSMBCLIENT], [1], [Define to 1 if you have Samba installed])
1447 if test "$use_libnfs" != "no"; then
1448 AC_CHECK_HEADERS([nfsc/libnfs.h],,
1449 [if test "$use_libnfs" = "yes"; then
1450 AC_MSG_ERROR($libnfs_not_found)
1452 elif test "$use_libnfs" != "no"; then
1453 AC_MSG_NOTICE($libnfs_not_found)
1458 if test "$use_libnfs" != "no"; then
1459 XB_FIND_SONAME([NFS], [nfs], [use_libnfs])
1461 if test "$use_libnfs" != "no"; then
1462 AC_DEFINE([HAVE_LIBNFS], [1], [Whether to use libnfs library.])
1467 AC_MSG_NOTICE($libnfs_disabled)
1471 if test "$use_libgif" != "no"; then
1472 AC_CHECK_HEADERS([gif_lib.h],,
1473 [if test "$use_libgif" = "yes"; then
1474 AC_MSG_ERROR($libgif_not_found)
1476 elif test "$use_libgif" != "no"; then
1477 AC_MSG_NOTICE($libgif_not_found)
1482 if test "$use_libgif" != "no"; then
1483 XB_FIND_SONAME([GIF], [gif], [use_libgif])
1485 if test "$use_libgif" != "no"; then
1486 AC_DEFINE([HAVE_LIBGIF], [1], [Whether to use libgif library.])
1491 AC_MSG_NOTICE($libgif_disabled)
1494 # libplist for airplay feature
1496 if test "$use_airplay" != "no"; then
1497 AC_CHECK_HEADER([plist/plist.h],,
1498 [if test "$use_airplay" = "yes"; then
1499 AC_MSG_ERROR($libplist_not_found)
1500 elif test "$use_airplay" != "no"; then
1501 AC_MSG_NOTICE($libplist_not_found)
1506 if test "$use_airplay" != "no"; then
1507 XB_FIND_SONAME([PLIST], [plist], [use_airplay])
1509 AC_DEFINE([HAVE_LIBPLIST],[1],["Define to 1 if you have libplist."])
1513 # libshairplay for AirTunes
1515 if test "x$use_airtunes" != "xno"; then
1516 AC_CHECK_HEADERS([shairplay/raop.h],USE_AIRTUNES=1,
1517 [AC_MSG_NOTICE($libshairplay_not_found)
1520 if test "x$USE_AIRTUNES" != "x0"; then
1521 XB_FIND_SONAME([SHAIRPLAY], [shairplay], [USE_AIRTUNES])
1522 AC_CHECK_MEMBERS([struct raop_callbacks_s.audio_remote_control_id],
1523 AC_DEFINE([HAVE_LIBSHAIRPLAY],[1],["Define to 1 if you have libshairplay."]),
1525 [[#include <shairplay/raop.h>]])
1528 if test "x$USE_AIRTUNES" == "x0"; then
1529 if test "x$use_airtunes" == "xyes"; then
1530 AC_MSG_ERROR("No airtunes library could be found. (libshairplay)")
1538 if test "$use_libudev" = "auto"; then
1539 PKG_CHECK_MODULES([UDEV],[libudev],,[use_libudev="no";AC_MSG_RESULT($libudev_not_found)])
1540 elif test "$use_libudev" = "yes" ; then
1541 PKG_CHECK_MODULES([UDEV],[libudev],,[use_libudev="no";AC_MSG_ERROR($libudev_not_found)])
1543 AC_MSG_NOTICE($libudev_disabled)
1546 if test "x$use_libudev" != "xno"; then
1547 USE_LIBUDEV=1;INCLUDES="$INCLUDES $UDEV_CFLAGS";LIBS="$LIBS $UDEV_LIBS"
1548 AC_DEFINE([HAVE_LIBUDEV],[1],["Define to 1 if libudev is installed"])
1554 # if libudev is available, we don't need libusb
1555 if test "x$use_libudev" != "xno"; then
1557 AC_MSG_NOTICE($libusb_disabled_udev_found)
1559 if echo "$ARCH" | grep -q freebsd ; then
1560 AC_CHECK_LIB([usb],[main],
1561 [use_libusb="yes";USB_LIBS="-lusb"],
1562 [use_libusb="no";AC_MSG_RESULT($libusb_not_found)])
1563 elif test "$use_libusb" = "auto"; then
1564 PKG_CHECK_MODULES([USB],[libusb],,[use_libusb="no";AC_MSG_RESULT($libusb_not_found)])
1565 elif test "$use_libusb" = "yes"; then
1566 PKG_CHECK_MODULES([USB],[libusb],,[use_libusb="no";AC_MSG_ERROR($libusb_not_found)])
1568 AC_MSG_NOTICE($libusb_disabled)
1571 if test "x$use_libusb" != "xno"; then
1572 USE_LIBUSB=1;INCLUDES="$INCLUDES $USB_CFLAGS";LIBS="$LIBS $USB_LIBS"
1573 AC_DEFINE([HAVE_LIBUSB],[1],["Define to 1 if libusb is installed"])
1579 if test "x$use_libcec" != "xno"; then
1580 # libcec is dyloaded, so we need to check for its headers and link any depends.
1581 if test "x$use_libcec" != "xno"; then
1582 if test "x$use_libcec" != "xauto"; then
1583 PKG_CHECK_MODULES([CEC],[libcec >= 3.0.0],,[use_libcec="no";AC_MSG_ERROR($libcec_disabled)])
1585 PKG_CHECK_MODULES([CEC],[libcec >= 3.0.0],,[use_libcec="no";AC_MSG_RESULT($libcec_disabled)])
1588 if test "x$use_libcec" != "xno"; then
1589 INCLUDES="$INCLUDES $CEC_CFLAGS"
1590 USE_LIBCEC=1;AC_DEFINE([HAVE_LIBCEC],[1],["Define to 1 if libcec is installed"])
1591 XB_FIND_SONAME([LIBCEC],[cec],[use_libcec])
1592 AC_MSG_NOTICE($libcec_enabled)
1595 AC_MSG_NOTICE($libcec_disabled)
1600 AC_MSG_NOTICE($libcec_disabled)
1604 if test "$use_libcap" != "no"; then
1605 AC_CHECK_HEADERS([sys/capability.h],,
1606 [if test "$use_libcap" = "yes"; then
1607 AC_MSG_ERROR($libcap_not_found)
1608 elif test "$use_libcap" != "no"; then
1609 AC_MSG_NOTICE($libcap_not_found)
1613 if test "$use_libcap" != "no"; then
1614 AC_CHECK_LIB([cap], main, LIBS="$LIBS -lcap", use_libcap=no)
1616 if test "$use_libcap" != "no"; then
1617 AC_DEFINE([HAVE_LIBCAP], [1], [Whether to use libcap library.])
1620 AC_MSG_NOTICE($libcap_disabled)
1624 FFMPEG_LIBNAMES="libavcodec >= 56.26.100
1625 libavfilter >= 5.11.102
1626 libavformat >= 56.25.101
1627 libavutil >= 54.20.100
1628 libpostproc >= 53.3.100
1629 libswscale >= 3.1.101
1630 libswresample >= 1.1.100"
1632 ffmpeg_build="${abs_top_srcdir}/tools/depends/target/ffmpeg"
1633 FFMPEG_VER_SHA=$(grep "VERSION=" ${ffmpeg_build}/FFMPEG-VERSION | sed 's/VERSION=//g')
1634 AC_DEFINE_UNQUOTED([FFMPEG_VER_SHA], ["$FFMPEG_VER_SHA"], [FFmpeg version hash])
1636 if test "$with_ffmpeg" = "shared"; then
1637 # allow linking against shared ffmpeg libs
1638 # a proper version must be installed, we won't build ffmpeg
1640 AC_DEFINE([USE_STATIC_FFMPEG], [0], [FFmpeg linked dynamically])
1642 if test "${USE_STATIC_FFMPEG}" = "1"; then
1643 AC_DEFINE([USE_STATIC_FFMPEG], [1], [FFmpeg linked statically])
1644 ff_libs=$(${ECHO} ${FFMPEG_LIBNAMES} | ${AWK} '/lib/{print $1}' ORS=' ')
1645 if test -n "${PKG_CONFIG_SYSROOT_DIR}"; then
1646 # workaround for cross compiling with buildroot on different buildsystem
1647 # Rpi buildroots pkg-config returns static libs with
1648 # PKG_CONFIG_SYSROOT_DIR prefixed, OEs does not
1649 # so lets make sure we always prefix in case PKG_CONFIG_SYSROOT_DIR is defined
1650 pkg_cfg_prefix="${PKG_CONFIG_SYSROOT_DIR}"
1651 elif test "${target_platform}" = "target_raspberry_pi" && test "${USE_BUILDROOT}" = "1"; then
1652 pkg_cfg_prefix=${SYSROOT}
1655 if test "$cross_compiling" != "yes"; then
1656 if test "$use_debug" != "yes"; then
1659 if test "$use_optimizations" != "yes"; then
1660 FFMPEG_OPTS="${FFMPEG_OPTS} --disable-optimizations"
1663 if test "$with_ffmpeg" = "auto" || test "$with_ffmpeg" = "yes"; then
1664 SAVE_INCLUDES="$INCLUDES"
1666 # check for system installed ffmpeg. We require minimum versions.
1667 PKG_CHECK_MODULES([FFMPEG], [$FFMPEG_LIBNAMES],
1668 [INCLUDES="$INCLUDES $FFMPEG_CFLAGS"; LIBS="$LIBS $FFMPEG_LIBS"; FFMPEG_FOUND="true"],
1669 [FFMPEG_FOUND="false"])
1671 if test "${USE_STATIC_FFMPEG}" = "1" && test "$FFMPEG_FOUND" = "true"; then
1672 # we need to check if static libs are available
1673 FFMPEG_LIBDIR=$(${PKG_CONFIG} --static --variable=libdir libavcodec)
1674 for ff_lib in ${ff_libs}; do
1675 if test -f ${FFMPEG_LIBDIR}/${ff_lib}.a; then :; else
1676 AC_MSG_NOTICE("${FFMPEG_LIBDIR}/${ff_lib}.a not found")
1677 FFMPEG_FOUND="false"
1678 # restore includes and libs, the ones we found are invalid
1679 INCLUDES="$SAVE_INCLUDES"
1681 unset FFMPEG_LIBS FFMPEG_CFLAGS FFMPEG_LIBDIR
1685 if test "$with_ffmpeg" = "yes" || test "$FFMPEG_FOUND" = "false"; then
1686 # ffmpeg not found with pkg-config, lets install it
1687 AC_MSG_NOTICE("Installing FFmpeg")
1688 CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" ${ffmpeg_build}/autobuild.sh ${FFMPEG_OPTS}
1689 export PKG_CONFIG_PATH="${ffmpeg_build}/ffmpeg-install/lib/pkgconfig:$PKG_CONFIG_PATH"
1692 elif test "$with_ffmpeg" = "force"; then
1693 # always build our ffmpeg
1694 AC_MSG_NOTICE("FFmpeg installation forced by user - installing our version")
1695 CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" ${ffmpeg_build}/autobuild.sh ${FFMPEG_OPTS}
1696 export PKG_CONFIG_PATH="${ffmpeg_build}/ffmpeg-install/lib/pkgconfig:$PKG_CONFIG_PATH"
1698 elif test "$with_ffmpeg" != "no"; then
1699 # user passed --with-ffmpeg=/some/path, lets use it
1700 AC_MSG_NOTICE("using ffmpeg: ${with_ffmpeg}")
1701 export PKG_CONFIG_PATH="${with_ffmpeg}/lib/pkgconfig:$PKG_CONFIG_PATH"
1706 if test "$FFMPEG_FOUND" != "true"; then
1707 PKG_CHECK_MODULES([FFMPEG], [$FFMPEG_LIBNAMES],
1708 [INCLUDES="$INCLUDES $FFMPEG_CFLAGS"; LIBS="$LIBS $FFMPEG_LIBS"; FFMPEG_FOUND="true"],
1709 [AC_MSG_ERROR("ffmpeg not found")])
1712 if test "${USE_STATIC_FFMPEG}" = "1"; then
1713 # get the libdir for static linking
1714 FFMPEG_LIBDIR=${pkg_cfg_prefix}$(PKG_CONFIG_SYSROOT_DIR="" ${PKG_CONFIG} --static --variable=libdir libavcodec)
1715 GNUTLS_ALL_LIBS=$(${PKG_CONFIG} --static --libs-only-l --silence-errors gnutls)
1716 VORBISENC_ALL_LIBS=$(${PKG_CONFIG} --static --libs-only-l --silence-errors vorbisenc)
1717 DCADEC_ALL_LIBS=$(${PKG_CONFIG} --static --libs-only-l --silence-errors dcadec)
1719 # check if static libs are available
1720 for ff_lib in ${ff_libs}; do
1721 if test -f ${FFMPEG_LIBDIR}/${ff_lib}.a; then :; else
1722 AC_MSG_ERROR("${FFMPEG_LIBDIR}/${ff_lib}.a not found")
1724 # filter out libs we link statically
1725 filter=$(${ECHO} ${ff_lib} | ${SED} 's/lib/-l/g')
1726 LIBS=$(${ECHO} ${LIBS} | ${SED} "s/${filter}//g")
1728 LIBS=$(${ECHO} ${LIBS} | ${SED} ':a;N;$!ba;s/\n/ /g')
1731 echo "Checking for SWIG installation"
1732 AC_PATH_PROG(SWIG_EXE, swig, "none")
1733 if test "$SWIG_EXE" = "none"; then
1734 AC_PATH_PROG(SWIG20_EXE, swig2.0, "none")
1735 if test "$SWIG20_EXE" != "none" ; then
1736 SWIG_EXE=$SWIG20_EXE
1739 if test "$SWIG_EXE" = "none"; then
1740 AC_MSG_ERROR($missing_program)
1742 final_message="$final_message\n SWIG Available:\tYes"
1744 echo "Checking for a jre installation"
1745 AC_PATH_PROG(JAVA_EXE, java, "none")
1746 if test "$JAVA_EXE" = "none"; then
1747 AC_MSG_ERROR($missing_program)
1749 final_message="$final_message\n JRE Available:\tYes"
1751 echo "Checking for doxygen installation"
1752 AC_PATH_PROG(DOXYGEN_EXE, doxygen, "none")
1753 if test "$DOXYGEN_EXE" = "none"; then
1754 AC_MSG_WARN([Unable to find doxygen installation. Will not be able to make docstrings for the python api])
1755 final_message="$final_message\n Doxygen Available:\tNo"
1758 final_message="$final_message\n Doxygen Available:\tYes"
1763 if test "x$use_vdpau" != "xno"; then
1764 if test "$host_vendor" = "apple" ; then
1765 if test "x$use_vdpau" = "xyes"; then
1766 AC_MSG_ERROR([VDPAU not supported on this platform])
1769 AC_MSG_NOTICE($vdpau_disabled)
1774 AC_CHECK_HEADER([vdpau/vdpau.h],AC_DEFINE([HAVE_LIBVDPAU], [],
1775 [Define to 1 if you have the 'vdpau' library (-lvdpau).]),
1776 [if test "x$use_vdpau" = "xyes"; then
1778 AC_MSG_ERROR([$vdpau_not_found])
1782 AC_MSG_RESULT($vdpau_not_found)
1787 AC_MSG_NOTICE($vdpau_disabled)
1791 if test "x$use_vaapi" != "xno"; then
1792 if test "$host_vendor" = "apple" ; then
1793 if test "x$use_vaapi" = "xyes"; then
1794 AC_MSG_ERROR([VAAPI not supported on this platform])
1797 AC_MSG_NOTICE($vaapi_disabled)
1801 initial_val=$use_vaapi
1802 if test "x$use_vaapi" != "xno"; then
1803 PKG_CHECK_MODULES([LIBVA], [libva libva-x11],
1804 [INCLUDES="$INCLUDES $LIBVA_CFLAGS"; LIBS="$LIBS $LIBVA_LIBS"; USE_VAAPI=1;
1805 AC_DEFINE([HAVE_LIBVA], [1], [Define to 1 if you have the 'vaapi' libraries])],
1806 [use_vaapi="no"; USE_VAAPI=0; AC_MSG_RESULT($vaapi_not_found)])
1808 if test "x$initial_val" = "xyes"; then
1809 AC_MSG_ERROR($vaapi_not_found)
1814 AC_MSG_NOTICE($vaapi_disabled)
1819 if test "x$use_vtbdecoder" != "xno"; then
1820 if test "$host_vendor" = "apple" ; then
1821 HAVE_VIDEOTOOLBOXDECODER=1
1822 AC_DEFINE([HAVE_VIDEOTOOLBOXDECODER], [1], [Define to 1 if you have the 'VTBDecoder' library.])
1823 AC_MSG_NOTICE($vtbdecoder_enabled)
1825 if test "x$use_vtbdecoder" = "xyes"; then
1826 AC_MSG_ERROR([VTB Decoder not supported on this platform])
1829 AC_MSG_NOTICE($vtbdecoder_disabled)
1833 AC_MSG_NOTICE($vtbdecoder_disabled)
1837 if test "$use_gles" = "yes" && test "$use_openmax" = "auto"; then
1839 AC_CHECK_HEADERS([OMX_Core.h],
1840 USE_OPENMAX=1;[INCLUDES="$INCLUDES $OPENMAX_CFLAGS"; LIBS="$LIBS $OPENMAX_LIBS";AC_DEFINE([HAVE_LIBOPENMAX], [1], [Define to 1 if you have the OpenMax library.])],
1841 use_openmax=no;USE_OPENMAX=0;AC_MSG_RESULT($openmax_not_found))
1842 elif test "$use_gles" = "yes" && test "$use_openmax" = "yes"; then
1843 AC_CHECK_HEADERS([OMX_Core.h],
1844 USE_OPENMAX=1;[INCLUDES="$INCLUDES $OPENMAX_CFLAGS"; LIBS="$LIBS $OPENMAX_LIBS";AC_DEFINE([HAVE_LIBOPENMAX], [1], [Define to 1 if you have the OpenMax library.])],
1845 AC_MSG_ERROR($openmax_not_found))
1847 AC_MSG_NOTICE($openmax_disabled)
1852 # additional internal players
1853 case $add_players in
1855 XB_ADD_PLAYER([OMXPLAYER], [omxplayer])
1859 # additional internal codecs
1860 # remember to convert commas to spaces
1861 for codecs in `echo $add_codecs | sed 's/,/ /g'`; do
1864 AC_CHECK_HEADER([amcodec/codec_error.h],, AC_MSG_ERROR($missing_headers))
1865 XB_ADD_CODEC([LIBAMCODEC], [amcodec], [$codecs])
1868 XB_ADD_CODEC([LIBSTAGEFRIGHT], [libstagefright], [$codecs])
1871 AC_CHECK_HEADER([imx-mm/vpu/vpu_wrapper.h],, AC_MSG_ERROR($missing_headers))
1872 AC_CHECK_LIB([vpu], main, LIBS="$LIBS -lfslvpuwrap -lvpu -lg2d", AC_MSG_ERROR($missing_library))
1873 XB_ADD_CODEC([IMXVPU], [imxvpu], [$codecs])
1874 CXXFLAGS="$CXXFLAGS -Wno-psabi -DLINUX "
1875 CFLAGS="$CFLAGS -DLINUX"
1876 if test "$use_x11" = "no"; then
1877 CXXFLAGS="$CXXFLAGS -DEGL_API_FB"
1878 CFLAGS="$CFLAGS -DEGL_API_FB"
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"
1959 if [[ -d "$NATIVE_ROOT" ]]; then
1960 CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -I$NATIVE_ROOT/include"
1961 CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -I$NATIVE_ROOT/include"
1962 LDFLAGS_FOR_BUILD="$LDFLAGS_FOR_BUILD -L$NATIVE_ROOT/lib"
1963 if test "$host_vendor" != "apple" ; then
1964 LDFLAGS_FOR_BUILD="$LDFLAGS_FOR_BUILD -Wl,-rpath=$NATIVE_ROOT/lib"
1966 final_message="$final_message\n Native Root:\t$NATIVE_ROOT"
1969 final_message="$final_message\n Crosscomp.:\tNo"
1972 final_message="$final_message\n target ARCH:\t$use_arch"
1973 final_message="$final_message\n target CPU:\t$use_cpu"
1975 if test "$use_gles" = "yes"; then
1976 final_message="$final_message\n OpenGLES:\tYes"
1981 if test "$use_gl" = "yes"; then
1982 final_message="$final_message\n OpenGL:\tYes"
1985 final_message="$final_message\n OpenGL:\tNo (Very Slow)"
1986 SDL_DEFINES="$SDL_DEFINES -DHAS_SDL_2D"
1991 if test "$use_alsa" = "yes"; then
1993 AC_DEFINE([USE_ALSA],[1],["Define to 1 if alsa is installed"])
1994 final_message="$final_message\n ALSA:\t\tYes"
1997 final_message="$final_message\n ALSA:\t\tNo"
2000 if test "$use_dbus" = "yes"; then
2001 final_message="$final_message\n DBUS:\t\tYes"
2003 final_message="$final_message\n DBUS:\t\tNo"
2006 if test "x$use_vdpau" != "xno"; then
2007 final_message="$final_message\n VDPAU:\tYes"
2009 final_message="$final_message\n VDPAU:\tNo"
2012 if test "x$use_vaapi" != "xno"; then
2013 final_message="$final_message\n VAAPI:\tYes"
2015 final_message="$final_message\n VAAPI:\tNo"
2018 if test "x$use_vtbdecoder" != "xno"; then
2019 final_message="$final_message\n VTBDecoder:\tYes"
2021 final_message="$final_message\n VTBDecoder:\tNo"
2024 if test "$use_openmax" != "no"; then
2025 final_message="$final_message\n OpenMax:\tYes"
2027 final_message="$final_message\n OpenMax:\tNo"
2030 if test "$use_joystick" = "yes"; then
2031 final_message="$final_message\n Joystick:\tYes"
2032 AC_DEFINE([HAS_SDL_JOYSTICK],[1],["Define to 1 if using SDL joystick"])
2034 final_message="$final_message\n Joystick:\tNo"
2037 if test "$use_touch_skin" = "yes"; then
2038 final_message="$final_message\n Touch skin:\tYes"
2040 final_message="$final_message\n Touch skin:\tNo"
2043 if test "$use_x11" = "yes"; then
2045 final_message="$final_message\n X11:\t\tYes"
2048 final_message="$final_message\n X11:\t\tNo"
2051 if test "$use_wayland" = "yes"; then
2052 final_message="$final_message\n Wayland:\tYes"
2056 final_message="$final_message\n Wayland:\tNo"
2059 if test "$use_libbluray" = "yes"; then
2060 final_message="$final_message\n Bluray:\tYes"
2062 final_message="$final_message\n Bluray:\tNo"
2065 # we don't compile with default upstream squish, so we use our own one
2066 # even on non unified deps platforms
2067 if test "$cross_compiling" != "yes"; then
2068 make -C ${abs_top_srcdir}/tools/depends/native/libsquish-native CXX=${CXX}
2069 export PKG_CONFIG_PATH="${abs_top_srcdir}/tools/depends/native/libsquish-native/squish-install/lib/pkgconfig:$PKG_CONFIG_PATH"
2071 PKG_CHECK_MODULES([SQUISH], [squish],
2072 [INCLUDES="$INCLUDES $SQUISH_CFLAGS" LIBS="$LIBS $SQUISH_LIBS"],
2073 AC_MSG_ERROR("squish not found"))
2075 if test "x$use_texturepacker" != "xno"; then
2076 AC_PATH_PROG([TEXTUREPACKER], [TexturePacker], ["none"],
2077 [$PATH$PATH_SEPARATOR${abs_top_srcdir}/tools/depends/native/TexturePacker/bin])
2078 if test "$TEXTUREPACKER" = "none"; then
2079 make -C ${abs_top_srcdir}/tools/depends/native/TexturePacker
2080 TEXTUREPACKER="${abs_top_srcdir}/tools/depends/native/TexturePacker/bin/TexturePacker"
2082 if test -x "$TEXTUREPACKER"; then
2083 final_message="$final_message\n TexturePacker:Yes"
2086 if test "x$use_texturepacker" = "xyes"; then
2087 AC_MSG_ERROR("Texturepacker not found")
2089 AC_MSG_NOTICE("Texturepacker not found")
2091 final_message="$final_message\n TexturePacker:No"
2095 final_message="$final_message\n TexturePacker:No"
2099 if test "$use_mid" = "yes"; then
2100 final_message="$final_message\n MID Support:\tYes"
2101 SDL_DEFINES="$SDL_DEFINES -DMID"
2103 final_message="$final_message\n MID Support:\tNo"
2108 if test "x$use_ccache" != "xno"; then
2109 AC_PATH_PROG(CCACHE,ccache,none)
2110 if test "$ac_cv_path_CCACHE" = "none"; then
2111 if test "x$use_ccache" = "xyes"; then
2112 AC_MSG_ERROR([ccache not found.]);
2114 AC_MSG_NOTICE([ccache not found. Falling back to default CC])
2115 final_message="$final_message\n ccache:\tNo"
2118 CC="$ac_cv_path_CCACHE $CC"
2119 CXX="$ac_cv_path_CCACHE $CXX"
2120 AC_MSG_NOTICE(enabling ccache)
2121 final_message="$final_message\n ccache:\tYes"
2124 final_message="$final_message\n ccache:\tNo"
2127 if test "$use_alsa" = "yes"; then
2128 final_message="$final_message\n ALSA Support:\tYes"
2130 final_message="$final_message\n ALSA Support:\tNo"
2133 if test "x$use_pulse" != "xno"; then
2134 XBMC_STANDALONE_SH_PULSE=tools/Linux/${APP_NAME_LC}-standalone.sh.pulse
2135 final_message="$final_message\n PulseAudio:\tYes"
2137 XBMC_STANDALONE_SH_PULSE=/dev/null
2138 final_message="$final_message\n PulseAudio:\tNo"
2142 if test "$use_dvdcss" = "yes"; then
2143 AC_MSG_NOTICE($dvdcss_enabled)
2144 final_message="$final_message\n DVDCSS:\tYes"
2146 SKIP_CONFIG_DVDCSS=0
2147 DVDREAD_CFLAGS="-D_XBMC -DHAVE_DVDCSS_DVDCSS_H"
2149 AC_MSG_NOTICE($dvdcss_disabled)
2150 final_message="$final_message\n DVDCSS:\tNo"
2152 SKIP_CONFIG_DVDCSS=1
2153 DVDREAD_CFLAGS="-D_XBMC -UHAVE_DVDCSS_DVDCSS_H"
2155 if test "$host_vendor" = "apple"; then
2156 DVDREAD_CFLAGS="$DVDREAD_CFLAGS -D__DARWIN__"
2159 # Google Test Framework
2160 if test "$configure_gtest" = "yes"; then
2161 AC_MSG_NOTICE($gtest_enabled)
2162 final_message="$final_message\n Google Test Framework Configured:\tYes"
2166 AC_MSG_NOTICE($gtest_disabled)
2167 final_message="$final_message\n Google Test Framework Configured:\tNo"
2173 if test "$use_breakpad" = "yes"; then
2175 PKG_CHECK_MODULES([BREAKPAD], [breakpad-client],
2176 [INCLUDES="$INCLUDES $BREAKPAD_CFLAGS"; LIBS="$LIBS $BREAKPAD_LIBS"],
2177 AC_MSG_ERROR("breakpad-client not found"))
2178 AC_DEFINE([HAVE_BREAKPAD],[1],["Define to 1 if Google Breakpad is installed"])
2179 AC_MSG_NOTICE($breakpad_enabled)
2180 final_message="$final_message\n Google Breakpad Configured:\tYes"
2182 AC_MSG_NOTICE($breakpad_disabled)
2183 final_message="$final_message\n Google Breakpad Configured:\tNo"
2187 if test "$use_avahi" = "yes"; then
2188 final_message="$final_message\n Avahi:\tYes"
2190 final_message="$final_message\n Avahi:\tNo"
2193 if test "$use_mdnsembedded" != "no"; then
2194 final_message="$final_message\n mDNSEmbedded:\tYes"
2196 final_message="$final_message\n mDNSEmbedded:\tNo"
2199 if test "$use_nonfree" = "yes"; then
2200 final_message="$final_message\n Non-free:\tYes"
2202 AC_DEFINE([HAVE_XBMC_NONFREE], [1], [Define to 1 to enable non-free components.])
2205 final_message="$final_message\n Non-free:\tNo"
2208 if test "$use_asap" = "yes"; then
2209 AC_CHECK_PROGS(HAVE_GDC,gdc-4.4 gdc-4.3 gdc,"no")
2210 if test "$HAVE_GDC" = "no"; then
2211 AC_MSG_ERROR($missing_program);
2213 AC_CHECK_PROG(HAVE_FPC,fpc,"yes","no")
2214 if test "$HAVE_FPC" = "no"; then
2215 AC_MSG_ERROR($missing_program);
2218 AC_DEFINE([USE_ASAP_CODEC], [1], [Define to 1 to enable ASAP codec.])
2219 final_message="$final_message\n ASAP Codec:\tYes"
2222 final_message="$final_message\n ASAP Codec:\tNo"
2225 if test "$use_mysql" = "yes"; then
2226 final_message="$final_message\n MySQL:\tYes"
2229 final_message="$final_message\n MySQL:\tNo"
2232 if test "$use_webserver" = "yes"; then
2233 final_message="$final_message\n Webserver:\tYes"
2236 final_message="$final_message\n Webserver:\tNo"
2240 if test "$use_libssh" != "no"; then
2241 final_message="$final_message\n libssh support:\tYes"
2243 final_message="$final_message\n libssh support:\tNo"
2246 if test "$use_librtmp" != "no"; then
2247 final_message="$final_message\n libRTMP support:\tYes"
2249 final_message="$final_message\n libRTMP support:\tNo"
2252 if test "x$use_samba" != "xno"; then
2253 final_message="$final_message\n libsmbclient support:\tYes"
2255 final_message="$final_message\n libsmbclient support:\tNo"
2258 if test "$use_libnfs" != "no"; then
2259 final_message="$final_message\n libnfs client support:Yes"
2261 final_message="$final_message\n libnfs client support:No"
2264 if test "$use_libgif" != "no"; then
2265 final_message="$final_message\n libgif support:\tYes"
2267 final_message="$final_message\n libgif support:\tNo"
2270 if test "$use_airplay" != "no"; then
2271 final_message="$final_message\n AirPlay support:\tYes"
2273 final_message="$final_message\n AirPLay support:\tNo"
2276 if test "x$use_airtunes" != "xno"; then
2277 final_message="$final_message\n AirTunes support (libshairplay):\tYes"
2279 final_message="$final_message\n AirTunes support:\tNo"
2282 if test "x$use_upnp" != "xno"; then
2283 final_message="$final_message\n UPnP support:\t\tYes"
2285 UPNP_DEFINES='-DNPT_CONFIG_ENABLE_LOGGING -DPLT_HTTP_DEFAULT_USER_AGENT="\"UPnP/1.0 DLNADOC/1.50 Kodi\"" -DPLT_HTTP_DEFAULT_SERVER="\"UPnP/1.0 DLNADOC/1.50 Kodi\""'
2286 AC_DEFINE([USE_UPNP], [1], [Define to 1 to enable UPnP support.])
2289 final_message="$final_message\n UPnP support:\t\tNo"
2292 if test "$use_optical_drive" = "yes"; then
2293 final_message="$final_message\n Optical drive:\tYes"
2295 final_message="$final_message\n Optical drive:\tNo"
2298 if test "x$use_libudev" != "xno"; then
2299 final_message="$final_message\n libudev support:\tYes"
2301 final_message="$final_message\n libudev support:\tNo"
2304 if test "x$use_libusb" != "xno"; then
2305 final_message="$final_message\n libusb support:\tYes"
2307 final_message="$final_message\n libusb support:\tNo"
2310 if test "x$use_libcec" != "xno"; then
2311 final_message="$final_message\n libcec support:\tYes"
2313 final_message="$final_message\n libcec support:\tNo"
2316 if test "x$use_libcap" != "xno"; then
2317 final_message="$final_message\n libcap support:\tYes"
2319 final_message="$final_message\n libcap support:\tNo"
2322 if test "x$add_players" != "xno"; then
2323 final_message="$final_message\n additional players:\tYes, $add_players"
2325 final_message="$final_message\n additional players:\tNo"
2328 if test "x$add_codecs" != "xno"; then
2329 final_message="$final_message\n additional codecs:\tYes, $add_codecs"
2331 final_message="$final_message\n additional codecs:\tNo"
2334 ### External libraries messages
2336 if test "$host_vendor" = "apple" ; then
2337 # built internal but referenced as external, we link directly to them.
2338 # this MUST be the last thing before OUTPUT_FILES as they do not
2339 # exist until after we build FFMpeg.
2340 LIBS="$LIBS -L\$(abs_top_srcdir)/lib/ffmpeg/libavcodec -lavcodec"
2341 LIBS="$LIBS -L\$(abs_top_srcdir)/lib/ffmpeg/libavfilter -lavfilter"
2342 LIBS="$LIBS -L\$(abs_top_srcdir)/lib/ffmpeg/libswresample -lswresample"
2343 LIBS="$LIBS -L\$(abs_top_srcdir)/lib/ffmpeg/libavformat -lavformat"
2344 LIBS="$LIBS -L\$(abs_top_srcdir)/lib/ffmpeg/libavutil -lavutil"
2345 LIBS="$LIBS -L\$(abs_top_srcdir)/lib/ffmpeg/libpostproc -lpostproc"
2346 LIBS="$LIBS -L\$(abs_top_srcdir)/lib/ffmpeg/libswscale -lswscale"
2349 OUTPUT_FILES="Makefile \
2351 addons/skin.confluence/media/Makefile \
2353 xbmc/cdrip/Makefile \
2354 xbmc/cores/Makefile \
2355 xbmc/cores/VideoRenderers/Makefile \
2356 xbmc/cores/dvdplayer/Makefile \
2357 lib/libdvd/Makefile \
2358 xbmc/cores/DllLoader/Makefile \
2359 xbmc/cores/DllLoader/exports/Makefile \
2360 xbmc/cores/dvdplayer/DVDCodecs/Makefile \
2361 xbmc/cores/dvdplayer/DVDCodecs/Audio/Makefile \
2362 xbmc/cores/dvdplayer/DVDCodecs/Overlay/Makefile \
2363 xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile \
2364 xbmc/cores/dvdplayer/DVDDemuxers/Makefile \
2365 xbmc/cores/dvdplayer/DVDSubtitles/Makefile \
2366 xbmc/cores/AudioEngine/Makefile \
2367 xbmc/cores/paplayer/Makefile \
2368 xbmc/cores/omxplayer/Makefile \
2369 xbmc/cores/playercorefactory/Makefile \
2370 xbmc/messaging/Makefile \
2371 xbmc/messaging/helpers/Makefile \
2373 xbmc/guilib/Makefile \
2374 xbmc/input/linux/Makefile \
2375 xbmc/interfaces/Makefile \
2376 xbmc/interfaces/builtins/Makefile \
2377 xbmc/network/Makefile \
2378 xbmc/network/upnp/Makefile \
2379 lib/libexif/Makefile \
2380 lib/cximage-6.0/Makefile \
2381 lib/libUPnP/Makefile \
2382 xbmc/DllPaths_generated.h \
2383 xbmc/DllPaths_generated_android.h \
2384 xbmc/freebsd/Makefile \
2385 xbmc/linux/Makefile \
2386 xbmc/filesystem/Makefile \
2387 xbmc/windowing/Makefile \
2388 xbmc/windowing/egl/Makefile \
2389 lib/addons/library.xbmc.addon/Makefile \
2390 lib/addons/library.kodi.adsp/Makefile \
2391 lib/addons/library.kodi.audioengine/Makefile \
2392 lib/addons/library.xbmc.codec/Makefile \
2393 lib/addons/library.kodi.guilib/Makefile \
2394 lib/addons/library.xbmc.pvr/Makefile \
2395 tools/Linux/${APP_NAME_LC}.sh \
2396 tools/Linux/${APP_NAME_LC}-standalone.sh \
2397 tools/Linux/${APP_NAME_LC}-xsession.desktop \
2398 tools/EventClients/Makefile \
2399 tools/EventClients/Clients/OSXRemote/Makefile \
2400 xbmc/peripherals/bus/Makefile \
2401 xbmc/peripherals/devices/Makefile \
2402 xbmc/android/activity/Makefile \
2403 xbmc/android/loader/Makefile \
2404 xbmc/android/jni/Makefile \
2405 xbmc/utils/Makefile \
2406 xbmc/main/Makefile \
2407 xbmc/main/posix/Makefile \
2408 tools/darwin/Configurations/App.xcconfig \
2409 tools/darwin/Configurations/Common.xcconfig \
2410 tools/darwin/packaging/ios/mkdeb-ios.sh \
2411 tools/darwin/packaging/osx/mkdmg-osx.sh \
2412 tools/darwin/packaging/migrate_to_kodi_ios.sh \
2413 xbmc/osx/Info.plist \
2414 xbmc/osx/ios/XBMCIOS-Info.plist \
2415 project/cmake/kodi-config.cmake \
2416 project/cmake/xbmc-config.cmake \
2417 tools/android/packaging/xbmc/AndroidManifest.xml \
2418 tools/android/packaging/Makefile \
2419 tools/android/packaging/xbmc/src/org/xbmc/kodi/Splash.java \
2420 tools/android/packaging/xbmc/src/org/xbmc/kodi/Main.java \
2421 tools/android/packaging/xbmc/src/org/xbmc/kodi/XBMCBroadcastReceiver.java \
2422 tools/android/packaging/xbmc/src/org/xbmc/kodi/XBMCOnFrameAvailableListener.java \
2423 tools/android/packaging/xbmc/src/org/xbmc/kodi/XBMCSettingsContentObserver.java \
2424 tools/android/packaging/xbmc/src/org/xbmc/kodi/XBMCOnAudioFocusChangeListener.java \
2425 tools/android/packaging/xbmc/src/org/xbmc/kodi/XBMCVideoView.java \
2426 tools/android/packaging/xbmc/activity_main.xml \
2427 tools/android/packaging/xbmc/strings.xml \
2428 addons/xbmc.addon/addon.xml"
2430 if test "$use_webserver" = "yes"; then
2431 OUTPUT_FILES="$OUTPUT_FILES xbmc/network/httprequesthandler/python/Makefile"
2434 if test "$use_wayland" = "yes"; then
2435 OUTPUT_FILES="$OUTPUT_FILES xbmc/windowing/tests/wayland/Makefile"
2438 if test "$use_touch_skin" = "yes"; then
2439 OUTPUT_FILES="$OUTPUT_FILES addons/skin.re-touched/media/Makefile"
2442 if test "$use_codec_libstagefright" = "yes"; then
2443 OUTPUT_FILES="$OUTPUT_FILES xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS/Makefile"
2446 if test "$use_sse4" = "yes"; then
2447 OUTPUT_FILES="$OUTPUT_FILES xbmc/linux/sse4/Makefile"
2450 OUTPUT_FILES="$OUTPUT_FILES \
2451 xbmc/interfaces/python/Makefile \
2452 xbmc/interfaces/python/test/Makefile"
2454 # needed for kodi-config.cmake
2455 if echo "$libdir" | grep -q '${exec_prefix}'; then
2456 if test "${prefix}" = "NONE" || test "${prefix}" = ""; then
2459 if test "${exec_prefix}" = "NONE" || test "${exec_prefix}" = ""; then
2460 exec_prefix=${prefix}
2463 eval "APP_PREFIX=${prefix}"
2464 eval "APP_LIB_DIR=${libdir}/${APP_NAME_LC}"
2465 eval "APP_INCLUDE_DIR=${includedir}/${APP_NAME_LC}"
2466 AC_SUBST(APP_PREFIX)
2467 AC_SUBST(APP_LIB_DIR)
2468 AC_SUBST(APP_INCLUDE_DIR)
2470 # Line below is used so we can use AM_INIT_AUTOMAKE. The corresponding
2471 # .dummy.am does nothing.
2472 AC_CONFIG_FILES([.dummy])
2474 AC_CONFIG_FILES([${OUTPUT_FILES}])
2475 OUTPUT_FILES="$OUTPUT_FILES \
2481 AC_SUBST(CXX_FOR_BUILD)
2482 AC_SUBST(CC_FOR_BUILD)
2483 AC_SUBST(CFLAGS_FOR_BUILD)
2484 AC_SUBST(CXXFLAGS_FOR_BUILD)
2485 AC_SUBST(LDFLAGS_FOR_BUILD)
2486 AC_SUBST(SDL_DEFINES)
2487 AC_SUBST(BUILD_DVDCSS)
2488 AC_SUBST(FFMPEG_LIBDIR)
2489 AC_SUBST(USE_STATIC_FFMPEG)
2490 AC_SUBST(GNUTLS_ALL_LIBS)
2491 AC_SUBST(VORBISENC_ALL_LIBS)
2492 AC_SUBST(DCADEC_ALL_LIBS)
2493 AC_SUBST(USE_TOUCH_SKIN)
2494 AC_SUBST(USE_LIBAV_HACKS)
2495 AC_SUBST(PYTHON_VERSION)
2496 AC_SUBST(OUTPUT_FILES)
2497 AC_SUBST(HAVE_XBMC_NONFREE)
2498 AC_SUBST(USE_ASAP_CODEC)
2499 AC_SUBST(LIBCURL_BASENAME)
2500 AC_SUBST(LIBVORBISFILE_BASENAME)
2501 AC_SUBST(LIBOGG_BASENAME)
2502 AC_SUBST(LIBVORBIS_BASENAME)
2503 AC_SUBST(LIBASS_BASENAME)
2504 AC_SUBST(LIBMEPG2_BASENAME)
2505 AC_SUBST_FILE(XBMC_STANDALONE_SH_PULSE)
2506 AC_SUBST(USE_OPENGL)
2507 AC_SUBST(USE_OPENGLES)
2510 AC_SUBST(USE_LIBSMBCLIENT)
2511 AC_SUBST(USE_LIBNFS)
2512 AC_SUBST(USE_LIBGIF)
2513 AC_SUBST(USE_AIRPLAY)
2514 AC_SUBST(USE_OPENMAX)
2516 AC_SUBST(HAVE_LIBPULSE)
2518 AC_SUBST(USE_TEXTUREPACKER)
2519 AC_SUBST(TEXTUREPACKER)
2520 AC_SUBST(USE_AIRTUNES)
2521 AC_SUBST(USE_LIBUDEV)
2522 AC_SUBST(USE_LIBUSB)
2523 AC_SUBST(USE_LIBCEC)
2525 AC_SUBST(USE_WAYLAND)
2526 AC_SUBST(USE_WEB_SERVER)
2528 AC_SUBST(USE_XKBCOMMON)
2529 AC_SUBST(USE_OMXLIB)
2530 AC_SUBST(USE_ANDROID)
2531 AC_SUBST(GTEST_CONFIGURED)
2532 AC_SUBST(USE_DOXYGEN)
2533 AC_SUBST(UPNP_DEFINES)
2537 AC_SUBST(USE_BREAKPAD)
2539 # pushd and popd are not available in other shells besides bash, so implement
2540 # our own pushd/popd functions
2545 if [[ -d "$dirname" ]] && [[ -x "$dirname" ]]; then
2547 XB_DIRSTACK="$dirname ${XB_DIRSTACK:-$PWD}"
2550 AC_MSG_ERROR(xb_pushd: unable to change to $dirname)
2555 if [[ -n "$XB_DIRSTACK" ]]; then
2556 XB_DIRSTACK="${XB_DIRSTACK#* }"
2557 cd "${XB_DIRSTACK%% *}"
2560 AC_MSG_ERROR(xb_popd: unable to go back to previous directory)
2564 # Function to run the configure scripts in our submodules
2565 # Consists of three paramaters, the path to the submodule, the configure command
2566 # with appropriate arguments, and a third parameter set to 1 if we are to skip
2567 # running the script, anything else if not.
2568 AC_DEFUN([XB_CONFIG_MODULE],[
2569 AC_CONFIG_COMMANDS_POST([
2570 if [[ $3 != "1" ]]; then
2571 if [[ -d $1 ]]; then
2574 if [[ $? -ne 0 ]]; then
2576 AC_MSG_ERROR([[Submodule $1 failed to configure]])
2581 AC_MSG_ERROR([[Submodule $1 does not exist]])
2584 AC_MSG_NOTICE([[Skipping configuration of submodule $1.]])
2589 XB_CONFIG_MODULE([lib/libdvd/libdvdcss], [
2593 CFLAGS="$CFLAGS $DROID_DVDLIB_SEEK64" \
2594 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2595 --host=$host_alias \
2596 --build=$build_alias \
2597 --target=$target_alias \
2601 ], [$SKIP_CONFIG_DVDCSS])
2603 XB_CONFIG_MODULE([lib/libdvd/libdvdread], [
2605 --extra-cflags="$CFLAGS $DVDREAD_CFLAGS -I`pwd`/../libdvdcss/src $DROID_DVDLIB_SEEK64" \
2606 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2607 --host=$host_alias \
2608 --build=$build_alias \
2609 --target=$target_alias \
2615 mkdir -p `pwd`/../includes/dvdread
2616 cp `pwd`/../libdvdread/src/*.h `pwd`/../includes/dvdread
2617 cp `pwd`/../libdvdread/src/dvdread/*.h `pwd`/../includes/dvdread
2620 XB_CONFIG_MODULE([lib/libdvd/libdvdnav], [
2622 --extra-cflags="$CFLAGS $DVDREAD_CFLAGS -I`pwd`/../includes $DROID_DVDLIB_SEEK64" \
2623 --extra-ldflags="-L`pwd`/../libdvdread/obj" \
2624 --with-dvdread-config="`pwd`/../dvdread-config" \
2625 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2626 --host=$host_alias \
2627 --build=$build_alias \
2628 --target=$target_alias \
2634 XB_CONFIG_MODULE([lib/cpluff], [
2635 ./configure --disable-nls \
2636 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2637 --host=$host_alias \
2638 --build=$build_alias \
2639 --target=$target_alias CFLAGS="$CFLAGS" CC="$CC" CXX="$CXX" LDFLAGS="$LDFLAGS" LIBS=""
2640 #LDFLAGS="$LDFLAGS -Wl,-read_only_relocs,suppress"
2643 XB_CONFIG_MODULE([lib/gtest], [
2648 CXXFLAGS="$CXXFLAGS" \
2649 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2650 --host=$host_alias \
2651 --build=$build_alias \
2652 --target=$target_alias \
2656 ], [$SKIP_CONFIG_GTEST])
2660 final_message="$final_message\n prefix:\t$prefix\n$dashes"
2661 echo -e "$final_message\n"