Merge pull request #205 from coreemu/feature/make-python-optional
make-python-optional
This commit is contained in:
commit
0fc40cd96b
3 changed files with 31 additions and 5 deletions
27
configure.ac
27
configure.ac
|
@ -43,17 +43,30 @@ AC_ARG_ENABLE([gui],
|
||||||
[build and install the GUI (default is yes)])],
|
[build and install the GUI (default is yes)])],
|
||||||
[], [enable_gui=yes])
|
[], [enable_gui=yes])
|
||||||
AC_SUBST(enable_gui)
|
AC_SUBST(enable_gui)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([python],
|
||||||
|
[AS_HELP_STRING([--enable-python[=ARG]],
|
||||||
|
[build and install the python bindings (default is yes)])],
|
||||||
|
[], [enable_python=yes])
|
||||||
|
AC_SUBST(enable_python)
|
||||||
|
if test "x$enable_python" = "xyes" ; then
|
||||||
|
want_python=yes
|
||||||
|
else
|
||||||
|
want_python=no
|
||||||
|
fi
|
||||||
AC_ARG_ENABLE([daemon],
|
AC_ARG_ENABLE([daemon],
|
||||||
[AS_HELP_STRING([--enable-daemon[=ARG]],
|
[AS_HELP_STRING([--enable-daemon[=ARG]],
|
||||||
[build and install the daemon with Python modules
|
[build and install the daemon with Python modules
|
||||||
(default is yes)])],
|
(default is yes)])],
|
||||||
[], [enable_daemon=yes])
|
[], [enable_daemon=yes])
|
||||||
AC_SUBST(enable_daemon)
|
AC_SUBST(enable_daemon)
|
||||||
AC_ARG_ENABLE([docs],
|
|
||||||
[AS_HELP_STRING([--enable-docs[=ARG]],
|
AC_ARG_ENABLE([vnodedonly],
|
||||||
[build documentation (default is no)])],
|
[AS_HELP_STRING([--enable-vnodedonly[=ARG]],
|
||||||
[], [enable_docs=no])
|
[only try to build vnoded and vcmd container utils
|
||||||
AC_SUBST(enable_docs)
|
(default is no)])],
|
||||||
|
[enable_vnodedonly=yes], [enable_vnodedonly=no])
|
||||||
|
AC_SUBST(enable_vnodedonly)
|
||||||
|
|
||||||
SEARCHPATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin"
|
SEARCHPATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin"
|
||||||
|
|
||||||
|
@ -141,6 +154,9 @@ if test "x$enable_daemon" = "xyes"; then
|
||||||
AC_MSG_ERROR([Python bindings require Python development headers (try installing your 'python-devel' or 'python-dev' package)]))
|
AC_MSG_ERROR([Python bindings require Python development headers (try installing your 'python-devel' or 'python-dev' package)]))
|
||||||
CFLAGS=$CFLAGS_save
|
CFLAGS=$CFLAGS_save
|
||||||
CPPFLAGS=$CPPFLAGS_save
|
CPPFLAGS=$CPPFLAGS_save
|
||||||
|
fi
|
||||||
|
if [ test "x$enable_daemon" = "xyes" || test "x$enable_vnodedonly" = "xyes" ] ; then
|
||||||
|
want_linux_netns=yes
|
||||||
PKG_CHECK_MODULES(libev, libev,
|
PKG_CHECK_MODULES(libev, libev,
|
||||||
AC_MSG_RESULT([found libev using pkgconfig OK])
|
AC_MSG_RESULT([found libev using pkgconfig OK])
|
||||||
AC_SUBST(libev_CFLAGS)
|
AC_SUBST(libev_CFLAGS)
|
||||||
|
@ -204,6 +220,7 @@ AM_CONDITIONAL(WANT_PYTHON, test x$want_python = xyes)
|
||||||
AM_CONDITIONAL(WANT_NETNS, test x$want_linux_netns = xyes)
|
AM_CONDITIONAL(WANT_NETNS, test x$want_linux_netns = xyes)
|
||||||
AM_CONDITIONAL(WANT_INITD, test x$with_startup = xinitd)
|
AM_CONDITIONAL(WANT_INITD, test x$with_startup = xinitd)
|
||||||
AM_CONDITIONAL(WANT_SYSTEMD, test x$with_startup = xsystemd)
|
AM_CONDITIONAL(WANT_SYSTEMD, test x$with_startup = xsystemd)
|
||||||
|
AM_CONDITIONAL(WANT_VNODEDONLY, test x$enable_vnodedonly = xyes)
|
||||||
|
|
||||||
if test $cross_compiling = no; then
|
if test $cross_compiling = no; then
|
||||||
AM_MISSING_PROG(HELP2MAN, help2man)
|
AM_MISSING_PROG(HELP2MAN, help2man)
|
||||||
|
|
|
@ -30,6 +30,7 @@ netns_SOURCES = $(SRC_NETNS)
|
||||||
# this triggers automake to run setup.py for building the Python libraries
|
# this triggers automake to run setup.py for building the Python libraries
|
||||||
# actual library names are netns.so and vcmd.so
|
# actual library names are netns.so and vcmd.so
|
||||||
# SOURCES line prevents 'make dist' from looking for a 'libnetns.c' file
|
# SOURCES line prevents 'make dist' from looking for a 'libnetns.c' file
|
||||||
|
if WANT_PYTHON
|
||||||
noinst_LIBRARIES = libnetns.a
|
noinst_LIBRARIES = libnetns.a
|
||||||
libnetns_a_SOURCES = netnsmodule.c vcmdmodule.c
|
libnetns_a_SOURCES = netnsmodule.c vcmdmodule.c
|
||||||
libnetns.a:
|
libnetns.a:
|
||||||
|
@ -60,6 +61,9 @@ clean-local-check:
|
||||||
distclean-local:
|
distclean-local:
|
||||||
-rm -rf core_netns.egg-info
|
-rm -rf core_netns.egg-info
|
||||||
|
|
||||||
|
endif
|
||||||
|
# endif WANT_PYTHON
|
||||||
|
|
||||||
# extra cruft to remove
|
# extra cruft to remove
|
||||||
DISTCLEANFILES = Makefile.in MANIFEST
|
DISTCLEANFILES = Makefile.in MANIFEST
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
# Makefile for building corens3 components.
|
# Makefile for building corens3 components.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if WANT_PYTHON
|
||||||
|
|
||||||
SETUPPY = setup.py
|
SETUPPY = setup.py
|
||||||
SETUPPYFLAGS = -v
|
SETUPPYFLAGS = -v
|
||||||
|
|
||||||
|
@ -47,3 +49,6 @@ DISTCLEANFILES = Makefile.in
|
||||||
|
|
||||||
# files to include with distribution tarball
|
# files to include with distribution tarball
|
||||||
EXTRA_DIST = LICENSE $(SETUPPY) corens3 examples
|
EXTRA_DIST = LICENSE $(SETUPPY) corens3 examples
|
||||||
|
|
||||||
|
endif
|
||||||
|
# endif WANT_PYTHON
|
||||||
|
|
Loading…
Reference in a new issue