You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

802 lines
25 KiB

  1. AC_PREREQ[(2.64)]
  2. m4_define(xplayer_version_major, 1)
  3. m4_define(xplayer_version_minor, 4)
  4. m4_define(xplayer_version_micro, 3)
  5. # The version of the API exposed to plugins
  6. m4_define(xplayer_api_version_major, 1)
  7. m4_define(xplayer_api_version_minor, 0)
  8. AC_INIT([xplayer],
  9. [xplayer_version_major.xplayer_version_minor.xplayer_version_micro],
  10. [http://github.com/linuxmint/xplayer],
  11. [xplayer],
  12. [http://github.com/linuxmint/xplayer/])
  13. AM_MAINTAINER_MODE([enable])
  14. AC_CONFIG_SRCDIR([src/xplayer.c])
  15. AC_CONFIG_HEADERS([config.h])
  16. AC_CONFIG_MACRO_DIR([m4])
  17. AC_CONFIG_AUX_DIR([build-aux])
  18. AM_INIT_AUTOMAKE([1.11 dist-xz tar-ustar no-dist-gzip subdir-objects])
  19. # Enable silent build when available (Automake 1.11)
  20. m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
  21. dnl Add the languages which your application supports to po/LINGUAS
  22. GETTEXT_PACKAGE=xplayer
  23. AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define to the Gettext package name])
  24. AC_SUBST(GETTEXT_PACKAGE)
  25. IT_PROG_INTLTOOL([0.40.0])
  26. # User Documentation
  27. YELP_HELP_INIT
  28. GOBJECT_INTROSPECTION_CHECK([0.6.7])
  29. GNOME_DEBUG_CHECK
  30. AC_PROG_CXX
  31. AM_PROG_CC_C_O
  32. # Initialize libtool
  33. LT_PREREQ([2.2])
  34. LT_INIT
  35. m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
  36. PKG_PROG_PKG_CONFIG
  37. AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
  38. # Requirements
  39. GLIB_REQS=2.33.0
  40. GIO_REQS=2.27.92
  41. GTK_REQS=3.5.2
  42. XPLAYER_PLPARSER_REQS=1.0.0
  43. DBUS_REQS=0.82
  44. VALA_REQS=0.14.1
  45. PEAS_REQS=1.1.0
  46. PYTHON_REQS=2.3
  47. PYGOBJECT_REQS=2.90.3
  48. GRILO_REQS=0.2.0
  49. LIBXML_REQS=2.6.0
  50. XAPP_REQS=1.0.0
  51. # Used in the pkg-config file for plugins
  52. AC_SUBST(GLIB_REQS)
  53. AC_SUBST(GTK_REQS)
  54. AC_SUBST(XPLAYER_PLPARSER_REQS)
  55. XPLAYER_VERSION_MAJOR=xplayer_version_major
  56. XPLAYER_VERSION_MINOR=xplayer_version_minor
  57. XPLAYER_VERSION_MICRO=xplayer_version_micro
  58. AC_SUBST(XPLAYER_VERSION_MAJOR)
  59. AC_SUBST(XPLAYER_VERSION_MINOR)
  60. AC_SUBST(XPLAYER_VERSION_MICRO)
  61. XPLAYER_API_VERSION=xplayer_api_version_major.xplayer_api_version_minor
  62. AC_SUBST(XPLAYER_API_VERSION)
  63. AC_DEFINE_UNQUOTED(XPLAYER_API_VERSION, ["$XPLAYER_API_VERSION"], [Define to the Xplayer plugin API version])
  64. # The full list of plugins
  65. allowed_plugins="apple-trailers autoload-subtitles brasero-disc-recorder chapters dbusservice im-status gromit lirc media-player-keys ontop opensubtitles properties pythonconsole recent rotation samplepython sample-vala screensaver screenshot sidebar-test skipto zeitgeist-dp grilo vimeo"
  66. PLUGINDIR='${libdir}/xplayer/plugins'
  67. AC_SUBST(PLUGINDIR)
  68. dnl the two versions here implicate the gstreamer core and gst-plugins
  69. dnl release versions.
  70. GST_MAJORMINOR=1.0
  71. GST_REQS=0.11.93
  72. GST_PLUG_BASE_REQS=0.11.93
  73. GSTPLUG_REQS=0.11.93
  74. CLUTTER_REQS=1.10.0
  75. CLUTTER_GTK_REQS=1.0.2
  76. dnl Check for the required GStreamer versions for missing plugins
  77. dnl installation, unless this has been disabled.
  78. MISSING_PLUGINS_MODULES=""
  79. AC_MSG_CHECKING([whether to enable easy codec installation support])
  80. AC_ARG_ENABLE([easy-codec-installation],
  81. [
  82. AS_HELP_STRING([--enable-easy-codec-installation],
  83. [Whether to enable easy codec installation support for GStreamer]
  84. )
  85. ], [
  86. case "${enableval}" in
  87. yes) enable_easy_codec_installation=yes ;;
  88. no) enable_easy_codec_installation=no ;;
  89. *) enable_easy_codec_installation=auto ;;
  90. esac
  91. ], [
  92. dnl default value
  93. enable_easy_codec_installation=auto
  94. ]
  95. )
  96. AC_MSG_RESULT([$enable_easy_codec_installation])
  97. if test "x$enable_easy_codec_installation" != "xno"; then
  98. MISSING_PLUGINS_MODULES="gstreamer-pbutils-1.0"
  99. PKG_CHECK_MODULES(MISSING_PLUGINS, $MISSING_PLUGINS_MODULES,
  100. [
  101. AC_DEFINE([ENABLE_MISSING_PLUGIN_INSTALLATION], 1,
  102. [Whether we can and want to do installation of missing plugins])
  103. ])
  104. fi
  105. # ================================================================
  106. # Backend requirements
  107. # ================================================================
  108. PKG_CHECK_MODULES(CLUTTER_GST_3, clutter-gst-3.0,
  109. [
  110. AC_MSG_NOTICE([** Using clutter-gst-3.0])
  111. CLUTTER_GST="clutter-gst-3.0 >= 2.99.2"
  112. AC_DEFINE([HAVE_CLUTTER_GST_3], 1, [Whether we're using clutter-gst-3.0])
  113. ],
  114. [
  115. AC_MSG_NOTICE([** Using clutter-gst-2.0])
  116. CLUTTER_GST="clutter-gst-2.0 >= 1.5.5"
  117. ])
  118. BACKEND_MODULES="gstreamer-1.0 >= $GST_REQS gstreamer-base-1.0 >= $GST_REQS gstreamer-plugins-base-1.0 >= $GST_PLUG_BASE_REQS $MISSING_PLUGINS_MODULES gstreamer-tag-1.0 >= $GSTPLUG_REQS gstreamer-audio-1.0 gstreamer-video-1.0 clutter-1.0 >= $CLUTTER_REQS $CLUTTER_GST clutter-gtk-1.0 cairo gsettings-desktop-schemas"
  119. PKG_CHECK_MODULES(BACKEND, $BACKEND_MODULES)
  120. PKG_CHECK_MODULES(BACKEND_TEST, $BACKEND_MODULES gtk+-3.0 >= $GTK_REQS)
  121. dnl Check for required plugins
  122. gst10_toolsdir=`$PKG_CONFIG --variable=toolsdir gstreamer-1.0`
  123. gst10_inspect="$gst10_toolsdir/gst-inspect-1.0"
  124. dnl Give error and exit if we don't have the gst_inspect tool
  125. AC_MSG_CHECKING([GStreamer 1.0 inspection tool])
  126. if test -r "$gst10_inspect"; then
  127. AC_MSG_RESULT([yes])
  128. else
  129. AC_MSG_RESULT([no])
  130. AC_MSG_ERROR([
  131. Cannot find required GStreamer-1.0 tool 'gst-inspect-1.0'.
  132. It should be part of gstreamer-1_0-utils. Please install it.
  133. ])
  134. fi
  135. dnl Check for elements from gst-plugins-base
  136. dnl Set plugins which contain below elements
  137. set -- playback videoscale
  138. for base_element in playbin videoscale
  139. do
  140. AC_MSG_CHECKING([GStreamer 1.0 $base_element element])
  141. if $gst10_inspect $base_element >/dev/null 2>/dev/null; then
  142. AC_MSG_RESULT([yes])
  143. else
  144. AC_MSG_RESULT([no])
  145. AC_MSG_ERROR([
  146. Cannot find required GStreamer-1.0 plugin '$1'.
  147. It should be part of gst-plugins-base. Please install it.
  148. ])
  149. fi
  150. shift;
  151. done
  152. dnl Check for elements from gst-plugins-good
  153. dnl Set plugins which contain below elements
  154. set -- autodetect goom scaletempo
  155. for good_element in autoaudiosink goom scaletempo
  156. do
  157. AC_MSG_CHECKING([GStreamer 1.0 $good_element element])
  158. if $gst10_inspect $good_element >/dev/null 2>/dev/null; then
  159. AC_MSG_RESULT([yes])
  160. else
  161. AC_MSG_RESULT([no])
  162. AC_MSG_ERROR([
  163. Cannot find required GStreamer-1.0 plugin '$1'.
  164. It should be part of gst-plugins-good. Please install it.
  165. ])
  166. fi
  167. shift;
  168. done
  169. dnl Check the smclient backend
  170. AC_MSG_CHECKING([which smclient backend to use])
  171. AC_ARG_WITH([smclient],
  172. [AS_HELP_STRING([--with-smclient],[which smclient backend to use (auto/no/xsmp/win32/quartz)])],
  173. [],
  174. [with_smclient=auto])
  175. if test "$with_smclient" = "auto"; then
  176. # There could be several targets, given in any order (see bgo#652999)
  177. gdk_targets=`$PKG_CONFIG --variable targets gdk-3.0`
  178. for target in $gdk_targets; do
  179. case "$target" in
  180. x11)
  181. with_smclient=xsmp
  182. PKG_CHECK_MODULES([SMCLIENT],[sm ice])
  183. break
  184. ;;
  185. win32)
  186. with_smclient=win32
  187. break
  188. ;;
  189. quartz)
  190. with_smclient=quartz
  191. break
  192. ;;
  193. *)
  194. with_smclient=no
  195. # Loop around and see if we find a better target next time
  196. ;;
  197. esac
  198. done
  199. fi
  200. AC_MSG_RESULT([$with_smclient])
  201. if test "$with_smclient" != "no"; then
  202. AC_DEFINE([WITH_SMCLIENT],[1],[Define if smclient is enabled])
  203. fi
  204. AM_CONDITIONAL([WITH_SMCLIENT],[test "$with_smclient" != "no"])
  205. AM_CONDITIONAL([WITH_SMCLIENT_XSMP],[test "$with_smclient" = "xsmp"])
  206. AM_CONDITIONAL([WITH_SMCLIENT_WIN32],[test "$with_smclient" = "win32"])
  207. AM_CONDITIONAL([WITH_SMCLIENT_QUARTZ],[test "$with_smclient" = "quartz"])
  208. # ================================================================
  209. # Python plugins
  210. # ================================================================
  211. # We don't Python or PyGObject at compile time, but they are needed for the Python plugins at runtime, so we check anyway.
  212. # We need pylint for `make check`.
  213. AC_MSG_CHECKING([whether Python plugin support is requested])
  214. AC_ARG_ENABLE([python],
  215. AS_HELP_STRING([--enable-python],[Enable python support]),
  216. [enable_python=$enableval],
  217. [enable_python=autodetect])
  218. AC_MSG_RESULT([$enable_python])
  219. have_python=no
  220. have_pygobject=no
  221. PYTHON_MODULES=""
  222. # Test for the Python run time and PyGObject. Test for pylint as well, for `make check`.
  223. if test "x$enable_python" != "xno"; then
  224. AM_PATH_PYTHON([$PYTHON_REQS],[have_python=yes],[have_python=no])
  225. if test "x$PYTHON" = "x:"; then
  226. have_python=no
  227. fi
  228. PYTHON_MODULES="pygobject-3.0 >= $PYGOBJECT_REQS"
  229. PKG_CHECK_MODULES([PYGOBJECT],[$PYTHON_MODULES],[have_pygobject=yes],[have_pygobject=no])
  230. AC_PATH_PROG([PYLINT], [pylint], [no])
  231. fi
  232. # Output the results of the Python checks
  233. if test "x$have_python" != "xyes" -o "x$have_pygobject" != "xyes" -o "x$PYLINT" = "xno"; then
  234. if test "x$enable_python" = "xyes"; then
  235. AC_MSG_ERROR([python >= $PYTHON_REQS, $PYTHON_MODULES or pylint not found])
  236. elif test "x$enable_python" = "xautodetect"; then
  237. enable_python=no
  238. AC_MSG_WARN([python >= $PYTHON_REQS, $PYTHON_MODULES or pylint not found; disabling Python support])
  239. fi
  240. elif test "x$enable_python" != "xno"; then
  241. enable_python=yes
  242. fi
  243. AM_CONDITIONAL([ENABLE_PYTHON],[test "x$enable_python" = "xyes"])
  244. # ================================================================
  245. # Player requirements
  246. #================================================================
  247. PKG_CHECK_MODULES(PLAYER, $BACKEND_MODULES glib-2.0 >= $GLIB_REQS gio-2.0 >= $GIO_REQS gtk+-3.0 >= $GTK_REQS gdk-x11-3.0 >= $GTK_REQS gmodule-2.0 xplayer-plparser >= $XPLAYER_PLPARSER_REQS libpeas-1.0 >= $PEAS_REQS libpeas-gtk-1.0 >= $PEAS_REQS $PYTHON_MODULES xapp >= $XAPP_REQS)
  248. PKG_CHECK_MODULES(LIBPLAYER, glib-2.0 >= $GLIB_REQS gio-2.0 >= $GIO_REQS gtk+-3.0 >= $GTK_REQS gdk-x11-3.0 >= $GTK_REQS clutter-gtk-1.0 xapp >= $XAPP_REQS)
  249. PKG_CHECK_MODULES(HELPER, gstreamer-1.0 gstreamer-tag-1.0 xapp >= $XAPP_REQS)
  250. PKG_CHECK_MODULES(TIME_HELPER, glib-2.0 xapp >= $XAPP_REQS)
  251. PKG_CHECK_MODULES(RTL_HELPER, glib-2.0 gtk+-3.0 >= $GTK_REQS xapp >= $XAPP_REQS)
  252. PKG_CHECK_MODULES(PIXBUF_HELPER, gdk-pixbuf-2.0 gstreamer-tag-1.0 >= $GSTPLUG_REQS gstreamer-video-1.0 xapp >= $XAPP_REQS)
  253. PKG_CHECK_MODULES(THUMBNAILER, gtk+-3.0 >= $GTK_REQS xplayer-plparser >= $XPLAYER_PLPARSER_REQS gstreamer-tag-1.0 >= $GSTPLUG_REQS gstreamer-video-1.0 xapp >= $XAPP_REQS)
  254. PKG_CHECK_MODULES(PREVIEW, gstreamer-1.0 >= $GST_REQS gio-2.0 >= $GIO_REQS gdk-pixbuf-2.0 xapp >= $XAPP_REQS)
  255. PKG_CHECK_MODULES(PROPERTIES, gtk+-3.0 >= $GTK_REQS xapp >= $XAPP_REQS)
  256. LIBGD_INIT([
  257. tagged-entry
  258. main-icon-view
  259. static
  260. ])
  261. dnl ================================================================
  262. dnl Vala plugins
  263. dnl ================================================================
  264. AC_MSG_CHECKING([whether Vala plugin support is requested])
  265. AC_ARG_ENABLE([vala],
  266. AS_HELP_STRING([--enable-vala],[Enable Vala plugin support]),
  267. [enable_vala=$enableval],
  268. [enable_vala=auto])
  269. AC_MSG_RESULT([$enable_vala])
  270. if test "x$enable_vala" != "xno"; then
  271. AM_PROG_VALAC([$VALA_REQS])
  272. if test "$VALAC" = "valac"; then
  273. if test "x$enable_vala" = "xyes"; then
  274. AC_MSG_ERROR([Vala plugin support explicitly requested, but not found])
  275. fi
  276. with_vala=no
  277. else
  278. with_vala=yes
  279. fi
  280. fi
  281. AM_CONDITIONAL(ENABLE_VALA, test "x$with_vala" = "xyes")
  282. # ********************
  283. # Movie player plugins
  284. # ********************
  285. plugin_error_or_ignore()
  286. {
  287. if test "${error_on_bad_plugin}" = "1" ; then
  288. AC_MSG_ERROR([$1])
  289. else
  290. AC_MSG_WARN([$1 (disabling plugin)])
  291. fi
  292. }
  293. plugin_error()
  294. {
  295. AC_MSG_ERROR([$1])
  296. }
  297. AC_ARG_WITH([plugins],
  298. [AS_HELP_STRING([--with-plugins],[Which Xplayer plugins to compile (default: auto; "all", "none" and "autodetect" are valid)])],
  299. [], [with_plugins=autodetect])
  300. used_plugins=""
  301. used_plugins2=""
  302. if test "x${with_plugins}" = "xautodetect" ; then
  303. # Default to all plugins and just ignore them if they won't compile
  304. with_plugins="all"
  305. error_on_bad_plugin="0"
  306. else
  307. # Clean up the plugin list and error if a plugin won't compile
  308. with_plugins=`echo ,"${with_plugins}", | sed -e 's/[[ ,]][[ ,]]*/ /g' -e 's/,$//'`
  309. error_on_bad_plugin="1"
  310. fi
  311. # Iterate through the wanted plugins and weed out bad ones (or error)
  312. for wanted_plugin in ${with_plugins}; do
  313. for allowed_plugin in ${allowed_plugins}; do
  314. case ${wanted_plugin} in
  315. all)
  316. # List all plugins as being used
  317. used_plugins=${allowed_plugins}
  318. ;;
  319. autodetect)
  320. # List all plugins as being used
  321. used_plugins=${allowed_plugins}
  322. ;;
  323. none) used_plugins="";; # List no plugins
  324. ${allowed_plugin}) used_plugins="${used_plugins} ${wanted_plugin}";; # List the plugin
  325. *) ;;
  326. esac
  327. done
  328. done
  329. # Check for plugin-specific requirements and error if necessary
  330. for plugin in ${used_plugins}; do
  331. add_plugin="1"
  332. case ${plugin} in
  333. gromit)
  334. have_x11=no
  335. gdk_targets=$(pkg-config --variable=targets gtk+-3.0)
  336. for gdk_target in $gdk_targets; do
  337. if test x$gdk_target = xx11; then
  338. have_x11=yes
  339. break
  340. fi
  341. done
  342. if test "${have_x11}" != "yes" ; then
  343. plugin_error_or_ignore "the gromit plugin is not supported on non-X11 targets"
  344. add_plugin="0"
  345. fi
  346. ;;
  347. media-player-keys)
  348. PKG_CHECK_MODULES(MEDIA_PLAYER_KEYS, gio-2.0,
  349. [HAVE_MEDIA_PLAYER_KEYS=yes], [HAVE_MEDIA_PLAYER_KEYS=no])
  350. if test "${HAVE_MEDIA_PLAYER_KEYS}" != "yes" ; then
  351. plugin_error "you need gio installed for the media-player-keys plugin"
  352. add_plugin="0"
  353. fi
  354. ;;
  355. lirc)
  356. AC_CHECK_LIB(lirc_client, lirc_init,
  357. [AC_CHECK_HEADER(lirc/lirc_client.h,
  358. [LIRC_LIBS="-llirc_client"
  359. HAVE_LIRC=yes],
  360. [
  361. LIRC_LIBS=""
  362. HAVE_LIRC=no])])
  363. AC_SUBST(LIRC_LIBS)
  364. if test "${HAVE_LIRC}" != "yes" ; then
  365. plugin_error_or_ignore "you need lirc_client installed for the lirc plugin"
  366. add_plugin="0"
  367. fi
  368. ;;
  369. rotation)
  370. if test "${with_vala}" != "yes" ; then
  371. plugin_error_or_ignore "you need vala installed to use the rotation plugin"
  372. add_plugin="0"
  373. elif test "x$found_introspection" != "xyes"; then
  374. plugin_error_or_ignore "you need introspection support for the rotation plugin"
  375. add_plugin="0"
  376. fi
  377. ;;
  378. sample-vala)
  379. if test "${with_vala}" != "yes" ; then
  380. plugin_error_or_ignore "you need vala installed to use the sample-vala plugin"
  381. add_plugin="0"
  382. elif test "x$found_introspection" != "xyes"; then
  383. plugin_error_or_ignore "you need introspection support for the sample-vala plugin"
  384. add_plugin="0"
  385. fi
  386. ;;
  387. brasero-disc-recorder)
  388. dnl this is only needed to use brasero icons
  389. PKG_CHECK_MODULES(DISC_RECORDER, libxml-2.0 >= 2.6.0 gtk+-x11-3.0,
  390. [BUILD_RECORDER=yes], [BUILD_RECORDER=no])
  391. if test "${BUILD_RECORDER}" != "yes" ; then
  392. plugin_error_or_ignore "you need libxml-2.0 >= 2.6.0 and gtk+-x11-3.0 to use the brasero-disc-recorder plugin"
  393. add_plugin="0"
  394. fi
  395. ;;
  396. chapters)
  397. PKG_CHECK_MODULES(CHAPTERS, libxml-2.0 >= $LIBXML_REQS gtk+-3.0 glib-2.0 xapp >= $XAPP_REQS,
  398. [BUILD_CHAPTERS=yes], [BUILD_CHAPTERS=no])
  399. if test "${BUILD_CHAPTERS}" != "yes" ; then
  400. plugin_error "you need gtk+-3.0, glib-2.0 >= 2.15.0 and libxml-2.0 >= 2.6.0 to use the chapters plugin"
  401. add_plugin="0"
  402. fi
  403. ;;
  404. zeitgeist-dp)
  405. if test "${with_vala}" != "yes" ; then
  406. plugin_error_or_ignore "you need vala installed to use the zeitgeist-dp plugin"
  407. add_plugin="0"
  408. elif test "x$found_introspection" != "xyes"; then
  409. plugin_error_or_ignore "you need introspection support for the zeitgeist-dp plugin"
  410. add_plugin="0"
  411. else
  412. PKG_CHECK_MODULES(LIBZEITGEIST, zeitgeist-2.0 >= 0.9.12,
  413. [HAS_LIBZEITGEIST=yes], [HAS_LIBZEITGEIST=no])
  414. if test "${HAS_LIBZEITGEIST}" != "yes" ; then
  415. plugin_error_or_ignore "you need zeitgeist-2.0 >= 0.9.12 to use the zeitgeist-dp plugin"
  416. add_plugin="0"
  417. fi
  418. fi
  419. ;;
  420. grilo)
  421. PKG_CHECK_EXISTS(grilo-0.3 >= $GRILO_REQS, [have_grilo_0_3_0=yes], [have_grilo_0_3_0=no])
  422. if test "$have_grilo_0_3_0" = yes; then
  423. PKG_CHECK_MODULES(LIBGRILO, grilo-0.3 >= $GRILO_REQS,
  424. [HAVE_LIBGRILO=yes], [HAVE_LIBGRILO=no])
  425. AC_DEFINE(HAVE_GRILO_0_3_0, 1, [libgrilo >= 0.3.0 present])
  426. else
  427. PKG_CHECK_MODULES(LIBGRILO, grilo-0.2 >= $GRILO_REQS,
  428. [HAVE_LIBGRILO=yes], [HAVE_LIBGRILO=no])
  429. fi
  430. if test "${HAVE_LIBGRILO}" != "yes" ; then
  431. plugin_error_or_ignore "you need libgrilo >= $GRILO_REQS installed for the Grilo plugin"
  432. add_plugin="0"
  433. fi
  434. ;;
  435. esac
  436. # Add the specified plugin
  437. if test "${add_plugin}" = "1" ; then
  438. used_plugins2="${used_plugins2} ${plugin}"
  439. fi
  440. done
  441. ALL_PLUGINS=$allowed_plugins
  442. PLUGINS=$used_plugins2
  443. AC_MSG_CHECKING([which plugins to compile])
  444. AC_MSG_RESULT([$PLUGINS])
  445. AC_SUBST([ALL_PLUGINS])
  446. AC_SUBST([PLUGINS])
  447. # ***************
  448. # Browser plugins
  449. # ***************
  450. AC_MSG_CHECKING([whether to compile the browser plugins])
  451. AC_ARG_ENABLE([browser-plugins],
  452. [AS_HELP_STRING([--enable-browser-plugins],[compile the xplayer browser plugins])],
  453. [],[enable_browser_plugins=yes])
  454. AC_MSG_RESULT([$enable_browser_plugins])
  455. if test "$enable_browser_plugins" = "yes" ; then
  456. AC_DEFINE([ENABLE_BROWSER_PLUGINS],[1],[Define to build the browser plugin])
  457. BROWSER_PLUGIN_DIR="${BROWSER_PLUGIN_DIR:-"\${libdir}/mozilla/plugins"}"
  458. AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the plugin to])
  459. PKG_CHECK_MODULES([BROWSER_PLUGIN],
  460. [glib-2.0
  461. gio-2.0 >= $GIO_REQS
  462. gmodule-export-2.0
  463. x11
  464. xplayer-plparser-mini >= $XPLAYER_PLPARSER_REQS
  465. xapp >= $XAPP_REQS],
  466. [],[enable_browser_plugins=no])
  467. AC_SUBST([BROWSER_PLUGIN_CFLAGS])
  468. AC_SUBST([BROWSER_PLUGIN_LIBS])
  469. # Earlier versions misdetect playlists
  470. PKG_CHECK_EXISTS([shared-mime-info >= 0.22],
  471. [],
  472. [AC_MSG_ERROR([
  473. The Browser plugin requires shared-mime-info
  474. >= 0.22 to function.])])
  475. PKG_CHECK_MODULES([DBUS], [dbus-glib-1 >= $DBUS_REQS],,
  476. [enable_browser_plugins=no])
  477. DBUSLIBDIR="`$PKG_CONFIG dbus-glib-1 --variable=libdir`"
  478. DBUSBINDIR="`echo $DBUSLIBDIR | sed -e s/lib/bin/`"
  479. AC_PATH_PROG([DBUS_BIND], [dbus-binding-tool], [no], [$DBUSBINDIR:$PATH])
  480. if test "x$DBUS_BIND" = "xno"; then
  481. AC_MSG_WARN([dbus-binding-tool not found])
  482. enable_browser_plugins=no
  483. fi
  484. # check for -fno-rtti flag
  485. AC_LANG_PUSH([C++])
  486. __SAVE_CXXFLAGS=$CXXFLAGS
  487. CXXFLAGS="-fno-rtti $CXXFLAGS"
  488. AC_MSG_CHECKING([for -fno-rtti compiler flag])
  489. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[have_no_rtti_flag=yes],[have_no_rtti_flag=no])
  490. AC_MSG_RESULT([$have_no_rtti_flag])
  491. CXXFLAGS=$__SAVE_CXXFLAGS
  492. AC_LANG_POP([C++])
  493. if test "$have_no_rtti_flag" = "yes"; then
  494. AM_CXXFLAGS="-fno-rtti $AM_CXXFLAGS"
  495. fi
  496. PKG_CHECK_MODULES(PLUGIN_VIEWER, $BACKEND_MODULES gtk+-3.0 >= $GTK_REQS xplayer-plparser >= $XPLAYER_PLPARSER_REQS gdk-x11-3.0 >= $GTK_REQS dbus-glib-1 >= $DBUS_REQS xapp >= $XAPP_REQS)
  497. PKG_CHECK_MODULES(GLOW_BUTTON, gtk+-3.0)
  498. fi
  499. AM_CONDITIONAL([ENABLE_BROWSER_PLUGINS], [test "$enable_browser_plugins" = "yes"])
  500. # check which plugins to enable
  501. if test "$enable_browser_plugins" = "yes"; then
  502. AC_MSG_CHECKING([whether to enable the GMP browser plugin])
  503. AC_ARG_ENABLE([gmp-plugin],
  504. AS_HELP_STRING([--enable-gmp-plugin],[Whether to enable the GMP browser plugin]),
  505. [],[enable_gmp_plugin=yes])
  506. AC_MSG_RESULT([$enable_gmp_plugin])
  507. AC_MSG_CHECKING([whether to enable the NarrowSpace browser plugin])
  508. AC_ARG_ENABLE([narrowspace-plugin],
  509. AS_HELP_STRING([--enable-narrowspace-plugin],[Whether to enable the NarrowSpace browser plugin]),
  510. [],[enable_narrowspace_plugin=yes])
  511. AC_MSG_RESULT([$enable_narrowspace_plugin])
  512. AC_MSG_CHECKING([whether to enable the MullY browser plugin])
  513. AC_ARG_ENABLE([mully-plugin],
  514. AS_HELP_STRING([--enable-mully-plugin],[Whether to enable the MullY browser plugin]),
  515. [],[enable_mully_plugin=yes])
  516. AC_MSG_RESULT([$enable_mully_plugin])
  517. AC_MSG_CHECKING([whether to enable the Cone browser plugin])
  518. AC_ARG_ENABLE([cone-plugin],
  519. AS_HELP_STRING([--enable-cone-plugin],[Whether to enable the Cone browser plugin]),
  520. [],[enable_cone_plugin=yes])
  521. AC_MSG_RESULT([$enable_cone_plugin])
  522. AC_MSG_CHECKING([whether to enable the Vegas browser plugin])
  523. AC_ARG_ENABLE([vegas-plugin],
  524. AS_HELP_STRING([--enable-vegas-plugin],[Whether to enable the Vegas browser plugin]),
  525. [],[enable_vegas_plugin=yes])
  526. AC_MSG_RESULT([$enable_vegas_plugin])
  527. fi
  528. AM_CONDITIONAL([ENABLE_GMP_PLUGIN],[test "$enable_gmp_plugin" = "yes"])
  529. AM_CONDITIONAL([ENABLE_NARROWSPACE_PLUGIN],[test "$enable_narrowspace_plugin" = "yes"])
  530. AM_CONDITIONAL([ENABLE_MULLY_PLUGIN],[test "$enable_mully_plugin" = "yes"])
  531. AM_CONDITIONAL([ENABLE_CONE_PLUGIN],[test "$enable_cone_plugin" = "yes"])
  532. AM_CONDITIONAL([ENABLE_VEGAS_PLUGIN],[test "$enable_vegas_plugin" = "yes"])
  533. GLIB_GSETTINGS
  534. GNOME_COMPILE_WARNINGS([maximum])
  535. GNOME_CXX_WARNINGS
  536. GNOME_MAINTAINER_MODE_DEFINES
  537. GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
  538. # This macro expands DIR and assigns it to RET.
  539. # If DIR is NONE, then it's replaced by DEFAULT.
  540. # Based on AC_DEFINE_DIR
  541. AC_DEFUN([XPLAYER_FULLPATH], [
  542. test "x$prefix" = xNONE && prefix="$ac_default_prefix"
  543. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  544. ac_expand=[$]$1
  545. test "x$ac_expand" = xNONE && ac_expand="[$]$2"
  546. ac_expand=`eval echo [$]ac_expand`
  547. $3=`eval echo [$]ac_expand`
  548. ])
  549. dnl FULL_LIBEXECDIR is used for X-GNOME-Bugzilla-ExtraInfoScript expansion
  550. dnl in data/xplayer.desktop.in.in.in
  551. XPLAYER_FULLPATH(libexecdir, NONE, FULL_LIBEXECDIR)
  552. AC_SUBST(FULL_LIBEXECDIR)
  553. dnl run in source tree
  554. AC_ARG_ENABLE(run-in-source-tree,
  555. AS_HELP_STRING([--disable-run-in-source-tree],[disable search for UI files and plugins in local directory ]),
  556. [case "${enableval}" in
  557. yes) ENABLE_RUN_IN_SOURCE_TREE=yes ;;
  558. no) ENABLE_RUN_IN_SOURCE_TREE=no ;;
  559. *) AC_MSG_ERROR(bad value ${enableval} for --disable-run-in-source-tree) ;;
  560. esac],
  561. [ENABLE_RUN_IN_SOURCE_TREE=yes]) dnl Default value
  562. if test x$ENABLE_RUN_IN_SOURCE_TREE = xyes; then
  563. AC_DEFINE(XPLAYER_RUN_IN_SOURCE_TREE, 1, [enable search for UI files and plugins in local directory])
  564. fi
  565. if test "$GCC" = "yes" ; then
  566. CFLAGS="\
  567. -Wall \
  568. -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
  569. -Wnested-externs -Wpointer-arith \
  570. -Wcast-align -Wsign-compare \
  571. -fno-strict-aliasing \
  572. $CFLAGS"
  573. fi
  574. AC_SUBST([AM_CPPFLAGS])
  575. AC_SUBST([AM_CFLAGS])
  576. AC_SUBST([AM_CXXFLAGS])
  577. AC_SUBST([AM_LDFLAGS])
  578. AC_CONFIG_FILES([
  579. Makefile
  580. libgd/Makefile
  581. src/Makefile
  582. src/gst/Makefile
  583. src/properties/Makefile
  584. src/plugins/Makefile
  585. src/plugins/apple-trailers/Makefile
  586. src/plugins/autoload-subtitles/Makefile
  587. src/plugins/dbusservice/Makefile
  588. src/plugins/screensaver/Makefile
  589. src/plugins/screenshot/Makefile
  590. src/plugins/ontop/Makefile
  591. src/plugins/im-status/Makefile
  592. src/plugins/gromit/Makefile
  593. src/plugins/lirc/Makefile
  594. src/plugins/media-player-keys/Makefile
  595. src/plugins/opensubtitles/Makefile
  596. src/plugins/opensubtitles/org.x.player.plugins.opensubtitles.gschema.xml.in
  597. src/plugins/properties/Makefile
  598. src/plugins/recent/Makefile
  599. src/plugins/rotation/Makefile
  600. src/plugins/sidebar-test/Makefile
  601. src/plugins/skipto/Makefile
  602. src/plugins/samplepython/Makefile
  603. src/plugins/sample-vala/Makefile
  604. src/plugins/pythonconsole/Makefile
  605. src/plugins/pythonconsole/org.x.player.plugins.pythonconsole.gschema.xml.in
  606. src/plugins/brasero-disc-recorder/Makefile
  607. src/plugins/chapters/Makefile
  608. src/plugins/zeitgeist-dp/Makefile
  609. src/plugins/grilo/Makefile
  610. src/plugins/vimeo/Makefile
  611. src/backend/Makefile
  612. browser-plugin/Makefile
  613. data/Makefile
  614. data/org.x.player.gschema.xml.in
  615. data/xplayer.desktop.in.in
  616. data/xplayer.pc
  617. data/icons/Makefile
  618. data/icons/16x16/Makefile
  619. data/icons/22x22/Makefile
  620. data/icons/24x24/Makefile
  621. data/icons/32x32/Makefile
  622. data/icons/48x48/Makefile
  623. data/icons/64x64/Makefile
  624. data/icons/96x96/Makefile
  625. data/icons/scalable/Makefile
  626. po/Makefile.in
  627. help/Makefile
  628. docs/Makefile
  629. docs/reference/Makefile
  630. docs/reference/version.xml
  631. ])
  632. AC_OUTPUT
  633. AC_MSG_NOTICE([Xplayer was configured with the following options:])
  634. AC_MSG_NOTICE([** Using the GStreamer-$GST_MAJORMINOR backend])
  635. if test "x$MISSING_PLUGINS_LIBS" != "x"; then
  636. AC_MSG_NOTICE([** Easy codec installation support enabled])
  637. else
  638. AC_MSG_NOTICE([ Easy codec installation support disabled])
  639. fi
  640. if test x$enable_python = xyes ; then
  641. AC_MSG_NOTICE([** Python plugin support enabled])
  642. else
  643. AC_MSG_NOTICE([ Python plugin support disabled])
  644. fi
  645. if test x$with_vala = xyes ; then
  646. AC_MSG_NOTICE([** Vala plugin support enabled])
  647. else
  648. AC_MSG_NOTICE([ Vala plugin support disabled])
  649. fi
  650. if test "x${PLUGINS}" != "x" ; then
  651. for allowed_plugin in ${ALL_PLUGINS}; do
  652. for plugin in ${PLUGINS}; do
  653. case ${allowed_plugin} in
  654. ${plugin})
  655. AC_MSG_NOTICE([** ${allowed_plugin} plugin enabled])
  656. continue 2
  657. ;;
  658. *);;
  659. esac
  660. done
  661. AC_MSG_NOTICE([ ${allowed_plugin} plugin disabled])
  662. done
  663. else
  664. AC_MSG_NOTICE([ No Xplayer plugins enabled])
  665. fi
  666. if test x$enable_browser_plugins = xyes ; then
  667. AC_MSG_NOTICE([** Browser plugin enabled])
  668. if test x$enable_gmp_plugin = xyes ; then
  669. AC_MSG_NOTICE([** GMP (Windows Media) plugin enabled])
  670. else
  671. AC_MSG_NOTICE([ GMP (Windows Media) plugin disabled])
  672. fi
  673. if test x$enable_narrowspace_plugin = xyes ; then
  674. AC_MSG_NOTICE([** NarrowSpace (QuickTime) plugin enabled])
  675. else
  676. AC_MSG_NOTICE([ NarrowSpace (QuickTime) plugin disabled])
  677. fi
  678. if test x$enable_mully_plugin = xyes ; then
  679. AC_MSG_NOTICE([** MullY (DivX) plugin enabled])
  680. else
  681. AC_MSG_NOTICE([ MullY (DivX) plugin disabled])
  682. fi
  683. if test x$enable_cone_plugin = xyes ; then
  684. AC_MSG_NOTICE([** Cone (VLC) plugin enabled])
  685. else
  686. AC_MSG_NOTICE([ Cone (VLC) plugin disabled])
  687. fi
  688. if test x$enable_vegas_plugin = xyes ; then
  689. AC_MSG_NOTICE([** Vegas (Flash) plugin enabled])
  690. else
  691. AC_MSG_NOTICE([ Vegas (Flash) plugin disabled])
  692. fi
  693. else
  694. AC_MSG_NOTICE([ Browser plugin disabled])
  695. fi
  696. if test "$with_smclient" != "no" ; then
  697. AC_MSG_NOTICE([** SM client support enabled])
  698. else
  699. AC_MSG_NOTICE([ SM client support disabled])
  700. fi
  701. AC_MSG_NOTICE([End options])