+AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
+[
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"
+ then
+ PERL_BINDINGS_OPTIONS="$withval"
+ with_perl_bindings="yes"
+ else
+ PERL_BINDINGS_OPTIONS=""
+ with_perl_bindings="$withval"
+ fi
+],
+[
+ PERL_BINDINGS_OPTIONS=""
+ with_perl_bindings="yes"
+])
+
+if test "x$with_perl_bindings" = "xyes"
+then
+ BINDINGS="perl-bindings"
+else
+ BINDINGS=""
+fi
+
+AC_SUBST(PERL_BINDINGS_OPTIONS)
+
+AC_SUBST(BINDINGS)
+
+AC_OUTPUT(Makefile src/Makefile src/mans/Makefile bindings/Makefile)