From 7d67d76d0d5cb32fb5eb55a55238d169694ffed2 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Wed, 26 Jul 2017 15:23:29 +0100 Subject: [PATCH 5/5] relocatable-lib{,-lgpl}: make ENABLE_COSTLY_RELOCATABLE the default * lib/relocatable.c: Define ENABLE_COSTLY_RELOCATABLE to 1 if undefined. * doc/relocatable-maint.texi: Mention that it can be defined to 0. --- ChangeLog | 6 ++++++ doc/relocatable-maint.texi | 4 ++-- lib/relocatable.c | 10 ++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 35a07c9..2fa071b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2017-07-26 Reuben Thomas + relocatable-lib{,-lgpl}: make ENABLE_COSTLY_RELOCATABLE the default + * lib/relocatable.c: Define ENABLE_COSTLY_RELOCATABLE to 1 if undefined. + * doc/relocatable-maint.texi: Mention that it can be defined to 0. + +2017-07-26 Reuben Thomas + Change default for relocatable modules to --enable-relocatable * m4/relocatable.m4: Change --enable-relocatable to --disable-relocatable. diff --git a/doc/relocatable-maint.texi b/doc/relocatable-maint.texi index 8208ce3..9300899 100644 --- a/doc/relocatable-maint.texi +++ b/doc/relocatable-maint.texi @@ -184,7 +184,7 @@ In your @file{Makefile.am}, for every program @command{foo} that gets installed in, say, @file{$(bindir)}, you add: @example -foo_CPPFLAGS = -DINSTALLDIR=\"$(bindir)\" +foo_CPPFLAGS = -DINSTALLDIR=\"$(bindir)\" # optionally, -DENABLE_COSTLY_RELOCATABLE=0 if RELOCATABLE_VIA_LD foo_LDFLAGS = `$(RELOCATABLE_LDFLAGS) $(bindir)` endif @@ -193,7 +193,7 @@ endif Also in @file{Makefile.am}, for each library @code{libfoo}, you add: @example -libfoo_la_CPPFLAGS = -DIN_LIBRARY +libfoo_la_CPPFLAGS = -DIN_LIBRARY # optionally, -DENABLE_COSTLY_RELOCATABLE=0 @end example (Adjust the suffix @code{la} as necessary if you are not using libtool.) diff --git a/lib/relocatable.c b/lib/relocatable.c index 9a8f637..24192b5 100644 --- a/lib/relocatable.c +++ b/lib/relocatable.c @@ -95,15 +95,9 @@ /* Whether to enable the more costly support for relocatable libraries. It allows libraries to be have been installed with a different original - prefix than the program. But it is quite costly, especially on Cygwin - platforms, see below. Therefore we enable it by default only on native - Windows platforms. */ + prefix than the program. */ #ifndef ENABLE_COSTLY_RELOCATABLE -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ -# define ENABLE_COSTLY_RELOCATABLE 1 -# else -# define ENABLE_COSTLY_RELOCATABLE 0 -# endif +# define ENABLE_COSTLY_RELOCATABLE 1 #endif /* Original installation prefix. */ -- 2.7.4