On 26 Jun 2001 03:37:12 -0500, [EMAIL PROTECTED] wrote: > > Message summary for PR#728 > > From: [EMAIL PROTECTED] > Subject: PATCH: fvwm-2.3.33/acinclude.m4 smr_ARG_WITHLIB needs to check > existence of library > Full_Name: Adam J. Richter > Version: 2.3.33 > > If you just do "./configure" with fvwm95-2.3.33 on a system that uses ^^^^^^- What? :) > ncurses instead of termcap, it will decide that readline wants "-ltermcap" > rather than "-lncurses". The reason for this is that configure.in > relies on the autoconf macro smr_ARG_WITHLIB setting with_termcap to "no" > if there is no termcap library, but, in fact, smr_ARG_WITHLIB defaults > to setting it to "maybe", even if the library does not exist.
Well, no, smr_ARG_WITHLIB is supposed to return "maybe" in this case, and ./configure expects this (and not "no"). Let see if I understand this "problem". You have both libtermcap and libncurses installed, fvwm chooses libtermcap to be used together with libreadline, and you don't like this. If this is the case, use: --without-termcap-library --with-ncurses-library (only the first is really needed), like it is suggested in INSTALL.fvwm. If this is not the case and there is actually a problem with building fvwm, please describe it. > The following patch fixes smr_ARG_WITHLIB to set with_${library} to > "maybe" if the library exists and "no" if it does not. I have tested > it under autoconf-2.50, and it results in a successful build, automatically > determining that it should use "-lreadline -lncruses" (which tests both > the failure case, the test for termcap, and the success case, the test > of ncurses). Here is the patch. > > --- fvwm-2.3.33/acinclude.m4 Tue May 22 11:42:00 2001 > +++ fvwm2/acinclude.m4 Tue Jun 26 00:52:30 2001 > @@ -193,10 +193,15 @@ > AC_MSG_ERROR(argument must be boolean, file, or directory) > fi > fi > ], [ > - with_[$1]=maybe > - [$1]_LIBS="-l${smr_lib}" > + AC_CHECK_LIB([$1], main, > + [ > + with_[$1]=maybe > + [$1]_LIBS="-l${smr_lib}" > + ],[ > + with_[$1]=no > + ]) > ])]) > > > dnl Check if the include files for a library are accessible, and Sorry, but this is a really bad patch. :) It only "works" for you because: 1) your libtermcap does not contain "main" function 2) your libncurses does contain "main" function 3) your libreadline does contain "main" function Libraries are not expected to contain "main", in fact my libreadline does not contain it, as well as libXpm, so for me your patch breaks detection of xpm and readline completely if they are not explicitely specified. Anyway, thank you for your willing to help, sending patches is a good idea. Regards, Mikhael. -- 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 PROTECTED] To report problems, send mail to [EMAIL PROTECTED]