Add systemd configure option. Closes #921.

This commit is contained in:
sledgehammer999 2015-04-05 15:12:36 +03:00
commit 6b3555bd90
3 changed files with 53 additions and 0 deletions

View file

@ -42,6 +42,12 @@ AC_ARG_ENABLE(gui,
[],
[enable_gui=yes])
AC_ARG_ENABLE(systemd,
[AS_HELP_STRING([--enable-systemd],
[Install the systemd service file (GUI only).])],
[],
[enable_systemd=no])
AC_ARG_ENABLE(webui,
[AS_HELP_STRING([--disable-webui],
[Disable the WebUI.])],
@ -84,6 +90,7 @@ AC_MSG_CHECKING([whether to enable the GUI])
AS_CASE(["x$enable_gui"],
["xyes"],
[AC_MSG_RESULT([yes])
enable_systemd=[no]
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG nogui"],
["xno"],
[AC_MSG_RESULT([no])
@ -93,6 +100,17 @@ AS_CASE(["x$enable_gui"],
[AC_MSG_RESULT([$enable_gui])
AC_MSG_ERROR([Unknown option "$enable_gui". Use either "yes" or "no".])])
AC_MSG_CHECKING([whether to install the systemd service file])
AS_CASE(["x$enable_systemd"],
["xyes"],
[AC_MSG_RESULT([yes])
QBT_ADD_CONFIG="$QBT_ADD_CONFIG systemd"],
["xno"],
[AC_MSG_RESULT([no])
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG systemd"],
[AC_MSG_RESULT([$enable_systemd])
AC_MSG_ERROR([Unknown option "$enable_systemd". Use either "yes" or "no".])])
AC_MSG_CHECKING([whether to enable the WebUI])
AS_CASE(["x$enable_webui"],
["xyes"],