X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=configure;h=f0540b7c177f92e748e38cfb3028592659e458ed;hb=f21bce61b0b8c121ae9ada3717079bdd81451f92;hp=791a088b550470e9e9d6c16621a3d6d64540b686;hpb=15925690fee382ffc7d78fa2fed8b686c180ec99;p=SXSI%2Fxpathcomp.git diff --git a/configure b/configure index 791a088..f0540b7 100755 --- a/configure +++ b/configure @@ -18,23 +18,48 @@ Conf.check_prog "camlp4" "ocamlfind query camlp4";; Conf.check_prog "ulex" "ocamlfind query ulex";; Conf.check_prog "expat" "ocamlfind query expat";; +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 "XMLTree" (Conf.absolute) ("%s/../XMLTree/libXMLTree.a") (Sys.file_exists);; +Conf.check "TextCollection" (Conf.absolute) ("%s/../TextCollection/libTextCollection.a") (Sys.file_exists);; +Conf.check "Grammar" (Conf.absolute) ("%s/../Grammar/libGrammar.a") (Sys.file_exists);; -let libXMLTreeI = [ Conf.absolute "-I%s/../XMLTree"; - Conf.absolute "-I%s/../XMLTree/libcds/includes"; - Conf.absolute "-I%s/../XMLTree/TextCollection" ] -;; -let libXMLTreeL = [ Conf.absolute "-L%s/../XMLTree" ];; -let libXMLTreel = [ "-lXMLTree" ];; + +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/../Grammar"; + 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/../Grammar"; + Conf.absolute "-L%s/.."; + ] + +(* Order is relevant *) +let libs_l = [ + "-lGrammar"; + "-lXMLTree"; + "-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;;