build: make libnm-util/libnm-glib optional
Add --without-libnm-glib, for people who don't want to build the legacy client libraries. When building with this option, dbus-glib and libdbus are not required.
This commit is contained in:
14
Makefile.am
14
Makefile.am
@@ -6,8 +6,6 @@ SUBDIRS = \
|
|||||||
introspection \
|
introspection \
|
||||||
libnm-core \
|
libnm-core \
|
||||||
libnm \
|
libnm \
|
||||||
libnm-util \
|
|
||||||
libnm-glib \
|
|
||||||
src \
|
src \
|
||||||
callouts \
|
callouts \
|
||||||
clients \
|
clients \
|
||||||
@@ -15,9 +13,17 @@ SUBDIRS = \
|
|||||||
policy \
|
policy \
|
||||||
data \
|
data \
|
||||||
po \
|
po \
|
||||||
docs \
|
|
||||||
man \
|
man \
|
||||||
examples \
|
examples
|
||||||
|
|
||||||
|
if WITH_LEGACY_LIBRARIES
|
||||||
|
SUBDIRS += \
|
||||||
|
libnm-util \
|
||||||
|
libnm-glib
|
||||||
|
endif
|
||||||
|
|
||||||
|
SUBDIRS += \
|
||||||
|
docs \
|
||||||
vapi
|
vapi
|
||||||
|
|
||||||
@GNOME_CODE_COVERAGE_RULES@
|
@GNOME_CODE_COVERAGE_RULES@
|
||||||
|
16
configure.ac
16
configure.ac
@@ -268,11 +268,6 @@ dnl
|
|||||||
AC_CHECK_LIB([dl], [dladdr], LIBDL="-ldl", LIBDL="")
|
AC_CHECK_LIB([dl], [dladdr], LIBDL="-ldl", LIBDL="")
|
||||||
AC_SUBST(LIBDL)
|
AC_SUBST(LIBDL)
|
||||||
|
|
||||||
dnl
|
|
||||||
dnl Checks for dbus-glib
|
|
||||||
dnl
|
|
||||||
PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.1 dbus-glib-1 >= 0.94)
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES(GLIB, [gio-unix-2.0 >= 2.37.6 gmodule-2.0],
|
PKG_CHECK_MODULES(GLIB, [gio-unix-2.0 >= 2.37.6 gmodule-2.0],
|
||||||
[AC_SUBST(LOG_DRIVER, '$(top_srcdir)/build-aux/tap-driver.sh'),
|
[AC_SUBST(LOG_DRIVER, '$(top_srcdir)/build-aux/tap-driver.sh'),
|
||||||
AC_SUBST(AM_TESTS_FD_REDIRECT, '--tap')],
|
AC_SUBST(AM_TESTS_FD_REDIRECT, '--tap')],
|
||||||
@@ -288,6 +283,16 @@ GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32 -DGLIB_V
|
|||||||
AC_SUBST(GLIB_CFLAGS)
|
AC_SUBST(GLIB_CFLAGS)
|
||||||
AC_SUBST(GLIB_LIBS)
|
AC_SUBST(GLIB_LIBS)
|
||||||
|
|
||||||
|
AC_ARG_WITH(libnm-glib, AS_HELP_STRING([--without-libnm-glib], [don't build legacy libraries]))
|
||||||
|
if test "$with_libnm_glib" != "no"; then
|
||||||
|
PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.1 dbus-glib-1 >= 0.94, :,
|
||||||
|
[AC_MSG_FAILURE([$DBUS_PKG_ERRORS
|
||||||
|
|
||||||
|
Configure with --without-libnm-glib if you do not need the legacy libraries])])
|
||||||
|
with_libnm_glib=yes
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL(WITH_LEGACY_LIBRARIES, test "$with_libnm_glib" != "no")
|
||||||
|
|
||||||
PKG_CHECK_MODULES(GUDEV, gudev-1.0 >= 165)
|
PKG_CHECK_MODULES(GUDEV, gudev-1.0 >= 165)
|
||||||
|
|
||||||
GOBJECT_INTROSPECTION_CHECK([0.9.6])
|
GOBJECT_INTROSPECTION_CHECK([0.9.6])
|
||||||
@@ -1140,6 +1145,7 @@ echo " ppp: $enable_ppp"
|
|||||||
echo " modemmanager-1: $with_modem_manager_1"
|
echo " modemmanager-1: $with_modem_manager_1"
|
||||||
echo " concheck: $enable_concheck"
|
echo " concheck: $enable_concheck"
|
||||||
echo " libteamdctl: $enable_teamdctl"
|
echo " libteamdctl: $enable_teamdctl"
|
||||||
|
echo " libnm-glib: $with_libnm_glib"
|
||||||
echo " nmtui: $build_nmtui"
|
echo " nmtui: $build_nmtui"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
@@ -1,2 +1,7 @@
|
|||||||
SUBDIRS = libnm-glib libnm-util libnm api
|
SUBDIRS = libnm api
|
||||||
|
|
||||||
|
if WITH_LEGACY_LIBRARIES
|
||||||
|
SUBDIRS += \
|
||||||
|
libnm-util \
|
||||||
|
libnm-glib
|
||||||
|
endif
|
||||||
|
@@ -4,7 +4,9 @@ EXTRA_DIST = \
|
|||||||
libnm-util.deps \
|
libnm-util.deps \
|
||||||
libnm-glib.deps
|
libnm-glib.deps
|
||||||
|
|
||||||
|
if WITH_LEGACY_LIBRARIES
|
||||||
VAPIGEN_VAPIS = libnm-util.vapi libnm-glib.vapi
|
VAPIGEN_VAPIS = libnm-util.vapi libnm-glib.vapi
|
||||||
|
endif
|
||||||
|
|
||||||
if ENABLE_VAPIGEN
|
if ENABLE_VAPIGEN
|
||||||
include Makefile.vapigen
|
include Makefile.vapigen
|
||||||
|
Reference in New Issue
Block a user