OSDN Git Service

PR binutils/4334
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 4 Apr 2008 11:39:20 +0000 (11:39 +0000)
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 4 Apr 2008 11:39:20 +0000 (11:39 +0000)
        * acx.m4 (ACX_CHECK_CYGWIN_CAT_WORKS): New macro to check that
        cygwin builds are not running in textmode.

        * configure.ac: Run ACX_XHEXK_CYGWIN_CAT_WORKS for cygwin hosted
        builds.
        * configure: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133894 138bc75d-0d04-0410-961f-82ee72b054a4

ChangeLog
config/ChangeLog
config/acx.m4
configure
configure.ac

index ef30432..2b4e257 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-04-04  Nick Clifton  <nickc@redhat.com>
+
+       PR binutils/4334
+       * configure.ac: Run ACX_XHEXK_CYGWIN_CAT_WORKS for cygwin hosted
+       builds.
+       * configure: Regenerate.
+
 2008-04-04  NightStrike  <NightStrike@gmail.com>
 
        PR other/35151
 2008-04-04  NightStrike  <NightStrike@gmail.com>
 
        PR other/35151
index 9152d8a..3556e08 100644 (file)
@@ -1,3 +1,9 @@
+2008-04-04  Nick Clifton  <nickc@redhat.com>
+
+       PR binutils/4334
+       * acx.m4 (ACX_CHECK_CYGWIN_CAT_WORKS): New macro to check that
+       cygwin builds are not running in textmode.
+
 2008-03-27  Paolo Bonzini  <bonzini@gnu.org>
 
        * extensions.m4: New.
 2008-03-27  Paolo Bonzini  <bonzini@gnu.org>
 
        * extensions.m4: New.
index c8a32c9..d186a4c 100644 (file)
@@ -595,3 +595,26 @@ AC_DEFUN([ACX_BUGURL],[
   AC_SUBST(REPORT_BUGS_TO)
   AC_SUBST(REPORT_BUGS_TEXI)
 ])
   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
+])
index 0fc08b5..b146180 100755 (executable)
--- a/configure
+++ b/configure
@@ -2780,6 +2780,33 @@ case "${host}" in
     host_makefile_frag="config/mh-djgpp"
     ;;
   *-cygwin*)
     host_makefile_frag="config/mh-djgpp"
     ;;
   *-cygwin*)
+
+echo "$as_me:$LINENO: checking to see if cat works as expected" >&5
+echo $ECHO_N "checking to see if cat works as expected... $ECHO_C" >&6
+echo a >cygwin-cat-check
+if test `cat cygwin-cat-check` == a ; then
+  rm cygwin-cat-check
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  rm cygwin-cat-check
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  { { echo "$as_me:$LINENO: 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
+  " >&5
+echo "$as_me: 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
+  " >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
     host_makefile_frag="config/mh-cygwin"
     ;;
   *-mingw*)
     host_makefile_frag="config/mh-cygwin"
     ;;
   *-mingw*)
index b7be3ad..1a18c61 100644 (file)
@@ -1042,6 +1042,7 @@ case "${host}" in
     host_makefile_frag="config/mh-djgpp"
     ;;
   *-cygwin*)
     host_makefile_frag="config/mh-djgpp"
     ;;
   *-cygwin*)
+    ACX_CHECK_CYGWIN_CAT_WORKS
     host_makefile_frag="config/mh-cygwin"
     ;;
   *-mingw*)
     host_makefile_frag="config/mh-cygwin"
     ;;
   *-mingw*)