Skip to content

Commit

Permalink
Make installation of contrib scripts configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
reinerh committed Apr 13, 2017
1 parent e7c7b31 commit 8d8686a
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ NAME=@PACKAGE_NAME@
PACKAGE_TARNAME=@PACKAGE_TARNAME@
DOCDIR=@docdir@
HAVE_APPARMOR=@HAVE_APPARMOR@
HAVE_CONTRIB_INSTALL=@HAVE_CONTRIB_INSTALL@
HAVE_GIT_INSTALL=@HAVE_GIT_INSTALL@
BUSYBOX_WORKAROUND=@BUSYBOX_WORKAROUND@

uids.h:; ./mkuid.sh
Expand Down Expand Up @@ -94,11 +96,13 @@ endif
install -c -m 0644 seccomp.debug $(DESTDIR)/$(libdir)/firejail/.
install -c -m 0644 seccomp.i386 $(DESTDIR)/$(libdir)/firejail/.
install -c -m 0644 seccomp.amd64 $(DESTDIR)/$(libdir)/firejail/.
ifeq($(HAVE_CONTRIB_INSTALL),yes)
install -c -m 0755 contrib/fix_private-bin.py $(DESTDIR)/$(libdir)/firejail/.
install -c -m 0755 contrib/fjclip.py $(DESTDIR)/$(libdir)/firejail/.
install -c -m 0755 contrib/fjdisplay.py $(DESTDIR)/$(libdir)/firejail/.
install -c -m 0755 contrib/fjresize.py $(DESTDIR)/$(libdir)/firejail/.
install -c -m 0755 contrib/fj-mkdeb.py $(DESTDIR)/$(libdir)/firejail/.
endif
# documents
install -m 0755 -d $(DESTDIR)/$(DOCDIR)
install -c -m 0644 COPYING $(DESTDIR)/$(DOCDIR)/.
Expand Down
19 changes: 19 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
HAVE_SECCOMP_H
HAVE_CONTRIB_INSTALL
HAVE_GIT_INSTALL
HAVE_GCOV
BUSYBOX_WORKAROUND
Expand Down Expand Up @@ -713,6 +714,7 @@ enable_fatal_warnings
enable_busybox_workaround
enable_gcov
enable_git_install
enable_contrib_install
'
ac_precious_vars='build_alias
host_alias
Expand Down Expand Up @@ -1352,6 +1354,8 @@ Optional Features:
enable busybox workaround
--enable-gcov Gcov instrumentation
--enable-git-install enable git install feature
--enable-contrib-install
install contrib scripts
Some influential environment variables:
CC C compiler command
Expand Down Expand Up @@ -3728,6 +3732,20 @@ if test "x$enable_git_install" = "xyes"; then :
fi
HAVE_CONTRIB_INSTALL="yes"
# Check whether --enable-contrib-install was given.
if test "${enable_contrib_install+set}" = set; then :
enableval=$enable_contrib_install;
fi
if test "x$enable_contrib_install" = "xno"; then :
HAVE_CONTRIB_INSTALL="no"
else
HAVE_CONTRIB_INSTALL="yes"
fi
# checking pthread library
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5
$as_echo_n "checking for main in -lpthread... " >&6; }
Expand Down Expand Up @@ -4991,6 +5009,7 @@ echo " busybox workaround: $BUSYBOX_WORKAROUND"
echo " EXTRA_LDFLAGS: $EXTRA_LDFLAGS"
echo " fatal warnings: $HAVE_FATAL_WARNINGS"
echo " Gcov instrumentation: $HAVE_GCOV"
echo " Install contrib scripts: $HAVE_CONTRIB_INSTALL"
echo
Expand Down
10 changes: 10 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,15 @@ AS_IF([test "x$enable_git_install" = "xyes"], [
AC_SUBST(HAVE_GIT_INSTALL)
])

HAVE_CONTRIB_INSTALL="yes"
AC_ARG_ENABLE([contrib-install],
AS_HELP_STRING([--enable-contrib-install], [install contrib scripts]))
AS_IF([test "x$enable_contrib_install" = "xno"],
[HAVE_CONTRIB_INSTALL="no"],
[HAVE_CONTRIB_INSTALL="yes"]
)
AC_SUBST(HAVE_CONTRIB_INSTALL)

# checking pthread library
AC_CHECK_LIB([pthread], [main], [], AC_MSG_ERROR([*** POSIX thread support not installed ***]))
AC_CHECK_HEADER(pthread.h,,AC_MSG_ERROR([*** POSIX thread support not installed ***]))
Expand Down Expand Up @@ -192,6 +201,7 @@ echo " busybox workaround: $BUSYBOX_WORKAROUND"
echo " EXTRA_LDFLAGS: $EXTRA_LDFLAGS"
echo " fatal warnings: $HAVE_FATAL_WARNINGS"
echo " Gcov instrumentation: $HAVE_GCOV"
echo " Install contrib scripts: $HAVE_CONTRIB_INSTALL"
echo


Expand Down

0 comments on commit 8d8686a

Please sign in to comment.