X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=config%2Facx.m4;h=d186a4ccccd58d1583416c8d0a5bac9b27ca1dd4;hb=e33b51a675a59f37ed6aa8c60b3b202fb470d4ca;hp=c8a32c9f9ed591609a793f5f27310f0fbc6e7149;hpb=fc5df3ab38705a40c2e790e6538b4e9c48bc17bb;p=deliverable%2Fbinutils-gdb.git diff --git a/config/acx.m4 b/config/acx.m4 index c8a32c9f9e..d186a4cccc 100644 --- a/config/acx.m4 +++ b/config/acx.m4 @@ -595,3 +595,26 @@ AC_DEFUN([ACX_BUGURL],[ AC_SUBST(REPORT_BUGS_TO) AC_SUBST(REPORT_BUGS_TEXI) ]) + +dnl #### +dnl # ACX_CHECK_CYGWIN_CAT_WORKS +dnl # On Cygwin hosts, check that the cat command ignores +dnl # carriage returns as otherwise builds will not work. +dnl # See binutils PR 4334 for more details. +AC_DEFUN([ACX_CHECK_CYGWIN_CAT_WORKS],[ +AC_MSG_CHECKING([to see if cat works as expected]) +echo a >cygwin-cat-check +if test `cat cygwin-cat-check` == a ; then + rm cygwin-cat-check + AC_MSG_RESULT(yes) +else + rm cygwin-cat-check + AC_MSG_RESULT(no) + AC_MSG_ERROR([The cat command does not ignore carriage return characters. + Please either mount the build directory in binary mode or run the following + commands before running any configure script: +set -o igncr +export SHELLOPTS + ]) +fi +])