fix build failure on Solaris 10 due to RANLIB being set to ':' by configure (#8795)
authorKarel Gardas <karel.gardas@centrum.cz>
Mon, 17 Feb 2014 09:24:05 +0000 (10:24 +0100)
committerAustin Seipp <austin@well-typed.com>
Wed, 19 Feb 2014 22:32:35 +0000 (16:32 -0600)
Signed-off-by: Austin Seipp <austin@well-typed.com>
aclocal.m4

index a30fa4f..c2a7ba2 100644 (file)
@@ -1137,6 +1137,16 @@ AC_DEFUN([FP_PROG_AR_NEEDS_RANLIB],[
         esac
     fi
 
+    # workaround for AC_PROG_RANLIB which sets RANLIB to `:' when
+    # ranlib is missing on the target OS. The problem is that
+    # ghc-cabal cannot execute `:' which is a shell built-in but can
+    # execute `true' which is usually simple program supported by the
+    # OS.
+    # Fixes #8795
+    if test "$RANLIB" = ":"
+    then
+        RANLIB="true"
+    fi
     REAL_RANLIB_CMD="$RANLIB"
     if test $fp_cv_prog_ar_needs_ranlib = yes
     then