The linker fails to resolve some symbols when libtinfo is installed as a
separate termcap library.
Fix this by checking a prominent symbol in the wide and non-wide cases.
Author: Adam Duskett <aduskett@codeblue.com>
Ncurses detection is currently broken in buildroot.
This patch does the following:
- Add SNGREP_CHECK_SCRIPT to configure.ac which checks for a
libname, a function in that library, sets a define if found, and
if not found, moves on to the next part. This is taken from the
htop configure.ac.
- Adds SNGREP_CHECK_LIB to configure.ac which checks for a
library, a function within that library, sets a define if that function
is found, and if not found, moves on to the next part.
This is taken from the htop configure.ac
- Modifies scrollbar.h and ui_panel.h to include <wctypes.h> instead of
<ncursesw/ncurses.h> if unicode is supported.
gcrypt is linked with libgpg-error, use libgcrypt-config to find
this dependency. (libgcrypt doesn't provide a .pc file)
libgcrypt-config --libs
[...] -lgcrypt -lgpg-error
Signed-off-by: Romain Naour <romain.naour@gmail.com>
PKG_CHECK_MODULES macro is installed in pkg-config package which is not present
in all installations. While it has its advantes, we must check if it's available
to support legacy configurations.
Using AC_CHECK_LIB() doesn't work properly for static linking, because
it doesn't return information on transitive dependencies of
libraries. For example, if library A internally uses library B, then
with dynamic linking, doing -lA is sufficient. However, with static
linking, one must do -lA -lB, and AC_CHECK_LIB() will only give the -lA
information. This for example causes a build failure when building
sngrep statically with openssl enabled:
checking for SSL_new in -lssl... no
configure: error: You need to have libssl installed to compile sngrep
due to undefined symbols in the OpenSSL library.
The proper solution for this is to discover the library using
pkg-config, because pkg-config properly returns the list of necessary
libraries, as it understands the concept of "list of libraries needed
when dynamic linking" and "list of libraries needed for static linking".
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Added --enable-ipv6 option to configure script
* All IP addresses are trimmet to 15 characters until UI can handle them properly
* IPv6 lookup is enabled