11cb0ef41Sopenharmony_ci# Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl> 21cb0ef41Sopenharmony_ci# 31cb0ef41Sopenharmony_ci# Permission to use, copy, modify, and/or distribute this software for any 41cb0ef41Sopenharmony_ci# purpose with or without fee is hereby granted, provided that the above 51cb0ef41Sopenharmony_ci# copyright notice and this permission notice appear in all copies. 61cb0ef41Sopenharmony_ci# 71cb0ef41Sopenharmony_ci# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 81cb0ef41Sopenharmony_ci# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 91cb0ef41Sopenharmony_ci# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 101cb0ef41Sopenharmony_ci# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 111cb0ef41Sopenharmony_ci# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 121cb0ef41Sopenharmony_ci# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 131cb0ef41Sopenharmony_ci# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 141cb0ef41Sopenharmony_ci 151cb0ef41Sopenharmony_ciAC_PREREQ(2.57) 161cb0ef41Sopenharmony_ciAC_INIT([libuv], [1.44.2], [https://github.com/libuv/libuv/issues]) 171cb0ef41Sopenharmony_ciAC_CONFIG_MACRO_DIR([m4]) 181cb0ef41Sopenharmony_cim4_include([m4/libuv-extra-automake-flags.m4]) 191cb0ef41Sopenharmony_cim4_include([m4/as_case.m4]) 201cb0ef41Sopenharmony_cim4_include([m4/libuv-check-flags.m4]) 211cb0ef41Sopenharmony_ciAM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects] UV_EXTRA_AUTOMAKE_FLAGS) 221cb0ef41Sopenharmony_ciAC_CANONICAL_HOST 231cb0ef41Sopenharmony_ciAC_ENABLE_SHARED 241cb0ef41Sopenharmony_ciAC_ENABLE_STATIC 251cb0ef41Sopenharmony_ciAC_PROG_CC 261cb0ef41Sopenharmony_ciAM_PROG_CC_C_O 271cb0ef41Sopenharmony_ci 281cb0ef41Sopenharmony_ciCC_ATTRIBUTE_VISIBILITY([default], [ 291cb0ef41Sopenharmony_ci CC_FLAG_VISIBILITY([CFLAGS="${CFLAGS} -fvisibility=hidden"]) 301cb0ef41Sopenharmony_ci]) 311cb0ef41Sopenharmony_ci# Xlc has a flag "-f<filename>". Need to use CC_CHECK_FLAG_SUPPORTED_APPEND so 321cb0ef41Sopenharmony_ci# we exclude -fno-strict-aliasing for xlc 331cb0ef41Sopenharmony_ciCC_CHECK_FLAG_SUPPORTED_APPEND([-fno-strict-aliasing]) 341cb0ef41Sopenharmony_ciCC_CHECK_CFLAGS_APPEND([-g]) 351cb0ef41Sopenharmony_ciCC_CHECK_CFLAGS_APPEND([-std=gnu89]) 361cb0ef41Sopenharmony_ciCC_CHECK_CFLAGS_APPEND([-Wall]) 371cb0ef41Sopenharmony_ciCC_CHECK_CFLAGS_APPEND([-Wextra]) 381cb0ef41Sopenharmony_ciCC_CHECK_CFLAGS_APPEND([-Wno-long-long]) 391cb0ef41Sopenharmony_ciCC_CHECK_CFLAGS_APPEND([-Wno-unused-parameter]) 401cb0ef41Sopenharmony_ciCC_CHECK_CFLAGS_APPEND([-Wstrict-prototypes]) 411cb0ef41Sopenharmony_ci# AM_PROG_AR is not available in automake v0.11 but it's essential in v0.12. 421cb0ef41Sopenharmony_cim4_ifdef([AM_PROG_AR], [AM_PROG_AR]) 431cb0ef41Sopenharmony_ci# autoconf complains if AC_PROG_LIBTOOL precedes AM_PROG_AR. 441cb0ef41Sopenharmony_ciAC_PROG_LIBTOOL 451cb0ef41Sopenharmony_cim4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 461cb0ef41Sopenharmony_ciLT_INIT 471cb0ef41Sopenharmony_ciAX_PTHREAD([ 481cb0ef41Sopenharmony_ci LIBS="$LIBS $PTHREAD_LIBS" 491cb0ef41Sopenharmony_ci CFLAGS="$CFLAGS $PTHREAD_CFLAGS" 501cb0ef41Sopenharmony_ci]) 511cb0ef41Sopenharmony_ciAC_SEARCH_LIBS([dlopen], [dl]) 521cb0ef41Sopenharmony_ciAC_SEARCH_LIBS([kstat_lookup], [kstat]) 531cb0ef41Sopenharmony_ciAC_SEARCH_LIBS([gethostbyname], [nsl]) 541cb0ef41Sopenharmony_ciAC_SEARCH_LIBS([perfstat_cpu], [perfstat]) 551cb0ef41Sopenharmony_ciAC_SEARCH_LIBS([clock_gettime], [rt]) 561cb0ef41Sopenharmony_ciAC_SEARCH_LIBS([sendfile], [sendfile]) 571cb0ef41Sopenharmony_ciAC_SEARCH_LIBS([socket], [socket]) 581cb0ef41Sopenharmony_ciAC_SYS_LARGEFILE 591cb0ef41Sopenharmony_ciAM_CONDITIONAL([AIX], [AS_CASE([$host_os],[aix*], [true], [false])]) 601cb0ef41Sopenharmony_ciAM_CONDITIONAL([ANDROID], [AS_CASE([$host_os],[linux-android*],[true], [false])]) 611cb0ef41Sopenharmony_ciAM_CONDITIONAL([CYGWIN], [AS_CASE([$host_os],[cygwin*], [true], [false])]) 621cb0ef41Sopenharmony_ciAM_CONDITIONAL([DARWIN], [AS_CASE([$host_os],[darwin*], [true], [false])]) 631cb0ef41Sopenharmony_ciAM_CONDITIONAL([DRAGONFLY],[AS_CASE([$host_os],[dragonfly*], [true], [false])]) 641cb0ef41Sopenharmony_ciAM_CONDITIONAL([FREEBSD], [AS_CASE([$host_os],[*freebsd*], [true], [false])]) 651cb0ef41Sopenharmony_ciAM_CONDITIONAL([KFREEBSD], [AS_CASE([$host_os],[kfreebsd*], [true], [false])]) 661cb0ef41Sopenharmony_ciAM_CONDITIONAL([HAIKU], [AS_CASE([$host_os],[haiku], [true], [false])]) 671cb0ef41Sopenharmony_ciAM_CONDITIONAL([HURD], [AS_CASE([$host_os],[gnu*], [true], [false])]) 681cb0ef41Sopenharmony_ciAM_CONDITIONAL([LINUX], [AS_CASE([$host_os],[linux*], [true], [false])]) 691cb0ef41Sopenharmony_ciAM_CONDITIONAL([MSYS], [AS_CASE([$host_os],[msys*], [true], [false])]) 701cb0ef41Sopenharmony_ciAM_CONDITIONAL([NETBSD], [AS_CASE([$host_os],[netbsd*], [true], [false])]) 711cb0ef41Sopenharmony_ciAM_CONDITIONAL([OPENBSD], [AS_CASE([$host_os],[openbsd*], [true], [false])]) 721cb0ef41Sopenharmony_ciAM_CONDITIONAL([OS390], [AS_CASE([$host_os],[openedition*], [true], [false])]) 731cb0ef41Sopenharmony_ciAM_CONDITIONAL([OS400], [AS_CASE([$host_os],[os400], [true], [false])]) 741cb0ef41Sopenharmony_ciAM_CONDITIONAL([SUNOS], [AS_CASE([$host_os],[solaris*], [true], [false])]) 751cb0ef41Sopenharmony_ciAM_CONDITIONAL([WINNT], [AS_CASE([$host_os],[mingw*], [true], [false])]) 761cb0ef41Sopenharmony_ciAS_CASE([$host_os],[mingw*], [ 771cb0ef41Sopenharmony_ci LIBS="$LIBS -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv -luser32" 781cb0ef41Sopenharmony_ci]) 791cb0ef41Sopenharmony_ciAS_CASE([$host_os], [netbsd*], [AC_CHECK_LIB([kvm], [kvm_open])]) 801cb0ef41Sopenharmony_ciAS_CASE([$host_os], [kfreebsd*], [ 811cb0ef41Sopenharmony_ci LIBS="$LIBS -lfreebsd-glue" 821cb0ef41Sopenharmony_ci]) 831cb0ef41Sopenharmony_ciAS_CASE([$host_os], [haiku], [ 841cb0ef41Sopenharmony_ci LIBS="$LIBS -lnetwork" 851cb0ef41Sopenharmony_ci]) 861cb0ef41Sopenharmony_ciAC_CHECK_HEADERS([sys/ahafs_evProds.h]) 871cb0ef41Sopenharmony_ciAC_CONFIG_FILES([Makefile libuv.pc]) 881cb0ef41Sopenharmony_ciAC_CONFIG_LINKS([test/fixtures/empty_file:test/fixtures/empty_file]) 891cb0ef41Sopenharmony_ciAC_CONFIG_LINKS([test/fixtures/load_error.node:test/fixtures/load_error.node]) 901cb0ef41Sopenharmony_ciAC_CONFIG_LINKS([test/fixtures/lorem_ipsum.txt:test/fixtures/lorem_ipsum.txt]) 911cb0ef41Sopenharmony_ciAC_OUTPUT 92