Index: configure.ac =================================================================== RCS file: /cvs/src/src/configure.ac,v retrieving revision 1.10 diff -c -3 -p -r1.10 configure.ac *** configure.ac 21 Mar 2007 20:11:06 -0000 1.10 --- configure.ac 24 May 2007 09:45:14 -0000 *************** case "${host}" in *** 965,970 **** --- 965,971 ---- host_makefile_frag="config/mh-djgpp" ;; *-cygwin*) + ACX_CHECK_CYGWIN_BINMOUNTED_BUILDDIR host_makefile_frag="config/mh-cygwin" ;; *-mingw32*) Index: config/acx.m4 =================================================================== RCS file: /cvs/src/src/config/acx.m4,v retrieving revision 1.25 diff -c -3 -p -r1.25 acx.m4 *** config/acx.m4 26 Mar 2007 15:38:25 -0000 1.25 --- config/acx.m4 24 May 2007 09:45:14 -0000 *************** AC_DEFUN([ACX_BUGURL],[ *** 597,599 **** --- 597,618 ---- AC_SUBST(REPORT_BUGS_TO) AC_SUBST(REPORT_BUGS_TEXI) ]) + + dnl #### + dnl # ACX_CHECK_CYGWIN_BINMOUNTED_BUILDDIR + dnl # On Cygwin hosts, check that the build directory is mounted in + dnl # binmode as builds will not work if it is mounted in textmode. + dnl # See binutils PR 4334 for more details about why textmode is a problem. + AC_DEFUN([ACX_CHECK_CYGWIN_BINMOUNTED_BUILDDIR],[ + AC_MSG_CHECKING([build directory to see if it is mounted in binmode]) + build_dir=`pwd` + build_dir_mount_point=`df ${build_dir} | awk '/[[0-9]]%/{print $NF;}'` + is_binmode=`mount | grep "${build_dir_mount_point} " | grep binmode` + if test $? == 0 ; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + AC_MSG_ERROR([The build directory is not mounted in binmode]) + fi + ]) + \ No newline at end of file