Improve configure script.
* configure.ac: New option --with-pythondir (PYTHON_SITE_DIR, PYTHON_EXEC_DIR): New subst variables. * python/libmu_py/Makefile.am: use pythonexec_LTLIBRARIES, instead of pythonexec_LTLIBRARIES. (pythonexecdir): New variable. * python/mailutils/Makefile.am: use pythonsite_PYTHON, instead of pkgpython_PYTHON. (pythonsitedir): New variable.
Showing
3 changed files
with
17 additions
and
3 deletions
... | @@ -1136,6 +1136,18 @@ if test "$status_python" = yes; then | ... | @@ -1136,6 +1136,18 @@ if test "$status_python" = yes; then |
1136 | if test "$status_python" = yes; then | 1136 | if test "$status_python" = yes; then |
1137 | AC_DEFINE(WITH_PYTHON,1,[Enable Python support]) | 1137 | AC_DEFINE(WITH_PYTHON,1,[Enable Python support]) |
1138 | MU_LIB_PY='${top_builddir}/python/libmu_py/libmu_py.la' | 1138 | MU_LIB_PY='${top_builddir}/python/libmu_py/libmu_py.la' |
1139 | AC_SUBST([PYTHON_SITE_DIR]) | ||
1140 | AC_SUBST([PYTHON_EXEC_DIR]) | ||
1141 | AC_ARG_WITH([pythondir], | ||
1142 | AC_HELP_STRING([--with-pythondir=DIR], | ||
1143 | [Specify the directory to install Python modules to]), | ||
1144 | [case $withval in | ||
1145 | /*) PYTHON_SITE_DIR="${withval}/mailutils" | ||
1146 | PYTHON_EXEC_DIR="${withval}/mailutils";; | ||
1147 | *) AC_MSG_ERROR([Argument to --with-pythondir must be an absolute directory name]);; | ||
1148 | esac], | ||
1149 | [PYTHON_SITE_DIR='$(pkgpythondir)' | ||
1150 | PYTHON_EXEC_DIR='$(pkgpyexecdir)']) | ||
1139 | fi | 1151 | fi |
1140 | fi | 1152 | fi |
1141 | fi | 1153 | fi | ... | ... |
... | @@ -63,7 +63,8 @@ libmu_py_la_LIBADD = $(PYTHON_LIBS) @MU_COMMON_LIBRARIES@ \ | ... | @@ -63,7 +63,8 @@ libmu_py_la_LIBADD = $(PYTHON_LIBS) @MU_COMMON_LIBRARIES@ \ |
63 | @MU_AUTHLIBS@\ | 63 | @MU_AUTHLIBS@\ |
64 | ${MU_LIB_MAILUTILS} | 64 | ${MU_LIB_MAILUTILS} |
65 | 65 | ||
66 | pkgpyexec_LTLIBRARIES = c_api.la | 66 | pythonexecdir=@PYTHON_EXEC_DIR@ |
67 | c_api_la_LDFLAGS = -avoid-version -module -rpath $(pkgpyexecdir) | 67 | pythonexec_LTLIBRARIES = c_api.la |
68 | c_api_la_LDFLAGS = -avoid-version -module -rpath $(pythonexecdir) | ||
68 | c_api_la_LIBADD = $(PYTHON_LIBS) ${MU_LIB_PY} | 69 | c_api_la_LIBADD = $(PYTHON_LIBS) ${MU_LIB_PY} |
69 | c_api_la_SOURCES = c_api.c | 70 | c_api_la_SOURCES = c_api.c | ... | ... |
... | @@ -17,7 +17,8 @@ | ... | @@ -17,7 +17,8 @@ |
17 | ## Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA | 17 | ## Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA |
18 | ## 02110-1301 USA | 18 | ## 02110-1301 USA |
19 | 19 | ||
20 | pkgpython_PYTHON=\ | 20 | pythonsitedir=@PYTHON_SITE_DIR@ |
21 | pythonsite_PYTHON=\ | ||
21 | __init__.py \ | 22 | __init__.py \ |
22 | error.py \ | 23 | error.py \ |
23 | address.py \ | 24 | address.py \ | ... | ... |
-
Please register or sign in to post a comment