6 AC_DEFUN([PGAC_PATH_PERL],
7 [AC_PATH_PROG(PERL, perl)])
10 # PGAC_CHECK_PERL_CONFIG(NAME)
11 # ----------------------------
12 AC_DEFUN([PGAC_CHECK_PERL_CONFIG],
13 [AC_REQUIRE([PGAC_PATH_PERL])
14 AC_MSG_CHECKING([for Perl $1])
15 perl_$1=`$PERL -MConfig -e 'print $Config{$1}'`
17 AC_MSG_RESULT([$perl_$1])])
20 # PGAC_CHECK_PERL_CONFIGS(NAMES)
21 # ------------------------------
22 AC_DEFUN([PGAC_CHECK_PERL_CONFIGS],
23 [m4_foreach([pgac_item], [$1], [PGAC_CHECK_PERL_CONFIG(pgac_item)])])
26 # PGAC_CHECK_PERL_EMBED_LDFLAGS
27 # -----------------------------
28 AC_DEFUN([PGAC_CHECK_PERL_EMBED_LDFLAGS],
29 [AC_REQUIRE([PGAC_PATH_PERL])
30 AC_MSG_CHECKING(for flags to link embedded Perl)
31 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
32 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
33 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
34 AC_SUBST(perl_embed_ldflags)dnl
35 if test -z "$perl_embed_ldflags" ; then
37 AC_MSG_ERROR([could not determine flags for linking embedded Perl.
38 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
41 AC_MSG_RESULT([$perl_embed_ldflags])
43 ])# PGAC_CHECK_PERL_EMBED_LDFLAGS