That error is a sign that the file is in the DOS format and not the UNIX
format. Bash doesn't recognize the windows end of line character \r.
Just run dos2unix on the file
dos2unix configure
that should take care of the error.
LMH
Richard Haney wrote:
I am trying to get set up to build the Gnu Scientific Library using Cygwin bash
for my command-line processor. I eventually plan to use the tdm64-1 copy of
MinGW gcc 4.6.1 to do the building:
$ gcc --version
gcc.exe (tdm64-1) 4.6.1
But I have not gotten to using the gcc tools yet. (I also want to eventually
rebuild all or parts of the gcc package optimized for my Intel i5 processor.)
So in particular, I wanted to run ./configure --help , to find out what options I need to
use to build the Gnu Scientific Library, besides what is said in the INSTALL file. (For
example, I am wondering about revising the "make install" defaults.)
But first I ran, and got:
$ ./configure --version
./configure: line 16: $'\r': command not found
./configure: line 31: syntax error near unexpected token
`newline'
'/configure: line 31: ` ;;
I recall having a similar problem on another laptop (probably Cygwin on Windows
XP), and I recall that I fixed the problem (after a terribly long, horrendous
search for info and finally realizing that '\r' in C is a carriage return; but
the details were a long time ago)
Anyway, I believe I copied my Cygwin.bat (with the fix) from my old laptop to
my new one, the one I'm now using (with Windows 7 and an Intel i5 processor).
Here is the Cygwin.bat file listing:
@echo off
C:
chdir C:\cygwin\bin
rem bash --login -i
bash --login -i -o igncr
Evidently the "igncr" is supposed to tell bash to ignore carriage returns.
But on this system, it apparently is not ignoring carriage returns.
I even searched the bash.info file for the string "igncr", but I found no such
string. Even the old bash.info file seems to lack that info.
However, I did find a web page
http://sourceware.org/ml/cygwin-announce/2011-02/msg00027.html
that discusses the matter, but that does not seem to help in this case.
So what's the problem?
Has my more recently installed Cygwin dropped the "igncr" option capability
from the bash command line?
Here is my current bash version:
$ bash --version
GNU bash, version 4.1.10(4)-release (i686-pc-cygwin)
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple