From 7572be1afb16621a537e9da02f96cf04cb10b655 Mon Sep 17 00:00:00 2001 From: Kent Fredric Date: Sat, 20 Jun 2020 22:14:22 +1200 Subject: Add support for -Dgentoolibdirs Which just adds the libdirs verbatim in the right place without having perl molest it in the process. --- Configure | 26 ++++++++++++++++++++++++++ config_h.SH | 5 +++++ perl.c | 1 + perl_inc_macro.h | 8 ++++++++ uconfig.sh | 1 + 5 files changed, 41 insertions(+) diff --git a/Configure b/Configure index cef8c3c078..77258e8f43 100755 --- a/Configure +++ b/Configure @@ -1181,6 +1181,8 @@ orderlib='' ranlib='' d_perl_otherlibdirs='' otherlibdirs='' +gentoolibdirs='' +d_gentoolibdirs='' package='' spackage='' pager='' @@ -8101,6 +8103,28 @@ esac set d_perl_otherlibdirs eval $setvar +case "$gentoolibdirs" in +''|' ') dflt='none' ;; +*) dflt="$gentoolibdirs" ;; +esac +$cat <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_perl_otherlibdirs PERL_OTHERLIBDIRS "$otherlibdirs" /**/ +/* GENTOO_LIBDIRS: + * Like PERL_OTHERLIBDIRS, but doesn't stuff ARCH dirs in when not wanted + */ +#$d_gentoolibdirs GENTOO_LIBDIRS "$gentoolibdirs" /**/ + /* PRIVLIB: * This symbol contains the name of the private library for this package. * The library is private in the sense that it needn't be in anyone's diff --git a/perl.c b/perl.c index 2013a76026..62e67cfaa2 100644 --- a/perl.c +++ b/perl.c @@ -4750,6 +4750,7 @@ S_init_perllib(pTHX) INCPUSH_ARCHLIB_EXP INCPUSH_PRIVLIB_EXP INCPUSH_PERL_OTHERLIBDIRS + INCPUSH_GENTOO_LIBDIRS INCPUSH_PERL5LIB INCPUSH_APPLLIB_OLD_EXP INCPUSH_SITELIB_STEM diff --git a/perl_inc_macro.h b/perl_inc_macro.h index 5a2f20dfae..4b69b39199 100644 --- a/perl_inc_macro.h +++ b/perl_inc_macro.h @@ -143,6 +143,14 @@ INCPUSH_ADD_OLD_VERS|INCPUSH_CAN_RELOCATE); #endif +#ifdef GENTOO_LIBDIRS +# define INCPUSH_GENTOO_LIBDIRS S_incpush_use_sep(aTHX_ STR_WITH_LEN(GENTOO_LIBDIRS), \ + INCPUSH_ADD_OLD_VERS|INCPUSH_CAN_RELOCATE); +#endif +#ifndef INCPUSH_GENTOO_LIBDIRS +# define INCPUSH_GENTOO_LIBDIRS +#endif + #ifdef PERL_OTHERLIBDIRS # define INCPUSH_PERL_OTHERLIBDIRS_ARCHONLY S_incpush_use_sep(aTHX_ STR_WITH_LEN(PERL_OTHERLIBDIRS), \ INCPUSH_ADD_OLD_VERS|INCPUSH_ADD_ARCHONLY_SUB_DIRS|INCPUSH_CAN_RELOCATE); diff --git a/uconfig.sh b/uconfig.sh index 1d4a0f4a57..fba825acad 100644 --- a/uconfig.sh +++ b/uconfig.sh @@ -185,6 +185,7 @@ d_futimes='undef' d_gai_strerror='undef' d_gdbm_ndbm_h_uses_prototypes='undef' d_gdbmndbm_h_uses_prototypes='undef' +d_gentoolibdirs='undef' d_getaddrinfo='undef' d_getcwd='undef' d_getespwnam='undef' -- 2.27.0