autotools: install themes during 'make install'
Default path for themes is ${pkgdatadir}/themes that usualy equals to
/usr/share/profanity/themes. This patch also introduces new option
--with-themes[=PATH] that specifies installation path. This option can
be used for cancel of installation at all: --without-themes.
References: issue #323
This commit is contained in:
14
configure.ac
14
configure.ac
@@ -42,6 +42,8 @@ AC_ARG_WITH([libxml2],
|
||||
[AS_HELP_STRING([--with-libxml2], [link with libxml2 instead of expat])])
|
||||
AC_ARG_WITH([xscreensaver],
|
||||
[AS_HELP_STRING([--with-xscreensaver], [use libXScrnSaver to determine idle time])])
|
||||
AC_ARG_WITH([themes],
|
||||
[AS_HELP_STRING([--with-themes[[=PATH]]], [install themes (default yes)])])
|
||||
|
||||
### Select first existing xml library among expat and libxml2
|
||||
PARSER=""
|
||||
@@ -192,6 +194,15 @@ elif test "x$enable_otr" = x; then
|
||||
[AC_MSG_NOTICE([libotr not found, otr encryption support not enabled])])
|
||||
fi
|
||||
|
||||
AS_IF([test "x$with_themes" = xno],
|
||||
[THEMES_INSTALL="false"],
|
||||
[THEMES_INSTALL="true"])
|
||||
AS_IF([test "x$with_themes" = xno -o "x$with_themes" = xyes -o "x$with_themes" = x],
|
||||
[THEMES_PATH='${pkgdatadir}/themes'],
|
||||
[THEMES_PATH="$with_themes"])
|
||||
AC_SUBST(THEMES_PATH)
|
||||
AM_CONDITIONAL([THEMES_INSTALL], "$THEMES_INSTALL")
|
||||
|
||||
### cmocka is required only for tests, profanity shouldn't be linked with it
|
||||
### TODO: pass cmocka_CFLAGS and cmocka_LIBS to Makefile.am
|
||||
PKG_CHECK_MODULES([cmocka], [cmocka], [],
|
||||
@@ -206,6 +217,7 @@ AM_CFLAGS="-Wall -Wno-deprecated-declarations"
|
||||
AS_IF([test "x$PACKAGE_STATUS" = xdevelopment],
|
||||
[AM_CFLAGS="$AM_CFLAGS -Wunused -Werror"])
|
||||
AM_CPPFLAGS="$AM_CPPFLAGS $glib_CFLAGS $curl_CFLAGS $libnotify_CFLAGS"
|
||||
AM_CPPFLAGS="$AM_CPPFLAGS -DTHEMES_PATH=\"$THEMES_PATH\""
|
||||
LIBS="$LIBS $glib_LIBS $curl_LIBS $libnotify_LIBS"
|
||||
|
||||
AC_SUBST(AM_CFLAGS)
|
||||
@@ -225,5 +237,7 @@ echo "AM_CFLAGS : $AM_CFLAGS"
|
||||
echo "AM_CPPFLAGS : $AM_CPPFLAGS"
|
||||
echo "LIBS : $LIBS"
|
||||
echo "XML Parser : $PARSER"
|
||||
echo "Install themes : $THEMES_INSTALL"
|
||||
echo "Themes path : $THEMES_PATH"
|
||||
echo ""
|
||||
echo "Now you can run \`make' to build profanity"
|
||||
|
||||
Reference in New Issue
Block a user