autotools: add --enable-site-packages option

This option allows the installation of pyfiles in PYTHON/site-packages/gajim
instead of DATADIR/gajim/src which is a quality policy for some distributions.
This commit is contained in:
Bruno Tarquini 2009-11-28 12:54:44 +01:00
parent fe8bd2b027
commit 4dd159b42c
1 changed files with 11 additions and 0 deletions

View File

@ -56,7 +56,18 @@ AC_SUBST(ACLOCAL_AMFLAGS)
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)]) AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
AC_SUBST([PYTHON_INCLUDES]) AC_SUBST([PYTHON_INCLUDES])
dnl ****
dnl enable installation in python-2.x/site-packages/gajim
dnl ****
AC_ARG_ENABLE(site-packages,
[AS_HELP_STRING([--enable-site-packages],
[install gajim sources in PYTHONDIR/site-packages/gajim
instead of DATADIR/gajim/src.])]
,
AC_SUBST([gajim_srcdir], [\${pkgpythondir}])
,
AC_SUBST([gajim_srcdir], [\${datadir}/\${PACKAGE}/src]) AC_SUBST([gajim_srcdir], [\${datadir}/\${PACKAGE}/src])
)
AS_AC_EXPAND(GAJIM_SRCDIR, "${gajim_srcdir}") AS_AC_EXPAND(GAJIM_SRCDIR, "${gajim_srcdir}")
AS_AC_EXPAND(PKGDATADIR, "${datadir}/${PACKAGE}") AS_AC_EXPAND(PKGDATADIR, "${datadir}/${PACKAGE}")