From c95d0e17d41adab48cd67f4e46a8183fa17438e1 Mon Sep 17 00:00:00 2001 From: Gisle Aas Date: Thu, 30 Mar 2006 12:13:54 +0000 Subject: [PATCH] Introduce d_sitearch and d_inc_version_list config.sh variables. These allow me to set sitearch and sitelib to be the same without ending up with duplicate entries in @INC. Basically the same way the old d_archlib variable is used. p4raw-id: //depot/perl@27632 --- Configure | 14 +++++++++++++- Porting/Glossary | 9 +++++++++ config_h.SH | 6 +++--- perl.c | 3 ++- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/Configure b/Configure index 374eb39..d8c2933 100755 --- a/Configure +++ b/Configure @@ -921,6 +921,7 @@ i_varhdr='' i_vfork='' inc_version_list='' inc_version_list_init='' +d_inc_version_list='' installprefix='' installprefixexp='' installstyle='' @@ -1101,6 +1102,7 @@ sig_size='' installsitearch='' sitearch='' sitearchexp='' +d_sitearch='' installsitebin='' sitebin='' sitebinexp='' @@ -6584,6 +6586,11 @@ rp='Pathname for the site-specific architecture-dependent library files?' . ./getfile prefixvar=sitearch . ./setprefixvar +if $test X"$sitearch" = X"$sitelib"; then + d_sitearch="$undef" +else + d_sitearch="$define" +fi $cat <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un * for a C initialization string. See the inc_version_list entry * in Porting/Glossary for more details. */ -#define PERL_INC_VERSION_LIST $inc_version_list_init /**/ +#$d_inc_version_list PERL_INC_VERSION_LIST $inc_version_list_init /**/ /* INSTALL_USR_BIN_PERL: * This symbol, if defined, indicates that Perl is to be installed @@ -3485,8 +3485,8 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un * This symbol contains the ~name expanded version of SITEARCH, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define SITEARCH "$sitearch" /**/ -#define SITEARCH_EXP "$sitearchexp" /**/ +#$d_sitearch SITEARCH "$sitearch" /**/ +#$d_sitearch SITEARCH_EXP "$sitearchexp" /**/ /* SITELIB: * This symbol contains the name of the private library for this package. diff --git a/perl.c b/perl.c index 7e0f842..9fe9f1e 100644 --- a/perl.c +++ b/perl.c @@ -4781,7 +4781,8 @@ S_init_perllib(pTHX) # endif #endif -#ifdef SITELIB_STEM /* Search for version-specific dirs below here */ +#if defined(SITELIB_STEM) && defined(PERL_INC_VERSION_LIST) + /* Search for version-specific dirs below here */ incpush(SITELIB_STEM, FALSE, TRUE, TRUE, TRUE); #endif -- 2.7.4