]> granicus.if.org Git - libnl/commitdiff
libnl: optionally disable cli tools.
authorKarl Hiramoto <karl@hiramoto.org>
Wed, 16 Jun 2010 14:33:51 +0000 (16:33 +0200)
committerThomas Graf <tgraf@suug.ch>
Wed, 13 Oct 2010 11:10:48 +0000 (13:10 +0200)
compile and link time can reduced, most non-developers don't need these cli tools.

./configure --disable-cli
time make
real    0m40.485s
user    0m33.784s
sys     0m2.793s

./configure
time make
real    0m53.097s
user    0m42.077s
sys     0m4.396s

Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
Makefile.am
configure.in

index e1c47b98d6c3c3876e42067ea3c5189a90ada0b5..8f9438c0a66f56ed95958b9b03f78ff900dc7f4f 100644 (file)
@@ -2,7 +2,13 @@
 
 ACLOCAL_AMFLAGS = -I m4
 
-SUBDIRS = include lib src doc
+OPT_DIRS =
+
+if ENABLE_CLI
+OPT_DIRS += src
+endif
+
+SUBDIRS = include lib doc $(OPT_DIRS)
 
 pkgconfig_DATA = libnl-2.0.pc
 
index 1fcdb64bf0e0a97fd7300edda6bc7e84367fa862..18d27168af1f57010f569c1a4c27303a436657fb 100644 (file)
@@ -29,6 +29,11 @@ AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH],
        [pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig'])
 AC_SUBST([pkgconfigdir])
 
+AC_ARG_ENABLE([cli],
+       AS_HELP_STRING([--disable-cli], [Do not build command line interface utils]),
+       [enable_cli="$enableval"], [enable_cli="yes"])
+AM_CONDITIONAL([ENABLE_CLI], [test "$enable_cli" = "yes"])
+
 AC_CHECK_LIB([m], [pow], [], AC_MSG_ERROR([libm is required]))
 
 AC_CONFIG_FILES([Makefile doc/Doxyfile doc/Makefile lib/Makefile