+AS_IF([test "x$enable_qt4" = "xno"], [
+ AS_IF([test "${enable_skins2}" = "yes"], [
+ AC_MSG_ERROR([The skins2 module depends on the Qt4 interface. Without it you will not be able to open any dialog box from the interface, which makes the skins2 interface rather useless. Install the Qt4 development package or alternatively you can also configure with: --disable-qt4 --disable-skins2.])
+ ], [
+ enable_skins2="no"
+ AC_MSG_WARN([The skins2 module depends on the Qt4 interface, Qt4 is not built so skins2 is disabled.])
+ ])
+])
+
+dnl
+dnl Skins2 module
+dnl
+AC_ARG_ENABLE(skins2,
+ [AS_HELP_STRING([--enable-skins2], [skins interface module (default auto)])])
+AS_IF([test "${enable_skins2}" != "no"], [
+ have_skins_deps="yes"
+
+ dnl Win32
+ AS_IF([test "${SYS}" = "mingw32"], [
+ VLC_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -Imodules/gui/skins2 -DWIN32_SKINS])
+ VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
+ VLC_ADD_LIBS([skins2],[-lgdi32 -lole32 -luuid -lmsimg32])
+ dnl MacOS
+ ], [test "${SYS}" = "darwin"], [
+ VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 -DMACOSX_SKINS])
+ VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
+ VLC_ADD_LIBS([skins2],[-Wl,-framework,Carbon])
+ dnl Linux/Unix
+ ], [
+ PKG_CHECK_MODULES([XPM], [xpm],, [have_skins_deps="no"])
+ PKG_CHECK_MODULES([XINERAMA], [xinerama],, [have_skins_deps="no"])
+ PKG_CHECK_MODULES([XEXT], [xext],, [have_skins_deps="no"])
+ VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 ${X_CFLAGS} ${XEXT_CFLAGS} ${XPM_CFLAGS} -DX11_SKINS])
+ VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
+ VLC_ADD_LIBS([skins2],[${X_LIBS} ${X_PRE_LIBS} ${XEXT_LIBS} ${XPM_LIBS} ${XINERAMA_LIBS} -lX11])
+ ])
+
+ dnl we need freetype
+ AS_IF([test "${have_freetype}" != "yes"], [
+ have_skins_deps="no"
+ ])
+
+ AS_IF([test "${have_skins_deps}" = "no"], [
+ AS_IF([test "x${enable_skins2}" = "x"], [
+ AC_MSG_WARN([Skins2 interface disabled due to missing dependencies.])
+ ], [
+ AC_MSG_ERROR([Skins2 interface requires FreeType, libxpm, libxext and libxinerama])
+ ])
+ enable_skins2="no"
+ ], [
+ VLC_ADD_PLUGIN([skins2])
+ ALIASES="${ALIASES} svlc"
+ enable_skins2="yes"
+ ])
+])
+AM_CONDITIONAL(BUILD_SKINS, [test "${enable_skins2}" = "yes"])
+
+AC_ARG_ENABLE(libtar,
+ [ --enable-libtar libtar support for skins2 (default auto)])
+AS_IF([test "${enable_skins2}" = "yes" && test "${enable_libtar}" != "no"], [
+ AC_CHECK_HEADERS(libtar.h, [
+ VLC_ADD_LIBS([skins2],[-ltar])
+ ])