summaryrefslogtreecommitdiff
path: root/config/acx.m4
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2008-04-04 11:45:58 +0000
committerNick Clifton <nickc@redhat.com>2008-04-04 11:45:58 +0000
commit7d9aaf8f15a4b9ae354912c2aedce4a13e107c17 (patch)
treecb2b58e8c7d68be368706aa811b96c335525c465 /config/acx.m4
parentee8f6207c0603230e610969bf94c1400c782ee1f (diff)
downloadgdb-7d9aaf8f15a4b9ae354912c2aedce4a13e107c17.tar.gz
PR binutils/4334
* acx.m4 (ACX_CHECK_CYGWIN_CAT_WORKS): New macro to check that cygwin builds are not running in textmode. * configure.ac: Run ACX_CHECK_CYGWIN_CAT_WORKS for cygwin hosted builds. * configure: Regenerate.
Diffstat (limited to 'config/acx.m4')
-rw-r--r--config/acx.m423
1 files changed, 23 insertions, 0 deletions
diff --git a/config/acx.m4 b/config/acx.m4
index c8a32c9f9ed..d186a4ccccd 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
+])