1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
--- configure.ac.orig 2011-08-15 22:29:28.309745342 +0300
+++ configure.ac 2011-08-15 22:34:54.324549151 +0300
@@ -170,11 +170,18 @@
AC_SUBST([LIBXML2_CFLAGS])
AC_SUBST([LIBXML2_LIBS])
+
+dnl ////////////////////////////////////////////////////////////////////////////
dnl Check for OCaml (optional, for OCaml bindings).
+
+AC_ARG_ENABLE([ocaml],
+ AS_HELP_STRING([--with-ocaml],[build Ocaml binding]))
+
+
AC_PROG_OCAML
AC_PROG_FINDLIB
AM_CONDITIONAL([HAVE_OCAML],
- [test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno"])
+ [test "x$OCAMLC" != "xno" -a "x$OCAMLFIND" != "xno" -a "x$enable_ocaml" = "xyes"])
AM_CONDITIONAL([HAVE_OCAMLOPT],
[test "x$OCAMLOPT" != "xno" && test "x$OCAMLFIND" != "xno"])
@@ -207,6 +214,8 @@
rm -f conftest conftest.* conftest_ml.*
fi
+dnl ///////////////////////////////////////////////////////////////////////////////////////
+
dnl Check for Perl (optional, for Perl bindings).
dnl XXX This isn't quite right, we should check for Perl devel library.
AC_CHECK_PROG([PERL],[perl],[perl],[no])
@@ -214,21 +223,35 @@
dnl Check for Perl modules that must be present to compile and
dnl test the Perl bindings.
missing_perl_modules=no
-for pm in Test::More ExtUtils::MakeMaker IO::Stringy; do
- AC_MSG_CHECKING([for $pm])
- if ! perl -M$pm -e1 >/dev/null 2>&1; then
- AC_MSG_RESULT([no])
- missing_perl_modules=yes
- else
- AC_MSG_RESULT([yes])
- fi
-done
-if test "x$missing_perl_modules" = "xyes"; then
- AC_MSG_WARN([some Perl modules required to compile or test the Perl bindings are missing])
-fi
+
+AC_ARG_ENABLE([perl],
+ AS_HELP_STRING([--with-perl],[build Perl binding]))
+
+
+PERL=
+AS_IF([test "x$enable_perl" != "xno" ],[
+ AC_CHECK_PROG([PERL],[perl],[yes],[no])
+
+ for pm in Test::More ExtUtils::MakeMaker IO::Stringy; do
+ AC_MSG_CHECKING([for $pm])
+ if ! perl -M$pm -e1 >/dev/null 2>&1; then
+ AC_MSG_RESULT([no])
+ missing_perl_modules=yes
+ else
+ AC_MSG_RESULT([yes])
+ fi
+ done
+
+ AS_IF([test "x$missing_perl_modules" = "xyes"],
+ [AC_MSG_FAILURE([some Perl modules required to compile or test the Perl bindings are missing])],
+ )
+])
+
AM_CONDITIONAL([HAVE_PERL],
- [test "x$PERL" != "xno" && test "x$missing_perl_modules" != "xyes"])
+ [test "x$PERL" != "xno" -a "x$missing_perl_modules" != "xyes" -a "x$enable_perl" = "xyes"])
+
+dnl //////////////////////////////////////////////////////////////////////////////////////////////////
dnl Check for Python (optional, for Python bindings).
AC_CHECK_PROG([PYTHON],[python],[python],[no])
@@ -266,15 +289,21 @@
AC_SUBST(PYTHON_INCLUDEDIR)
AC_SUBST(PYTHON_SITE_PACKAGES)
+AC_ARG_ENABLE([python],
+ AS_HELP_STRING([--with-python],[build Python binding]))
+
AM_CONDITIONAL([HAVE_PYTHON],
- [test "x$PYTHON_INCLUDEDIR" != "x" && test "x$PYTHON_SITE_PACKAGES" != "x"])
+ [test "x$PYTHON_INCLUDEDIR" != "x" -a "x$PYTHON_SITE_PACKAGES" != "x" -a "x$enable_python" = "xyes"])
dnl Check for Ruby and rake (optional, for Ruby bindings).
AC_CHECK_LIB([ruby],[ruby_init],[HAVE_LIBRUBY=1],[HAVE_LIBRUBY=0])
AC_CHECK_PROG([RAKE],[rake],[rake],[no])
+AC_ARG_ENABLE([ruby],
+ AS_HELP_STRING([--with-ruby],[build Ruby binding]))
+
AM_CONDITIONAL([HAVE_RUBY],
- [test "x$RAKE" != "xno" && test -n "$HAVE_LIBRUBY"])
+ [test "x$RAKE" != "xno" && test -n "$HAVE_LIBRUBY" -a "x$enable_ruby" = "xyes"])
dnl dnl Check for Java.
dnl AC_ARG_WITH(java_home,
|