source: trunk/cf/rp_perl.m4 @ 2203

Last change on this file since 2203 was 2203, checked in by gah, 14 years ago
File size: 1.3 KB
Line 
1
2AC_DEFUN([RP_LANG_PERL],[
3AC_ARG_WITH(
4    [perl],
5    [AS_HELP_STRING([--with-perl[=DIR]], [location of perl @<:@default=yes@:>@])],
6    [],
7    [rp_with_perl=yes])
8
9PERL=
10PERL_INCLUDES=
11PERL_ARCHLIB=
12PERL_ARCHLIBEXP=
13PERL_VERSION=
14PERL_VENDORLIB=
15PERL_PRIVLIB=
16PERL_CPPFLAGS=
17PERL_CCFlAGS=
18PERL_VERSION_RV=
19PERL_LIBSPEC=
20if test "$rp_with_perl" != "no" ; then
21  if test "$rp_with_perl" != "yes" ; then
22    AC_PATH_PROG(PERL, perl, [], [$rp_with_perl/bin:$rp_with_perl])
23  else
24    AC_PATH_PROG(PERL, perl)
25  fi
26  if test "x${PERL}" != "x" ; then
27    PERL_ARCHLIB=`${PERL} -MConfig -e 'print $Config{archlib}'`
28    PERL_VERSION=`${PERL} -MConfig -e 'print $Config{version}'`
29    PERL_CCFLAGS=`${PERL} -MConfig -e 'print $Config{ccflags}'`
30    PERL_CPPFLAGS=`${PERL} -MConfig -e 'print $Config{cppflags}'`
31    PERL_VENDORLIB=`${PERL} -MConfig -e 'print $Config{vendorlib}'`
32    PERL_PRIVLIB=`${PERL} -MConfig -e 'print $Config{privlib}'`
33    PERL_INSTALLARCHLIB=`${PERL} -MConfig -e 'print $Config{installarchlib}'`
34    PERL_ARCHLIBEXP=`${PERL} -MConfig -e 'print $Config{archlibexp}'`
35    PERL_VERSION_RV=`echo ${PERL_VERSION} | cut -d'.' -f1-2`
36    # libperl may or may not be installed.  Check for its existence.
37    if test -f "${PERL_ARCHLIBEXP}/CORE/libperl${SHLIB_SUFFIX}" ; then
38      PERL_LIBSPEC="-L${PERL_ARCHLIBEXP}/CORE -lperl"
39    fi
40  fi
41fi
42])
Note: See TracBrowser for help on using the repository browser.