Re: mico configure.in broken



Bernhard Rosenkraenzer <bero@linux.net.eu.org> writes:
> When trying to compile the mico package, part of the configure
> (autogen.sh) output is:
> 
> checking for POSIXized ISC... no
> expr: syntax error
> ./configure: test: : integer expression expected
> checking for bison... bison -y
> [...]
> checking for main in -lncurses... no
> [...]
> checking for strdup... no
> checking for strerror... no
> checking for gethostname... no
> [...]
> checking size of unsigned char... 0
> checking size of int... 0
> checking size of unsigned int... 0
> checking size of long... 0
> checking size of unsigned long... 0
> checking size of short... 0
> checking size of unsigned short... 0
> checking size of float... 0
> checking size of double... 0
> 
> Check for ncurses by looking for main is a bad thing, because ncurses
> compiled as a glibc add-on doesn't export a main function.

Not a problem.  The "main" test will succeed if a `-lncurses' exists,
and (should) fail if `-lncurses' doesn't.  This is a way to look for a
library without being particularly interested if it has a specific
function or not.
 
> The malfunction in detecting strdup, strerror and all the sizes is related
> to the configure script messing up the CFLAGS.
> 
> configure:1066: checking whether the C++ compiler (c++ -g0 -O2
> -fomit-frame-pointer -mamdk6 -march=amdk6 -mcpu=amdk6 -pipe -s -s
> -L/usr/local/lib) works
> 
> At this point, they're ok, what I specified in the CXXFLAGS variable with
> "-s -L/usr/local/lib" added.
> 
> A few lines later, it's broken:
> configure:1441: gcc -o conftest -O 0  -fomit-frame-pointer -mamdk6
> -march=amdk6
> -mcpu=amdk6 -pipe -s -fno-exceptions -I/usr/local/include -s
> -L/usr/local/lib conftest.c -lfl   1>&5
> 
> Note the space between "-O" and "0" - gcc can't handle that...
> 
> The problem is caused by lines 165 and 166; the output of
> echo $CXXFLAGS | sed -e 's/-g//g' -e 's/-O[0-9]*//g'
> for me is 
> "0  -fomit-frame-pointer -mamdk6 -march=amdk6 -mcpu=amdk6 -pipe -s"
> 
> Simply removing lines 164 to 176 does the trick.

`sed' is fooled by the -g0 that you specified. I'll check in a fix for
`configure.in' shortly.  In the meantime, changing the sed expression to

	sed -e 's/-g[0-9]*//g' -e 's/-O[0-9]*//g'

or just removing it, as you did, should work.

- Hari
-- 
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions."      -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]