patchPSPP - Patches: patch #6492, More robust detection of libncurses

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #6492: More robust detection of libncurses

Submitter:  John Darrington <jmd>
Submitted:  Thu 17 Apr 2008 04:49:07 AM UTC
   
 
Category:  None Item Group:  None
Status:  Done Assigned to:  None
Open/Closed:  Closed

Fri 18 Apr 2008 11:48:34 PM UTC, comment #4: 

I checked this in.

John Darrington <jmd>
Group administrator
Fri 18 Apr 2008 11:29:40 PM UTC, comment #3: 


>I did this because HAVE_NCURSES is automatically set by
>AC_CHECK_LIB(ncurses) which may be called indirectly by other
>macros.


OK, that makes sense to me.

Ben Pfaff <blp>
Group administrator
Fri 18 Apr 2008 11:11:41 PM UTC, comment #2: 


>  I don't see a good reason to rename HAVE_NCURSES to LIBNCURSES_USABLE.


I did this because HAVE_NCURSES is automatically set by AC_CHECK_LIB(ncurses) which may be called indirectly by other macros.  When HAVE_NCURSES is non-zero, this merely asserts that the library is present on the system.  It doesn't mean that the header file(s) are present.

John Darrington <jmd>
Group administrator
Fri 18 Apr 2008 03:09:08 AM UTC, comment #1: 

Thanks for taking care of this.  It looks good, except for the following minor points.

In configure.ac:

>AC_CHECK_PROGS([NCURSES_CONFIG], [ncurses{1..9}-config])

Please don't use brace expansion.  It is a bash extension not part of the POSIX shell specification.  Since we only know about ncurses5-config and ncurses8-config, I would just write those explicitly.

Also, it is merely nitpicking, but I don't see a good reason to rename HAVE_NCURSES to LIBNCURSES_USABLE.

Ben Pfaff <blp>
Group administrator
Thu 17 Apr 2008 04:49:07 AM UTC, original submission:  

Currently, we're just detecting the presence of libncurses.  This is not sufficient.  We also need to check that the relevant header files are available.  Older versions just put them in /usr/include newer versions seem to put them elsewhere, and provide an introspection program ncurses5-config to discover where they are.
Cygwin appears to have decided to rename ncurses5-config to ncurses8-config !!!!!

The attached patch seems to do a better job of detecting curses.  It's a little convoluted, so I'm not sure that it might not have some untoward effects.  In particular I don't know how if non-bash shells support brace expansion {1..9}

Any comments?

John Darrington <jmd>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #15466:  ncurses.patch added by jmd (5KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by blp (Posted a comment)
  • -email is unavailable- added by jmd (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-04-18 jmd StatusWorks For Me Done
        Open/ClosedOpen Closed
    2008-04-18 blp StatusReady For Test/Review Works For Me
    2008-04-17 jmd Attached File- Added ncurses.patch, #15466

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code