build: make rsxs configurable
authortheuni <theuni-nospam-@xbmc.org>
Thu, 11 Aug 2011 20:31:30 +0000 (16:31 -0400)
committertheuni <theuni-nospam-@xbmc.org>
Mon, 29 Aug 2011 04:21:45 +0000 (00:21 -0400)
Also, there were a few X libs (xt and xmu) that appear to only be used by
rsxs. We still check for them and link to them so that our packaging scripts
(Ubuntu) are able to resolve deps correctly, otherwise the linking in the XBMC
binary is unnecessary.

We might consider removing these links and hinting to packagers instead.

Makefile.in
configure.in

index 52112d7..db7f88e 100644 (file)
@@ -136,7 +136,7 @@ LIB_DIRS=\
        lib/xbmc-dll-symbols
 
 SS_DIRS=
-ifeq (@USE_OPENGL@,1)
+ifneq (@DISABLE_RSXS@,1)
   SS_DIRS+= xbmc/screensavers/rsxs-0.9/xbmc
 endif
 
index 621ee79..6113758 100644 (file)
@@ -66,6 +66,8 @@ xrandr_not_found="== Could not find libXRandR. SDL will be used for resolution s
 xrandr_disabled="== XRandR support disabled. SDL will be used for resolution support. =="
 goom_enabled="== GOOM enabled. =="
 goom_disabled="== GOOM disabled. =="
+rsxs_enabled="== RSXS enabled. =="
+rsxs_disabled="== RSXS disabled. =="
 pulse_not_found="== Could not find libpulse. PulseAudio support disabled. =="
 pulse_disabled="== PulseAudio support manually disabled. =="
 dvdcss_enabled="== DVDCSS support enabled. =="
@@ -208,6 +210,12 @@ AC_ARG_ENABLE([goom],
   [use_goom=$enableval],
   [use_goom=no])
 
+AC_ARG_ENABLE([rsxs],
+  [AS_HELP_STRING([--enable-rsxs],
+  [enable really slick X screensavers (default is yes)])],
+  [use_rsxs=$enableval],
+  [use_rsxs=yes])
+
 AC_ARG_ENABLE([ccache],
   [AS_HELP_STRING([--enable-ccache],
   [enable building with ccache feature (default is auto)])],
@@ -674,15 +682,9 @@ else
   PKG_CHECK_MODULES([ENCA],  [enca],
     [INCLUDES="$INCLUDES $ENCA_CFLAGS"; LIBS="$LIBS $ENCA_LIBS"],
     AC_MSG_ERROR($missing_library))
-  PKG_CHECK_MODULES([XT],    [xt],
-    [INCLUDES="$INCLUDES $XT_CFLAGS"; LIBS="$LIBS $XT_LIBS"],
-    AC_MSG_ERROR($missing_library))
   PKG_CHECK_MODULES([XEXT],  [xext],
     [INCLUDES="$INCLUDES $XEXT_CFLAGS"; LIBS="$LIBS $XEXT_LIBS"],
     AC_MSG_ERROR($missing_library))
-  PKG_CHECK_MODULES([XMU],   [xmu],
-    [INCLUDES="$INCLUDES $XMU_CFLAGS"; LIBS="$LIBS $XMU_LIBS"],
-    AC_MSG_ERROR($missing_library))
   PKG_CHECK_MODULES([DBUS],  [dbus-1],
     [INCLUDES="$INCLUDES $DBUS_CFLAGS"; LIBS="$LIBS $DBUS_LIBS"],
     AC_MSG_ERROR($missing_library))
@@ -804,6 +806,21 @@ else
   fi
 fi
 
+# RSXS
+if test "$use_rsxs" = "no" || test "$use_gl" == "no"; then
+  AC_MSG_NOTICE($rsxs_disabled)
+  DISABLE_RSXS=1
+else
+  AC_MSG_NOTICE($rsxs_enabled)
+  DISABLE_RSXS=0
+  PKG_CHECK_MODULES([XT],    [xt],
+    [INCLUDES="$INCLUDES $XT_CFLAGS"; LIBS="$LIBS $XT_LIBS"],
+    AC_MSG_ERROR($missing_library))
+  PKG_CHECK_MODULES([XMU],   [xmu],
+    [INCLUDES="$INCLUDES $XMU_CFLAGS"; LIBS="$LIBS $XMU_LIBS"],
+    AC_MSG_ERROR($missing_library))
+fi
+
 # libRTMP
 if test "$use_librtmp" != "no"; then
   AC_CHECK_HEADERS([librtmp/log.h librtmp/amf.h librtmp/rtmp.h],,
@@ -1267,6 +1284,13 @@ else
   final_message="$final_message\n  GOOM:\t\tNo"
 fi
 
+if test "$use_rsxs" = "yes"; then
+  final_message="$final_message\n  RSXS:\t\tYes"
+else
+  final_message="$final_message\n  RSXS:\t\tNo"
+fi
+
+
 if test "$use_libbluray" = "yes"; then
   final_message="$final_message\n  Bluray:\tYes"
 else
@@ -1496,6 +1520,7 @@ AC_SUBST(LDFLAGS)
 AC_SUBST(SDL_DEFINES)
 AC_SUBST(BUILD_DVDCSS)
 AC_SUBST(DISABLE_GOOM)
+AC_SUBST(DISABLE_RSXS)
 AC_SUBST(USE_EXTERNAL_FFMPEG)
 AC_SUBST(PYTHON_VERSION)
 AC_SUBST(OUTPUT_FILES)
@@ -1756,7 +1781,6 @@ XB_CONFIG_MODULE([xbmc/visualizations/Goom/goom2k4-0],[
 ], [$DISABLE_GOOM])
 
 XB_CONFIG_MODULE([xbmc/screensavers/rsxs-0.9/], [
-if test "$use_gl" = "no"; then :; else
   ./configure \
     CC="$CC" \
     CXX="$CXX" \
@@ -1777,8 +1801,7 @@ if test "$use_gl" = "no"; then :; else
     --disable-hyperspace \
     --disable-lattice \
     --disable-skyrocket
-fi
-], [0])
+], [$DISABLE_RSXS])
 
 XB_CONFIG_MODULE([lib/libapetag], [
   ./configure \