File tree Expand file tree Collapse file tree 4 files changed +35
-12
lines changed Expand file tree Collapse file tree 4 files changed +35
-12
lines changed Original file line number Diff line number Diff line change @@ -86,12 +86,19 @@ AC_DEFUN([PGAC_CHECK_PERL_EMBED_LDFLAGS],
86
86
[ AC_REQUIRE ( [ PGAC_PATH_PERL] )
87
87
AC_MSG_CHECKING ( for flags to link embedded Perl )
88
88
if test "$PORTNAME" = "win32" ; then
89
- perl_lib=`basename $perl_archlibexp/CORE/perl[ [ 5-9] ] *.lib .lib`
90
- test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
89
+ perl_lib=`basename $perl_archlibexp/CORE/perl[ [ 5-9] ] *.lib .lib`
90
+ if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
91
+ perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
92
+ else
93
+ perl_lib=`basename $perl_archlibexp/CORE/libperl[ [ 5-9] ] *.a .a | sed 's/^lib//'`
94
+ if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
95
+ perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
96
+ fi
97
+ fi
91
98
else
92
- pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
93
- pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
94
- perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e [ "s/ -arch [ -a-zA-Z0-9_] *//g"] `
99
+ pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
100
+ pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
101
+ perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e [ "s/ -arch [ -a-zA-Z0-9_] *//g"] `
95
102
fi
96
103
AC_SUBST ( perl_embed_ldflags ) dnl
97
104
if test -z "$perl_embed_ldflags" ; then
Original file line number Diff line number Diff line change @@ -7527,12 +7527,19 @@ $as_echo "$perl_embed_ccflags" >&6; }
7527
7527
{ $as_echo " $as_me :${as_lineno-$LINENO } : checking for flags to link embedded Perl" >&5
7528
7528
$as_echo_n " checking for flags to link embedded Perl... " >&6 ; }
7529
7529
if test " $PORTNAME " = " win32" ; then
7530
- perl_lib=` basename $perl_archlibexp /CORE/perl[5-9]* .lib .lib`
7531
- test -e " $perl_archlibexp /CORE/$perl_lib .lib" && perl_embed_ldflags=" -L$perl_archlibexp /CORE -l$perl_lib "
7530
+ perl_lib=` basename $perl_archlibexp /CORE/perl[5-9]* .lib .lib`
7531
+ if test -e " $perl_archlibexp /CORE/$perl_lib .lib" ; then
7532
+ perl_embed_ldflags=" -L$perl_archlibexp /CORE -l$perl_lib "
7533
+ else
7534
+ perl_lib=` basename $perl_archlibexp /CORE/libperl[5-9]* .a .a | sed ' s/^lib//' `
7535
+ if test -e " $perl_archlibexp /CORE/lib$perl_lib .a" ; then
7536
+ perl_embed_ldflags=" -L$perl_archlibexp /CORE -l$perl_lib "
7537
+ fi
7538
+ fi
7532
7539
else
7533
- pgac_tmp1=` $PERL -MExtUtils::Embed -e ldopts`
7534
- pgac_tmp2=` $PERL -MConfig -e ' print $Config{ccdlflags}' `
7535
- perl_embed_ldflags=` echo X" $pgac_tmp1 " | sed -e " s/^X//" -e " s%$pgac_tmp2 %%" -e " s/ -arch [-a-zA-Z0-9_]*//g" `
7540
+ pgac_tmp1=` $PERL -MExtUtils::Embed -e ldopts`
7541
+ pgac_tmp2=` $PERL -MConfig -e ' print $Config{ccdlflags}' `
7542
+ perl_embed_ldflags=` echo X" $pgac_tmp1 " | sed -e " s/^X//" -e " s%$pgac_tmp2 %%" -e " s/ -arch [-a-zA-Z0-9_]*//g" `
7536
7543
fi
7537
7544
if test -z " $perl_embed_ldflags " ; then
7538
7545
{ $as_echo " $as_me :${as_lineno-$LINENO } : result: no" >&5
Original file line number Diff line number Diff line change 42
42
#undef vsnprintf
43
43
#endif
44
44
45
+ /*
46
+ * ActivePerl 5.18 and later are MinGW-built, and their headers use GCC's
47
+ * __inline__. Translate to something MSVC recognizes.
48
+ */
49
+ #ifdef _MSC_VER
50
+ #define __inline__ inline
51
+ #endif
52
+
45
53
46
54
/*
47
55
* Get the basic Perl API. We use PERL_NO_GET_CONTEXT mode so that our code
Original file line number Diff line number Diff line change @@ -614,9 +614,10 @@ sub mkvcbuild
614
614
}
615
615
}
616
616
$plperl -> AddReference($postgres );
617
+ my $perl_path = $solution -> {options }-> {perl } . ' \lib\CORE\*perl*' ;
618
+ # ActivePerl 5.16 provided perl516.lib; 5.18 provided libperl518.a
617
619
my @perl_libs =
618
- grep { / perl\d +.lib$ / }
619
- glob ($solution -> {options }-> {perl } . ' \lib\CORE\perl*.lib' );
620
+ grep { / perl\d +\. lib$|libperl\d +\. a$ / } glob ($perl_path );
620
621
if (@perl_libs == 1)
621
622
{
622
623
$plperl -> AddLibrary($perl_libs [0]);
You can’t perform that action at this time.
0 commit comments