Hi,

The detection code of config_file in the ./configure script doesn't
work for me:

 Looking for config_file library... not found, not
in /usr/lib/ocaml/3.09.2/config_file/ neither
in /usr/local/lib/ocaml/3.09.2/config_file/

(the module is in /usr/local/lib/ocaml/3.09.2/cameleon/config_file.*)

This code doesn't use ocamlfind, while the rest of the configure script
uses ocamlfind to check for OCaml modules. Is there any particular
reason for that ?

Anyway, for me, it works with ocamlfind, so here's a patch that fixes
it.

Sincerly,

Thomas
-- 
PETAZZONI Thomas - [EMAIL PROTECTED] 
http://{thomas,sos,kos}.enix.org - Jabber: [EMAIL PROTECTED]
http://{agenda,livret}dulibre.org - http://www.toulibre.org
Fingerprint : 0BE1 4CF3 CEA4 AC9D CC6E  1624 F653 CB30 98D3 F7A7
--- demexp--dev--0.7/configure	2006-02-05 14:27:31.000000000 +0100
+++ demexp--dev--0.7.new/configure	2006-09-26 00:14:23.000000000 +0200
@@ -408,28 +408,26 @@
 # find independent config_file
 
 echo -n "Looking for config_file library... "
-ocamlstdlib=`ocamlc -v|sed -re '2!{d};2{s/^.*: (.*)/\1/}'`
-ocamllocallib=`echo $ocamlstdlib|sed 's|/usr/lib|/usr/local/lib|'`
-if test -f "$ocamlstdlib/config_file/config_file.cmx"; then
-    echo "$ocamlstdlib/config_file/config_file.cmx";
-    external_include="$external_include -I $ocamlstdlib/config_file";
-    external_cmxa="$external_cmxa config_file.cmx";
+configfileinc=`ocamlfind query -i-format -recursive -separator ' ' cameleon.config_file`
+configfilecmxa=cameleon.config_file
+if test -n "$configfileinc"; then
+    echo "$configfileinc";
+    external_include="$external_include $configfileinc";
+    external_package="$external_package $configfilecmxa";
 else
-    if test -f "$ocamllocallib/config_file/config_file.cmx"; then
-        echo "$ocamllocallib/config_file/config_file.cmx";
-        external_include="$external_include -I $ocamllocallib/config_file";
-        external_cmxa="$external_cmxa config_file.cmx";
-    else
-        echo "not found, not in $ocamlstdlib/config_file/"
-        echo " neither in $ocamllocallib/config_file/";
-        echo "*** This tool is required to build demexp";
-        echo "*** Please install the package or compile following instructions found";
-        echo "*** in README. Source archive available at:";
-        echo "***   http://download.gna.org/cameleon/";;
-        exit 2;    
-    fi
+    echo "*** This tool is required to build demexp";
+    echo "*** Please install the package or compile following instructions found";
+    echo "*** in README. Source archive available at:";
+    echo "***   http://download.gna.org/cameleon/";;
+    exit 2;
 fi
 
+# find needed .cmxa for ocamlfind package name
+
+external_cmxa=`ocamlfind query -predicates native -a-format -recursive -separator ' ' $external_package`
+# remove spurious '+'
+external_cmxa=`echo $external_cmxa | sed -e "s|+||g"`
+
 # remove -I /usr/lib/ocaml/VERSION otherwise ocamldep will introduce
 # unneeded dependencies on standard modules (e.g. thread.cmi)
 standard_include=`ocamlfind query -i-format stdlib`

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Demexp-dev mailing list
Demexp-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/demexp-dev

Répondre à