FVWM Bug Tracking notification

new message incoming/728

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
        Date: Tue, 26 Jun 2001 03:37:10 -0500
        0 replies       0 followups

====> ORIGINAL MESSAGE FOLLOWS <====

>From [EMAIL PROTECTED] Tue Jun 26 03:37:12 2001
Received: from karazm.math.uh.edu ([129.7.128.1])
        by malifon.math.uh.edu with esmtp (Exim 3.20 #1)
        id 15EoLQ-0001Rl-00
        for [EMAIL PROTECTED]; Tue, 26 Jun 2001 03:37:12 -0500
Received: from malifon.math.uh.edu (IDENT:[EMAIL PROTECTED] [129.7.128.13])
        by karazm.math.uh.edu (8.9.3/8.9.3) with ESMTP id DAA00828
        for <[EMAIL PROTECTED]>; Tue, 26 Jun 2001 03:37:11 -0500 (CDT)
From: [EMAIL PROTECTED]
Received: from localhost ([127.0.0.1] ident=65534)
        by malifon.math.uh.edu with esmtp (Exim 3.20 #1)
        id 15EoLO-0001Rh-00
        for [EMAIL PROTECTED]; Tue, 26 Jun 2001 03:37:10 -0500
To: [EMAIL PROTECTED]
Subject: PATCH: fvwm-2.3.33/acinclude.m4 smr_ARG_WITHLIB needs to check 
existence of library
Message-Id: <[EMAIL PROTECTED]>
Date: Tue, 26 Jun 2001 03:37:10 -0500

Full_Name: Adam J. Richter
Version: 2.3.33
CVS_Date: 
OS: Linux-2.4.5
X_Server: XFree86-4.1
Submission from: (NULL) (216.218.142.42)


If you just do "./configure" with fvwm95-2.3.33 on a system that uses
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.

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



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

Reply via email to