Commit c43011da authored by dobenour's avatar dobenour Committed by Ben Gamari

Clean up some shell code and M4 quoting


Test Plan: GHC CI

Reviewers: austin, hvr, bgamari

Reviewed By: bgamari

Subscribers: thomie, erikd

Differential Revision: https://phabricator.haskell.org/D2993
parent b626a001
......@@ -1056,15 +1056,14 @@ AC_SUBST([LdHasBuildId])
# -----------------
# Sets the output variable LdIsGNULd to YES or NO, depending on whether it is
# GNU ld or not.
AC_DEFUN([FP_PROG_LD_IS_GNU],
[
AC_DEFUN([FP_PROG_LD_IS_GNU],[
AC_CACHE_CHECK([whether ld is GNU ld], [fp_cv_gnu_ld],
[if ${LdCmd} --version 2> /dev/null | grep "GNU" > /dev/null 2>&1; then
fp_cv_gnu_ld=yes
[[if ${LdCmd} --version 2> /dev/null | grep "GNU" > /dev/null 2>&1; then
fp_cv_gnu_ld=YES
else
fp_cv_gnu_ld=no
fi])
AC_SUBST([LdIsGNULd], [`echo $fp_cv_gnu_ld | sed 'y/yesno/YESNO/'`])
fp_cv_gnu_ld=NO
fi]])
AC_SUBST([LdIsGNULd],["$fp_cv_gnu_ld"])
])# FP_PROG_LD_IS_GNU
......
......@@ -120,7 +120,7 @@ AC_ARG_VAR(CC_STAGE0, [C compiler command (bootstrap)])
if test "$WithGhc" != ""; then
FPTOOLS_GHC_VERSION([GhcVersion], [GhcMajVersion], [GhcMinVersion], [GhcPatchLevel])dnl
if test "$GhcMajVersion" = "unknown" -o "$GhcMinVersion" = "unknown"; then
if test "$GhcMajVersion" = "unknown" || test "$GhcMinVersion" = "unknown"; then
AC_MSG_ERROR([Cannot determine the version of $WithGhc. Is it really GHC?])
fi
......@@ -1144,7 +1144,7 @@ checkMake380 gmake
AC_CONFIG_FILES([mk/config.mk mk/install.mk mk/project.mk compiler/ghc.cabal ghc/ghc-bin.cabal utils/runghc/runghc.cabal libraries/ghc-boot/ghc-boot.cabal libraries/ghc-boot-th/ghc-boot-th.cabal libraries/ghci/ghci.cabal settings docs/users_guide/ghc_config.py docs/index.html libraries/prologue.txt utils/mkUserGuidePart/mkUserGuidePart.cabal distrib/configure.ac])
AC_OUTPUT
[
if test "$print_make_warning" = "true"; then
echo
echo "WARNING: It looks like \"$MakeCmd\" is GNU make 3.80."
......@@ -1152,7 +1152,7 @@ if test "$print_make_warning" = "true"; then
echo "Please use GNU make >= 3.81."
fi
echo ["
echo "
----------------------------------------------------------------------
Configure completed successfully.
......@@ -1162,12 +1162,12 @@ Configure completed successfully.
Build platform : $BuildPlatform
Host platform : $HostPlatform
Target platform : $TargetPlatform
"]
"
echo ["\
echo "\
Bootstrapping using : $WithGhc
which is version : $GhcVersion
"]
"
if test "x$CC_LLVM_BACKEND" = "x1"; then
if test "x$CC_CLANG_BACKEND" = "x1"; then
......@@ -1179,7 +1179,7 @@ else
CompilerName="gcc "
fi
echo ["\
echo "\
Using (for bootstrapping) : $CC_STAGE0
Using $CompilerName : $CC
which is version : $GccVersion
......@@ -1198,24 +1198,24 @@ echo ["\
Using LLVM tools
llc : $LlcCmd
opt : $OptCmd"]
opt : $OptCmd"
if test "$HSCOLOUR" = ""; then
echo ["
echo "
HsColour was not found; documentation will not contain source links
"]
"
else
echo ["\
echo "\
HsColour : $HSCOLOUR
"]
"
fi
echo ["\
echo "\
Tools to build Sphinx HTML documentation available: $BUILD_SPHINX_HTML
Tools to build Sphinx PDF documentation available: $BUILD_SPHINX_PDF"]
echo ["----------------------------------------------------------------------
"]
echo "----------------------------------------------------------------------
"
echo "\
For a standard build of GHC (fully optimised with profiling), type (g)make.
......@@ -1225,4 +1225,4 @@ mk/build.mk.sample to mk/build.mk, and edit the settings in there.
For more information on how to configure your GHC build, see
http://ghc.haskell.org/trac/ghc/wiki/Building
"
"]
......@@ -51,11 +51,11 @@ AC_CHECK_FUNCS([epoll_ctl eventfd kevent kevent64 kqueue poll])
# event-related fun
if test "$ac_cv_header_sys_epoll_h" = yes -a "$ac_cv_func_epoll_ctl" = yes; then
if test "$ac_cv_header_sys_epoll_h" = yes && test "$ac_cv_func_epoll_ctl" = yes; then
AC_DEFINE([HAVE_EPOLL], [1], [Define if you have epoll support.])
fi
if test "$ac_cv_header_sys_event_h" = yes -a "$ac_cv_func_kqueue" = yes; then
if test "$ac_cv_header_sys_event_h" = yes && test "$ac_cv_func_kqueue" = yes; then
AC_DEFINE([HAVE_KQUEUE], [1], [Define if you have kqueue support.])
AC_CHECK_SIZEOF([kev.filter], [], [#include <sys/event.h>
......@@ -65,7 +65,7 @@ struct kevent kev;])
struct kevent kev;])
fi
if test "$ac_cv_header_poll_h" = yes -a "$ac_cv_func_poll" = yes; then
if test "$ac_cv_header_poll_h" = yes && test "$ac_cv_func_poll" = yes; then
AC_DEFINE([HAVE_POLL], [1], [Define if you have poll support.])
fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment