Bug 1744 - libedit support shouldn't assume -lcurses
Summary: libedit support shouldn't assume -lcurses
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: -current
Hardware: Other Other
: P2 minor
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_5_5
  Show dependency treegraph
 
Reported: 2010-03-27 08:47 AEDT by Iain Morgan
Modified: 2010-04-16 15:51 AEST (History)
1 user (show)

See Also:


Attachments
Use pkg-config to determine linker options for libedit (911 bytes, patch)
2010-03-27 08:47 AEDT, Iain Morgan
no flags Details | Diff
openssh-libedit-pkgconfig.patch (1.50 KB, patch)
2010-04-09 11:23 AEST, Darren Tucker
no flags Details | Diff
Also uses pkg-config for cflags if we decide to use pkg-config. (1.61 KB, patch)
2010-04-09 11:47 AEST, Darren Tucker
djm: ok+
Details | Diff
openssh-libedit-pkgconfig.patch (1.61 KB, text/plain)
2010-04-09 14:36 AEST, Darren Tucker
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Iain Morgan 2010-03-27 08:47:46 AEDT
Created attachment 1824 [details]
Use pkg-config to determine linker options for libedit

Currently, building sftp with libedit support assumes that -ledit
depends on -lcurses. However, libedit may depend on -lncurses or
-ltermcap instead. On SLES 10 for example, libncurses may exist but
not libcurses.

Perhaps pkg-config should be used to check what libraries are required.
Comment 1 Darren Tucker 2010-04-09 10:46:41 AEST
Seems reasonable, however I think it needs to test for the success of "pkg-config --libs-only-l libedit" not just the existence of pkg-config, so it'll still work on systems where libedit is installed but does not have a libedit.pc file (like mine :-).
Comment 2 Darren Tucker 2010-04-09 11:23:13 AEST
Created attachment 1832 [details]
openssh-libedit-pkgconfig.patch

Use pkg-config for libedit only if pkg-config is found, it knows about libedit and --with-libedit does not specify a directory.
Comment 3 Darren Tucker 2010-04-09 11:47:12 AEST
Created attachment 1833 [details]
Also uses pkg-config for cflags if we decide to use pkg-config.

Merge two if blocks into one if/else block.
Comment 4 Darren Tucker 2010-04-09 14:05:49 AEST
Thanks all, patch applied and will be in 5.5p1.
Comment 5 Darren Tucker 2010-04-09 14:36:15 AEST
Created attachment 1834 [details]
openssh-libedit-pkgconfig.patch
Comment 6 Darren Tucker 2010-04-09 14:51:30 AEST
Comment on attachment 1834 [details]
openssh-libedit-pkgconfig.patch

oops, accidentally reran the "bugz" command and reattached this file.  please ignore
Comment 7 Damien Miller 2010-04-16 15:51:02 AEST
Mass move of bugs RESOLVED->CLOSED following the release of openssh-5.5p1