diff options
author | gregory guy <[email protected]> | 2021-07-14 12:50:17 +0200 |
---|---|---|
committer | gregory guy <[email protected]> | 2021-07-19 14:17:02 +0200 |
commit | b4149315024044440d69dbe9a4961ffb6e45989f (patch) | |
tree | e46e9de0e581189f0106593c4d86b61e40d921cf /src | |
parent | defa7b64d793db74f47a706cb2565684f9577104 (diff) | |
download | knemo-b4149315024044440d69dbe9a4961ffb6e45989f.tar.gz knemo-b4149315024044440d69dbe9a4961ffb6e45989f.zip |
Make the Nettools backend optional.
Signed-off-by: gregory guy <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/knemod/backends/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/knemod/backends/daemonregistry.h | 6 | ||||
-rw-r--r-- | src/knemod/backends/kcmregistry.h | 18 |
3 files changed, 26 insertions, 10 deletions
diff --git a/src/knemod/backends/CMakeLists.txt b/src/knemod/backends/CMakeLists.txt index 3e9ef71..afe94d3 100644 --- a/src/knemod/backends/CMakeLists.txt +++ b/src/knemod/backends/CMakeLists.txt @@ -14,14 +14,20 @@ link_directories( ) +set( _SRC_ backendbase.cpp + sysbackend.cpp +) +if( WITH_NETTOOLS ) + list( APPEND _SRC_ nettoolsbackend.cpp ) +endif() + + ##### knemo_backends (static) tde_add_library( knemo_backends STATIC_PIC AUTOMOC SOURCES - backendbase.cpp - nettoolsbackend.cpp - sysbackend.cpp + ${_SRC_} LINK tdeio-shared ${IW_LIBRARIES} diff --git a/src/knemod/backends/daemonregistry.h b/src/knemod/backends/daemonregistry.h index 26af5ae..d3ec3b9 100644 --- a/src/knemod/backends/daemonregistry.h +++ b/src/knemod/backends/daemonregistry.h @@ -20,6 +20,10 @@ #ifndef DAEMONREGISTRY_H #define DAEMONREGISTRY_H +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <tqstring.h> #include <tdelocale.h> @@ -47,7 +51,9 @@ struct DaemonRegistryEntry DaemonRegistryEntry DaemonRegistry[] = { { "Sys", SysBackend::createInstance }, +#if defined( WITH_NETTOOLS ) { "Nettools", NetToolsBackend::createInstance }, +#endif { TQString(), 0 } }; diff --git a/src/knemod/backends/kcmregistry.h b/src/knemod/backends/kcmregistry.h index 28ffec4..38a95c6 100644 --- a/src/knemod/backends/kcmregistry.h +++ b/src/knemod/backends/kcmregistry.h @@ -20,6 +20,10 @@ #ifndef KCMREGISTRY_H #define KCMREGISTRY_H +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <tqstring.h> #include <tdelocale.h> @@ -42,13 +46,13 @@ struct KCMRegistryEntry KCMRegistryEntry KCMRegistry[] = { - { "Sys", - i18n( "Uses the sys filesystem available in 2.6 kernels and " \ - "direct system calls to the Linux kernel." ) }, - { "Nettools", - i18n( "Uses the tools from the net-tools package like ifconfig, " \ - "iwconfig and route to read the necessary information " \ - "from the ouput of these commands.") }, + { "Sys", i18n( "Uses the sys filesystem available in 2.6 kernels and " \ + "direct system calls to the Linux kernel." ) }, +#if defined( WITH_NETTOOLS ) + { "Nettools", i18n( "Uses the tools from the net-tools package like ifconfig, " \ + "iwconfig and route to read the necessary information " \ + "from the ouput of these commands.") }, +#endif { TQString(), TQString() } }; |