--git-install: default disabled in ./configure script

This commit is contained in:
netblue30 2017-02-07 13:03:28 -05:00
parent d17ce1322e
commit 6730f4c0cc
5 changed files with 16 additions and 8 deletions

7
configure vendored
View file

@ -1351,7 +1351,7 @@ Optional Features:
--enable-busybox-workaround
enable busybox workaround
--enable-gcov Gcov instrumentation
--disable-git-install disable git install feature
--enable-git-install enable git install feature
Some influential environment variables:
CC C compiler command
@ -3103,6 +3103,7 @@ if test "x$enable_apparmor" = "xyes"; then :
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@ -3713,20 +3714,20 @@ if test "x$enable_gcov" = "xyes"; then :
fi
HAVE_GIT_INSTALL=""
# Check whether --enable-git-install was given.
if test "${enable_git_install+set}" = set; then :
enableval=$enable_git_install;
fi
if test "x$enable_git_install" != "xno"; then :
if test "x$enable_git_install" = "xyes"; then :
HAVE_GIT_INSTALL="-DHAVE_GIT_INSTALL"
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; }

View file

@ -17,6 +17,7 @@ AS_IF([test "x$enable_apparmor" = "xyes"], [
AC_SUBST(HAVE_APPARMOR)
])
AS_IF([test "x$enable_apparmor" = "xyes"], [
AC_CHECK_HEADER(sys/apparmor.h, , [AC_MSG_ERROR(
[Couldn't find sys/apparmor.h... please install apparmor user space library and development files] )])
@ -145,15 +146,15 @@ AS_IF([test "x$enable_gcov" = "xyes"], [
AC_SUBST(HAVE_GCOV)
])
HAVE_GIT_INSTALL=""
AC_ARG_ENABLE([git-install],
AS_HELP_STRING([--disable-git-install], [disable git install feature]))
AS_IF([test "x$enable_git_install" != "xno"], [
AS_HELP_STRING([--enable-git-install], [enable git install feature]))
AS_IF([test "x$enable_git_install" = "xyes"], [
HAVE_GIT_INSTALL="-DHAVE_GIT_INSTALL"
AC_SUBST(HAVE_GIT_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 ***]))

View file

@ -6,7 +6,7 @@ set -e # exit immediately if one of the commands fails
cd /tmp # by the time we start this, we should have a tmpfs mounted on top of /tmp
git clone --depth=1 https://www.github.com/netblue30/firejail.git
cd firejail
./configure
./configure --enable-git-install
make
sudo make install-strip
echo "**********************************************************************"

View file

@ -6,7 +6,7 @@ set -e # exit immediately if one of the commands fails
cd /tmp # by the time we start this, we should have a tmpfs mounted on top of /tmp
git clone --depth=1 https://www.github.com/netblue30/firejail.git
cd firejail
./configure
./configure --enable-git-install
sudo make uninstall
echo "**********************************************************************"
echo "Firejail mainline git version uninstalled from /usr/local"

View file

@ -2143,6 +2143,12 @@ int main(int argc, char **argv) {
return 1;
}
}
else if (strcmp(argv[i], "--git-install") == 0 ||
strcmp(argv[i], "--git-uninstall") == 0) {
fprintf(stderr, "This feature is not enabled in the current build\n");
exit(1);
}
else if (strcmp(argv[i], "--") == 0) {
// double dash - positional params to follow
arg_doubledash = 1;