Subject: FVWM: configure: cc -E? Boooh!

From: Harald Dunkel <[email-masked]>
Date: Sat, 05 Jul 2003 12:08:25 +0200

Hi folks,

I would suggest to use "cc -E $CFLAGS" instead of "cc -E" during
configure. $CFLAGS might contain some -I flags pointing to include
directories to search for xpm.h or png.h, for example.

Regards

Harri

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Sat, 5 Jul 2003 12:14:10 +0000

> directories to search for xpm.h or png.h, for example.

What is the actual problem?

I have no time to test it now, but I would think all of these may work:

  CFLAGS="-O5 -g" ./configure --something
  CC="cc -E -O5 -g" ./configure --something
  ./configure --something CFLAGS="-O5 -g"
  ./configure --something CC="cc -E -O5 -g"

This value should be propagated to "make", but you may also specify CC or
CFLAGS for the make stage separately, like:

  make something CFLAGS="-O5 -g"

See also INSTALL.fvwm for other hints (including Solaris).

Regards,
Mikhael.

---

From: Nix <[email-masked]>
Date: Sat, 05 Jul 2003 14:25:42 +0100

> directories to search for xpm.h or png.h, for example.

You want $(CPP) $(CPPFLAGS) (where $(CPP) is often autodetected by
configure as being cc -E).

$(CPPFLAGS) should *not* need to be passed to $(CC); if users need flags
that are passed when preprocessing *and* compiling, they should prepend
$(CPPFLAGS) to $(CFLAGS) themselves.

-- 
`It is an unfortunate coincidence that the date locarchive.h was
 written (in hex) matches Ritchie's birthday (in octal).'
               -- Roland McGrath on the libc-alpha list
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Harald Dunkel <[email-masked]>
Date: Mon, 07 Jul 2003 12:40:29 +0200

> What is the actual problem?
The problem was that configure wasn't smart enough to find
xpm.h and some other headers, even though CFLAGS contained
"-I/usr/local/include" pointing to the right directory.

>   ./configure --something CC="cc -E -O5 -g"
Currently I am using

	export IMLIBCONF=/usr/local/bin/imlib-config
	export GTK_CONFIG=/usr/local/bin/gtk-config
	export CFLAGS=-I/usr/local/include
	export LDFLAGS"=-L/usr/local/lib -R/usr/local/lib"
	export CC="cc $CFLAGS $LDFLAGS"
	export CPP="$CC -E"
	./configure --prefix=/usr/local/stow/fvwm-2.5.7
	make

Please note that I am _not_ using gcc. Standard gcc looks
in /usr/local/include by default, even if you installed
it somewhere else.

Regards

Harri

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 7 Jul 2003 12:48:35 +0200

> "-I/usr/local/include" pointing to the right directory.

Well, the CFLAGS are not supposed to contain preprocessor flags.
You should put them in the CPPFLAGS variable.

> in /usr/local/include by default, even if you installed

Bye

Dominik ^_^  ^_^