Subject: Re: FVWM: cannot even pass configure

From: Steven Michael ROBBINS <[email-masked]>
Date: Fri, 2 Jul 1999 12:34:14 -0400 (EDT)

Hi gang,

[My home computer died a few days ago, and I don't know when I can get a
replacement.  So CC me here if you want to bring something to my
attention.]

On 30 Jun 1999, Paul D. Smith wrote:

> %% "Pushpak Patel" <[email-masked]> writes:
> 
>   pp> Can you help me, please
> 
>   pp> configure:1873: checking for c++
>   pp> configure:1911: checking for c++
>   pp> configure:1943: checking whether the C++ compiler (c++  ) works
>   pp> configure:1959: c++ -o conftest    conftest.C  1>&5
>   pp> collect2: ld returned 1 exit status
>   pp> /usr/ccs/bin/ld: Can't find library for -lg++
>   pp> configure: failed program was:
> 
>   pp> #line 1954 "configure"
>   pp> #include "confdefs.h"
> 
>   pp> int main(){return(0);}
> 
> _This_ is what I was referring to a few weeks ago when I said that
> configure died if you didn't have a C++ compiler. 

Ah.  If one dared be pedantic, one could argue that this person *does* 
have a C++ compiler, albeit broken.  Since the autoconf macro checks for 
a working compiler, it complains.

At the time, I didn't see any way around this short of hacking the autoconf
macro.  I didn't want to do that, so I added the '--without-cxx' switch 
as a workaround.

As you have noticed, the reason for C++ (FvwmConfig, I think) has vanished
in 2.3.x, so the C++ autoconf junk can safely be removed.  I only left it
in because a C++-based module may someday be added.  Until that happens,
I don't oppose removing the macro.
 
> Maybe it works OK if
> you don't have a c++ program at all, I haven't tested that.

Yes, it works fine.
 
> But I still think configure should "catch" the error if the C++ compiler
> can't be used, and continue on.  After all, C++ is needed only for one
> module, and probably one of the lesser-used ones at that.
> 
> We can add a note or warning to the informational printout at the end
> saying that the C++ compiler wasn't found or was unusable, but IMO
> configure shouldn't choke.
> 
> Can we do that with autoconf?  Would we have to write our own versions
> of the compiler checking macros?

I agree with everything you said in the previous two paragraphs.
I couldn't find a way to do it without re-writing the compiler checking 
macros.

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

---

From: [email-masked] (Paul D. Smith)
Date: 02 Jul 1999 13:55:57 -0400

%% Steven Michael ROBBINS <[email-masked]> writes:

  smr> As you have noticed, the reason for C++ (FvwmConfig, I think) has
  smr> vanished in 2.3.x, so the C++ autoconf junk can safely be
  smr> removed.  I only left it in because a C++-based module may
  smr> someday be added.  Until that happens, I don't oppose removing
  smr> the macro.

I think we should definitely remove it.  This is the cause of a lot of
problems and confusion.

For example, unless I'm careful it causes my builds to break, as I've
discussed here in the past:

  * G++ requires a shared library.

  * On my system (Solaris) unless you use the -R option, shared libs
    aren't found unless they're in the standard directory (/lib);
    there's no ldconfig to get it to look elsewhere.

  * G++ isn't installed in the default directory :).

So, I always have to remember to add -R/usr/local/lib to my configure
line.  If I don't, then the _compile_ of the C++ program succeeds
(unlike this issue, where the compile fails), then the _run_ of the C++
program fails, so configure decides I'm cross compiling!

It doesn't notice that the C compiler wasn't cross compiling and the C++
compiler was, and give an error (which would be the sensible thing to
do), so if you don't notice that little "yes" in the cross-compiling for
C++ you'll be mightily confused when you try to run "make" :-/.

Anyway, unless I hear objections (or someone beats me to it) I'll remove
the C++ check later today.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]