From 71bd17b666e82ffb2b83644e5c122763e12e900b Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Sat, 9 Nov 2013 18:50:59 -0500 Subject: Fix various \r issues with windows Also add a 2 in an error message (it's gSourceView2, not gSourceView). This closes bugs 3150, 3151, 3152, and 3153. --- configure | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 1a6b72604..1e0290b7f 100755 --- a/configure +++ b/configure @@ -336,7 +336,8 @@ fi MAKE=`which ${makecmd:-make}` if [ "$MAKE" != "" ]; then - MAKEVERSION=`$MAKE -v | head -1 | cut -d" " -f3` + # Beware of the final \r in Win32 + MAKEVERSION=`"$MAKE" -v | head -1 | tr -d "\r" | cut -d" " -f3` MAKEVERSIONMAJOR=`echo $MAKEVERSION | cut -d. -f1` MAKEVERSIONMINOR=`echo $MAKEVERSION | cut -d. -f2` if [ "$MAKEVERSIONMAJOR" -gt 3 -o "$MAKEVERSIONMAJOR" -eq 3 -a "$MAKEVERSIONMINOR" -ge 81 ]; then @@ -493,7 +494,8 @@ case $usecamlp5 in exit 1 fi else - camlp5dir="$(camlp5 -where)" + # Beware of the final \r in Win32 + camlp5dir="$(camlp5 -where | tr -d "\r")" if [ "$camlp5dir" != "" ]; then CAMLP4LIB=$camlp5dir FULLCAMLP4LIB=$camlp5dir @@ -637,9 +639,10 @@ if [ "$coqide_spec" = "yes" -a "$COQIDE" = "no" ]; then else case $lablgtkdir_spec in no) - if lablgtkdirtmp=$(ocamlfind query lablgtk2.sourceview2 2> /dev/null); then + # Beware of the final \r in Win32 + if lablgtkdirtmp="$(ocamlfind query lablgtk2.sourceview2 2> /dev/null | tr -d "\r")"; then if [ ! -f "$lablgtkdirtmp/gSourceView2.cmi" ]; then - echo "Incomplete Lablgtk2 found by ocamlfind (gSourceView.cmi not found)." + echo "Incomplete Lablgtk2 found by ocamlfind (gSourceView2.cmi not found)." elif [ ! -f "$lablgtkdirtmp/glib.mli" ]; then echo "Incomplete Lablgtk2 found by ocamlfind (glib.mli not found)." else -- cgit v1.2.3