autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autoconf can't find X11 libraries


From: Thomas Dickey
Subject: Re: Autoconf can't find X11 libraries
Date: Sun, 24 Jan 2016 19:12:30 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Jan 21, 2016 at 10:11:47AM +0300, anatoly techtonik wrote:
> On Wed, Jan 13, 2016 at 1:19 PM, Thomas Dickey <address@hidden> wrote:
> > On Mon, Jan 11, 2016 at 02:05:49PM +0300, anatoly techtonik wrote:
> >> Hi,
> >>
> >> In this build on Ubuntu x86_64 autoconf is unable to find X11
> >> libraries:
> >>     https://travis-ci.org/techtonik/PDCurses/builds/101477536
> >> However, it works with explicit configure option
> >>     --x-libraries=/usr/lib/x86_64-linux-gnu
> >>     https://travis-ci.org/techtonik/PDCurses/builds/101506738
> >>
> >> It looks like the problem is PDCurses specific
> >> http://askubuntu.com/questions/539574/how-to-install-xaw-package-with-header-files/578003
> >> probably because people rarely use Xaw. Anyway, how to fix
> >> it? Is it an autoconf bug?
> >
> > no - it is a bug in PDCurses' configure script, which assumes that the
> > libraries are in a directory "../lib" relative to the location of the
> > X headers.
> 
> Thank for clarification. The ./configure script is autogenerated  - at
> least this is said in headers
> "Generated by GNU Autoconf 2.61 for PDCurses 3.4."
> So, is it a bug in Autoconf?
> 
> > You might find this to be useful:
> >
> >         http://anonscm.debian.org/cgit/users/agmartin/pdcurses.git/
> 
> I see only two patches, one of which is said to be fixed upstream
> https://anonscm.debian.org/cgit/users/agmartin/pdcurses.git/tree/debian/patches
> I can't extract the solution for complication problem from them.

hmm.  I started a while back by tweaking the configure script, and noticed
Martin's tree, made a copy of _that_, and eliminated most of the unnecessary
stuff.  Since I'm not going to publish _that_ tree (I maintain ncurses), it
would be of limited use.

So (referring to PDCurses 3.4)
this line in the configure script is the problem:

        mh_lib_dirs="$x_libraries `echo "$ac_x_includes $ac_x_header_dirs" | 
sed s/include/lib/g`"

The problem is that 64-bit machines nowadays generally use lib64 - not lib,
as the script assumes.  When I tweaked it by hand, I just edited that line.

        mh_lib_dirs="$x_libraries `echo "$ac_x_includes $ac_x_header_dirs" | 
sed s/include/lib64/g`"

But I prefer packages...

Refreshing my memory, I see that Martin may not have _fixed_ that.
But I did, using a script in the debian/rules file.  I'm attaching
that, for discussion.

> > Before noticing this, I would simply build PDCurses with a quick fix
> > for its configure script bug.  (Actually now I build it using Martin's
> > version plus some further fixes -- I use that for test-builds, e.g.,
> > of lynx, dialog).
> 
> Can you clarify how to fix this configure script? Looks like the file that
> should be fixed is
> https://anonscm.debian.org/cgit/users/agmartin/pdcurses.git/tree/configure.ac
> but I don't understand its semantics well enough to find the
> problem myself.
> 
> Thanks.

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net

Attachment: rules
Description: Text document

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]