On Wed, Jul 24, 2002 at 06:32:46PM -0500, Art Haas wrote:
> On Tue, Jul 23, 2002 at 12:22:56PM -0400, Brian Hechinger wrote:
> > > [ ... snippage ... ]
> > > However I would like configure to be
> > > able to set the compiler flags properly.
> > 
> > as would i.  i'm looking into how this configure beast works to see if i can
> > come up with a solution.  if anyone is familiar with the internals of the
> > configure process i could use a couple pointers.  thanks!!
> > 
> 
> Here is a small patch (kind-of/sort-of tested) that should
> only set the '-Wall -W -pedanctic' flags if the person building
> blackbox is compiling with GCC.
> 
> The AC_PROG_CC macro sets the variable GCC to yes if it finds
> out that the user is compiling with GCC (g++ in our case). After
> applying this patch, you'll need to regenerate the configure
> script. What you should see, or more precisely should _not_ see,
> are the '-Wall -W -pedantic' flags in the resulting makefile
> if you ar building with the SGI compiler.


Um, I don't actually see the AC_PROG_CC macro being used here, so the
flags won't show up for any compiler.

 
> Index: configure.in
> ===================================================================
> RCS file: /cvsroot/blackboxwm/blackbox/configure.in,v
> retrieving revision 1.26
> diff -u -r1.26 configure.in
> --- configure.in      23 Jul 2002 19:18:53 -0000      1.26
> +++ configure.in      24 Jul 2002 23:27:28 -0000
> @@ -41,9 +41,13 @@
>  test x$x_libraries = "x" && x_libraries="/usr/lib"
>  
>  CFLAGS="$CFLAGS $X_CFLAGS"
> -CXXFLAGS="$CXXFLAGS $X_CFLAGS -Wall -W -pedantic"
> +CXXFLAGS="$CXXFLAGS $X_CFLAGS"
>  LIBS="$LIBS $X_LIBS"
>  LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS"
> +
> +if test x$GCC = "xyes"; then
> +CXXFLAGS="$CXXFLAGS -Wall -W -pedantic"
> +fi
>  
>  dnl Check for required functions in -lX11
>  AC_CHECK_LIB(X11, XOpenDisplay,
> -- 
> They that can give up essential liberty to obtain a little temporary
> safety deserve neither liberty nor safety.
>  -- Benjamin Franklin, Historical Review of Pennsylvania, 1759

xOr
-- 
I am damn unsatisfied to be killed in this way.

Attachment: msg08067/pgp00000.pgp
Description: PGP signature

Reply via email to