e3fd50a2b785bb9f13b6b38f0d01dcc418deca82
[m6w6/libmemcached] / pandora_with_perl.m4
1 dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2 dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3 dnl
4 dnl pandora-build: A pedantic build system
5 dnl Copyright (C) 2009 Sun Microsystems, Inc.
6 dnl This file is free software; the Free Software Foundation
7 dnl gives unlimited permission to copy and/or distribute it,
8 dnl with or without modifications, as long as this notice is preserved.
9 dnl
10 dnl From Monty Taylor
11
12
13 AC_DEFUN([PANDORA_WITH_PERL], [
14
15 AC_ARG_WITH([perl],
16 [AS_HELP_STRING([--with-perl],
17 [Build Perl Bindings @<:@default=yes@:>@])],
18 [with_perl=$withval],
19 [with_perl=yes])
20
21
22 AS_IF([test "x$with_perl" != "xno"],[
23 AS_IF([test "x$with_perl" != "xyes"],
24 [ac_chk_perl=$with_perl],
25 [ac_chk_perl=perl])
26 AC_CHECK_PROGS(PERL,$ac_chk_perl)
27 ])
28
29 AM_CONDITIONAL(BUILD_PERL, [test "$with_perl" = "yes"])
30
31 dnl Don't think we need these anymore, but it's a good reference
32 dnl if test "x$PERL" != "x"; then
33 dnl PERLCCFLAGS=`$PERL -MConfig -e 'print $Config{ccflags};'`
34 dnl PERLCPPFLAGS=`$PERL -MConfig -e 'print $Config{cppflags};'`
35 dnl PERLLIBS=`$PERL -MConfig -e 'print $Config{perllibs};'`
36 dnl fi
37
38 ])