From ca02c36c6ddcf1f74215a63b3fbff04c1a79a1c0 Mon Sep 17 00:00:00 2001 From: Kevin Adler Date: Tue, 15 Jan 2019 12:27:31 -0600 Subject: [PATCH] ibmi: add support for IBM i to autotools build PR-URL: https://github.com/libuv/libuv/pull/2148 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig --- Makefile.am | 18 ++++++++++++++++++ configure.ac | 1 + 2 files changed, 19 insertions(+) diff --git a/Makefile.am b/Makefile.am index 8fe31e2d753..1a2bc282698 100644 --- a/Makefile.am +++ b/Makefile.am @@ -334,6 +334,12 @@ test_run_tests_CFLAGS += -D_UNIX03_THREADS \ -qFLOAT=IEEE endif +if OS400 +test_run_tests_CFLAGS += -D_ALL_SOURCE \ + -D_XOPEN_SOURCE=500 \ + -D_LINUX_SOURCE_COMPAT +endif + if AIX libuv_la_CFLAGS += -D_ALL_SOURCE \ -D_XOPEN_SOURCE=500 \ @@ -479,6 +485,18 @@ libuv_la_SOURCES += src/unix/pthread-fixes.c \ src/unix/os390-syscalls.c \ src/unix/proctitle.c endif +if OS400 +libuv_la_CFLAGS += -D_ALL_SOURCE \ + -D_XOPEN_SOURCE=500 \ + -D_LINUX_SOURCE_COMPAT \ + -D_THREAD_SAFE +uvinclude_HEADERS += include/uv/posix.h +libuv_la_SOURCES += src/unix/aix-common.c \ + src/unix/ibmi.c \ + src/unix/posix-poll.c \ + src/unix/no-fsevents.c \ + src/unix/no-proctitle.c +endif pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = @PACKAGE_NAME@.pc diff --git a/configure.ac b/configure.ac index b2b80509ad0..ac6908fb146 100644 --- a/configure.ac +++ b/configure.ac @@ -60,6 +60,7 @@ AM_CONDITIONAL([HURD], [AS_CASE([$host_os],[gnu*], [true], [false]) AM_CONDITIONAL([LINUX], [AS_CASE([$host_os],[linux*], [true], [false])]) AM_CONDITIONAL([MSYS], [AS_CASE([$host_os],[msys*], [true], [false])]) AM_CONDITIONAL([NETBSD], [AS_CASE([$host_os],[netbsd*], [true], [false])]) +AM_CONDITIONAL([OS400], [AS_CASE([$host_os],[os400*], [true], [false])]) AM_CONDITIONAL([OPENBSD], [AS_CASE([$host_os],[openbsd*], [true], [false])]) AM_CONDITIONAL([OS390], [AS_CASE([$host_os],[openedition*], [true], [false])]) AM_CONDITIONAL([SUNOS], [AS_CASE([$host_os],[solaris*], [true], [false])])