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 13 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. AC_INIT([plymouth],[0.9.5],[https://gitlab.freedesktop.org/plymouth/plymouth/issues])
  2. AC_CONFIG_SRCDIR(src/main.c)
  3. AC_CONFIG_HEADER(config.h)
  4. AC_CONFIG_AUX_DIR(build-tools)
  5. AC_USE_SYSTEM_EXTENSIONS
  6. AC_SYS_LARGEFILE
  7. AC_PROG_AWK
  8. AC_PROG_CC_STDC
  9. AM_PROG_CC_C_O
  10. AC_HEADER_STDC
  11. AC_C_CONST
  12. AM_INIT_AUTOMAKE([dist-xz no-dist-gzip subdir-objects])
  13. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  14. AM_MAINTAINER_MODE([enable])
  15. AM_GNU_GETTEXT_VERSION([0.19.8])
  16. AM_GNU_GETTEXT([external])
  17. PKG_PROG_PKG_CONFIG
  18. LT_INIT([dlopen disable-static pic-only])
  19. ## increment if the interface has additions, changes, removals.
  20. LT_CURRENT=5
  21. ## increment any time the source changes; set to
  22. ## 0 if you increment CURRENT
  23. LT_REVISION=0
  24. ## increment if any interfaces have been added; set to 0
  25. ## if any interfaces have been changed or removed. removal has
  26. ## precedence over adding, so set to 0 if both happened.
  27. LT_AGE=0
  28. AC_SUBST(LT_CURRENT)
  29. AC_SUBST(LT_REVISION)
  30. AC_SUBST(LT_AGE)
  31. PKG_CHECK_MODULES(IMAGE, [libpng >= 1.2.16 ])
  32. AC_SUBST(IMAGE_CFLAGS)
  33. AC_SUBST(IMAGE_LIBS)
  34. AC_ARG_WITH(udev, AS_HELP_STRING([--with-udev], [Add udev support]),, with_udev=yes)
  35. if test "x$with_udev" != "xno" ; then
  36. PKG_CHECK_MODULES(UDEV, [libudev], have_udev=yes, have_udev=no)
  37. AC_SUBST(UDEV_CFLAGS)
  38. AC_SUBST(UDEV_LIBS)
  39. if test "x$have_udev" = "xyes"; then
  40. AC_DEFINE(HAVE_UDEV, 1, [Define if have udev support])
  41. else
  42. AC_MSG_ERROR([libudev is required unless --without-udev is passed])
  43. fi
  44. fi
  45. PLYMOUTH_CFLAGS=""
  46. PLYMOUTH_LIBS="-lm -lrt -ldl"
  47. AC_SUBST(PLYMOUTH_CFLAGS)
  48. AC_SUBST(PLYMOUTH_LIBS)
  49. AC_PATH_PROG([SYSTEMD_ASK_PASSWORD_AGENT], [systemd-tty-ask-password-agent])
  50. AC_PATH_PROG([UDEVADM], [udevadm])
  51. AC_ARG_ENABLE(pango, AS_HELP_STRING([--enable-pango],[enable building with pango, disabled there is no encryption prompts]),enable_pango=$enableval,enable_pango=yes)
  52. AM_CONDITIONAL(ENABLE_PANGO, [test "$enable_pango" = yes])
  53. if test x$enable_pango = xyes; then
  54. PKG_CHECK_MODULES(PANGO, [pangocairo >= 1.21.0 ])
  55. AC_SUBST(PANGO_CFLAGS)
  56. AC_SUBST(PANGO_LIBS)
  57. fi
  58. AC_ARG_ENABLE(gtk, AS_HELP_STRING([--enable-gtk],[enable building with gtk, disabled there is no x11 renderer]),enable_gtk=$enableval,enable_gtk=yes)
  59. AM_CONDITIONAL(ENABLE_GTK, [test "$enable_gtk" = yes])
  60. if test x$enable_gtk = xyes; then
  61. PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= 3.14.0])
  62. AC_SUBST(GTK_CFLAGS)
  63. AC_SUBST(GTK_LIBS)
  64. fi
  65. AC_ARG_ENABLE(drm, AS_HELP_STRING([--enable-drm],[enable building drm kms support]),enable_drm_renderer=$enableval,enable_drm_renderer=yes)
  66. AM_CONDITIONAL(ENABLE_DRM_RENDERER, [test "$enable_drm_renderer" = yes])
  67. if test x$enable_drm_renderer = xyes; then
  68. PKG_CHECK_MODULES(DRM, [libdrm])
  69. fi
  70. AC_ARG_ENABLE(documentation,
  71. AS_HELP_STRING([--enable-documentation],
  72. [build documentation]),,
  73. enable_documentation=yes)
  74. if test x$enable_documentation = xyes; then
  75. AC_PATH_PROG([XSLTPROC], [xsltproc])
  76. if test x$XSLTPROC = x; then
  77. AC_MSG_ERROR([xsltproc is required to build documentation])
  78. fi
  79. fi
  80. AM_CONDITIONAL(BUILD_DOCUMENTATION, test x$enable_documentation = xyes)
  81. AC_ARG_ENABLE(tracing, AS_HELP_STRING([--enable-tracing],[enable verbose tracing code]),enable_tracing=$enableval,enable_tracing=yes)
  82. if test x$enable_tracing = xyes; then
  83. AC_DEFINE(PLY_ENABLE_TRACING, 1, [Build in verbose debug tracing spew])
  84. fi
  85. AC_ARG_ENABLE(upstart-monitoring, AS_HELP_STRING([--enable-upstart-monitoring],[listen for messages on the Upstart D-Bus interface]),enable_upstart_monitoring=$enableval,enable_upstart_monitoring=no)
  86. if test x$enable_upstart_monitoring = xyes; then
  87. PKG_CHECK_MODULES(DBUS, [dbus-1])
  88. AC_SUBST(DBUS_CFLAGS)
  89. AC_SUBST(DBUS_LIBS)
  90. AC_CHECK_HEADERS([ncursesw/term.h ncurses/term.h term.h], [break])
  91. AC_CHECK_LIB([ncursesw], [initscr],
  92. [CURSES_LIBS="$CURSES_LIBS -lncursesw"],
  93. [AC_CHECK_LIB([ncurses], [initscr],
  94. [CURSES_LIBS="$CURSES_LIBS -lncurses"],
  95. [AC_CHECK_LIB([curses], [initscr],
  96. [CURSES_LIBS="$CURSES_LIBS -lcurses"],
  97. [AC_MSG_ERROR([no curses library found])])])])
  98. AC_SUBST(CURSES_LIBS)
  99. fi
  100. AM_CONDITIONAL(ENABLE_UPSTART_MONITORING, [test "$enable_upstart_monitoring" = yes])
  101. AC_ARG_ENABLE(systemd-integration, AS_HELP_STRING([--enable-systemd-integration],[coordinate boot up with systemd]),enable_systemd_integration=$enableval,enable_systemd_integration=yes)
  102. AM_CONDITIONAL(ENABLE_SYSTEMD_INTEGRATION, [test "$enable_systemd_integration" = yes])
  103. if test x$enable_systemd_integration = xyes; then
  104. AC_DEFINE(PLY_ENABLE_SYSTEMD_INTEGRATION, 1, [Coordinate boot up with systemd])
  105. AC_ARG_WITH([systemdunitdir], AC_HELP_STRING([--with-systemdunitdir=DIR],
  106. [path to systemd service directory]), [path_systemdunit=${withval}],
  107. [path_systemdunit="`$PKG_CONFIG --variable=systemdsystemunitdir systemd`"])
  108. if (test -n "${path_systemdunit}"); then
  109. SYSTEMD_UNIT_DIR="${path_systemdunit}"
  110. fi
  111. AC_SUBST(SYSTEMD_UNIT_DIR)
  112. fi
  113. AC_ARG_WITH([runtimedir],
  114. AC_HELP_STRING([--with-runtimedir=DIR], [runtime data dir [LOCALSTATEDIR/run]]),
  115. [plymouthruntimedir=${withval}/plymouth], [plymouthruntimedir=""])
  116. AC_ARG_WITH(system-root-install, AS_HELP_STRING([--with-system-root-install],[Install client in /bin and daemon in /sbin]),with_system_root_install=${withval},with_system_root_install=no)
  117. AM_CONDITIONAL(WITH_SYSTEM_ROOT_INSTALL, [test "$with_system_root_install" = yes])
  118. if test x$with_system_root_install = xyes; then
  119. plymouthclientdir=/bin
  120. plymouthdaemondir=/sbin
  121. if (test -z "${plymouthruntimedir}"); then
  122. plymouthruntimedir=/run/plymouth
  123. fi
  124. else
  125. plymouthclientdir=$bindir
  126. plymouthdaemondir=$sbindir
  127. if (test -z "${plymouthruntimedir}"); then
  128. plymouthruntimedir=$localstatedir/run/plymouth
  129. fi
  130. fi
  131. AC_SUBST(plymouthclientdir)
  132. AC_SUBST(plymouthdaemondir)
  133. AC_SUBST(plymouthruntimedir)
  134. AS_AC_EXPAND(PLYMOUTH_CLIENT_DIR, $plymouthclientdir)
  135. AS_AC_EXPAND(PLYMOUTH_DAEMON_DIR, $plymouthdaemondir)
  136. AS_AC_EXPAND(PLYMOUTH_RUNTIME_DIR, $plymouthruntimedir)
  137. AC_ARG_WITH(rhgb-compat-link, AS_HELP_STRING([--with-rhgb-compat-link],[Install /usr/bin/rhgb-client compatability symlink]),with_rhgb_compat_link=${withval},with_rhgb_compat_link=no)
  138. AM_CONDITIONAL(WITH_RHGB_COMPAT_LINK, [test "$with_rhgb_compat_link" = yes])
  139. AC_ARG_WITH(logo, AS_HELP_STRING([--with-logo],[logo used by boot splash plugins]),logofile=${withval},logofile=$datadir/plymouth/bizcom.png)
  140. AC_SUBST(logofile)
  141. AS_AC_EXPAND(PLYMOUTH_LOGO_FILE, $logofile)
  142. AM_CONDITIONAL(INSTALL_FALLBACK_LOGO, [test "$logofile" = $datadir/plymouth/bizcom.png])
  143. AC_ARG_WITH(background-color, AS_HELP_STRING([--with-background-color],[background color used by boot splash plugins]),background_color=${withval},background_color=0x5d5950)
  144. AC_SUBST(background_color)
  145. AC_ARG_WITH(background-start-color-stop, AS_HELP_STRING([--with-background-start-color-stop],[first color stop in background gradients used by boot splash plugins]),background_start_color=${withval},background_start_color=0x807c71)
  146. AC_SUBST(background_start_color)
  147. AC_ARG_WITH(background-end-color-stop, AS_HELP_STRING([--with-background-end-color-stop],[first color end in background gradients used by boot splash plugins]),background_end_color=${withval},background_end_color=0x3a362f)
  148. AC_SUBST(background_end_color)
  149. AC_ARG_WITH(release-file, AS_HELP_STRING([--with-release-file=<path_to_release_file>],[Release File to use to detect distribution (by default /etc/system-release)]),RELEASE_FILE=${withval},RELEASE_FILE=/etc/system-release)
  150. AC_SUBST(RELEASE_FILE)
  151. AC_DEFINE_UNQUOTED(RELEASE_FILE, "$RELEASE_FILE", [Release file path])
  152. AC_ARG_WITH(boot-tty, AS_HELP_STRING([--with-boot-tty=<tty>],[Default TTY to use in boot mode (by default tty1)]),BOOT_TTY=${withval},BOOT_TTY=/dev/tty1)
  153. AC_DEFINE_UNQUOTED(BOOT_TTY, "$BOOT_TTY", [TTY to use in boot mode])
  154. AC_ARG_WITH(shutdown-tty, AS_HELP_STRING([--with-shutdown-tty=<tty>],[Default TTY to use in shutdown mode (by default tty63)]),SHUTDOWN_TTY=${withval},SHUTDOWN_TTY=/dev/tty63)
  155. AC_DEFINE_UNQUOTED(SHUTDOWN_TTY, "$SHUTDOWN_TTY", [TTY to use in shutdown mode])
  156. # Turn on the additional warnings last, so -Werror doesn't affect other tests.
  157. AC_DEFUN([PLYMOUTH_CC_TRY_FLAG], [
  158. AC_MSG_CHECKING([whether $CC supports $1])
  159. plymouth_save_CFLAGS="$CFLAGS"
  160. CFLAGS="$CFLAGS $1"
  161. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])], [plymouth_cc_flag=yes], [plymouth_cc_flag=no])
  162. CFLAGS="$plymouth_save_CFLAGS"
  163. if test "x$plymouth_cc_flag" = "xyes"; then
  164. ifelse([$2], , :, [$2])
  165. else
  166. ifelse([$3], , :, [$3])
  167. fi
  168. AC_MSG_RESULT([$plymouth_cc_flag])
  169. ])
  170. AC_ARG_ENABLE(more-warnings,
  171. AS_HELP_STRING([--enable-more-warnings],
  172. [Maximum compiler warnings]),
  173. set_more_warnings="$enableval",[
  174. if test -d $srcdir/.git; then
  175. set_more_warnings=yes
  176. else
  177. set_more_warnings=no
  178. fi])
  179. AC_MSG_CHECKING(for more warnings)
  180. if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
  181. AC_MSG_RESULT(yes)
  182. MAYBE_WARN="\
  183. -Wall -Wextra \
  184. -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
  185. -Wwrite-strings -Wnested-externs -Wpointer-arith \
  186. -Wswitch-enum -Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations \
  187. -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-result \
  188. -Wno-cast-function-type \
  189. -Wcast-align -Wsign-compare -Wp,-D_FORTIFY_SOURCE=2"
  190. elif test "$GCC" = "yes"; then
  191. AC_MSG_RESULT(no)
  192. MAYBE_WARN="-Wall -Wno-sign-compare -Wno-deprecated-declarations"
  193. else
  194. AC_MSG_RESULT(no)
  195. fi
  196. # invalidate cached value if MAYBE_WARN has changed
  197. if test "x$plymouth_cv_warn_maybe" != "x$MAYBE_WARN"; then
  198. unset plymouth_cv_warn_cflags
  199. fi
  200. AC_CACHE_CHECK([for supported warning flags], plymouth_cv_warn_cflags, [
  201. echo
  202. WARN_CFLAGS=""
  203. # Some warning options are not supported by all versions of
  204. # gcc, so test all desired options against the current
  205. # compiler.
  206. #
  207. # Note that there are some order dependencies
  208. # here. Specifically, an option that disables a warning will
  209. # have no net effect if a later option then enables that
  210. # warnings, (perhaps implicitly). So we put some grouped
  211. # options (-Wall and -Wextra) up front and the -Wno options
  212. # last.
  213. for W in $MAYBE_WARN; do
  214. PLYMOUTH_CC_TRY_FLAG([$W], [WARN_CFLAGS="$WARN_CFLAGS $W"])
  215. done
  216. plymouth_cv_warn_cflags=$WARN_CFLAGS
  217. plymouth_cv_warn_maybe=$MAYBE_WARN
  218. AC_MSG_CHECKING([which warning flags were supported])])
  219. WARN_CFLAGS="$plymouth_cv_warn_cflags"
  220. PLYMOUTH_CFLAGS="$PLYMOUTH_CFLAGS $WARN_CFLAGS"
  221. plymouththemedir=$datadir/plymouth/themes
  222. AS_AC_EXPAND(PLYMOUTH_THEME_PATH, $plymouththemedir)
  223. plymouthruntimethemedir=$plymouthruntimedir/themes
  224. AS_AC_EXPAND(PLYMOUTH_RUNTIME_THEME_PATH, $plymouthruntimethemedir)
  225. plymouthplugindir=$libdir/plymouth/
  226. AS_AC_EXPAND(PLYMOUTH_PLUGIN_PATH, $plymouthplugindir)
  227. plymouthpolicydir=$datadir/plymouth/
  228. AS_AC_EXPAND(PLYMOUTH_POLICY_DIR, $plymouthpolicydir)
  229. plymouthconfdir=$sysconfdir/plymouth/
  230. AS_AC_EXPAND(PLYMOUTH_CONF_DIR, $plymouthconfdir)
  231. AS_AC_EXPAND(PLYMOUTH_LIBDIR, $libdir)
  232. AS_AC_EXPAND(PLYMOUTH_LIBEXECDIR, $libexecdir)
  233. AS_AC_EXPAND(PLYMOUTH_DATADIR, $datadir)
  234. AC_CONFIG_FILES([Makefile po/Makefile.in
  235. src/libply/Makefile
  236. src/libply-splash-core/Makefile
  237. src/libply-splash-graphics/Makefile
  238. src/ply-splash-core.pc
  239. src/ply-splash-graphics.pc
  240. src/plugins/Makefile
  241. src/plugins/renderers/Makefile
  242. src/plugins/renderers/frame-buffer/Makefile
  243. src/plugins/renderers/drm/Makefile
  244. src/plugins/renderers/x11/Makefile
  245. src/plugins/splash/Makefile
  246. src/plugins/splash/fade-throbber/Makefile
  247. src/plugins/splash/tribar/Makefile
  248. src/plugins/splash/text/Makefile
  249. src/plugins/splash/details/Makefile
  250. src/plugins/splash/space-flares/Makefile
  251. src/plugins/splash/two-step/Makefile
  252. src/plugins/splash/script/Makefile
  253. src/plugins/controls/Makefile
  254. src/plugins/controls/label/Makefile
  255. src/Makefile
  256. src/client/ply-boot-client.pc
  257. src/client/Makefile
  258. src/upstart-bridge/Makefile
  259. themes/Makefile
  260. themes/spinfinity/Makefile
  261. themes/fade-in/Makefile
  262. themes/tribar/Makefile
  263. themes/text/Makefile
  264. themes/details/Makefile
  265. themes/solar/Makefile
  266. themes/glow/Makefile
  267. themes/spinner/Makefile
  268. themes/script/Makefile
  269. themes/bgrt/Makefile
  270. images/Makefile
  271. scripts/plymouth-generate-initrd
  272. scripts/plymouth-populate-initrd
  273. scripts/plymouth-set-default-theme
  274. scripts/Makefile
  275. systemd-units/plymouth-halt.service
  276. systemd-units/plymouth-kexec.service
  277. systemd-units/plymouth-poweroff.service
  278. systemd-units/plymouth-quit.service
  279. systemd-units/plymouth-quit-wait.service
  280. systemd-units/plymouth-read-write.service
  281. systemd-units/plymouth-reboot.service
  282. systemd-units/plymouth-start.service
  283. systemd-units/plymouth-switch-root.service
  284. systemd-units/systemd-ask-password-plymouth.path
  285. systemd-units/systemd-ask-password-plymouth.service
  286. systemd-units/Makefile
  287. docs/Makefile
  288. ])
  289. AC_OUTPUT