From adaa231fd4c582e675efede08135747dd7574191 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Wed, 26 Jul 2017 15:12:40 +0100 Subject: [PATCH 4/5] Change default for relocatable modules to --enable-relocatable * m4/relocatable.m4: Change --enable-relocatable to --disable-relocatable. * doc/relocatable.texi: Update the documentation. --- ChangeLog | 7 +++++++ doc/relocatable.texi | 19 +++++++------------ m4/relocatable-lib.m4 | 12 ++++++------ 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7496a89..35a07c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2017-07-26 Reuben Thomas + Change default for relocatable modules to --enable-relocatable + * m4/relocatable.m4: Change --enable-relocatable to + --disable-relocatable. + * doc/relocatable.texi: Update the documentation. + +2017-07-26 Reuben Thomas + relocatable-lib{,-lgpl}: improve documentation * doc/relocatable-maint.texi: Document use of relocatable-lib{,-lgpl}; previously not mentioned. diff --git a/doc/relocatable.texi b/doc/relocatable.texi index fca0ea5..2f03b15 100644 --- a/doc/relocatable.texi +++ b/doc/relocatable.texi @@ -20,9 +20,6 @@ and moved programs, and invoke them through the symlink. It is possible to do the same thing with a hard link @emph{only} if the hard link file is in the same directory as the real program. -To configure a program to be relocatable, add address@hidden to the @command{configure} command line. - On some OSes the executables remember the location of shared libraries and prefer them over any other search path. Therefore, such an executable will look for its shared libraries first in the original @@ -45,18 +42,16 @@ Here's a sample installation run that takes into account all these recommendations: @example -./configure --enable-relocatable --prefix=/nonexistent +./configure --prefix=/nonexistent make make install DESTDIR=/tmp/inst$$ @end example -Installation with @option{--enable-relocatable} will not work for -setuid or setgid executables, because such executables search only -system library paths for security reasons. Also, installation with address@hidden might not work on OpenBSD, when the -package contains shared libraries and libtool versions 1.5.xx are used. +Relocation will not work for setuid or setgid executables, because such +executables search only system library paths for security reasons. The runtime penalty and size penalty are negligible on GNU/Linux (just -one system call more when an executable is launched), and small on -other systems (the wrapper program just sets an environment variable -and executes the real program). +one system call more when an executable is launched), and small on other +systems (the wrapper program just sets an environment variable and +executes the real program); however, if desired you can disable +relocatability by configuring with @option{--disable-relocatable}. diff --git a/m4/relocatable-lib.m4 b/m4/relocatable-lib.m4 index 24572ee..6b311f3 100644 --- a/m4/relocatable-lib.m4 +++ b/m4/relocatable-lib.m4 @@ -34,14 +34,14 @@ AC_DEFUN([gl_RELOCATABLE_NOP], [ AC_MSG_CHECKING([whether to activate relocatable installation]) AC_ARG_ENABLE([relocatable], - [AS_HELP_STRING([--enable-relocatable], - [install a package that can be moved in the file system])], - [if test "$enableval" != no; then - RELOCATABLE=yes - else + [AS_HELP_STRING([--disable-relocatable], + [install a package that cannot be moved in the file system])], + [if test "$enableval" != yes; then RELOCATABLE=no + else + RELOCATABLE=yes fi - ], RELOCATABLE=no) + ], RELOCATABLE=yes) AC_SUBST([RELOCATABLE]) AC_MSG_RESULT([$RELOCATABLE]) ]) -- 2.7.4