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.

configure.ac 6.7 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. AC_PREREQ(2.63)
  2. AC_INIT([cinnamon],[4.2.2],[https://github.com/linuxmint/Cinnamon/issues],[cinnamon])
  3. AC_CONFIG_HEADERS([config.h])
  4. AC_CONFIG_SRCDIR([src/cinnamon-global.c])
  5. AC_CONFIG_MACRO_DIR([m4])
  6. AC_CONFIG_AUX_DIR([config])
  7. m4_ifdef([AX_IS_RELEASE], [AX_IS_RELEASE([always])])
  8. AC_SUBST([PACKAGE_NAME], ["$PACKAGE_NAME"])
  9. AC_SUBST([PACKAGE_VERSION], ["$PACKAGE_VERSION"])
  10. AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar foreign subdir-objects])
  11. AM_MAINTAINER_MODE([enable])
  12. m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
  13. m4_divert_text([DEFAULTS], [: "${ARFLAGS=cr} ${AR_FLAGS=cr}"])
  14. # Checks for programs.
  15. AC_PROG_CC
  16. AC_PROG_CXX
  17. # Needed for per-target cflags, like in cinnamon-taskpanel
  18. AM_PROG_CC_C_O
  19. # Initialize libtool
  20. LT_PREREQ([2.2.6])
  21. LT_INIT([disable-static])
  22. # i18n
  23. IT_PROG_INTLTOOL([0.40])
  24. GETTEXT_PACKAGE=cinnamon
  25. AC_SUBST(GETTEXT_PACKAGE)
  26. AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
  27. [The prefix for our gettext translation domains.])
  28. PKG_PROG_PKG_CONFIG([0.22])
  29. GLIB_GSETTINGS
  30. # We need at least this, since gst_plugin_register_static() was added
  31. # in 0.10.16, but nothing older than 0.10.21 has been tested.
  32. GSTREAMER_MIN_VERSION=0.11.92
  33. recorder_modules=
  34. build_recorder=false
  35. AC_MSG_CHECKING([for GStreamer (needed for recording functionality)])
  36. if $PKG_CONFIG --exists gstreamer-1.0 '>=' $GSTREAMER_MIN_VERSION ; then
  37. AC_MSG_RESULT(yes)
  38. build_recorder=true
  39. recorder_modules="gstreamer-1.0 gstreamer-base-1.0 x11"
  40. PKG_CHECK_MODULES(TEST_CINNAMON_RECORDER, $recorder_modules muffin-clutter-0 xfixes)
  41. else
  42. AC_MSG_RESULT(no)
  43. fi
  44. AM_CONDITIONAL(BUILD_RECORDER, $build_recorder)
  45. CLUTTER_MIN_VERSION=0
  46. GOBJECT_INTROSPECTION_MIN_VERSION=0.9.2
  47. GJS_MIN_VERSION=3.2.0
  48. MUFFIN_MIN_VERSION=4.0.3
  49. GTK_MIN_VERSION=3.12.0
  50. GIO_MIN_VERSION=2.35.0
  51. POLKIT_MIN_VERSION=0.100
  52. STARTUP_NOTIFICATION_MIN_VERSION=0.11
  53. # Collect more than 20 libraries for a prize!
  54. PKG_CHECK_MODULES(CINNAMON, gio-2.0 >= $GIO_MIN_VERSION
  55. gio-unix-2.0 dbus-glib-1 libxml-2.0
  56. gtk+-3.0 >= $GTK_MIN_VERSION
  57. libmuffin >= $MUFFIN_MIN_VERSION
  58. cjs-1.0 >= $GJS_MIN_VERSION
  59. libcinnamon-menu-3.0 $recorder_modules
  60. gdk-x11-3.0 libsoup-2.4 gl
  61. muffin-cogl-pango-0
  62. muffin-cogl-path-0
  63. muffin-cogl-0
  64. muffin-clutter-0
  65. libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION
  66. gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION
  67. polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes
  68. libnm atk-bridge-2.0)
  69. PKG_CHECK_MODULES(CINNAMON_PERF_HELPER, gtk+-3.0 gio-2.0)
  70. PKG_CHECK_MODULES(CINNAMON_HOTPLUG_SNIFFER, gio-2.0 gdk-pixbuf-2.0)
  71. GJS_VERSION=`$PKG_CONFIG --modversion cjs-1.0`
  72. AC_DEFINE_UNQUOTED([GJS_VERSION], ["$GJS_VERSION"], [The version of GJS we're linking to])
  73. dnl '
  74. AC_SUBST([GJS_VERSION], ["$GJS_VERSION"])
  75. GOBJECT_INTROSPECTION_CHECK([$GOBJECT_INTROSPECTION_MIN_VERSION])
  76. saved_CFLAGS=$CFLAGS
  77. saved_LIBS=$LIBS
  78. CFLAGS=$CINNAMON_CFLAGS
  79. LIBS=$CINNAMON_LIBS
  80. AC_CHECK_FUNCS(XFixesCreatePointerBarrier)
  81. CFLAGS=$saved_CFLAGS
  82. LIBS=$saved_LIBS
  83. PKG_CHECK_MODULES(ST, muffin-cogl-path-0 muffin-clutter-0 gtk+-3.0 libcroco-0.6 >= 0.6.2 cinnamon-desktop >= 2.4.0 x11)
  84. PKG_CHECK_MODULES(GDMUSER, dbus-glib-1 gtk+-3.0)
  85. PKG_CHECK_MODULES(TRAY, muffin-clutter-0 gtk+-3.0)
  86. PKG_CHECK_MODULES(DESKTOP_SCHEMAS, cinnamon-desktop >= 2.4.0)
  87. MUFFIN_GIR_DIR=`$PKG_CONFIG --variable=girdir libmuffin`
  88. MUFFIN_TYPELIB_DIR=`$PKG_CONFIG --variable=typelibdir libmuffin`
  89. AC_SUBST(MUFFIN_GIR_DIR)
  90. AC_SUBST(MUFFIN_TYPELIB_DIR)
  91. GJS_CONSOLE=`$PKG_CONFIG --variable=cjs_console cjs-1.0`
  92. AC_SUBST(GJS_CONSOLE)
  93. AC_CHECK_FUNCS(fdwalk)
  94. AC_CHECK_FUNCS(mallinfo)
  95. AC_CHECK_HEADERS([sys/resource.h])
  96. # _NL_TIME_FIRST_WEEKDAY is an enum and not a define
  97. AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
  98. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]],
  99. [[nl_langinfo(_NL_TIME_FIRST_WEEKDAY);]])],
  100. [langinfo_ok=yes], [langinfo_ok=no])
  101. AC_MSG_RESULT($langinfo_ok)
  102. if test "$langinfo_ok" = "yes"; then
  103. AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
  104. [Define if _NL_TIME_FIRST_WEEKDAY is available])
  105. fi
  106. # Sets GLIB_GENMARSHAL and GLIB_MKENUMS
  107. AM_PATH_GLIB_2_0()
  108. G_IR_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
  109. AC_SUBST(G_IR_SCANNER)
  110. G_IR_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
  111. AC_SUBST(G_IR_COMPILER)
  112. G_IR_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
  113. AC_SUBST(G_IR_GENERATE)
  114. GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
  115. AC_SUBST(GIRDIR)
  116. TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
  117. AC_SUBST(TYPELIBDIR)
  118. m4_ifdef([AX_COMPILER_FLAGS],
  119. [AX_COMPILER_FLAGS([WARN_CFLAGS],[WARN_LDFLAGS])])
  120. AC_ARG_ENABLE([gtk-doc],
  121. AC_HELP_STRING([--enable-gtk-doc],
  122. [use gtk-doc to build documentation [[default=yes]]]),,
  123. enable_gtk_doc=yes)
  124. AC_MSG_CHECKING([location of system Certificate Authority list])
  125. AC_ARG_WITH(ca-certificates,
  126. [AC_HELP_STRING([--with-ca-certificates=@<:@path@:>@],
  127. [path to system Certificate Authority list])])
  128. if test "$with_ca_certificates" = "no"; then
  129. AC_MSG_RESULT([disabled])
  130. else
  131. if test -z "$with_ca_certificates"; then
  132. for f in /etc/pki/tls/certs/ca-bundle.crt \
  133. /etc/ssl/certs/ca-certificates.crt; do
  134. if test -f "$f"; then
  135. with_ca_certificates="$f"
  136. fi
  137. done
  138. if test -z "$with_ca_certificates"; then
  139. AC_MSG_ERROR([could not find. Use --with-ca-certificates=path to set, or --without-ca-certificates to disable])
  140. fi
  141. fi
  142. AC_MSG_RESULT($with_ca_certificates)
  143. AC_DEFINE_UNQUOTED(CINNAMON_SYSTEM_CA_FILE, ["$with_ca_certificates"], [The system TLS CA list])
  144. fi
  145. AC_SUBST(CINNAMON_SYSTEM_CA_FILE,["$with_ca_certificates"])
  146. GTK_DOC_CHECK([1.15], [--flavour no-tmpl])
  147. AC_CONFIG_FILES([
  148. Makefile
  149. data/Makefile
  150. data/icons/Makefile
  151. docs/Makefile
  152. docs/reference/Makefile
  153. docs/reference/cinnamon/Makefile
  154. docs/reference/cinnamon/cinnamon-docs.sgml
  155. docs/reference/cinnamon-js/Makefile
  156. docs/reference/cinnamon-tutorials/Makefile
  157. docs/reference/cinnamon-tutorials/cinnamon-tutorials-docs.sgml
  158. docs/reference/st/Makefile
  159. docs/reference/st/cinnamon-st-docs.sgml
  160. js/Makefile
  161. js/misc/config.js
  162. src/Makefile
  163. tests/Makefile
  164. po/Makefile.in
  165. man/Makefile
  166. files/Makefile
  167. ])
  168. AC_OUTPUT