Index: build-tree/findlib-1.2.5+debian/configure
===================================================================
--- build-tree.orig/findlib-1.2.5+debian/configure	2009-09-26 10:11:43.000000000 +0200
+++ build-tree/findlib-1.2.5+debian/configure	2011-10-09 04:22:56.112287612 +0200
@@ -113,6 +113,7 @@
 ocamlfind_bin=""
 ocamlfind_man=""
 ocaml_sitelib=""
+camlp4bin="camlp4"
 ocamlfind_config=""
 with_toolbox=0
 with_topfind=1
@@ -132,6 +133,9 @@
         -config) ocamlfind_config=$2
 	         shift 2
 		 ;;
+        -camlp4bin) camlp4bin=$2
+                 shift 2
+                 ;;
 	-cygpath) system=mingw
 	         shift
 		 ;;
@@ -391,20 +395,20 @@
 
 # Check on camlp4:
 
-if in_path camlp4; then
-    camlp4_dir=`camlp4 -where`
+if test -x "${camlp4bin}" || in_path ${camlp4bin}; then
+    camlp4_dir=`${camlp4bin} -where | tr -d '\r'`
     if [ ${use_cygpath} -gt 0 ]; then
 	camlp4_dir=`echo x | env USE_CYGPATH=1 tools/patch x "$camlp4_dir"`
         # This makes camlp4_dir a windows path
     fi
-    camlp4_version=`camlp4 -v 2>&1`
+    camlp4_version=`${camlp4bin} -v | tr -d '\r' 2>&1`
     if [ "$have_dlls" = "yes" ]; then
 	camlp4_cmd="camlp4"
     else
 	camlp4_cmd="safe_camlp4"
     fi
     # Check whether 3.09 or 3.10 style:
-    if camlp4 -loaded-modules >/dev/null 2>/dev/null; then
+    if ${camlp4bin} -loaded-modules >/dev/null 2>/dev/null; then
 	camlp4style=310
     else
 	camlp4style=309
