diff --git a/Makefile.am b/Makefile.am index c777a99f..df7126f3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,14 @@ # liblsof -lib_LTLIBRARIES = liblsof.la - liblsof_la_SOURCES = lib/ckkv.c lib/cvfs.c lib/dvch.c lib/fino.c lib/isfn.c lib/lkud.c lib/lsof.c lib/misc.c lib/node.c lib/pdvn.c lib/prfp.c lib/print.c lib/proc.c lib/ptti.c lib/rdev.c lib/rnmt.c lib/rmnt.c lib/rnam.c lib/rnch.c lib/rnmh.c liblsof_la_SOURCES += lib/common.h lib/proto.h lib/hash.h + +if INSTALL_LIBLSOF +lib_LTLIBRARIES = liblsof.la include_HEADERS = include/lsof.h include/lsof_fields.h +else +noinst_LTLIBRARIES = liblsof.la +# nodist_include_HEADERS = include/lsof.h include/lsof_fields.h +endif # Hide internal functions AM_CFLAGS = -fvisibility=hidden @@ -217,4 +222,4 @@ EXTRA_DIST += Lsof.8 clean-local: rm -rf lsof.man distclean-local: - rm -rf lockf_owner.h lockf.h \ No newline at end of file + rm -rf lockf_owner.h lockf.h diff --git a/configure.ac b/configure.ac index 83490926..ec780eff 100644 --- a/configure.ac +++ b/configure.ac @@ -253,6 +253,11 @@ AC_SUBST([LSOF_DIALECT_DIR]) AC_DEFINE([API_EXPORT], [__attribute__ ((visibility ("default")))], [Set visibility to default for exported API functions.]) +# --enable-liblsof to install liblsof +AC_ARG_ENABLE(security, AS_HELP_STRING([--enable-liblsof], + [build and install liblsof @<:@default=no@:>@]), [], [install_liblsof=no]) +AM_CONDITIONAL([INSTALL_LIBLSOF], [test "x$install_liblsof" = xyes]) + # --enable-security to define HASSECURITY AC_ARG_ENABLE(security, AS_HELP_STRING([--enable-security], [allow only the root user to list all open files @<:@default=no@:>@]), [], [enable_security=no])