Skip to content
Snippets Groups Projects
Commit 7fb97ecd authored by Andrew Dunstan's avatar Andrew Dunstan
Browse files

Detect Windows perl linkage parameters in configure script.

This means we can now construct a configure test for the library
presence. Previously these parameters were only figured out at
build time in plperl's GnuMakefile.
parent 6e650a55
Branches
Tags
No related merge requests found
...@@ -38,6 +38,7 @@ AC_DEFUN([PGAC_CHECK_PERL_CONFIG], ...@@ -38,6 +38,7 @@ AC_DEFUN([PGAC_CHECK_PERL_CONFIG],
[AC_REQUIRE([PGAC_PATH_PERL]) [AC_REQUIRE([PGAC_PATH_PERL])
AC_MSG_CHECKING([for Perl $1]) AC_MSG_CHECKING([for Perl $1])
perl_$1=`$PERL -MConfig -e 'print $Config{$1}'` perl_$1=`$PERL -MConfig -e 'print $Config{$1}'`
test "$PORTNAME" = "win32" && perl_$1=`echo $perl_$1 | sed 's,\\\\,/,g'`
AC_SUBST(perl_$1)dnl AC_SUBST(perl_$1)dnl
AC_MSG_RESULT([$perl_$1])]) AC_MSG_RESULT([$perl_$1])])
...@@ -57,9 +58,14 @@ AC_DEFUN([PGAC_CHECK_PERL_CONFIGS], ...@@ -57,9 +58,14 @@ AC_DEFUN([PGAC_CHECK_PERL_CONFIGS],
AC_DEFUN([PGAC_CHECK_PERL_EMBED_LDFLAGS], AC_DEFUN([PGAC_CHECK_PERL_EMBED_LDFLAGS],
[AC_REQUIRE([PGAC_PATH_PERL]) [AC_REQUIRE([PGAC_PATH_PERL])
AC_MSG_CHECKING(for flags to link embedded Perl) AC_MSG_CHECKING(for flags to link embedded Perl)
if test "$PORTNAME" = "win32" ; then
perl_lib=`basename $perl_archlibexp/CORE/perl[[5-9]]*.lib .lib`
test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
else
pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts` pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'` pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e ["s/ -arch [-a-zA-Z0-9_]*//g"]` perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e ["s/ -arch [-a-zA-Z0-9_]*//g"]`
fi
AC_SUBST(perl_embed_ldflags)dnl AC_SUBST(perl_embed_ldflags)dnl
if test -z "$perl_embed_ldflags" ; then if test -z "$perl_embed_ldflags" ; then
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
......
...@@ -7320,24 +7320,32 @@ $as_echo "$as_me: error: Perl not found" >&2;} ...@@ -7320,24 +7320,32 @@ $as_echo "$as_me: error: Perl not found" >&2;}
{ $as_echo "$as_me:$LINENO: checking for Perl archlibexp" >&5 { $as_echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
$as_echo_n "checking for Perl archlibexp... " >&6; } $as_echo_n "checking for Perl archlibexp... " >&6; }
perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'` perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
{ $as_echo "$as_me:$LINENO: result: $perl_archlibexp" >&5 { $as_echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
$as_echo "$perl_archlibexp" >&6; } $as_echo "$perl_archlibexp" >&6; }
{ $as_echo "$as_me:$LINENO: checking for Perl privlibexp" >&5 { $as_echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
$as_echo_n "checking for Perl privlibexp... " >&6; } $as_echo_n "checking for Perl privlibexp... " >&6; }
perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'` perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
{ $as_echo "$as_me:$LINENO: result: $perl_privlibexp" >&5 { $as_echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
$as_echo "$perl_privlibexp" >&6; } $as_echo "$perl_privlibexp" >&6; }
{ $as_echo "$as_me:$LINENO: checking for Perl useshrplib" >&5 { $as_echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
$as_echo_n "checking for Perl useshrplib... " >&6; } $as_echo_n "checking for Perl useshrplib... " >&6; }
perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'` perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
{ $as_echo "$as_me:$LINENO: result: $perl_useshrplib" >&5 { $as_echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
$as_echo "$perl_useshrplib" >&6; } $as_echo "$perl_useshrplib" >&6; }
   
{ $as_echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5 { $as_echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
$as_echo_n "checking for flags to link embedded Perl... " >&6; } $as_echo_n "checking for flags to link embedded Perl... " >&6; }
if test "$PORTNAME" = "win32" ; then
perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
else
pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts` pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'` pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"` perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
fi
if test -z "$perl_embed_ldflags" ; then if test -z "$perl_embed_ldflags" ; then
{ $as_echo "$as_me:$LINENO: result: no" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; } $as_echo "no" >&6; }
......
...@@ -16,10 +16,6 @@ endif ...@@ -16,10 +16,6 @@ endif
ifeq ($(shared_libperl),yes) ifeq ($(shared_libperl),yes)
ifeq ($(PORTNAME), win32) ifeq ($(PORTNAME), win32)
perl_archlibexp := $(subst \,/,$(perl_archlibexp))
perl_privlibexp := $(subst \,/,$(perl_privlibexp))
perl_lib := $(basename $(notdir $(wildcard $(perl_archlibexp)/CORE/perl[5-9]*.lib)))
perl_embed_ldflags = -L$(perl_archlibexp)/CORE -l$(perl_lib)
override CPPFLAGS += -DPLPERL_HAVE_UID_GID override CPPFLAGS += -DPLPERL_HAVE_UID_GID
# Perl on win32 contains /* within comment all over the header file, # Perl on win32 contains /* within comment all over the header file,
# so disable this warning. # so disable this warning.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment