source: branches/1.4/cf/rpLangPerl.m4 @ 5291

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