On Thu, 30 Nov 2006, Eric Blake wrote: > According to Bob Rossi on 11/30/2006 7:32 PM: > > > AC_CHECK_SIZEOF does these two things on cygwin with autoconf 2.60. > > fprintf(f, "%d\n", sizeof($1)); > > which prints "4\r\n" if the size is 4 and then > > AC_CV_NAME=`cat conftestval`, ... > > now cygwin's cat doesn't understand \r\n, so > > Or better worded, on a binary mount, cygwin's cat treats \r literally, > like any other unix implementation of cat would do. Well, actually, Cygwin's cat *always* treats \r literally, since it always opens the file in binary mode. > > ac_cv_sizeof_int=`cat conftestval` > > results in "4\r", which breaks the configure.in scripts that check with > > if statements for "$ac_cv_sizeof_int" = "4". > > > > What is the best way to resolve something like this? > > Perhaps experiment with a cygwin text mount, so that cygwin cat will > ignore the \r. So the above solution will not help in this case... > Or experiment with the recent add-on to cygwin's bash, where exporting > SHELLOPTS with the cygwin-specific shell option igncr set will tell > subsequent /bin/sh invocations to strip \r from command substitution. Although this might work. > And the fact that you are now telling configure the truth that you are > cross-compiling, even though the cross binaries are executable, may be > enough for autoconf to try harder for discovering how AC_CHECK_SIZEOF > should behave without tripping up on line endings (and if that is not > the case, maybe we should consider patching autoconf to make it happen > that way). Or have autoconf use some other tool that does not do binary processing (e.g., awk or tr) instead of cat, which would enable the text mount solution. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha@xxxxxxxxxx | igor@xxxxxxxxxxxxxx ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Freedom is just another word for "nothing left to lose"... -- Janis Joplin _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf