Re: ORBit/popt configure.in dies if $CC contains spaces



"Brandon S. Allbery" <allbery@ece.cmu.edu> writes:
> Due to use of BIND 8 on all our systems, I have to use a hack to get things
> to configure right:
> 
> 	CC="gcc -include /usr/local/include/configure-hack.h"
> 
> The configure.in in ORBit/popt contains the following:
> 
> if test $CC = gcc; then             
>     CFLAGS="-Wall $CFLAGS"
> fi
> 
> which doesn't work very well in that case....
> 
> My quick workaround was to double-quote $CC, but a more correct fix would be
> to extract the first word of $CC and check that its basename is "gcc" (and/or
> "egcs"?).

Even better is to use the facilities that autoconf already provides.
It sets $GCC to yes if a GNU C compiler is being used.  So, the right
fix is to say

	if test "x$GCC" = xyes; then
	  CFLAGS="-Wall $CFLAGS"
	fi

- 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]