Autoconf detection of Perl5 and Perl5 modules
Add m4 macros for checking for perl modules (JSON) Fix #74, #29. Signed-off-by: Nico Williams <nico@twosigma.com>
This commit is contained in:

committed by
Nicolas Williams

parent
7b6bf87685
commit
298ee93ac2
21
cf/krb-prog-perl.m4
Normal file
21
cf/krb-prog-perl.m4
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
dnl
|
||||||
|
dnl perl and some of its module are required to build some headers
|
||||||
|
dnl
|
||||||
|
|
||||||
|
AC_DEFUN([AC_KRB_PROG_PERL],
|
||||||
|
[AC_CHECK_PROGS(PERL, perl, perl)
|
||||||
|
if test "$PERL" = ""; then
|
||||||
|
AC_MSG_ERROR([perl not found - Cannot build Heimdal without perl])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([AC_KRB_PERL_MOD],
|
||||||
|
[
|
||||||
|
AC_MSG_CHECKING([for Perl5 module $1])
|
||||||
|
if ! $PERL -M$1 -e 'exit(0);' >/dev/null 2>&1; then
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
AC_MSG_ERROR([perl module $1 not found - Cannot build Heimdal without perl module $1])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
fi
|
||||||
|
])
|
12
configure.ac
12
configure.ac
@@ -45,6 +45,17 @@ AC_DEFINE([_GNU_SOURCE], 1,
|
|||||||
AC_OBJEXT
|
AC_OBJEXT
|
||||||
AC_EXEEXT
|
AC_EXEEXT
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl this is needed when der-protos.h or der-private.h has to be generated
|
||||||
|
dnl
|
||||||
|
if ! test -f "$srcdir/lib/asn1/der-protos.h" ||
|
||||||
|
! test -f "$srcdir/lib/asn1/der-private.h"; then
|
||||||
|
AC_KRB_PROG_PERL
|
||||||
|
AC_KRB_PERL_MOD(Getopt::Std)
|
||||||
|
AC_KRB_PERL_MOD(File::Compare)
|
||||||
|
AC_KRB_PERL_MOD(JSON)
|
||||||
|
fi
|
||||||
|
|
||||||
dnl AC_KRB_PROG_YACC
|
dnl AC_KRB_PROG_YACC
|
||||||
AC_PROG_YACC
|
AC_PROG_YACC
|
||||||
AM_PROG_LEX
|
AM_PROG_LEX
|
||||||
@@ -100,7 +111,6 @@ AC_SUBST([ASN1_COMPILE_DEP])
|
|||||||
AC_SUBST([SLC])
|
AC_SUBST([SLC])
|
||||||
AC_SUBST([SLC_DEP])
|
AC_SUBST([SLC_DEP])
|
||||||
|
|
||||||
|
|
||||||
dnl ---
|
dnl ---
|
||||||
|
|
||||||
AC_DEFINE(HEIM_WEAK_CRYPTO, 1, [Define if you want support for weak crypto])
|
AC_DEFINE(HEIM_WEAK_CRYPTO, 1, [Define if you want support for weak crypto])
|
||||||
|
Reference in New Issue
Block a user