X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Fgdome_xslt%2Fconfigure.ac;h=c711e9f825bdea10f3d654ebd24c01c8f88bd86e;hb=8d27b525f31e1f1760bee25aae8fba5b9c3db637;hp=bc8ab38b2f4e9458f84c7cc675191f3860f6cf1b;hpb=c640e15d6309c8aaeeb8d4ce25b31ec1d588dcd3;p=helm.git diff --git a/helm/DEVEL/gdome_xslt/configure.ac b/helm/DEVEL/gdome_xslt/configure.ac index bc8ab38b2..c711e9f82 100644 --- a/helm/DEVEL/gdome_xslt/configure.ac +++ b/helm/DEVEL/gdome_xslt/configure.ac @@ -7,11 +7,35 @@ VERSION=0.0.3 VERSION_INFO=`echo $VERSION | awk -F. '{ printf "%d:%d:%d", $1+$2, $3, $2 }'` AC_SUBST(VERSION_INFO) +AC_ARG_WITH( + gmetadom-prefix, + [ --with-gmetadom-prefix=PFX prefix dir where gmetadom is installed], + [ + with_gmetadom_prefix=yes + GMETADOM_PREFIX=$withval + ], + [ + with_gmetadom_prefix=no + ] +) + +AC_ARG_WITH( + gdome-prefix, + [ --with-gdome-prefix=PFX prefix dir where gdome is installed], + [ + with_gdome_prefix=yes + GDOME_PREFIX=$withval + ], + [ + with_gdome_prefix=no + ] +) + AC_PROG_CC AC_PROG_CXX AC_PROG_INSTALL -AC_CONFIG_HEADER([config.h]) +AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE($PACKAGE, $VERSION) AM_PROG_LIBTOOL @@ -23,8 +47,8 @@ then if ${GDOME_PREFIX}/bin/$GDOME_CONFIG --version > /dev/null 2>&1 then GDOME_CONFIG=${GDOME_PREFIX}/bin/$GDOME_CONFIG - elif ! $GDOME_CONFIG --version > /dev/null 2>&1 - then + elif ! $GDOME_CONFIG --version > /dev/null 2>&1 + then AC_MSG_ERROR(Could not find Gdome2 anywhere (see config.log for details).) fi fi @@ -102,16 +126,51 @@ AC_SUBST(LIBXSLT_LIBS) AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no) if test $HAVE_OCAMLC = "no"; then AC_MSG_ERROR(could not find ocamlc in PATH, please make sure ocaml is installed) +else + OCAMLC=ocamlc + OCAMLSTDLIBDIR="`ocamlc -where`" + OCAMLSTUBDIR="`ocamlc -where`/stublibs" + AC_SUBST(OCAMLC) + AC_SUBST(OCAMLSTDLIBDIR) + AC_SUBST(OCAMLSTUBDIR) +fi + +AC_CHECK_PROG(HAVE_OCAMLOPT, ocamlopt, yes, no) +if test $HAVE_OCAMLOPT = "no"; then + AC_MSG_WARN(ocaml native libraries won't be compiled since ocamlopt was not found) +else + OCAMLOPT=ocamlopt + AC_SUBST(OCAMLOPT) fi +AM_CONDITIONAL(HAVE_OCAMLOPT_COND, test x$HAVE_OCAMLOPT = xyes) AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no) if test $HAVE_OCAMLFIND = "no"; then AC_MSG_ERROR(could not find ocamlfind in PATH, please make sure findlib is installed) +else + OCAMLFIND=ocamlfind + AC_SUBST(OCAMLFIND) +fi + +AC_CHECK_PROG(HAVE_OCAMLDEP, ocamldep, yes, no) +if test $HAVE_OCAMLDEP = "yes"; then + OCAMLDEP=ocamldep + AC_SUBST(OCAMLDEP) +fi + +AC_CHECK_PROG(HAVE_OCAMLMKLIB, ocamlmklib, yes, no) +if test $HAVE_OCAMLMKLIB = "no"; then + AC_MSG_ERROR(could not find ocamlmklib in PATH, please make sure ocamlmklib is installed) +else + OCAMLMKLIB=ocamlmklib + AC_SUBST(OCAMLMKLIB) fi AC_MSG_CHECKING(for gdome2 ocaml binding) ocamlfind query gdome2 || AC_MSG_ERROR(gdome2 not installed (according to findlib)) +MLGDOME_CFLAGS="`$OCAMLFIND query -i-format gdome2`" +AC_SUBST(MLGDOME_CFLAGS) AC_MSG_CHECKING(for the ocaml library dir) OCAML_LIB_DIR=`ocamlc -where` @@ -134,11 +193,11 @@ AC_CONFIG_FILES([ C++/gdome_xslt/Makefile C++/test/Makefile C++/Makefile - C++/gdome_xslt_cpp_smart-config ocaml/Makefile ocaml/gdome_xslt/Makefile + ocaml/gdome_xslt/META ocaml/test/Makefile - test_files/Makefile - debian/Makefile]) -AC_CONFIG_COMMANDS([default],[[chmod +x C++/gdome_xslt_cpp_smart-config]],[[]]) + gdome_xslt_cpp_smart-config + test_files/Makefile]) +AC_CONFIG_COMMANDS([default],[[chmod +x gdome_xslt_cpp_smart-config]],[[]]) AC_OUTPUT