Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration flag for enabling liblsof (#299) #300

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# 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
endif

# Hide internal functions
AM_CFLAGS = -fvisibility=hidden
Expand Down Expand Up @@ -217,4 +221,4 @@ EXTRA_DIST += Lsof.8
clean-local:
rm -rf lsof.man
distclean-local:
rm -rf lockf_owner.h lockf.h
rm -rf lockf_owner.h lockf.h
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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(liblsof, AS_HELP_STRING([--enable-liblsof],
[build and install liblsof @<:@default=no@:>@]), [], [enable_liblsof=no])
AM_CONDITIONAL([INSTALL_LIBLSOF], [test "x$enable_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])
Expand Down