X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=configure;h=c192a2840a231a7ac5f4389b73f500de8f6e1ce8;hb=f1181ec507d05a2f9ff5371b282a26f8d6e1ff7e;hp=6d86ab3396c122409f969bfdd5573d2906c1f190;hpb=ff13d22656fdbdffb2d909192bd17ba135606224;p=SXSI%2Fxpathcomp.git diff --git a/configure b/configure index 6d86ab3..c192a28 100755 --- a/configure +++ b/configure @@ -14,28 +14,56 @@ Conf.check_prog "ocamlbuild" "ocamlbuild -version";; Conf.check_prog "ocamlfind" "ocamlfind printconf";; Conf.check_prog "pkg-config" "pkg-config --version";; -(*Conf.check_prog "libxml++-2.6" "pkg-config --exists libxml++-2.6" ;;*) +Conf.check_prog "camlp4" "ocamlfind query camlp4";; Conf.check_prog "ulex" "ocamlfind query ulex";; Conf.check_prog "expat" "ocamlfind query expat";; -Conf.check "XMLTree" (Conf.absolute) ("%s/src/XMLTree/libXMLTree.a") (Sys.file_exists);; +Conf.check "bp" (Conf.absolute) ("%s/../bp/libbp.a") (Sys.file_exists);; +Conf.check "libcds" (Conf.absolute) ("%s/../libcds/lib/libcds.a") (Sys.file_exists);; +Conf.check "libxml-tree" (Conf.absolute) ("%s/../XMLTree/libxml-tree.a") (Sys.file_exists);; +Conf.check "TextCollection" (Conf.absolute) ("%s/../TextCollection/libTextCollection.a") (Sys.file_exists);; -let libXMLTreeI = [ Conf.absolute "-I%s/src/XMLTree"; - Conf.absolute "-I%s/src/XMLTree/libcds/includes"; - Conf.absolute "-I%s/src/XMLTree/TextCollection" ] -;; -let libXMLTreeL = [ Conf.absolute "-L%s/src/XMLTree" ];; -let libXMLTreel = [ "-lXMLTree" ];; + +let libs_files = [ + (Conf.absolute) ("%s/../bp/libbp.a"); + (Conf.absolute) ("%s/../libcds/lib/libcds.a"); + (Conf.absolute) ("%s/../XMLTree/libxml-tree.a"); + (Conf.absolute) ("%s/../TextCollection/libTextCollection.a"); +] + +let libs_I= [ + Conf.absolute "-I%s/../bp"; + Conf.absolute "-I%s/../libcds/includes"; + Conf.absolute "-I%s/../XMLTree"; + Conf.absolute "-I%s/../TextCollection"; + Conf.absolute "-I%s/.."; + ] + +let libs_L = [ + Conf.absolute "-L%s/../bp"; + Conf.absolute "-L%s/../libcds/lib"; + Conf.absolute "-L%s/../XMLTree"; + Conf.absolute "-L%s/../TextCollection"; + Conf.absolute "-L%s/.."; + ] + +(* Order is relevant *) +let libs_l = [ + "-lxml-tree"; + "-lTextCollection"; + "-lbp"; + "-lcds" +] let _,ocamlI,_ = Conf.exec "ocamlc -where";; let ocamlI = [ "-I" ^ ocamlI ];; Conf.def_str "cxx_cmd" "g++";; -Conf.def_list "cxx_includes" (libXMLTreeI @ ocamlI);; -Conf.def_list "cxx_lpaths" libXMLTreeL;; -Conf.def_list "cxx_libs" libXMLTreel;; - +Conf.def_list "cxx_includes" (libs_I @ ocamlI);; +Conf.def_list "cxx_lpaths" libs_L;; +Conf.def_list "cxx_libs" libs_l;; +Conf.def_list "cxx_libs_objects" libs_files;; Conf.finish ();;