Skip to content

Commit 1b1c9f2

Browse files
zdohnalchrisbra
authored andcommitted
patch 9.0.2083: Perl: xsubpp may be in non-standard location
Problem: Perl: xsubpp may be in non-standard location Solution: Add --with-subpp configure option configure.ac: Add --with-xsubpp configure option Some environments (such as flatpaks) cannot count on xsubpp being in the common Perl directory, so a configure option should be used for clean solution. closes: #13470 Signed-off-by: Zdenek Dohnal <zdohnal@redhat.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 2b89afd commit 1b1c9f2

3 files changed

Lines changed: 67 additions & 12 deletions

File tree

src/auto/configure

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,7 @@ with_luajit
836836
enable_mzschemeinterp
837837
with_plthome
838838
enable_perlinterp
839+
with_xsubpp
839840
enable_pythoninterp
840841
with_python_command
841842
with_python_config_dir
@@ -1569,6 +1570,7 @@ Optional Packages:
15691570
--with-lua-prefix=PFX Prefix where Lua is installed.
15701571
--with-luajit Link with LuaJIT instead of Lua.
15711572
--with-plthome=PLTHOME Use PLTHOME.
1573+
--with-xsubpp=PATH path to the xsubpp command
15721574
--with-python-command=NAME name of the Python 2 command (default: python2 or python)
15731575
--with-python-config-dir=PATH Python's config directory (deprecated)
15741576
--with-python3-command=NAME name of the Python 3 command (default: python3 or python)
@@ -6455,12 +6457,42 @@ printf "%s\n" "OK" >&6; }
64556457
vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
64566458

64576459
vi_cv_perl_extutils=unknown_perl_extutils_path
6458-
for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
6459-
xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
6460-
if test -f "$xsubpp_path"; then
6461-
vi_cv_perl_xsubpp="$xsubpp_path"
6462-
fi
6463-
done
6460+
6461+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-xsubpp path" >&5
6462+
printf %s "checking --with-xsubpp path... " >&6; }
6463+
vi_cv_perl_xsubpp=
6464+
6465+
# Check whether --with-xsubpp was given.
6466+
if test ${with_xsubpp+y}
6467+
then :
6468+
withval=$with_xsubpp;
6469+
if test -f "$withval"
6470+
then
6471+
vi_cv_perl_xsubpp="$withval"
6472+
fi
6473+
6474+
fi
6475+
6476+
6477+
if test "x$vi_cv_perl_xsubpp" = "x"
6478+
then
6479+
for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
6480+
xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
6481+
if test -f "$xsubpp_path"; then
6482+
vi_cv_perl_xsubpp="$xsubpp_path"
6483+
fi
6484+
done
6485+
fi
6486+
6487+
if test "x$vi_cv_perl_xsubpp" = "x"
6488+
then
6489+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: empty" >&5
6490+
printf "%s\n" "empty" >&6; }
6491+
else
6492+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_perl_xsubpp" >&5
6493+
printf "%s\n" "$vi_cv_perl_xsubpp" >&6; }
6494+
fi
6495+
64646496

64656497
perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
64666498
-e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \

src/configure.ac

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,13 +1132,34 @@ if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
11321132
vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
11331133
AC_SUBST(vi_cv_perllib)
11341134
vi_cv_perl_extutils=unknown_perl_extutils_path
1135-
for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
1136-
xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
1137-
if test -f "$xsubpp_path"; then
1138-
vi_cv_perl_xsubpp="$xsubpp_path"
1139-
fi
1140-
done
1135+
1136+
AC_MSG_CHECKING(--with-xsubpp path)
1137+
vi_cv_perl_xsubpp=
1138+
AC_ARG_WITH(xsubpp, [ --with-xsubpp=PATH path to the xsubpp command], [
1139+
if test -f "$withval"
1140+
then
1141+
vi_cv_perl_xsubpp="$withval"
1142+
fi
1143+
])
1144+
1145+
if test "x$vi_cv_perl_xsubpp" = "x"
1146+
then
1147+
for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
1148+
xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
1149+
if test -f "$xsubpp_path"; then
1150+
vi_cv_perl_xsubpp="$xsubpp_path"
1151+
fi
1152+
done
1153+
fi
1154+
1155+
if test "x$vi_cv_perl_xsubpp" = "x"
1156+
then
1157+
AC_MSG_RESULT(empty)
1158+
else
1159+
AC_MSG_RESULT($vi_cv_perl_xsubpp)
1160+
fi
11411161
AC_SUBST(vi_cv_perl_xsubpp)
1162+
11421163
dnl Remove "-fno-something", it breaks using cproto.
11431164
dnl Remove "-fdebug-prefix-map", it isn't supported by clang.
11441165
dnl Remove "FORTIFY_SOURCE", it will be defined twice.

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static char *(features[]) =
704704

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
2083,
707709
/**/
708710
2082,
709711
/**/

0 commit comments

Comments
 (0)