1e66f31c5Sopenharmony_ci# Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl> 2e66f31c5Sopenharmony_ci# 3e66f31c5Sopenharmony_ci# Permission to use, copy, modify, and/or distribute this software for any 4e66f31c5Sopenharmony_ci# purpose with or without fee is hereby granted, provided that the above 5e66f31c5Sopenharmony_ci# copyright notice and this permission notice appear in all copies. 6e66f31c5Sopenharmony_ci# 7e66f31c5Sopenharmony_ci# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8e66f31c5Sopenharmony_ci# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9e66f31c5Sopenharmony_ci# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10e66f31c5Sopenharmony_ci# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11e66f31c5Sopenharmony_ci# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12e66f31c5Sopenharmony_ci# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13e66f31c5Sopenharmony_ci# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14e66f31c5Sopenharmony_ci 15e66f31c5Sopenharmony_ciAC_PREREQ(2.57) 16e66f31c5Sopenharmony_ciAC_INIT([libuv], [1.48.0], [https://github.com/libuv/libuv/issues]) 17e66f31c5Sopenharmony_ciAC_CONFIG_MACRO_DIR([m4]) 18e66f31c5Sopenharmony_cim4_include([m4/libuv-extra-automake-flags.m4]) 19e66f31c5Sopenharmony_cim4_include([m4/as_case.m4]) 20e66f31c5Sopenharmony_cim4_include([m4/libuv-check-flags.m4]) 21e66f31c5Sopenharmony_ciAM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects] UV_EXTRA_AUTOMAKE_FLAGS) 22e66f31c5Sopenharmony_ciAM_MAINTAINER_MODE([enable]) # pass --disable-maintainer-mode if autotools may be unavailable 23e66f31c5Sopenharmony_ciAC_CANONICAL_HOST 24e66f31c5Sopenharmony_ciAC_ENABLE_SHARED 25e66f31c5Sopenharmony_ciAC_ENABLE_STATIC 26e66f31c5Sopenharmony_ciAC_PROG_CC 27e66f31c5Sopenharmony_ciAM_PROG_CC_C_O 28e66f31c5Sopenharmony_ci 29e66f31c5Sopenharmony_ciCC_ATTRIBUTE_VISIBILITY([default], [ 30e66f31c5Sopenharmony_ci CC_FLAG_VISIBILITY([CFLAGS="${CFLAGS} -fvisibility=hidden"]) 31e66f31c5Sopenharmony_ci]) 32e66f31c5Sopenharmony_ci# Xlc has a flag "-f<filename>". Need to use CC_CHECK_FLAG_SUPPORTED_APPEND so 33e66f31c5Sopenharmony_ci# we exclude -fno-strict-aliasing for xlc 34e66f31c5Sopenharmony_ciCC_CHECK_FLAG_SUPPORTED_APPEND([-fno-strict-aliasing]) 35e66f31c5Sopenharmony_ciCC_CHECK_CFLAGS_APPEND([-g]) 36e66f31c5Sopenharmony_ciCC_CHECK_CFLAGS_APPEND([-std=gnu89]) 37e66f31c5Sopenharmony_ciCC_CHECK_CFLAGS_APPEND([-Wall]) 38e66f31c5Sopenharmony_ciCC_CHECK_CFLAGS_APPEND([-Wextra]) 39e66f31c5Sopenharmony_ciCC_CHECK_CFLAGS_APPEND([-Wno-long-long]) 40e66f31c5Sopenharmony_ciCC_CHECK_CFLAGS_APPEND([-Wno-unused-parameter]) 41e66f31c5Sopenharmony_ciCC_CHECK_CFLAGS_APPEND([-Wstrict-prototypes]) 42e66f31c5Sopenharmony_ci# AM_PROG_AR is not available in automake v0.11 but it's essential in v0.12. 43e66f31c5Sopenharmony_cim4_ifdef([AM_PROG_AR], [AM_PROG_AR]) 44e66f31c5Sopenharmony_ci# autoconf complains if AC_PROG_LIBTOOL precedes AM_PROG_AR. 45e66f31c5Sopenharmony_ciAC_PROG_LIBTOOL 46e66f31c5Sopenharmony_cim4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 47e66f31c5Sopenharmony_ciLT_INIT 48e66f31c5Sopenharmony_ciAX_PTHREAD([ 49e66f31c5Sopenharmony_ci LIBS="$LIBS $PTHREAD_LIBS" 50e66f31c5Sopenharmony_ci CFLAGS="$CFLAGS $PTHREAD_CFLAGS" 51e66f31c5Sopenharmony_ci]) 52e66f31c5Sopenharmony_ciAC_SEARCH_LIBS([dlopen], [dl]) 53e66f31c5Sopenharmony_ciAC_SEARCH_LIBS([kstat_lookup], [kstat]) 54e66f31c5Sopenharmony_ciAC_SEARCH_LIBS([gethostbyname], [nsl]) 55e66f31c5Sopenharmony_ciAC_SEARCH_LIBS([perfstat_cpu], [perfstat]) 56e66f31c5Sopenharmony_ciAC_SEARCH_LIBS([clock_gettime], [rt]) 57e66f31c5Sopenharmony_ciAC_SEARCH_LIBS([sendfile], [sendfile]) 58e66f31c5Sopenharmony_ciAC_SEARCH_LIBS([socket], [socket]) 59e66f31c5Sopenharmony_ciAC_SYS_LARGEFILE 60e66f31c5Sopenharmony_ciAM_CONDITIONAL([AIX], [AS_CASE([$host_os],[aix*], [true], [false])]) 61e66f31c5Sopenharmony_ciAM_CONDITIONAL([ANDROID], [AS_CASE([$host_os],[linux-android*],[true], [false])]) 62e66f31c5Sopenharmony_ciAM_CONDITIONAL([CYGWIN], [AS_CASE([$host_os],[cygwin*], [true], [false])]) 63e66f31c5Sopenharmony_ciAM_CONDITIONAL([DARWIN], [AS_CASE([$host_os],[darwin*], [true], [false])]) 64e66f31c5Sopenharmony_ciAM_CONDITIONAL([DRAGONFLY],[AS_CASE([$host_os],[dragonfly*], [true], [false])]) 65e66f31c5Sopenharmony_ciAM_CONDITIONAL([FREEBSD], [AS_CASE([$host_os],[freebsd*], [true], [false])]) 66e66f31c5Sopenharmony_ciAM_CONDITIONAL([HAIKU], [AS_CASE([$host_os],[haiku], [true], [false])]) 67e66f31c5Sopenharmony_ciAM_CONDITIONAL([HURD], [AS_CASE([$host_os],[gnu*], [true], [false])]) 68e66f31c5Sopenharmony_ciAM_CONDITIONAL([LINUX], [AS_CASE([$host_os],[linux*], [true], [false])]) 69e66f31c5Sopenharmony_ciAM_CONDITIONAL([MSYS], [AS_CASE([$host_os],[msys*], [true], [false])]) 70e66f31c5Sopenharmony_ciAM_CONDITIONAL([NETBSD], [AS_CASE([$host_os],[netbsd*], [true], [false])]) 71e66f31c5Sopenharmony_ciAM_CONDITIONAL([OPENBSD], [AS_CASE([$host_os],[openbsd*], [true], [false])]) 72e66f31c5Sopenharmony_ciAM_CONDITIONAL([OS390], [AS_CASE([$host_os],[openedition*], [true], [false])]) 73e66f31c5Sopenharmony_ciAM_CONDITIONAL([OS400], [AS_CASE([$host_os],[os400], [true], [false])]) 74e66f31c5Sopenharmony_ciAM_CONDITIONAL([SUNOS], [AS_CASE([$host_os],[solaris*], [true], [false])]) 75e66f31c5Sopenharmony_ciAM_CONDITIONAL([WINNT], [AS_CASE([$host_os],[mingw*], [true], [false])]) 76e66f31c5Sopenharmony_ciAS_CASE([$host_os],[mingw*], [ 77e66f31c5Sopenharmony_ci LIBS="$LIBS -lws2_32 -lpsapi -liphlpapi -luserenv -luser32 -ldbghelp -lole32 -lshell32" 78e66f31c5Sopenharmony_ci]) 79e66f31c5Sopenharmony_ciAS_CASE([$host_os], [solaris2.10], [ 80e66f31c5Sopenharmony_ci CFLAGS="$CFLAGS -DSUNOS_NO_IFADDRS" 81e66f31c5Sopenharmony_ci]) 82e66f31c5Sopenharmony_ciAS_CASE([$host_os], [netbsd*], [AC_CHECK_LIB([kvm], [kvm_open])]) 83e66f31c5Sopenharmony_ciAS_CASE([$host_os], [haiku], [ 84e66f31c5Sopenharmony_ci LIBS="$LIBS -lnetwork" 85e66f31c5Sopenharmony_ci]) 86e66f31c5Sopenharmony_ciAC_CHECK_HEADERS([sys/ahafs_evProds.h]) 87e66f31c5Sopenharmony_ciAC_CONFIG_FILES([Makefile libuv.pc]) 88e66f31c5Sopenharmony_ciAC_CONFIG_LINKS([test/fixtures/empty_file:test/fixtures/empty_file]) 89e66f31c5Sopenharmony_ciAC_CONFIG_LINKS([test/fixtures/load_error.node:test/fixtures/load_error.node]) 90e66f31c5Sopenharmony_ciAC_CONFIG_LINKS([test/fixtures/lorem_ipsum.txt:test/fixtures/lorem_ipsum.txt]) 91e66f31c5Sopenharmony_ciAC_CONFIG_LINKS([test/fixtures/one_file/one_file:test/fixtures/one_file/one_file]) 92e66f31c5Sopenharmony_ciAC_OUTPUT 93