[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gtypist] gtypist fails to build with ncurses[tinfo]
From: |
Tim Marston |
Subject: |
Re: [bug-gtypist] gtypist fails to build with ncurses[tinfo] |
Date: |
Sun, 15 Sep 2013 20:44:58 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi Felix,
On Sat, Sep 14, 2013 at 12:54:34PM +0200, Felix Natter wrote:
> the patch seems to be simple:
>
> [snip]
> +PKG_CHECK_MODULES([NCURSESW], [ncursesw])
I don't think that it is going to be this simple, unfortunately.
I checked with some GNU folks about the policy on using pkg-config and,
while there is no problem with using pkg-config to *augment* the build
process, we should make sure that gtypist can build without it.
I believe that using PKG_CHECK_MODULES (in the way you are suggesting)
would make GNU typist's build process dependent on pkg-config. (There
is an interesting discussion about it here[1].) But we should be able
to make gtypist build without using pkg-config at all...
I haven't looked in to this properly, so the following ideas might be
rubbish, but here are a couple of ideas that might work...
* It looks like we could add another AC_CHECK_LIB line that looks for
the cbreak function (which is in libtinfo, not libncurses, on
Gentoo, according to this[2]) and put tinfo as a fifth parameter.
This should cause it to look for cbreak in libncurses first, and
then libtinfo if it can't find it. (See autoconf docs[4].)
* We also might be able to use AC_SEARCH_LIBS, as suggested here[3]
and in the autoconf docs[4]. Or we could also use AC_LINK_IFELSE
for the same purpose.
I also found a discussion[5] suggesting that you can "invoke
AC_CHECK_LIBS first, then conditionally invoke PKG_CHECK_MODULES, and
then invoke AC_CHECK_LIBS again to validate the information found by
PKG_CHECK_MODULES". This sounds a lot more complicated and (as far as
I can see) only gives us the benefit of including pkg-config in the
build process. But since that's not really the goal here -- it was
just a proposed solution -- I suggest we try one of the above first.
[1] http://lists.gnu.org/archive/html/autoconf/2009-10/msg00132.html
[2] https://bugs.gentoo.org/show_bug.cgi?id=483778
[3] http://lists.gnu.org/archive/html/autoconf/2009-10/msg00149.html
[4]
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Libraries.html
[5]
http://stackoverflow.com/questions/10220946/pkg-check-modules-considered-harmful
> - src/Makefile.am contains the following header:
> ## Process this file with automake to produce Makefile.in
>
> #
> # NOTE: this file will probably be changed by gettextize, so don't
> # commit changed version into CVS.
> #
>
> => is this still applicable?
That's a very good question. I don't know! :o) You could try to run
gettextize and see what happens!
Best regards,
--
Tim Marston
ed.am