2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([xbmc], [11.0], [http://trac.xbmc.org])
6 AC_CONFIG_HEADERS([xbmc/config.h])
8 m4_include([m4/ax_python_devel.m4])
10 AC_CONFIG_AUX_DIR([build-aux])
11 AM_INIT_AUTOMAKE([foreign])
15 echo "$@" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz
18 # check for library basenames
19 AC_DEFUN([XB_FIND_SONAME],
21 if [[ "$host_vendor" != "apple" ]]; then
22 AC_MSG_CHECKING([for lib$2 soname])
23 $1_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS -l$2 -Wl,-M 2>/dev/null | grep "^LOAD.*$2" | awk '{V=2; print $V}')
24 if [[ ! -z $$1_FILENAME ]]; then
25 $1_SONAME=$(objdump -p $$1_FILENAME | grep "SONAME.*$2" | awk '{V=2; print $V}')
28 AC_MSG_CHECKING([for lib$2 dylib])
29 gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
30 env_lib_path=[`echo $LDFLAGS | sed 's/-L[ ]*//g'`]
31 if test "$cross_compiling" = yes; then
34 host_lib_path="/usr/lib /usr/local/lib"
36 for path in $gcc_lib_path $env_lib_path $host_lib_path; do
37 lib=[`ls -- $path/lib$2.dylib 2>/dev/null`]
38 if test x$lib != x; then
39 # we want the path/name that is embedded in the dylib
40 $1_SONAME=[`otool -L $lib | grep -v lib$2.dylib | grep lib$2 | awk '{V=1; print $V}'`]
41 $1_SONAME=[`basename $$1_SONAME`]
45 if [[ -z "$$1_SONAME" ]]; then
47 if test -z "$3" || test "x${$3}" = "xyes"; then
48 AC_MSG_ERROR([Unable to determine soname of lib$2 library])
50 AC_MSG_WARN([Unable to determine soname of lib$2 library])
52 AC_MSG_WARN([lib$2 support disabled])
55 AC_MSG_RESULT([$$1_SONAME])
60 # Function to push and pop libs and includes for a command
61 AC_DEFUN([XB_PUSH_FLAGS], [
63 SAVE_INCLUDES="$INCLUDES"
68 INCLUDES="$SAVE_INCLUDES"
71 # General message strings
72 configure_debug="ERROR: this is a configure debug statement"
73 missing_library="Could not find a required library. Please see the README for your platform."
74 missing_headers="Could not find some required headers. Please see the README for your platform."
75 missing_program="Could not find a required program. Please see the README for your platform."
76 xrandr_not_found="== Could not find libXRandR. SDL will be used for resolution support. =="
77 xrandr_disabled="== XRandR support disabled. SDL will be used for resolution support. =="
78 goom_enabled="== GOOM enabled. =="
79 goom_disabled="== GOOM disabled. =="
80 rsxs_enabled="== RSXS enabled. =="
81 rsxs_disabled="== RSXS disabled. =="
82 projectm_enabled="== ProjectM enabled. =="
83 projectm_disabled="== ProjectM disabled. =="
84 x11_enabled="== X11 enabled. =="
85 x11_disabled="== X11 disabled. =="
86 pulse_not_found="== Could not find libpulse. PulseAudio support disabled. =="
87 pulse_disabled="== PulseAudio support manually disabled. =="
88 dvdcss_enabled="== DVDCSS support enabled. =="
89 dvdcss_disabled="== DVDCSS support disabled. =="
90 hal_not_found="== Could not find hal. HAL support disabled. =="
91 halstorage_not_found="== Could not find hal-storage. HAL support disabled. =="
92 hal_disabled="== HAL support disabled. =="
93 avahi_not_found="== Could not find libavahi-common or libavahi-client. Avahi support disabled. =="
94 avahi_disabled="== Avahi support disabled. =="
95 vdpau_not_found="== Could not find libvdpau. VDPAU support disabled. =="
96 vdpau_disabled="== VDPAU support manually disabled. =="
97 vaapi_not_found="== Could not find libva. VAAPI support disabled. =="
98 vaapi_disabled="== VAAPI support manually disabled. =="
99 crystalhd_not_found="== Could not find libcrystalhd. CrystalHD support disabled. =="
100 crystalhd_disabled="== CrystalHD support manually disabled. =="
101 vdadecoder_enabled="== VDADecoder support enabled. =="
102 vdadecoder_disabled="== VDADecoder support manually disabled. =="
103 vtbdecoder_enabled="== VTBDecoder support enabled. =="
104 vtbdecoder_disabled="== VTBDecoder support manually disabled. =="
105 openmax_disabled="== OpenMax support manually disabled. =="
106 openmax_not_found="== Could not find libnvomx. OpenMax support disabled. =="
107 ssh_not_found="== Could not find libssh. SSH FTP VFS support disabled. =="
108 librtmp_not_found="== Could not find libRTMP. RTMP support disabled. =="
109 librtmp_disabled="== RTMP support disabled. =="
110 libnfs_not_found="== Could not find libnfs. NFS client support disabled. =="
111 libnfs_disabled="== NFS support disabled. =="
112 libafpclient_not_found="== Could not find libafpclient. AFP client support disabled. =="
113 libafpclient_disabled="== AFP support disabled. =="
114 libshairport_not_found="== Could not find libshairport. AirTunes support disabled. =="
115 libshairport_disabled="== AirTunes support disabled. =="
116 samba_disabled="== SAMBA support disabled. =="
117 libplist_not_found="== Could not find libplist. AirPlay support disabled. =="
118 libplist_disabled="== AirPlay support disabled. =="
119 alsa_not_found="== Could not find ALSA. ALSA support disabled. =="
120 dbus_not_found="== Could not find DBUS. DBUS support disabled. =="
122 libudev_not_found="== Could not find libudev. Will use polling to check for device changes. =="
123 libudev_disabled="== udev support disabled. Will use polling to check for device changes. =="
124 libusb_not_found="== Could not find libusb. Plug and play USB device support will not be available. =="
125 libusb_disabled="== libusb disabled. Plug and play USB device support will not be available. =="
126 libcec_enabled="== libCEC enabled. =="
127 libcec_disabled="== libCEC disabled. CEC adapter support will not be available. =="
128 libcec_internal="== Using internal libCEC. =="
129 libcec_external_missing="== libCEC was not found on your system. =="
131 # External library message strings
132 external_libraries_enabled="== Use of all supported external libraries enabled. =="
133 external_libraries_disabled="== Use of all supported external libraries disabled. =="
134 external_ffmpeg_enabled="== Use of external ffmpeg enabled. =="
135 external_ffmpeg_disabled="== Use of external ffmpeg disabled. =="
136 ffmpeg_vdpau_not_supported="== External ffmpeg doesn't support VDPAU. VDPAU support disabled. =="
137 dashes="------------------------"
138 final_message="\n XBMC Configuration:"
139 final_message="\n$dashes$final_message\n$dashes"
142 AC_ARG_ENABLE([debug],
143 [AS_HELP_STRING([--enable-debug],
144 [enable debugging information (default is yes)])],
145 [use_debug=$enableval],
149 [AS_HELP_STRING([--with-arch],
150 [build with given arch passing to internal ffmpeg (default is no, needed for crosscompiling)])],
155 [AS_HELP_STRING([--with-cpu],
156 [build with given cpu passing to ffmpeg (default is no)])],
160 AC_ARG_ENABLE([optimizations],
161 [AS_HELP_STRING([--enable-optimizations],
162 [enable optimization (default is yes)])],
163 [use_optimizations=$enableval],
164 [use_optimizations=yes])
167 [AS_HELP_STRING([--enable-gl],
168 [enable OpenGL rendering (default is yes)])],
172 AC_ARG_ENABLE([gles],
173 [AS_HELP_STRING([--enable-gles],
174 [enable OpenGLES rendering (default is no)])],
175 [use_gles=$enableval],
179 [AS_HELP_STRING([--enable-sdl],
180 [enable SDL (default is auto)])],
181 [use_sdl=$enableval],
184 AC_ARG_ENABLE([vdpau],
185 [AS_HELP_STRING([--enable-vdpau],
186 [enable VDPAU decoding (default is auto)])],
187 [use_vdpau=$enableval],
190 AC_ARG_ENABLE([vaapi],
191 [AS_HELP_STRING([--enable-vaapi],
192 [enable VAAPI decoding (default is auto)])],
193 [use_vaapi=$enableval],
196 AC_ARG_ENABLE([crystalhd],
197 [AS_HELP_STRING([--enable-crystalhd],
198 [enable CrystalHD decoding (default is auto)])],
199 [use_crystalhd=$enableval],
200 [use_crystalhd=auto])
202 AC_ARG_ENABLE([vdadecoder],
203 [AS_HELP_STRING([--enable-vdadecoder],
204 [enable VDADecoder decoding (default is auto)])],
205 [use_vdadecoder=$enableval],
206 [use_vdadecoder=auto])
208 AC_ARG_ENABLE([vtbdecoder],
209 [AS_HELP_STRING([--enable-vtbdecoder],
210 [enable VTBDecoder decoding (default is auto)])],
211 [use_vtbdecoder=$enableval],
212 [use_vtbdecoder=auto])
214 AC_ARG_ENABLE([openmax],
215 [AS_HELP_STRING([--enable-openmax],
216 [enable OpenMax decoding (default is auto, requires OpenGLES)])],
217 [use_openmax=$enableval],
220 AC_ARG_ENABLE([tegra],
221 [AS_HELP_STRING([--enable-tegra],
222 [enable Tegra2 arm (default is no)])],
223 [use_tegra=$enableval],
226 AC_ARG_ENABLE([profiling],
227 [AS_HELP_STRING([--enable-profiling],
228 [enable gprof profiling (default is no)])],
229 [use_profiling=$enableval],
232 AC_ARG_ENABLE([joystick],
233 [AS_HELP_STRING([--enable-joystick],
234 [enable SDL joystick support (default is yes)])],
235 [use_joystick=$enableval],
238 AC_ARG_ENABLE([xrandr],
239 [AS_HELP_STRING([--enable-xrandr],
240 [enable XRandR support (default is yes)])],
241 [use_xrandr=$enableval],
244 AC_ARG_ENABLE([goom],
245 [AS_HELP_STRING([--enable-goom],
246 [enable GOOM visualisation (default is no)])],
247 [use_goom=$enableval],
250 AC_ARG_ENABLE([rsxs],
251 [AS_HELP_STRING([--enable-rsxs],
252 [enable really slick X screensavers (default is yes)])],
253 [use_rsxs=$enableval],
256 AC_ARG_ENABLE([projectm],
257 [AS_HELP_STRING([--enable-projectm],
258 [enable ProjectM visualisation (default is yes)])],
259 [use_projectm=$enableval],
263 [AS_HELP_STRING([--enable-x11],
264 [enable x11 (default is yes) 'Linux Only'])],
265 [use_x11=$enableval],
268 AC_ARG_ENABLE([ccache],
269 [AS_HELP_STRING([--enable-ccache],
270 [enable building with ccache feature (default is auto)])],
271 [use_ccache=$enableval],
274 AC_ARG_ENABLE([pulse],
275 [AS_HELP_STRING([--enable-pulse],
276 [enable PulseAudio support (default is auto)])],
277 [use_pulse=$enableval],
280 AC_ARG_ENABLE([rtmp],
281 [AS_HELP_STRING([--enable-rtmp],
282 [enable RTMP support via librtmp (default is auto)])],
283 [use_librtmp=$enableval],
286 AC_ARG_ENABLE([samba],
287 [AS_HELP_STRING([--disable-samba],
288 [disable SAMBA support (default is enabled)])],
289 [use_samba=$enableval],
293 [AS_HELP_STRING([--enable-nfs],
294 [enable NFS support via libnfs (default is auto)])],
295 [use_libnfs=$enableval],
298 AC_ARG_ENABLE([afpclient],
299 [AS_HELP_STRING([--enable-afpclient],
300 [enable AFP support via libafpclient (default is auto)])],
301 [use_libafpclient=$enableval],
302 [use_libafpclient=auto])
304 AC_ARG_ENABLE([airplay],
305 [AS_HELP_STRING([--enable-airplay],
306 [enable AirPlay support(default is auto)])],
307 [use_airplay=$enableval],
310 AC_ARG_ENABLE([airtunes],
311 [AS_HELP_STRING([--enable-airtunes],
312 [enable AirTunes support(default is auto)])],
313 [use_airtunes=$enableval],
316 AC_ARG_ENABLE([ffmpeg_libvorbis],
317 [AS_HELP_STRING([--enable-ffmpeg-libvorbis],
318 [enable FFmpeg vorbis encoding (default is no)])],
319 [use_ffmpeg_libvorbis=$enableval],
320 [use_ffmpeg_libvorbis=no])
322 AC_ARG_ENABLE([dvdcss],
323 [AS_HELP_STRING([--enable-dvdcss],
324 [enable DVDCSS support (default is yes)])],
325 [use_dvdcss=$enableval],
329 [AS_HELP_STRING([--enable-mid],
330 [enable MID support (default is no)])],
331 [use_mid=$enableval],
335 [AS_HELP_STRING([--disable-hal],
336 [disable HAL support (default is enabled if hal and hal-storage is found)])],
337 [use_hal=$enableval],
340 AC_ARG_ENABLE([avahi],
341 [AS_HELP_STRING([--disable-avahi],
342 [disable Avahi support (default is enabled if libavahi-common and libavahi-client is found)])],
343 [use_avahi=$enableval],
346 AC_ARG_ENABLE([non-free],
347 [AS_HELP_STRING([--disable-non-free],
348 [disable componentents with non-compliant licenses])],
349 [use_nonfree=$enableval],
352 AC_ARG_ENABLE([asap-codec],
353 [AS_HELP_STRING([--enable-asap-codec],
354 [enable ASAP ADPCM support])],
355 [use_asap=$enableval],
358 AC_ARG_ENABLE([webserver],
359 [AS_HELP_STRING([--disable-webserver],
360 [disable webserver])],
361 [use_webserver=$enableval],
364 AC_ARG_ENABLE([optical-drive],
365 [AS_HELP_STRING([--disable-optical-drive],
366 [disable optical drive])],
367 [use_optical_drive=$enableval],
368 [use_optical_drive=yes])
370 AC_ARG_ENABLE([libbluray],
371 [AS_HELP_STRING([--enable-libbluray],
372 [enable libbluray support])],
373 [use_libbluray=$enableval],
374 [use_libbluray=auto])
376 AC_ARG_ENABLE([texturepacker],
377 [AS_HELP_STRING([--enable-texturepacker],
378 [enable texturepacker support (default is yes)])],
379 [use_texturepacker=$enableval],
380 [use_texturepacker=auto])
382 AC_ARG_WITH([lirc-device],
383 [AS_HELP_STRING([--with-lirc-device=file],
384 [specify the default LIRC device (default is /dev/lircd)])],
385 [lirc_device=$withval],
386 [lirc_device=/dev/lircd])
387 AC_DEFINE_UNQUOTED([LIRC_DEVICE], ["$lirc_device"], [Default LIRC device])
389 AC_ARG_ENABLE([udev],
390 [AS_HELP_STRING([--enable-udev],
391 [enable udev support (default is auto)])],
392 [use_libudev=$enableval],
395 AC_ARG_ENABLE([libusb],
396 [AS_HELP_STRING([--enable-libusb],
397 [enable libusb support (default is auto)])],
398 [use_libusb=$enableval],
401 AC_ARG_ENABLE([libcec],
402 [AS_HELP_STRING([--enable-libcec],
403 [enable libcec support (default is no)])],
404 [use_libcec=$enableval],
407 ### External libraries options
408 AC_ARG_ENABLE([external-libraries],
409 [AS_HELP_STRING([--enable-external-libraries],
410 [enable use of all supported external libraries (default is no) 'Linux only'])],
411 [use_external_libraries=$enableval],
412 [use_external_libraries=no])
414 AC_ARG_ENABLE([external-libcec],
415 [AS_HELP_STRING([--enable-external-libcec],
416 [external libcec support (default is no) 'Linux only'])],
417 [use_external_libcec=$enableval],
418 [use_external_libcec=no])
420 AC_ARG_ENABLE([external-ffmpeg],
421 [AS_HELP_STRING([--enable-external-ffmpeg],
422 [enable use of external ffmpeg libraries (default is no) 'Linux only'])],
423 [use_external_ffmpeg=$enableval],
424 [use_external_ffmpeg=$use_external_libraries])
426 ### End of external library options
428 if test "x$host_vendor" != "xapple"; then
429 DEFAULT_COMPILE_FLAGS="-fPIC -DPIC -D_REENTRANT"
430 DEFAULT_COMPILE_FLAGS="$DEFAULT_COMPILE_FLAGS -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
433 # Checks for programs.
434 PASSED_CXXFLAGS=$CXXFLAGS # Hack to override autoconf default values
436 CXXFLAGS="$PASSED_CXXFLAGS $DEFAULT_COMPILE_FLAGS"
437 PASSED_CFLAGS=$CFLAGS # Hack to override autoconf default values
440 CFLAGS="$PASSED_CFLAGS $DEFAULT_COMPILE_FLAGS"
446 # host detection and setup
450 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
454 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
465 check_sdl_arch=[`file /opt/local/lib/libSDL_image.dylib | awk '{V=7; print $V}'`]
466 if test "x$check_sdl_arch" = "xi386"; then
467 use_texturepacker_native=yes
468 USE_TEXTUREPACKER_NATIVE_ROOT="/opt/local"
474 AC_SUBST(ARCH_DEFINES, "-D_ARMEL")
476 PYTHON_LDFLAGS="-L${prefix}/lib -lpython2.6"
477 PYTHON_CPPFLAGS="-I${prefix}/include/python2.6"
478 PYTHON_SITE_PKG="${prefix}/lib/python2.6/site-packages"
479 PYTHON_NOVERSIONCHECK="no-check"
480 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_IOS -D_LINUX")
485 use_texturepacker_native=yes
486 USE_TEXTUREPACKER_NATIVE_ROOT="$prefix"
488 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX")
490 powerpc-apple-darwin*)
497 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX")
499 powerpc-*-linux-gnu*)
501 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC")
503 powerpc64-*-linux-gnu*)
504 ARCH="powerpc64-linux"
505 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC64")
511 AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_ARMEL")
514 AC_MSG_ERROR(unsupported host ($host))
518 # platform debug flags
519 if test "$use_debug" = "yes"; then
520 final_message="$final_message\n Debugging:\tYes"
521 if test "$use_profiling" = "yes"; then
522 final_message="$final_message\n Profiling:\tYes"
523 DEBUG_FLAGS="-g -pg -D_DEBUG -Wall"
525 final_message="$final_message\n Profiling:\tNo"
526 DEBUG_FLAGS="-g -D_DEBUG -Wall"
529 final_message="$final_message\n Debugging:\tNo"
530 if test "$use_profiling" = "yes"; then
531 final_message="$final_message\n Profiling:\tYes"
532 DEBUG_FLAGS="-pg -DNDEBUG=1"
534 final_message="$final_message\n Profiling:\tNo"
535 DEBUG_FLAGS="-DNDEBUG=1"
538 CFLAGS="$CFLAGS $DEBUG_FLAGS"
539 CXXFLAGS="$CXXFLAGS $DEBUG_FLAGS"
542 if test "$use_optimizations" = "yes"; then
543 final_message="$final_message\n Optimization:\tYes"
544 CXXFLAGS="$CXXFLAGS -O2"
547 final_message="$final_message\n Optimization:\tNo"
551 # platform specific flags
552 if test "$host_vendor" = "apple" ; then
553 # standard xbmc paths
554 INCLUDES="$INCLUDES -I\$(abs_top_srcdir)/xbmc/osx"
555 if test "$use_arch" != "arm"; then
556 LIBS="$LIBS -framework IOKit"
557 LIBS="$LIBS -framework Cocoa"
558 LIBS="$LIBS -framework AppKit"
559 LIBS="$LIBS -framework Carbon"
560 LIBS="$LIBS -framework CoreAudio"
561 LIBS="$LIBS -framework QuickTime"
562 LIBS="$LIBS -framework AudioUnit"
563 LIBS="$LIBS -framework Foundation"
564 LIBS="$LIBS -framework CoreServices"
565 LIBS="$LIBS -framework CoreVideo"
566 LIBS="$LIBS -framework CoreAudio"
567 LIBS="$LIBS -framework AudioToolbox"
568 LIBS="$LIBS -framework CoreFoundation"
569 LIBS="$LIBS -framework DiskArbitration"
570 LIBS="$LIBS -framework ApplicationServices"
572 elif test "$use_arch" = "arm"; then
573 CFLAGS="$CFLAGS -mfloat-abi=softfp -mno-apcs-stack-check"
574 CXXFLAGS="$CXXFLAGS -mfloat-abi=softfp -mno-apcs-stack-check"
575 FFMPEG_EXTRACFLAGS="-mfloat-abi=softfp"
576 if test "$use_tegra" = "yes"; then
577 # Compile for ARMv7a architecture, need to test gcc for vfpv3-d16 support
578 SAVE_CFLAGS="$CFLAGS"
579 CFLAGS="-mfpu=vfpv3-d16"
581 [AC_LANG_SOURCE([int foo;])],
582 [ CFLAGS="$SAVE_CFLAGS -Wno-psabi -Wa,-march=armv7a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mthumb-interwork"
583 CXXFLAGS="$CXXFLAGS -Wno-psabi -Wa,-march=armv7a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mthumb-interwork"
584 FFMPEG_EXTRACFLAGS+=" -mtune=cortex-a9 -mfpu=vfpv3-d16"
586 [ CFLAGS="$SAVE_CFLAGS -Wa,-march=armv6 -mtune=cortex-a8 -mthumb-interwork"
587 CXXFLAGS="$CXXFLAGS -Wa,-march=armv6 -mtune=cortex-a8 -mthumb-interwork"
590 # Compile for ARMv7a architecture, CortexA8 cpu and NEON coprocessor
591 CFLAGS+=" -Wa,-march=armv7a -mcpu=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad"
592 CXXFLAGS+=" -Wa,-march=armv7a -mcpu=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad"
593 FFMPEG_EXTRACFLAGS+=" -mfpu=neon"
597 # Checks for library functions.
600 AC_FUNC_CLOSEDIR_VOID
601 AC_FUNC_ERROR_AT_LINE
603 AC_PROG_GCC_TRADITIONAL
605 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
609 # Boxee is apparently having compile problems
610 # if HAVE_REALLOC is defined. Sort this later.
612 AC_FUNC_SELECT_ARGTYPES
613 AC_FUNC_SETVBUF_REVERSED
621 AC_CHECK_FUNCS([atexit dup2 fdatasync floor fs_stat_dev ftime ftruncate getcwd gethostbyaddr gethostbyname gethostname getpagesize getpass gettimeofday inet_ntoa lchown localeconv memchr memmove memset mkdir modf munmap pow rmdir select setenv setlocale socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strpbrk strrchr strspn strstr strtol strtoul sysinfo tzset utime])
623 # Check for various sizes
624 AC_CHECK_SIZEOF([int])
625 AC_CHECK_SIZEOF([size_t])
627 # Add top source directory for all builds so we can use config.h
628 INCLUDES="$INCLUDES -I\$(abs_top_srcdir)"
630 # Check inotify availability
631 AC_CHECK_HEADER([sys/inotify.h], AC_DEFINE([HAVE_INOTIFY],[1],[Define if we have inotify]),)
633 # Checks for boost headers using CXX instead of CC
635 AC_CHECK_HEADER([boost/shared_ptr.hpp],, AC_MSG_ERROR($missing_library))
638 # Checks for platforms libraries.
639 if test "$use_gles" = "yes"; then
641 # GLES overwrites GL if both set to yes.
642 if test "$host_vendor" = "apple" ; then
643 AC_DEFINE([HAVE_LIBEGL],[1],["Define to 1 if you have the `EGL' library (-lEGL)."])
644 AC_DEFINE([HAVE_LIBGLESV2],[1],["Define to 1 if you have the `GLESv2' library (-lGLESv2)."])
645 AC_MSG_RESULT(== WARNING: OpenGLES support is assumed.)
647 AC_CHECK_LIB([EGL], [main],, AC_MSG_ERROR($missing_library))
648 AC_CHECK_LIB([GLESv2],[main],, AC_MSG_ERROR($missing_library))
651 if test "$use_gl" = "yes"; then
652 if test "$host_vendor" = "apple" ; then
653 # linking to OpenGL.framework instead of libGL, libGLU so AC_CHECK_LIB will fail
654 LIBS="$LIBS -framework OpenGL"
655 AC_DEFINE([HAVE_LIBGL],[1],["Define to 1 if you have the `GL' library (-lGL)."])
656 AC_MSG_RESULT(== WARNING: OpenGL support is assumed.)
657 AC_DEFINE([HAVE_LIBGLU],[1],["Define to 1 if you have the `GLU' library (-lGLU)."])
658 AC_MSG_RESULT(== WARNING: OpenGLU support is assumed.)
659 AC_CHECK_LIB([GLEW],[main],, AC_MSG_ERROR($missing_library))
661 AC_CHECK_LIB([GL], [main],, AC_MSG_ERROR($missing_library))
662 AC_CHECK_LIB([GLEW],[main],, AC_MSG_ERROR($missing_library))
663 AC_CHECK_LIB([GLU], [main],, AC_MSG_ERROR($missing_library))
666 AC_MSG_RESULT(== WARNING: OpenGL support is disabled. XBMC will run VERY slow. ==)
667 AC_CHECK_LIB([SDL_gfx],[main])
671 # platform common libraries
672 AC_CHECK_PROG(MYSQL_CONFIG, mysql_config, "yes", "no")
673 if test $MYSQL_CONFIG = "yes"; then
674 INCLUDES="$INCLUDES `mysql_config --include`"
675 MYSQL_LIBS=`mysql_config --libs`
676 LIBS="$LIBS $MYSQL_LIBS"
679 AC_MSG_ERROR($missing_program)
681 AC_CHECK_HEADER([ass/ass.h],, AC_MSG_ERROR($missing_library))
682 AC_CHECK_HEADER([mpeg2dec/mpeg2.h],, AC_MSG_ERROR($missing_library))
683 AC_CHECK_HEADER([mpeg2dec/mpeg2convert.h],, AC_MSG_ERROR($missing_library),
684 AC_INCLUDES_DEFAULT()
685 [#include <mpeg2dec/mpeg2.h>])
686 AC_CHECK_HEADER([mad.h],, AC_MSG_ERROR($missing_library))
687 AC_CHECK_HEADER([jpeglib.h],, AC_MSG_ERROR($missing_library))
688 AC_CHECK_HEADER([samplerate.h],, AC_MSG_ERROR($missing_library))
689 AC_CHECK_HEADER([ogg/ogg.h],, AC_MSG_ERROR($missing_library))
690 AC_CHECK_HEADER([vorbis/vorbisfile.h],, AC_MSG_ERROR($missing_library))
691 AC_CHECK_HEADER([vorbis/vorbisenc.h],, AC_MSG_ERROR($missing_library))
692 AC_CHECK_HEADER([libmodplug/modplug.h],, AC_MSG_ERROR($missing_library))
693 AC_CHECK_HEADER([curl/curl.h],, AC_MSG_ERROR($missing_library))
694 AC_CHECK_HEADER([FLAC/stream_decoder.h],, AC_MSG_ERROR($missing_library))
695 AC_CHECK_LIB([bz2], [main],, AC_MSG_ERROR($missing_library))
696 AC_CHECK_LIB([jpeg], [main],, AC_MSG_ERROR($missing_library)) # check for cximage
697 AC_CHECK_LIB([tiff], [main],, AC_MSG_ERROR($missing_library))
698 AC_CHECK_LIB([pthread], [main],, AC_MSG_ERROR($missing_library))
699 AC_CHECK_LIB([lzo2], [main],, AC_MSG_ERROR($missing_library))
700 AC_CHECK_LIB([z], [main],, AC_MSG_ERROR($missing_library))
701 AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR($missing_library))
702 AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR($missing_library))
703 AC_CHECK_LIB([mysqlclient], [main],, AC_MSG_ERROR($missing_library))
704 AC_CHECK_LIB([ssh], [sftp_tell64],, AC_MSG_RESULT([Could not find suitable version of libssh]))
705 AC_CHECK_LIB([bluetooth], [hci_devid],, AC_MSG_RESULT([Could not find suitable version of libbluetooth]))
706 AC_CHECK_LIB([yajl], [main],, AC_MSG_ERROR($missing_library))
708 PKG_CHECK_MODULES([FONTCONFIG], [fontconfig],
709 [INCLUDES="$INCLUDES $FONTCONFIG_CFLAGS"; LIBS="$LIBS $FONTCONFIG_LIBS"],
710 AC_MSG_ERROR($missing_library))
711 PKG_CHECK_MODULES([FRIBIDI], [fribidi],
712 [INCLUDES="$INCLUDES $FRIBIDI_CFLAGS"; LIBS="$LIBS $FRIBIDI_LIBS"],
713 AC_MSG_ERROR($missing_library))
714 PKG_CHECK_MODULES([SQLITE3], [sqlite3],
715 [INCLUDES="$INCLUDES $SQLITE3_CFLAGS"; LIBS="$LIBS $SQLITE3_LIBS"],
716 AC_MSG_ERROR($missing_library))
717 PKG_CHECK_MODULES([PNG], [libpng],
718 [INCLUDES="$INCLUDES $PNG_CFLAGS"; LIBS="$LIBS $PNG_LIBS"],
719 AC_MSG_ERROR($missing_library))
720 PKG_CHECK_MODULES([PCRE], [libpcre],
721 [INCLUDES="$INCLUDES $PCRE_CFLAGS"; LIBS="$LIBS $PCRE_LIBS"]; \
722 AC_DEFINE([HAVE_LIBPCRE],[1],["Define to 1 if libpcre is installed"]),
723 AC_MSG_ERROR($missing_library))
724 PKG_CHECK_MODULES([PCRECPP], [libpcrecpp],
725 [INCLUDES="$INCLUDES $PCRECPP_CFLAGS"; LIBS="$LIBS $PCRECPP_LIBS"]; \
726 AC_DEFINE([HAVE_LIBPCRECPP],[1],["Define to 1 if libpcrecpp is installed"]),
727 AC_MSG_ERROR($missing_library))
728 PKG_CHECK_MODULES([CDIO], [libcdio],
729 [INCLUDES="$INCLUDES $CDIO_CFLAGS"; LIBS="$LIBS $CDIO_LIBS"],
730 AC_MSG_ERROR($missing_library))
731 PKG_CHECK_MODULES([SAMPLERATE], [samplerate],
732 [INCLUDES="$INCLUDES $SAMPLERATE_CFLAGS"; LIBS="$LIBS $SAMPLERATE_LIBS"],
733 AC_MSG_ERROR($missing_library))
734 PKG_CHECK_MODULES([FREETYPE2], [freetype2],
735 [INCLUDES="$INCLUDES $FREETYPE2_CFLAGS"; LIBS="$LIBS $FREETYPE2_LIBS"],
736 AC_MSG_ERROR($missing_library))
738 # check for libbluray
739 AS_CASE([x$use_libbluray],
741 PKG_CHECK_MODULES([LIBBLURAY],[libbluray],[use_libbluray="yes"], AC_MSG_ERROR($missing_library))
744 PKG_CHECK_MODULES([LIBBLURAY],[libbluray],[use_libbluray="yes"], [use_libbluray="no"])
747 AS_CASE([x$use_libbluray],
749 INCLUDES="$INCLUDES $LIBBLURAY_CFLAGS";
750 XB_FIND_SONAME([BLURAY], [bluray], [use_libbluray])
751 AC_DEFINE([HAVE_LIBBLURAY], 1, [System has libbluray library])
752 AC_SUBST([HAVE_LIBBLURAY], 1)
758 , AC_MSG_CHECKING([libbluray version])
761 [#include <libbluray/bluray.h>]
762 ,[bd_get_playlist_info(0, 0)])
763 ,[AC_MSG_RESULT(version has old angle api)
764 AC_DEFINE([HAVE_LIBBLURAY_NOANGLE],[],[System has an old api libbluray without angle support])]
765 ,[AC_MSG_RESULT(normal)]
768 AC_MSG_CHECKING([for libbluray log control])
771 [#include <libbluray/bluray.h>
772 #include <libbluray/log_control.h>]
773 ,[bd_set_debug_mask(0)])
776 AC_DEFINE([HAVE_LIBBLURAY_NOLOGCONTROL],[],[System has an old api libbluray without log support])]
780 # AC_DEFINE([HAVE_LIBBLURAY], 0, [System has libbluray library])
781 AC_SUBST([HAVE_LIBBLURAY], 0)
785 # platform dependent libraries
786 if test "$host_vendor" = "apple" ; then
787 AC_CHECK_LIB([iconv], [main],, AC_MSG_ERROR($missing_library))
788 if test "$use_arch" != "arm"; then
789 AC_CHECK_LIB([SDL_mixer],[main],, AC_MSG_ERROR($missing_library))
790 AC_CHECK_LIB([SDL], [main],, AC_MSG_ERROR($missing_library))
791 AC_DEFINE([HAVE_SDL],[1],["Define to 1 if using sdl"])
794 AC_CHECK_LIB([dl], [main],, AC_MSG_ERROR($missing_library))
795 AC_CHECK_LIB([resolv], [main],, AC_MSG_ERROR($missing_library))
796 AC_CHECK_LIB([jasper], [main],, AC_MSG_ERROR($missing_library)) # check for cximage
797 AC_CHECK_LIB([rt], [clock_gettime],, AC_MSG_ERROR($missing_library))
799 PKG_CHECK_MODULES([ALSA], [alsa],
800 [INCLUDES="$INCLUDES $ALSA_CFLAGS"; LIBS="$LIBS $ALSA_LIBS"; use_alsa=yes],
801 AC_MSG_NOTICE($alsa_not_found); use_alsa=no)
802 PKG_CHECK_MODULES([DBUS], [dbus-1],
803 [INCLUDES="$INCLUDES $DBUS_CFLAGS"; LIBS="$LIBS $DBUS_LIBS"; use_dbus=yes]; \
804 AC_DEFINE([HAVE_DBUS],[1],["Define to 1 if dbus is installed"]),
805 AC_MSG_NOTICE($missing_library); use_dbus=no)
807 if test "x$use_sdl" != "xno"; then
808 PKG_CHECK_MODULES([SDL], [sdl],
809 [INCLUDES="$INCLUDES $SDL_CFLAGS"; LIBS="$LIBS $SDL_LIBS"],
810 AC_MSG_ERROR($missing_library))
811 AC_CHECK_LIB([SDL_mixer], [main],, AC_MSG_ERROR($missing_library))
812 AC_CHECK_LIB([SDL_image], [main],, AC_MSG_ERROR($missing_library))
813 AC_DEFINE([HAVE_SDL],[1],["Define to 1 if using sdl"])
817 XB_FIND_SONAME([MAD], [mad])
818 XB_FIND_SONAME([OGG], [ogg])
819 XB_FIND_SONAME([CURL], [curl])
820 XB_FIND_SONAME([FLAC], [FLAC])
821 XB_FIND_SONAME([VORBIS], [vorbis])
822 XB_FIND_SONAME([VORBISENC], [vorbisenc])
823 XB_FIND_SONAME([VORBISFILE], [vorbisfile])
824 XB_FIND_SONAME([MODPLUG], [modplug])
825 XB_FIND_SONAME([ASS], [ass])
826 XB_FIND_SONAME([MPEG2], [mpeg2])
829 if test "$use_webserver" = "yes"; then
830 AC_CHECK_LIB([microhttpd], [main],, AC_MSG_ERROR($missing_library))
834 if test "$use_optical_drive" = "yes"; then
835 AC_DEFINE([HAS_DVD_DRIVE], [1], [Define to 1 to have optical drive support])
839 if test "x$use_pulse" != "xno"; then
840 if test "$host_vendor" = "apple" ; then
841 if test "x$use_pulse" = "xyes"; then
842 AC_MSG_ERROR($pulse_disabled)
845 AC_MSG_RESULT($pulse_disabled)
849 AC_CHECK_LIB([pulse], [main],,
850 [if test "x$use_pulse" = "xyes"; then
851 AC_MSG_ERROR($pulse_not_found)
855 AC_MSG_RESULT($pulse_not_found)
860 AC_MSG_RESULT($pulse_disabled)
865 if test "$host_vendor" = "apple" ; then
867 AC_MSG_RESULT($hal_disabled)
869 if test "$use_hal" = "yes"; then
870 PKG_CHECK_MODULES([HAL], [hal],
871 [INCLUDES="$INCLUDES $HAL_CFLAGS"; LIBS="$LIBS $HAL_LIBS"],
872 use_hal=no;AC_MSG_RESULT($hal_not_found))
873 PKG_CHECK_MODULES([HAL_STORAGE], [hal-storage],
874 [INCLUDES="$INCLUDES $HAL_STORAGE_CFLAGS"; LIBS="$LIBS $HAL_STORAGE_LIBS"],
875 use_hal=no;AC_MSG_RESULT($halstorage_not_found))
877 AC_MSG_RESULT($hal_disabled)
879 if test "$use_hal" = "yes"; then
880 AC_DEFINE([HAS_HAL], [1], [Define to 1 if you have HAL installed])
885 if test "$host_vendor" = "apple" ; then
887 AC_MSG_RESULT($avahi_disabled)
889 if test "$use_avahi" = "yes"; then
890 AC_CHECK_LIB([avahi-common], [main],,
891 use_avahi=no;AC_MSG_RESULT($avahi_not_found))
892 if test "$use_avahi" = "yes"; then
893 #either both libs or none
894 AC_CHECK_LIB([avahi-client], [main],,
895 use_avahi=no;AC_MSG_RESULT($avahi_not_found))
898 AC_MSG_RESULT($avahi_disabled)
903 if test "$use_x11" = "yes" && test "$host_vendor" != "apple"; then
904 AC_MSG_NOTICE($x11_enabled)
905 PKG_CHECK_MODULES([X11], [x11],
906 [INCLUDES="$INCLUDES $X11_CFLAGS"; LIBS="$LIBS $X11_LIBS"],
907 AC_MSG_ERROR($missing_library))
908 PKG_CHECK_MODULES([XEXT], [xext],
909 [INCLUDES="$INCLUDES $XEXT_CFLAGS"; LIBS="$LIBS $XEXT_LIBS"],
910 AC_MSG_ERROR($missing_library))
911 AC_DEFINE([HAVE_X11], [1], [Define to 1 if you have X11 libs installed.])
913 AC_MSG_RESULT($x11_disabled)
917 if test "$host_vendor" = "apple" || test "$use_x11" = "no"; then
919 AC_MSG_RESULT($xrandr_disabled)
921 if test "$use_xrandr" = "yes" ; then
922 AC_CHECK_LIB([Xrandr], [main],,
923 use_xrandr="no";AC_MSG_RESULT($xrandr_not_found))
925 AC_MSG_RESULT($xrandr_disabled)
930 if test "$host_vendor" = "apple" ; then
931 AC_MSG_NOTICE($goom_disabled)
934 if test "$use_goom" = "yes" && test "$use_gl" = "yes"; then
935 AC_MSG_NOTICE($goom_enabled)
938 AC_MSG_NOTICE($goom_disabled)
944 if test "$use_rsxs" = "no" || test "$use_gl" = "no"; then
945 AC_MSG_NOTICE($rsxs_disabled)
948 AC_MSG_NOTICE($rsxs_enabled)
950 # darwin osx can do rsxs but does not use x11, so do not pkg-config check for them
951 if test "$host_vendor" != "apple" ; then
952 PKG_CHECK_MODULES([XT], [xt],
953 [INCLUDES="$INCLUDES $XT_CFLAGS"; LIBS="$LIBS $XT_LIBS"],
954 AC_MSG_ERROR($missing_library))
955 PKG_CHECK_MODULES([XMU], [xmu],
956 [INCLUDES="$INCLUDES $XMU_CFLAGS"; LIBS="$LIBS $XMU_LIBS"],
957 AC_MSG_ERROR($missing_library))
962 if test "$use_projectm" = "no" || test "$use_gl" = "no"; then
963 AC_MSG_NOTICE($projectm_disabled)
966 AC_MSG_NOTICE($projectm_enabled)
971 if test "$use_librtmp" != "no"; then
972 AC_CHECK_HEADERS([librtmp/log.h librtmp/amf.h librtmp/rtmp.h],,
973 [if test "$use_librtmp" = "yes"; then
974 AC_MSG_ERROR($librtmp_not_found)
975 elif test "$use_librtmp" != "no"; then
976 AC_MSG_NOTICE($librtmp_not_found)
980 if test "$use_librtmp" != "no"; then
981 XB_FIND_SONAME([RTMP], [rtmp], [use_librtmp])
983 if test "$use_librtmp" != "no"; then
984 AC_DEFINE([HAS_LIBRTMP], [1], [Whether to use libRTMP library.])
987 AC_MSG_NOTICE($librtmp_disabled)
991 if test "x$use_samba" != "xno"; then
992 AC_CHECK_LIB([smbclient], [main],,
993 use_samba=no;AC_MSG_ERROR($missing_library))
996 AC_MSG_RESULT($samba_disabled)
1000 if test "x$use_samba" != "xno"; then
1001 AC_DEFINE([HAVE_LIBSMBCLIENT], [1], [Define to 1 if you have Samba installed])
1006 if test "$use_libnfs" != "no"; then
1007 AC_CHECK_HEADERS([nfsc/libnfs.h],,
1008 [if test "$use_libnfs" = "yes"; then
1009 AC_MSG_ERROR($libnfs_not_found)
1011 elif test "$use_libnfs" != "no"; then
1012 AC_MSG_NOTICE($libnfs_not_found)
1017 if test "$use_libnfs" != "no"; then
1018 XB_FIND_SONAME([NFS], [nfs], [use_libnfs])
1020 if test "$use_libnfs" != "no"; then
1021 AC_DEFINE([HAVE_LIBNFS], [1], [Whether to use libnfs library.])
1026 AC_MSG_NOTICE($libnfs_disabled)
1031 if test "x$use_libafpclient" != "xno"; then
1032 AC_CHECK_HEADERS([afpfs-ng/libafpclient.h],,
1033 [if test "x$use_libafpclient" = "xyes"; then
1034 AC_MSG_ERROR($libafpclient_not_found)
1035 elif test "x$use_libafpclient" != "xno"; then
1036 AC_MSG_NOTICE($libafpclient_not_found)
1037 use_libafpclient="no"
1040 if test "x$use_libafpclient" != "xno"; then
1041 XB_FIND_SONAME([AFPCLIENT], [afpclient], [use_libafpclient])
1042 AC_DEFINE([HAVE_LIBAFPCLIENT], [1], [Whether to use libafpclient library.])
1046 AC_MSG_NOTICE($libafpclient_disabled)
1049 # libplist for airplay feature
1051 if test "$use_airplay" != "no"; then
1052 AC_CHECK_LIB([plist],[main],,
1053 [if test "$use_airplay" = "yes"; then
1054 AC_MSG_ERROR($libplist_not_found)
1055 elif test "$use_airplay" != "no"; then
1056 AC_MSG_NOTICE($libplist_not_found)
1061 if test "$use_airplay" != "no"; then
1062 XB_FIND_SONAME([PLIST], [plist], [use_airplay])
1067 # libshairport for AirTunes
1069 if test "x$use_airtunes" != "xno"; then
1070 AC_CHECK_LIB([shairport], [shairport_set_ao],,
1071 [if test "x$use_airtunes" = "xyes"; then
1072 AC_MSG_ERROR($libshairport_not_found)
1073 elif test "x$use_airtunes" != "xno"; then
1074 AC_MSG_NOTICE($libshairport_not_found)
1079 if test "x$use_airtunes" != "xno"; then
1080 XB_FIND_SONAME([SHAIRPORT], [shairport], [use_airtunes])
1087 if test "$host_vendor" = "apple" ; then
1089 AC_MSG_NOTICE($libudev_disabled)
1091 if test "$use_libudev" = "auto"; then
1092 PKG_CHECK_MODULES([UDEV], [libudev],
1093 use_libudev="yes"; use_libusb="no"; USE_LIBUDEV=1; [INCLUDES="$INCLUDES $UDEV_CFLAGS"; LIBS="$LIBS $UDEV_LIBS"]; \
1094 AC_DEFINE([HAVE_LIBUDEV],[1],["Define to 1 if libudev is installed"]),
1095 AC_MSG_RESULT($libudev_not_found))
1096 elif test "$use_libudev" = "yes" ; then
1097 PKG_CHECK_MODULES([UDEV], [libudev],
1098 use_libudev="yes"; use_libusb="no"; USE_LIBUDEV=1; [INCLUDES="$INCLUDES $UDEV_CFLAGS"; LIBS="$LIBS $UDEV_LIBS"]; \
1099 AC_DEFINE([HAVE_LIBUDEV],[1],["Define to 1 if libudev is installed"]),
1100 AC_MSG_ERROR($libudev_not_found))
1102 AC_MSG_NOTICE($libudev_disabled)
1108 if test "$use_libudev" != "yes"; then
1109 if test "$host_vendor" = "apple" ; then
1111 AC_MSG_NOTICE($libusb_disabled)
1113 if test "$use_libusb" = "auto"; then
1114 PKG_CHECK_MODULES([USB], [libusb],
1115 use_libusb="yes"; USE_LIBUSB=1; [INCLUDES="$INCLUDES $USB_CFLAGS"; LIBS="$LIBS $USB_LIBS"; USE_LIBUSB=1]; \
1116 AC_DEFINE([HAVE_LIBUSB],[1],["Define to 1 if libusb is installed"]),
1117 use_libusb="no"; AC_MSG_RESULT($libusb_not_found))
1118 elif test "$use_libusb" = "yes"; then
1119 PKG_CHECK_MODULES([USB], [libusb],
1120 use_libusb="yes"; USE_LIBUSB=1; [INCLUDES="$INCLUDES $USB_CFLAGS"; LIBS="$LIBS $USB_LIBS"; USE_LIBUSB=1]; \
1121 AC_DEFINE([HAVE_LIBUSB],[1],["Define to 1 if libusb is installed"]),
1122 use_libusb="no"; AC_MSG_ERROR($libusb_not_found))
1124 AC_MSG_NOTICE($libusb_disabled)
1133 if test "$use_libcec" = "yes"; then
1134 USE_LIBCEC=1; AC_DEFINE([HAVE_LIBCEC],[1],["Define to 1 if libCEC is installed"])
1135 AC_MSG_NOTICE($libcec_enabled)
1138 AC_MSG_NOTICE($libcec_disabled)
1141 ### External libraries checks
1144 USE_EXTERNAL_LIBCEC=0
1145 if test "$use_external_libcec" = "yes"; then
1146 USE_EXTERNAL_LIBCEC=1; PKG_CHECK_MODULES([CEC], [libcec],
1147 [INCLUDES="$INCLUDES $CEC_CFLAGS"; LIBS="$LIBS $CEC_LIBS"],
1148 AC_MSG_ERROR($libcec_external_missing))
1149 elif test "$use_libcec" = "yes"; then
1150 [INCLUDES="$INCLUDES -I\$(abs_top_srcdir)/lib/libcec/include"]
1151 AC_MSG_NOTICE($libcec_internal)
1155 if test "$use_external_ffmpeg" = "yes"; then
1156 FFMPEG_LIBNAMES="libavcodec libavfilter libavformat libavutil libpostproc libswscale"
1158 # libavcore is optional
1159 PKG_CHECK_EXISTS([libavcore], FFMPEG_LIBNAMES="$FFMPEG_LIBNAMES libavcore")
1161 PKG_CHECK_MODULES([FFMPEG], [$FFMPEG_LIBNAMES],
1162 [INCLUDES="$INCLUDES $FFMPEG_CFLAGS"; LIBS="$LIBS $FFMPEG_LIBS"],
1163 AC_MSG_ERROR($missing_library))
1165 # Determine whether AVPacket and relevant functions are defined in libavformat
1167 AC_CHECK_LIB([avcodec], [av_free_packet],
1168 [AC_MSG_NOTICE(== AVPacket and relevant functions defined in libavcodec. ==)],
1169 [AC_MSG_NOTICE(== AVPacket and relevant functions defined in libavformat. ==)
1170 AC_DEFINE([AVPACKET_IN_AVFORMAT], [1], [Whether AVPacket is in libavformat.])])
1172 # in case the headers are in a custom directory
1173 SAVE_CPPFLAGS="$CPPFLAGS"
1174 CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS"
1176 # Possible places the ffmpeg headers may be
1177 AC_CHECK_HEADERS([libavcodec/avcodec.h libavfilter/avfilter.h libavformat/avformat.h libavutil/avutil.h libpostproc/postprocess.h libswscale/swscale.h],,
1178 [AC_CHECK_HEADERS([ffmpeg/avcodec.h ffmpeg/avfilter.h ffmpeg/avformat.h ffmpeg/avutil.h postproc/postprocess.h ffmpeg/swscale.h],,
1179 [AC_MSG_ERROR($missing_headers)])])
1182 AC_CHECK_HEADERS([libavcore/avcore.h libavcore/samplefmt.h libavutil/mem.h libavutil/samplefmt.h])
1184 # old FFmpeg have this in libavcodec/opt.h instead:
1185 AC_CHECK_HEADERS([libavutil/opt.h])
1187 # We'll support the use of rgb2rgb.h if it exists.
1188 AC_CHECK_HEADERS([libswscale/rgb2rgb.h],,)
1189 AC_CHECK_HEADERS([ffmpeg/rgb2rgb.h],,)
1191 # Check if AVFilterBufferRefVideoProps AVRational member is named
1192 # 'pixel_aspect' or 'sample_aspect_ratio'.
1193 AC_CHECK_MEMBER([AVFilterBufferRefVideoProps.sample_aspect_ratio],
1194 [AC_DEFINE([HAVE_AVFILTERBUFFERREFVIDEOPROPS_SAMPLE_ASPECT_RATIO],
1196 [Define to 1 if AVFilterBufferRefVideoProps has member sample_aspect_ratio.])],
1197 [AC_CHECK_MEMBER([AVFilterBufferRefVideoProps.sample_aspect_ratio],
1198 [AC_DEFINE([HAVE_AVFILTERBUFFERREFVIDEOPROPS_SAMPLE_ASPECT_RATIO],
1200 [Define to 1 if AVFilterBufferRefVideoProps has member sample_aspect_ratio.])],
1202 [[#include <ffmpeg/avfilter.h>]])],
1203 [[#include <libavfilter/avfilter.h>]])
1205 AC_MSG_NOTICE($external_ffmpeg_enabled)
1206 USE_EXTERNAL_FFMPEG=1
1207 AC_DEFINE([USE_EXTERNAL_FFMPEG], [1], [Whether to use external FFmpeg libraries.])
1209 # Disable vdpau support if external libavcodec doesn't have it
1210 AC_CHECK_LIB([avcodec], [ff_vdpau_vc1_decode_picture],,
1211 [if test "x$use_vdpau" = "xyes"; then
1212 AC_MSG_ERROR($ffmpeg_vdpau_not_supported)
1215 AC_MSG_RESULT($ffmpeg_vdpau_not_supported)
1218 # Check for 'PIX_FMT_VDPAU_MPEG4' from libavutil
1219 if test "x$use_vdpau" != "xno"; then
1222 [AC_LANG_SOURCE([ #include <libavutil/pixfmt.h>
1223 int main() { PixelFormat format = PIX_FMT_VDPAU_MPEG4; }])],
1224 [AC_DEFINE([PIX_FMT_VDPAU_MPEG4_IN_AVUTIL], [1],
1225 [Whether AVUtil defines PIX_FMT_VDPAU_MPEG4.])],)
1228 CPPFLAGS="$SAVE_CPPFLAGS"
1230 AC_MSG_NOTICE($external_ffmpeg_disabled)
1231 USE_EXTERNAL_FFMPEG=0
1232 AC_DEFINE([PIX_FMT_VDPAU_MPEG4_IN_AVUTIL], [1], [Whether AVUtil defines PIX_FMT_VDPAU_MPEG4.])
1236 if test -z "$PYTHON_NOVERSIONCHECK"; then
1237 AX_PYTHON_DEVEL([>= 2.4])
1238 PYTHON_VERSION=$ac_python_version
1241 if test -z "$PYTHON_VERSION"; then
1242 AC_MSG_ERROR([Can't find a Python version.])
1244 AC_MSG_NOTICE([Using Python $PYTHON_VERSION])
1248 if test "x$use_vdpau" != "xno"; then
1249 if test "$host_vendor" = "apple" ; then
1250 if test "x$use_vdpau" = "xyes"; then
1251 AC_MSG_ERROR([VDPAU not supported on this platform])
1254 AC_MSG_NOTICE($vdpau_disabled)
1259 AC_CHECK_HEADER([vdpau/vdpau.h],AC_DEFINE([HAVE_LIBVDPAU], [],
1260 [Define to 1 if you have the 'vdpau' library (-lvdpau).]),
1261 [if test "x$use_vdpau" = "xyes"; then
1263 AC_MSG_ERROR([$vdpau_not_found])
1267 AC_MSG_RESULT($vdpau_not_found)
1272 AC_MSG_NOTICE($vdpau_disabled)
1276 if test "x$use_vaapi" != "xno"; then
1277 if test "$host_vendor" = "apple" ; then
1278 if test "x$use_vaapi" = "xyes"; then
1279 AC_MSG_ERROR([VAAPI not supported on this platform])
1282 AC_MSG_NOTICE($vaapi_disabled)
1286 initial_val=$use_vaapi
1287 AC_CHECK_LIB([va], main, :, use_vaapi=no)
1288 if test "x$use_vaapi" != "xno"; then
1289 AC_CHECK_LIB([va-glx], main, LIBS="-lva -lva-glx $LIBS", use_vaapi=no, -lva)
1292 if test "x$use_vaapi" = "xno"; then
1293 if test "x$initial_val" = "xyes"; then
1294 AC_MSG_ERROR($vaapi_not_found)
1296 AC_MSG_RESULT($vaapi_not_found)
1300 AC_DEFINE([HAVE_LIBVA], [1], [Define to 1 if you have the 'vaapi' libraries (-lva AND -lva-glx)])
1305 AC_MSG_NOTICE($vaapi_disabled)
1310 if test "x$use_crystalhd" != "xno"; then
1311 SAVE_CFLAGS="$CFLAGS"
1312 CFLAGS="-D__LINUX_USER__"
1313 AC_CHECK_HEADER([libcrystalhd/libcrystalhd_if.h], [],
1314 [ if test "x$use_crystalhd" = "xyes"; then
1315 AC_MSG_ERROR($crystalhd_not_found)
1318 AC_MSG_RESULT($crystalhd_not_found)
1322 CFLAGS="$SAVE_CFLAGS"
1323 if test "$host_vendor" != "apple"; then
1324 XB_FIND_SONAME([CRYSTALHD], [crystalhd], [use_crystalhd])
1326 if test "x$use_crystalhd" != "xno"; then
1327 SAVE_CFLAGS="$CFLAGS"
1328 CFLAGS="-D__LINUX_USER__ -llibcrystalhd"
1329 # check for new crystalhd lib
1331 [AC_LANG_SOURCE([#include <libcrystalhd/bc_dts_types.h>
1332 #include <libcrystalhd/bc_dts_defs.h>
1333 PBC_INFO_CRYSTAL bCrystalInfo;])],
1334 [ AC_DEFINE([HAVE_LIBCRYSTALHD], [2], [Define to 2 if you have the 'New Broadcom Crystal HD' library.]) ],
1335 [ AC_DEFINE([HAVE_LIBCRYSTALHD], [1], [Define to 1 if you have the 'Old Broadcom Crystal HD' library.]) ])
1336 CFLAGS="$SAVE_CFLAGS"
1340 AC_MSG_NOTICE($crystalhd_disabled)
1345 if test "x$use_vdadecoder" != "xno"; then
1346 if test "$host_vendor" = "apple" ; then
1347 HAVE_LIBVDADECODER=1
1348 AC_DEFINE([HAVE_LIBVDADECODER], [1], [Define to 1 if you have the 'VDADecoder' library.])
1349 AC_MSG_NOTICE($vdadecoder_enabled)
1352 if test "x$use_vdadecoder" = "xyes"; then
1353 AC_MSG_ERROR([VDA Decoder not supported on this platform])
1356 AC_MSG_NOTICE($vdadecoder_disabled)
1361 AC_MSG_NOTICE($vdadecoder_disabled)
1365 if test "x$use_vtbdecoder" != "xno"; then
1366 if test "$host_vendor" = "apple" ; then
1367 HAVE_VIDEOTOOLBOXDECODER=1
1368 AC_DEFINE([HAVE_VIDEOTOOLBOXDECODER], [1], [Define to 1 if you have the 'VTBDecoder' library.])
1369 AC_MSG_NOTICE($vtbdecoder_enabled)
1371 if test "x$use_vtbdecoder" = "xyes"; then
1372 AC_MSG_ERROR([VTB Decoder not supported on this platform])
1375 AC_MSG_NOTICE($vtbdecoder_disabled)
1379 AC_MSG_NOTICE($vtbdecoder_disabled)
1383 if test "$host_vendor" = "apple" ; then
1386 AC_MSG_NOTICE($openmax_disabled)
1388 if test "$use_gles" = "yes" && test "$use_openmax" = "auto"; then
1389 PKG_CHECK_MODULES([OPENMAX], [libomxil-bellagio],
1390 USE_OPENMAX=1;[INCLUDES="$INCLUDES $OPENMAX_CFLAGS"; LIBS="$LIBS $OPENMAX_LIBS"],
1391 use_openmax=no;USE_OPENMAX=0;AC_MSG_RESULT($openmax_not_found))
1392 elif test "$use_gles" = "yes" && test "$use_openmax" = "yes"; then
1393 PKG_CHECK_MODULES([OPENMAX], [libomxil-bellagio],
1394 USE_OPENMAX=1;[INCLUDES="$INCLUDES $OPENMAX_CFLAGS"; LIBS="$LIBS $OPENMAX_LIBS"],
1395 AC_MSG_ERROR($openmax_not_found))
1397 AC_MSG_NOTICE($openmax_disabled)
1403 # yajl version check (yajl_version.h was added in yajl 2.0)
1404 AC_CHECK_HEADERS([yajl/yajl_version.h], [], [
1405 AC_DEFINE(YAJL_MAJOR, 1, [yajl version 1])
1408 # platform specific bin utilities
1409 if test "$host_vendor" != "apple" ; then
1410 AC_CHECK_PROG(HAVE_GAWK,gawk,"yes","no",)
1411 if test "$HAVE_GAWK" = "no" ; then
1412 AC_MSG_ERROR($missing_program)
1416 if test "$use_arch" != "arm" ; then
1417 AC_CHECK_PROG(HAVE_CMAKE,cmake,"yes","no",)
1418 if test "$HAVE_CMAKE" = "no" ; then
1419 AC_MSG_ERROR($missing_program)
1423 AC_CHECK_PROG(HAVE_GPERF,gperf,"yes","no",)
1424 if test "$HAVE_GPERF" = "no" ; then
1425 AC_MSG_ERROR($missing_program)
1428 AC_CHECK_PROG(HAVE_UNZIP,unzip,"yes","no",)
1429 if test "$HAVE_UNZIP" = "no" ; then
1430 AC_MSG_ERROR($missing_program)
1433 AC_CHECK_PROG(HAVE_ZIP,zip,"yes","no",)
1434 if test "$HAVE_ZIP" = "no" ; then
1435 AC_MSG_ERROR($missing_program)
1438 if test "$ARCH" = "i486-linux" || test "$ARCH" = "x86-freebsd"; then
1439 AC_CHECK_PROG(HAVE_NASM,nasm,"yes","no",)
1440 if test "$HAVE_NASM" = "no" ; then
1441 AC_MSG_ERROR($missing_program)
1445 AC_CHECK_PROG(HAVE_GIT,git,"yes","no",)
1447 # Checks for header files.
1451 AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h inttypes.h limits.h locale.h \
1452 malloc.h memory.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h \
1453 strings.h sys/file.h sys/ioctl.h sys/mount.h sys/param.h sys/socket.h \
1454 sys/time.h sys/timeb.h sys/vfs.h termios.h unistd.h utime.h wchar.h wctype.h])
1455 AC_CHECK_HEADERS([cdio/iso9660.h],,AC_MSG_ERROR([$missing_headers]))
1457 # Checks for typedefs, structures, and compiler characteristics.
1473 AC_CHECK_MEMBERS([struct stat.st_rdev])
1482 if test "$cross_compiling" = "yes"; then
1483 final_message="$final_message\n Crosscomp.:\tYes"
1485 final_message="$final_message\n Crosscomp.:\tNo"
1488 final_message="$final_message\n target ARCH:\t$use_arch"
1489 final_message="$final_message\n target CPU:\t$use_cpu"
1491 if test "$use_gles" = "yes"; then
1492 final_message="$final_message\n OpenGLES:\tYes"
1497 if test "$use_gl" = "yes"; then
1498 final_message="$final_message\n OpenGL:\tYes"
1501 final_message="$final_message\n OpenGL:\tNo (Very Slow)"
1502 SDL_DEFINES="-DHAS_SDL_2D"
1507 if test "$use_alsa" = "yes"; then
1509 AC_DEFINE([USE_ALSA],[1],["Define to 1 if alsa is installed"])
1510 final_message="$final_message\n ALSA:\t\tYes"
1513 final_message="$final_message\n ALSA:\t\tNo"
1516 if test "$use_dbus" = "yes"; then
1517 final_message="$final_message\n DBUS:\t\tYes"
1519 final_message="$final_message\n DBUS:\t\tNo"
1522 if test "x$use_vdpau" != "xno"; then
1523 final_message="$final_message\n VDPAU:\tYes"
1525 final_message="$final_message\n VDPAU:\tNo"
1528 if test "x$use_vaapi" != "xno"; then
1529 final_message="$final_message\n VAAPI:\tYes"
1531 final_message="$final_message\n VAAPI:\tNo"
1534 if test "x$use_crystalhd" != "xno"; then
1535 final_message="$final_message\n CrystalHD:\tYes"
1537 final_message="$final_message\n CrystalHD:\tNo"
1540 if test "x$use_vdadecoder" != "xno"; then
1541 final_message="$final_message\n VDADecoder:\tYes"
1543 final_message="$final_message\n VDADecoder:\tNo"
1546 if test "x$use_vtbdecoder" != "xno"; then
1547 final_message="$final_message\n VTBDecoder:\tYes"
1549 final_message="$final_message\n VTBDecoder:\tNo"
1552 if test "$use_openmax" != "no"; then
1553 final_message="$final_message\n OpenMax:\tYes"
1555 final_message="$final_message\n OpenMax:\tNo"
1558 if test "$use_joystick" = "yes"; then
1559 final_message="$final_message\n Joystick:\tYes"
1560 SDL_DEFINES="$SDL_DEFINES -DHAS_SDL_JOYSTICK"
1562 final_message="$final_message\n Joystick:\tNo"
1565 if test "$use_xrandr" = "yes"; then
1566 final_message="$final_message\n XRandR:\tYes"
1569 final_message="$final_message\n XRandR:\tNo"
1573 if test "$use_goom" = "yes"; then
1574 final_message="$final_message\n GOOM:\t\tYes"
1576 final_message="$final_message\n GOOM:\t\tNo"
1579 if test "$use_rsxs" = "yes"; then
1580 final_message="$final_message\n RSXS:\t\tYes"
1582 final_message="$final_message\n RSXS:\t\tNo"
1585 if test "$use_projectm" = "yes"; then
1586 final_message="$final_message\n ProjectM:\tYes"
1588 final_message="$final_message\n ProjectM:\tNo"
1591 if test "$use_x11" = "yes"; then
1592 final_message="$final_message\n X11:\t\tYes"
1594 final_message="$final_message\n X11:\t\tNo"
1597 if test "$use_libbluray" = "yes"; then
1598 final_message="$final_message\n Bluray:\tYes"
1600 final_message="$final_message\n Bluray:\tNo"
1603 USE_TEXTUREPACKER_NATIVE=0
1604 if test "x$use_texturepacker" != "xno"; then
1605 final_message="$final_message\n TexturePacker:Yes"
1607 if test "x$use_texturepacker_native" = "xyes"; then
1608 USE_TEXTUREPACKER_NATIVE=1
1609 if [[ ! -d "$USE_TEXTUREPACKER_NATIVE_ROOT" ]]; then
1610 USE_TEXTUREPACKER_NATIVE_ROOT=
1614 final_message="$final_message\n TexturePacker:No"
1618 if test "$use_mid" = "yes"; then
1619 final_message="$final_message\n MID Support:\tYes"
1620 SDL_DEFINES="$SDL_DEFINES -DMID"
1622 final_message="$final_message\n MID Support:\tNo"
1627 if test "x$use_ccache" != "xno"; then
1628 AC_PATH_PROG(CCACHE,ccache,none)
1629 if test "$ac_cv_path_CCACHE" = "none"; then
1630 if test "x$use_ccache" = "xyes"; then
1631 AC_MSG_ERROR([ccache not found.]);
1633 AC_MSG_NOTICE([ccache not found. Falling back to default CC])
1634 final_message="$final_message\n ccache:\tNo"
1637 CC="$ac_cv_path_CCACHE $CC"
1638 CXX="$ac_cv_path_CCACHE $CXX"
1639 AC_MSG_NOTICE(enabling ccache)
1640 final_message="$final_message\n ccache:\tYes"
1643 final_message="$final_message\n ccache:\tNo"
1646 if test "x$use_pulse" != "xno"; then
1647 XBMC_STANDALONE_SH_PULSE=tools/Linux/xbmc-standalone.sh.pulse
1648 final_message="$final_message\n PulseAudio:\tYes"
1650 XBMC_STANDALONE_SH_PULSE=/dev/null
1651 final_message="$final_message\n PulseAudio:\tNo"
1654 if test "$use_hal" = "yes"; then
1655 final_message="$final_message\n HAL Support:\tYes"
1657 final_message="$final_message\n HAL Support:\tNo"
1661 if test "$use_dvdcss" = "yes"; then
1662 AC_MSG_NOTICE($dvdcss_enabled)
1663 final_message="$final_message\n DVDCSS:\tYes"
1665 SKIP_CONFIG_DVDCSS=0
1666 DVDREAD_CFLAGS="-D_XBMC -DHAVE_DVDCSS_DVDCSS_H"
1668 AC_MSG_NOTICE($dvdcss_disabled)
1669 final_message="$final_message\n DVDCSS:\tNo"
1671 SKIP_CONFIG_DVDCSS=1
1672 DVDREAD_CFLAGS="-D_XBMC -UHAVE_DVDCSS_DVDCSS_H"
1674 if test "$host_vendor" = "apple"; then
1675 DVDREAD_CFLAGS="$DVDREAD_CFLAGS -D__DARWIN__"
1678 if test "$use_avahi" = "yes"; then
1679 final_message="$final_message\n Avahi:\tYes"
1681 final_message="$final_message\n Avahi:\tNo"
1684 if test "$HAVE_GIT" = "yes"; then
1685 GIT_REV=$(git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h %ci" HEAD | awk '{gsub("-", "");print $2"-"$1}')
1687 if test "$GIT_REV" = ""; then
1690 if test "$host_vendor" = "apple"; then
1691 echo "#define GIT_REV \"$GIT_REV\"" > git_revision.h
1693 SDL_DEFINES="$SDL_DEFINES -D'GIT_REV=\"$GIT_REV\"'"
1696 if test "$use_nonfree" = "yes"; then
1697 final_message="$final_message\n Non-free:\tYes"
1699 AC_DEFINE([HAVE_XBMC_NONFREE], [1], [Define to 1 to enable non-free components.])
1702 final_message="$final_message\n Non-free:\tNo"
1705 if test "$use_asap" = "yes"; then
1706 AC_CHECK_PROG(HAVE_GDC,gdc,"yes","no")
1707 if test "$HAVE_GDC" = "no"; then
1708 AC_MSG_ERROR($missing_program);
1710 AC_CHECK_PROG(HAVE_FPC,fpc,"yes","no")
1711 if test "$HAVE_FPC" = "no"; then
1712 AC_MSG_ERROR($missing_program);
1715 AC_DEFINE([USE_ASAP_CODEC], [1], [Define to 1 to enable ASAP codec.])
1716 final_message="$final_message\n ASAP Codec:\tYes"
1719 final_message="$final_message\n ASAP Codec:\tNo"
1722 if test "$use_webserver" = "yes"; then
1723 final_message="$final_message\n Webserver:\tYes"
1725 final_message="$final_message\n Webserver:\tNo"
1728 if test "$use_librtmp" != "no"; then
1729 final_message="$final_message\n libRTMP support:\tYes"
1731 final_message="$final_message\n libRTMP support:\tNo"
1734 if test "x$use_samba" != "xno"; then
1735 final_message="$final_message\n libsmbclient support:\tYes"
1737 final_message="$final_message\n libsmbclient support:\tNo"
1740 if test "$use_libnfs" != "no"; then
1741 final_message="$final_message\n libnfs client support:Yes"
1743 final_message="$final_message\n libnfs client support:No"
1746 if test "x$use_libafpclient" != "xno"; then
1747 final_message="$final_message\n libafpclient support:\tYes"
1749 final_message="$final_message\n libafpclient support:\tNo"
1752 if test "$use_airplay" != "no"; then
1753 final_message="$final_message\n AirPlay support:\tYes"
1755 final_message="$final_message\n AirPLay support:\tNo"
1758 if test "x$use_airtunes" != "xno"; then
1759 final_message="$final_message\n AirTunes support:\tYes"
1761 final_message="$final_message\n AirTunes support:\tNo"
1764 if test "$use_optical_drive" = "yes"; then
1765 final_message="$final_message\n Optical drive:\tYes"
1767 final_message="$final_message\n Optical drive:\tNo"
1770 if test "x$use_libudev" != "xno"; then
1771 final_message="$final_message\n libudev support:\tYes"
1773 final_message="$final_message\n libudev support:\tNo"
1776 if test "x$use_libusb" != "xno"; then
1777 final_message="$final_message\n libusb support:\tYes"
1779 final_message="$final_message\n libusb support:\tNo"
1782 if test "$use_libcec" = "yes"; then
1783 final_message="$final_message\n libCEC support:\tYes"
1785 final_message="$final_message\n libCEC support:\tNo"
1788 ### External libraries messages
1789 if test "$use_external_libcec" = "yes"; then
1790 final_message="$final_message\n External libCEC:\tYes"
1792 final_message="$final_message\n External libCEC:\tNo"
1795 if test "$use_external_ffmpeg" = "yes"; then
1796 final_message="$final_message\n External FFmpeg:\tYes"
1798 final_message="$final_message\n External FFmpeg:\tNo"
1801 OUTPUT_FILES="Makefile \
1803 addons/skin.confluence/media/Makefile \
1805 xbmc/cdrip/Makefile \
1806 xbmc/cores/Makefile \
1807 xbmc/cores/VideoRenderers/Makefile \
1808 xbmc/cores/dvdplayer/Makefile \
1810 lib/libdvd/Makefile \
1811 xbmc/cores/DllLoader/Makefile \
1812 xbmc/cores/dvdplayer/DVDCodecs/Makefile \
1813 xbmc/cores/dvdplayer/DVDCodecs/Audio/Makefile \
1814 xbmc/cores/dvdplayer/DVDCodecs/Overlay/Makefile \
1815 xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile \
1816 xbmc/cores/dvdplayer/DVDDemuxers/Makefile \
1817 xbmc/cores/dvdplayer/DVDSubtitles/Makefile \
1818 xbmc/cores/AudioRenderers/Makefile \
1819 xbmc/cores/paplayer/Makefile \
1820 lib/timidity/Makefile \
1821 lib/xbadpcm/Makefile \
1823 lib/nosefart/Makefile \
1824 lib/libsidplay2/Makefile \
1825 lib/vgmstream/Makefile \
1826 lib/snesapu/SNES/SNESAPU/Makefile \
1827 lib/stsound/StSoundLibrary/Makefile \
1828 xbmc/cores/playercorefactory/Makefile \
1829 xbmc/music/karaoke/Makefile \
1831 xbmc/guilib/Makefile \
1832 xbmc/interfaces/Makefile \
1833 xbmc/network/Makefile \
1834 lib/libRTV/Makefile \
1835 lib/libexif/Makefile \
1836 lib/libXDAAP/Makefile \
1837 lib/cmyth/Makefile \
1838 lib/libhdhomerun/Makefile \
1839 lib/libsquish/Makefile \
1840 lib/libid3tag/Makefile \
1841 lib/cximage-6.0/Makefile \
1842 lib/addons/script.module.pil/Makefile \
1843 xbmc/interfaces/python/Makefile \
1844 xbmc/interfaces/python/xbmcmodule/Makefile \
1845 lib/libUPnP/Makefile \
1846 xbmc/DllPaths_generated.h \
1847 xbmc/linux/Makefile \
1848 xbmc/filesystem/Makefile \
1849 xbmc/screensavers/rsxs-0.9/xbmc/Makefile \
1850 xbmc/visualizations/XBMCProjectM/Makefile \
1851 xbmc/visualizations/Goom/Makefile \
1852 xbmc/visualizations/OpenGLSpectrum/Makefile \
1853 xbmc/visualizations/WaveForm/Makefile \
1854 xbmc/visualizations/iTunes/Makefile \
1855 tools/Linux/xbmc.sh \
1856 tools/Linux/xbmc-standalone.sh \
1857 tools/TexturePacker/Makefile \
1858 tools/EventClients/Clients/OSXRemote/Makefile \
1859 xbmc/peripherals/bus/Makefile \
1860 xbmc/peripherals/devices/Makefile \
1861 lib/libcec/Makefile"
1863 # Line below is used so we can use AM_INIT_AUTOMAKE. The corresponding
1864 # .dummy.am does nothing.
1865 AC_CONFIG_FILES([.dummy])
1867 AC_CONFIG_FILES([${OUTPUT_FILES}])
1868 OUTPUT_FILES="$OUTPUT_FILES \
1874 AC_SUBST(SDL_DEFINES)
1875 AC_SUBST(BUILD_DVDCSS)
1876 AC_SUBST(DISABLE_GOOM)
1877 AC_SUBST(DISABLE_RSXS)
1878 AC_SUBST(DISABLE_PROJECTM)
1879 AC_SUBST(USE_EXTERNAL_FFMPEG)
1880 AC_SUBST(PYTHON_VERSION)
1881 AC_SUBST(OUTPUT_FILES)
1882 AC_SUBST(HAVE_XBMC_NONFREE)
1883 AC_SUBST(USE_ASAP_CODEC)
1884 AC_SUBST(LIBCURL_BASENAME)
1885 AC_SUBST(LIBFLAC_BASENAME)
1886 AC_SUBST(LIBVORBISFILE_BASENAME)
1887 AC_SUBST(LIBMODPLUG_BASENAME)
1888 AC_SUBST(LIBMAD_BASENAME)
1889 AC_SUBST(LIBOGG_BASENAME)
1890 AC_SUBST(LIBVORBISENC_BASENAME)
1891 AC_SUBST(LIBVORBIS_BASENAME)
1892 AC_SUBST(LIBASS_BASENAME)
1893 AC_SUBST(LIBMEPG2_BASENAME)
1894 AC_SUBST_FILE(XBMC_STANDALONE_SH_PULSE)
1895 AC_SUBST(USE_OPENGL)
1896 AC_SUBST(USE_OPENGLES)
1899 AC_SUBST(USE_CRYSTALHD)
1900 AC_SUBST(USE_LIBSMBCLIENT)
1901 AC_SUBST(USE_LIBNFS)
1902 AC_SUBST(USE_LIBAFPCLIENT)
1903 AC_SUBST(USE_AIRPLAY)
1905 AC_SUBST(USE_OPENMAX)
1907 AC_SUBST(USE_XRANDR)
1909 AC_SUBST(USE_TEXTUREPACKER)
1910 AC_SUBST(USE_TEXTUREPACKER_NATIVE)
1911 AC_SUBST(USE_TEXTUREPACKER_NATIVE_ROOT)
1912 AC_SUBST(USE_AIRTUNES)
1913 AC_SUBST(USE_LIBUDEV)
1914 AC_SUBST(USE_LIBUSB)
1915 AC_SUBST(USE_LIBCEC)
1916 AC_SUBST(USE_EXTERNAL_LIBCEC)
1918 # pushd and popd are not available in other shells besides bash, so implement
1919 # our own pushd/popd functions
1924 if [[ -d "$dirname" ]] && [[ -x "$dirname" ]]; then
1926 XB_DIRSTACK="$dirname ${XB_DIRSTACK:-$PWD}"
1929 AC_MSG_ERROR(xb_pushd: unable to change to $dirname)
1934 if [[ -n "$XB_DIRSTACK" ]]; then
1935 XB_DIRSTACK="${XB_DIRSTACK#* }"
1936 cd "${XB_DIRSTACK%% *}"
1939 AC_MSG_ERROR(xb_popd: unable to go back to previous directory)
1943 # Function to run the configure scripts in our submodules
1944 # Consists of three paramaters, the path to the submodule, the configure command
1945 # with appropriate arguments, and a third parameter set to 1 if we are to skip
1946 # running the script, anything else if not.
1947 AC_DEFUN([XB_CONFIG_MODULE],[
1948 AC_CONFIG_COMMANDS_POST([
1949 if [[ $3 != "1" ]]; then
1950 if [[ -d $1 ]]; then
1953 if [[ $? -ne 0 ]]; then
1955 AC_MSG_ERROR([[Submodule $1 failed to configure]])
1960 AC_MSG_ERROR([[Submodule $1 does not exist]])
1963 AC_MSG_NOTICE([[Skipping configuration of submodule $1.]])
1968 XB_CONFIG_MODULE([lib/ffmpeg], [
1969 if test "$host_vendor" = "apple" ; then
1971 --extra-cflags="$CFLAGS $FFMPEG_EXTRACFLAGS -w -D_DARWIN_C_SOURCE -Dattribute_deprecated=" \
1972 `if test "$use_arch" != "no"; then echo --enable-cross-compile; fi` \
1973 `if test "$use_arch" != "no"; then echo --arch=$use_arch; fi`\
1974 `if test "$use_cpu" != "no"; then echo --cpu=$use_cpu; fi`\
1975 --target-os=$(tolower $(uname -s)) \
1976 --disable-amd3dnow \
1979 `if test "$use_arch" != "yes"; then echo --enable-neon; fi`\
1981 `if test "$use_debug" = "no"; then echo --disable-debug; fi` \
1983 --enable-muxer=spdif \
1984 --enable-muxer=adts \
1985 --disable-encoders \
1986 --enable-encoder=ac3 \
1987 --enable-encoder=aac \
1988 `if test "$use_ffmpeg_libvorbis" = "yes"; then echo --enable-libvorbis --enable-muxer=ogg --enable-encoder=libvorbis; else echo --disable-libvorbis; fi` \
1992 --disable-ffserver \
1996 --disable-decoder=mpeg_xvmc \
1999 --enable-protocol=http \
2001 --enable-runtime-cpudetect \
2003 sed -i "" -e "s#YASM=yasm#YASM=${prefix}/bin/yasm#" config.mak &&
2004 sed -i "" -e "s#YASMDEP=yasm#YASMDEP=${prefix}/bin/yasm#" config.mak &&
2005 sed -i "" -e "s# -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 # #" config.mak
2006 if test "$use_arch" = "ppc"; then
2007 sed -i "" -e "s/HAVE_GNU_AS 1/HAVE_GNU_AS 0/" config.h
2008 sed -i "" -e "s/^HAVE_GNU_AS=yes/!HAVE_GNU_AS=yes/" config.mak
2012 LDFLAGS="$(echo "$LDFLAGS" | sed "s/-Wl,-Bsymbolic-functions//g")" \
2014 --extra-cflags="$PASSED_CFLAGS $FFMPEG_EXTRACFLAGS" \
2016 `if test "$use_debug" = "no"; then echo --disable-debug; fi` \
2017 `if test "$cross_compiling" = "yes"; then echo --enable-cross-compile; fi` \
2018 `if test "$use_arch" != "no"; then echo --arch=$use_arch; fi`\
2019 `if test "$use_cpu" != "no"; then echo --cpu=$use_cpu; fi`\
2020 --target-os=$(tolower $(uname -s)) \
2022 --enable-muxer=spdif \
2023 --enable-muxer=adts \
2024 --disable-encoders \
2025 --enable-encoder=ac3 \
2026 --enable-encoder=aac \
2027 `if test "$use_ffmpeg_libvorbis" = "yes"; then echo --enable-libvorbis --enable-muxer=ogg --enable-encoder=libvorbis; else echo --disable-libvorbis; fi` \
2028 --disable-decoder=mpeg_xvmc \
2032 --disable-ffserver \
2038 `if test "x$use_vdpau" != "xno"; then echo --enable-vdpau; else echo --disable-vdpau; fi` \
2039 `if test "x$use_vaapi" != "xno"; then echo --enable-vaapi; else echo --disable-vaapi; fi` \
2040 --enable-protocol=http \
2042 --enable-runtime-cpudetect \
2043 --custom-libname-with-major="\$(FULLNAME)-\$(LIBMAJOR)-${ARCH}\$(SLIBSUF)" \
2044 `case $host_cpu in i?86*) echo --disable-pic ;; *) echo --enable-pic ;; esac` \
2046 sed -i -e "s#define HAVE_SYMVER 1#define HAVE_SYMVER 0#" config.h &&
2047 sed -i -e "s#define HAVE_SYMVER_GNU_ASM 1#define HAVE_SYMVER_GNU_ASM 0#" config.h
2049 ], [$USE_EXTERNAL_FFMPEG])
2051 XB_CONFIG_MODULE([lib/libdvd/libdvdcss], [
2056 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2057 --host=$host_alias \
2058 --build=$build_alias \
2059 --target=$target_alias \
2063 ], [$SKIP_CONFIG_DVDCSS])
2065 XB_CONFIG_MODULE([lib/libdvd/libdvdread], [
2067 --extra-cflags="$CFLAGS $DVDREAD_CFLAGS -I`pwd`/../libdvdcss/src" \
2068 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2069 --host=$host_alias \
2070 --build=$build_alias \
2071 --target=$target_alias \
2077 $MAKE dvdread-config &&
2078 mkdir -p `pwd`/../includes/dvdread
2079 cp `pwd`/../libdvdread/src/*.h `pwd`/../includes/dvdread
2082 XB_CONFIG_MODULE([lib/libdvd/libdvdnav], [
2084 --extra-cflags="$CFLAGS $DVDREAD_CFLAGS -I`pwd`/../includes" \
2085 --extra-ldflags="-L`pwd`/../libdvdread/obj" \
2086 --with-dvdread-config="`pwd`/../libdvdread/obj/dvdread-config" \
2087 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2088 --host=$host_alias \
2089 --build=$build_alias \
2090 --target=$target_alias \
2096 XB_CONFIG_MODULE([lib/libid3tag/libid3tag],[
2101 CXXFLAGS="$CXXFLAGS" \
2102 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2103 --host=$host_alias \
2104 --build=$build_alias \
2105 --target=$target_alias \
2110 XB_CONFIG_MODULE([xbmc/visualizations/XBMCProjectM/libprojectM],[
2112 rm -f CMakeCache.txt && CC="$ORIGCC" CXX="$ORIGCXX" cmake \
2113 -DCMAKE_BUILD_TYPE=None -DUSE_FTGL:BOOL=OFF \
2114 -DCMAKE_C_FLAGS:STRING="${CPPFLAGS} ${CFLAGS}" \
2115 -DCMAKE_CXX_FLAGS:STRING="${CPPFLAGS} ${CXXFLAGS}" \
2116 -DCMAKE_INSTALL_PREFIX="${prefix}" \
2117 -DCMAKE_INSTALL_LIBDIR:PATH="${libdir}" \
2118 -DINCLUDE_INSTALL_DIR:PATH="${includedir}" \
2119 -DLIB_INSTALL_DIR:PATH="${libdir}" \
2120 -DSYSCONF_INSTALL_DIR:PATH="${sysconfdir}" \
2121 -DSHARE_INSTALL_PREFIX:PATH="${datadir}" . &&
2122 if test "$host_vendor" = "apple" ; then
2123 # cmake has hardcoded paths to macports which bork our darwin depends cross/ppc, remove them
2124 sed -i "" -e "s|-L/opt/local/lib| |" CMakeFiles/projectM.dir/link.txt
2125 sed -i "" -e "s|-L/opt/local/lib| |" CMakeFiles/projectM.dir/flags.make
2126 sed -i "" -e "s|-I/opt/local/include| |" CMakeFiles/projectM.dir/flags.make
2129 ], [$DISABLE_PROJECTM])
2131 XB_CONFIG_MODULE([xbmc/visualizations/Goom/goom2k4-0],[
2134 CXXFLAGS="$CXXFLAGS" \
2135 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2136 --host=$host_alias \
2137 --build=$build_alias \
2138 --target=$target_alias \
2144 XB_CONFIG_MODULE([xbmc/screensavers/rsxs-0.9/], [
2149 CXXFLAGS="$CXXFLAGS" \
2150 `if test "$host_vendor" = "apple"; then echo --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib; fi` \
2151 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2152 --host=$host_alias \
2153 --build=$build_alias \
2154 --target=$target_alias \
2155 --without-xscreensaver \
2158 --disable-fieldlines \
2162 --disable-hyperspace \
2167 XB_CONFIG_MODULE([lib/libapetag], [
2169 `if test "$host_vendor" = "apple"; then echo --disable-shared; fi` \
2170 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2171 --host=$host_alias \
2172 --build=$build_alias \
2173 --target=$target_alias CFLAGS="$CFLAGS" CC="$CC" CXX="$CXX"
2176 XB_CONFIG_MODULE([lib/cpluff], [
2177 ./configure --disable-nls \
2178 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2179 --host=$host_alias \
2180 --build=$build_alias \
2181 --target=$target_alias CFLAGS="$CFLAGS" CC="$CC" CXX="$CXX"
2182 #LDFLAGS="$LDFLAGS -Wl,-read_only_relocs,suppress"
2185 XB_CONFIG_MODULE([lib/libcec], [
2186 if test "$use_libcec" = "yes" ; then
2187 cd libcec ; ./configure \
2188 --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
2189 --host=$host_alias \
2190 --build=$build_alias \
2191 --target=$target_alias CFLAGS="$CFLAGS" CC="$CC" CXX="$CXX"
2197 final_message="$final_message\n prefix:\t$prefix\n$dashes"
2198 echo -e "$final_message\n"