diff options
-rw-r--r-- | README | 8 | ||||
-rwxr-xr-x | bootstrap-configure | 1 | ||||
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/connman.h | 16 | ||||
-rw-r--r-- | src/udev-compat.c | 40 |
6 files changed, 45 insertions, 31 deletions
@@ -128,14 +128,6 @@ For a working system, certain configuration options need to be enabled: are in place. It detects an already configured loopback device and leaves it as it is. - --enable-udev - - Enable device detection support via udev - - Network devices are by default detected via the builtin RTNL - functionality. This allows to detect TTY based modem devices - via udev. - --enable-polkit Enable support for PolicyKit authorization diff --git a/bootstrap-configure b/bootstrap-configure index 236579d7..674f6e06 100755 --- a/bootstrap-configure +++ b/bootstrap-configure @@ -31,7 +31,6 @@ fi --enable-hso=builtin \ --enable-mbm=builtin \ --enable-ppp \ - --enable-udev \ --enable-iwmx \ --enable-iospm \ --enable-polkit=builtin \ diff --git a/configure.ac b/configure.ac index 7223efa7..7e37a961 100644 --- a/configure.ac +++ b/configure.ac @@ -195,16 +195,13 @@ AC_CHECK_LIB(c, inotify_init, dummy=yes, AC_CHECK_LIB(dl, dlopen, dummy=yes, AC_MSG_ERROR(dynamic linking loader is required)) -AC_ARG_ENABLE(udev, AC_HELP_STRING([--enable-udev], - [enable udev support]), [enable_udev=${enableval}]) +PKG_CHECK_MODULES(UDEV, libudev >= 141, + [enable_udev="yes"], [enable_udev="no"]) if (test "${enable_udev}" = "yes"); then - AC_DEFINE(HAVE_UDEV, 1, [Define if udev support is available]) - PKG_CHECK_MODULES(UDEV, libudev >= 141, dummy=yes, - AC_MSG_ERROR(udev >= 141 is required)) AC_CHECK_LIB(udev, udev_monitor_filter_update, dummy=yes, AC_DEFINE(NEED_UDEV_MONITOR_FILTER, 1, [Define to 1 if you need the - udev_monitor_filter...() functions.])) + udev_monitor_filter...() functions.])) UDEV_DATADIR="`$PKG_CONFIG --variable=rulesdir libudev`" if (test -z "${UDEV_DATADIR}"); then UDEV_DATADIR="${sysconfdir}/udev/rules.d" diff --git a/src/Makefile.am b/src/Makefile.am index 8b733464..b146a4b9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,6 +15,8 @@ connmand_SOURCES = main.c connman.h log.c selftest.c error.c plugin.c \ if UDEV connmand_SOURCES += udev.c +else +connmand_SOURCES += udev-compat.c endif connmand_LDADD = $(top_builddir)/plugins/libbuiltin.la \ diff --git a/src/connman.h b/src/connman.h index 22737693..24b64adb 100644 --- a/src/connman.h +++ b/src/connman.h @@ -186,25 +186,9 @@ void __connman_connection_cleanup(void); void __connman_connection_update_gateway(void); -#ifdef HAVE_UDEV int __connman_udev_init(void); void __connman_udev_cleanup(void); char *__connman_udev_get_devtype(const char *ifname); -#else -static inline int __connman_udev_init(void) -{ - return 0; -} - -static inline void __connman_udev_cleanup(void) -{ -} - -static inline char *__connman_udev_get_devtype(const char *ifname) -{ - return NULL; -} -#endif #include <connman/device.h> diff --git a/src/udev-compat.c b/src/udev-compat.c new file mode 100644 index 00000000..516a48db --- /dev/null +++ b/src/udev-compat.c @@ -0,0 +1,40 @@ +/* + * + * Connection Manager + * + * Copyright (C) 2007-2009 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include "connman.h" + +char *__connman_udev_get_devtype(const char *ifname) +{ + return NULL; +} + +int __connman_udev_init(void) +{ + return 0; +} + +void __connman_udev_cleanup(void) +{ +} |