Change path to XMLTree library
[SXSI/xpathcomp.git] / configure
index c985457..791a088 100755 (executable)
--- a/configure
+++ b/configure
@@ -14,24 +14,17 @@ 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 "XMLTree" (Conf.absolute) ("%s/src/XMLTree/libXMLTree.a") (Sys.file_exists);;
+Conf.check_prog "expat" "ocamlfind query expat";;
 
-let _, libxmlI, _ = Conf.exec "pkg-config --cflags-only-I libxml++-2.6";;
-let libxmlI = Conf.explode (libxmlI);;
+Conf.check "XMLTree" (Conf.absolute) ("%s/../XMLTree/libXMLTree.a") (Sys.file_exists);;
 
-let _, libxmlL, _ = Conf.exec "pkg-config --libs-only-L libxml++-2.6";;
-let libxmlL = Conf.explode (libxmlL);;
-
-let _, libxmll, _ = Conf.exec "pkg-config --libs-only-l libxml++-2.6";;
-let libxmll = Conf.explode (libxmll);;
-
-let libXMLTreeI = [ Conf.absolute "-I%s/src/XMLTree";
-                         Conf.absolute "-I%s/src/XMLTree/libcds/includes";
-                         Conf.absolute "-I%s/src/XMLTree/TextCollection" ]
+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/src/XMLTree" ];;
+let libXMLTreeL = [ Conf.absolute "-L%s/../XMLTree" ];;
 let libXMLTreel = [ "-lXMLTree" ];;
 
 let _,ocamlI,_ = Conf.exec "ocamlc -where";;
@@ -39,9 +32,9 @@ let ocamlI = [ "-I" ^ ocamlI ];;
 
 Conf.def_str "cxx_cmd" "g++";;
 
-Conf.def_list "cxx_includes" (libxmlI @ libXMLTreeI @ ocamlI);;
-Conf.def_list "cxx_lpaths" (libxmlL @ libXMLTreeL);;
-Conf.def_list "cxx_libs" ( libXMLTreel @ libxmll );;
+Conf.def_list "cxx_includes" (libXMLTreeI @ ocamlI);;
+Conf.def_list "cxx_lpaths" libXMLTreeL;;
+Conf.def_list "cxx_libs" libXMLTreel;;