X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=autoconf%2Fconfigure.ac;h=0d15ee0e968154d6b5b4474d81b459257ab8ad8f;hb=6530e9d8e6dfc8f16fe509701967e4ade99fae6c;hp=25cdfec4f31b5725c62c8b6abf1c0376e3dd405b;hpb=fdd7c6babfe2c77f015d491c7d571a9c098ae5d3;p=oota-llvm.git diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 25cdfec4f31..0d15ee0e968 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -432,6 +432,24 @@ case "$withval" in esac AC_SUBST(EXTRA_OPTIONS,$EXTRA_OPTIONS) +dnl Allow specific bindings to be specified for building (or not) +AC_ARG_ENABLE([bindings],AS_HELP_STRING([--enable-bindings], + [Build specific language bindings: all,auto,none,{binding-name} (default=auto)]),, + enableval=default) +BINDINGS_TO_BUILD="" +case "$enableval" in + all | yes | default | auto) BINDINGS_TO_BUILD="auto" ;; + all ) BINDINGS_TO_BUILD="ocaml" ;; + none | no) BINDINGS_TO_BUILD="" ;; + *)for a_binding in `echo $enableval|sed -e 's/,/ /g' ` ; do + case "$a_binding" in + ocaml) BINDINGS_TO_BUILD="ocaml $BINDINGS_TO_BUILD" ;; + *) AC_MSG_ERROR([Unrecognized binding $a_binding]) ;; + esac + done + ;; +esac + dnl===-----------------------------------------------------------------------=== dnl=== dnl=== SECTION 4: Check for programs we need and that they are the right version @@ -855,6 +873,19 @@ AC_DEFINE_UNQUOTED(LLVM_MANDIR, "$LLVM_MANDIR", AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME", [Time at which LLVM was configured]) +# Determine which bindings to build. +if test "$BINDINGS_TO_BUILD" = auto ; then + BINDINGS_TO_BUILD="" + if test "x$OCAMLC" != x -a "x$OCAMLDEP" != x ; then + BINDINGS_TO_BUILD="ocaml $BINDINGS_TO_BUILD" + fi +fi +AC_SUBST(BINDINGS_TO_BUILD,$BINDINGS_TO_BUILD) + +# This isn't really configurey, but it avoids having to repeat the list in +# other files. +AC_SUBST(ALL_BINDINGS,ocaml) + dnl===-----------------------------------------------------------------------=== dnl=== dnl=== SECTION 10: Specify the output files and generate it