From 1a96295755391b508ea37b4bfbb681ea15ed7559 Mon Sep 17 00:00:00 2001 From: Ralf Nolden Date: Fri, 24 Jun 2016 22:33:31 +0200 Subject: Libpng config.tests: use pkg-config when available Add pkg-config to the libpng usages as not all systems have the symlink libpng.so -> libpng.so (affected: NetBSD) that changes with the version of the lib. If no-pkg-config is used, use -lpng as before. Tested with FreeBSD 10.3, NetBSD 7.0.1 using png 1.6.21 Change-Id: I5c87f380c84da3d5c56c94da53adb900791c8caa Reviewed-by: Oswald Buddenhagen --- config.tests/unix/libpng/libpng.pro | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'config.tests') diff --git a/config.tests/unix/libpng/libpng.pro b/config.tests/unix/libpng/libpng.pro index 4e50fe26e5..cdca43171c 100644 --- a/config.tests/unix/libpng/libpng.pro +++ b/config.tests/unix/libpng/libpng.pro @@ -1,3 +1,8 @@ SOURCES = libpng.cpp CONFIG -= qt dylib -LIBS += -lpng +!contains(QT_CONFIG, no-pkg-config) { + CONFIG += link_pkgconfig + PKGCONFIG += libpng +} else { + LIBS += -lpng +} -- cgit v1.2.3 From b3b2f502e9b499814a1e3b21e1b572e3ff1ba37b Mon Sep 17 00:00:00 2001 From: Ralf Nolden Date: Mon, 27 Jun 2016 10:34:19 +0200 Subject: NetBSD: use paccept() where accept4() is used Where accept4() is used, NetBSD offers paccept() as a replacement function. Modify check for using accept4() and use paccept() on NetBSD. See http://netbsd.gw.com/cgi-bin/man-cgi?paccept++NetBSD-current and http://reviews.llvm.org/D12485 Change-Id: I9b3ecba5f3afad6c357d3f7b8f89589bf313e273 Reviewed-by: Oswald Buddenhagen Reviewed-by: Thiago Macieira --- config.tests/unix/cloexec/cloexec.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config.tests') diff --git a/config.tests/unix/cloexec/cloexec.cpp b/config.tests/unix/cloexec/cloexec.cpp index 3f127d8d3f..cbde307237 100644 --- a/config.tests/unix/cloexec/cloexec.cpp +++ b/config.tests/unix/cloexec/cloexec.cpp @@ -44,6 +44,10 @@ int main() (void) pipe2(pipes, O_CLOEXEC | O_NONBLOCK); (void) fcntl(0, F_DUPFD_CLOEXEC, 0); (void) dup3(0, 3, O_CLOEXEC); +#if defined(__NetBSD__) + (void) paccept(0, 0, 0, NULL, SOCK_CLOEXEC | SOCK_NONBLOCK); +#else (void) accept4(0, 0, 0, SOCK_CLOEXEC | SOCK_NONBLOCK); +#endif return 0; } -- cgit v1.2.3 From fe9ca6ede8ee9817868ae5aac8c3f8b4480e9aea Mon Sep 17 00:00:00 2001 From: Ralf Nolden Date: Mon, 27 Jun 2016 10:25:42 +0200 Subject: NetBSD: enable detection of posix_fallocate() posix_fallocate() is declared in unistd.h on NetBSD. Add the include for proper detection on NetBSD 7.0 and up. See http://netbsd.gw.com/cgi-bin/man-cgi?posix_fallocate++NetBSD-current As that is violating the POSIX standards, a PR was opened at NetBSD under http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=51287 for further tracking of the issue. Change-Id: I40ec320677eef37bbc39f58e0bbac34f8cf7b8da Reviewed-by: Thiago Macieira --- config.tests/unix/posix_fallocate/posix_fallocate.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config.tests') diff --git a/config.tests/unix/posix_fallocate/posix_fallocate.cpp b/config.tests/unix/posix_fallocate/posix_fallocate.cpp index 689feb6870..dfeba4bec1 100644 --- a/config.tests/unix/posix_fallocate/posix_fallocate.cpp +++ b/config.tests/unix/posix_fallocate/posix_fallocate.cpp @@ -32,6 +32,10 @@ ****************************************************************************/ #include +// NetBSD 7 has posix_fallocate, but in unistd.h instead of fcntl.h +#ifdef __NetBSD__ +# include +#endif int main(int, char **) { -- cgit v1.2.3 From 0d720a000f4f35c5ea6942426efec6847b06f4ce Mon Sep 17 00:00:00 2001 From: James McDonnell Date: Wed, 22 Jun 2016 10:35:22 -0400 Subject: Improve SQLite3 configuration test Reference an SQLite3 function to verify that the library is being linked. Discovered that the test didn't do this when I switched the Windows configure to use a compile test to determine whether the system has SQLite3. The test passed even though the initial configure changes failed to provide the test with information about the SQLite3 libraries. Change-Id: I3114cfc2dec3a42a60c8e1e432eb8375b440d7e0 Reviewed-by: Oswald Buddenhagen --- config.tests/unix/sqlite/sqlite.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'config.tests') diff --git a/config.tests/unix/sqlite/sqlite.cpp b/config.tests/unix/sqlite/sqlite.cpp index b639e82ed8..1059e516af 100644 --- a/config.tests/unix/sqlite/sqlite.cpp +++ b/config.tests/unix/sqlite/sqlite.cpp @@ -35,5 +35,6 @@ int main(int, char **) { + sqlite3_open_v2(0, 0, 0, 0); return 0; } -- cgit v1.2.3