2013-06-27 14:28:00 +02:00
|
|
|
# Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl>
|
|
|
|
#
|
|
|
|
# Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
# purpose with or without fee is hereby granted, provided that the above
|
|
|
|
# copyright notice and this permission notice appear in all copies.
|
|
|
|
#
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
|
|
|
AC_PREREQ(2.57)
|
2017-01-31 19:38:56 -05:00
|
|
|
AC_INIT([libuv], [1.11.0], [https://github.com/libuv/libuv/issues])
|
2013-06-27 14:28:00 +02:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2014-04-05 21:31:24 +04:00
|
|
|
m4_include([m4/libuv-extra-automake-flags.m4])
|
2014-03-25 17:35:47 +09:00
|
|
|
m4_include([m4/as_case.m4])
|
2014-09-14 15:09:48 +03:00
|
|
|
m4_include([m4/libuv-check-flags.m4])
|
2013-08-17 14:49:38 +02:00
|
|
|
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects] UV_EXTRA_AUTOMAKE_FLAGS)
|
2013-06-27 14:28:00 +02:00
|
|
|
AC_CANONICAL_HOST
|
|
|
|
AC_ENABLE_SHARED
|
|
|
|
AC_ENABLE_STATIC
|
|
|
|
AC_PROG_CC
|
2013-07-29 00:22:01 +02:00
|
|
|
AM_PROG_CC_C_O
|
2016-07-05 18:37:45 -04:00
|
|
|
AS_IF([AS_CASE([$host_os],[openedition*], [false], [true])], [
|
|
|
|
CC_CHECK_CFLAGS_APPEND([-pedantic])
|
|
|
|
])
|
2016-06-13 14:55:41 -04:00
|
|
|
CC_FLAG_VISIBILITY #[-fvisibility=hidden]
|
2015-01-05 17:13:52 +01:00
|
|
|
CC_CHECK_CFLAGS_APPEND([-g])
|
|
|
|
CC_CHECK_CFLAGS_APPEND([-std=gnu89])
|
2014-12-01 23:31:00 +01:00
|
|
|
CC_CHECK_CFLAGS_APPEND([-Wall])
|
|
|
|
CC_CHECK_CFLAGS_APPEND([-Wextra])
|
|
|
|
CC_CHECK_CFLAGS_APPEND([-Wno-unused-parameter])
|
2017-04-27 10:23:46 -04:00
|
|
|
CC_CHECK_CFLAGS_APPEND([-Wstrict-prototypes])
|
2013-07-02 12:39:26 +02:00
|
|
|
# AM_PROG_AR is not available in automake v0.11 but it's essential in v0.12.
|
|
|
|
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
2015-01-05 09:29:46 +01:00
|
|
|
# autoconf complains if AC_PROG_LIBTOOL precedes AM_PROG_AR.
|
|
|
|
AC_PROG_LIBTOOL
|
2013-07-02 18:01:26 +02:00
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
2013-06-27 14:28:00 +02:00
|
|
|
LT_INIT
|
|
|
|
# TODO(bnoordhuis) Check for -pthread vs. -pthreads
|
|
|
|
AC_CHECK_LIB([dl], [dlopen])
|
|
|
|
AC_CHECK_LIB([kstat], [kstat_lookup])
|
|
|
|
AC_CHECK_LIB([nsl], [gethostbyname])
|
|
|
|
AC_CHECK_LIB([perfstat], [perfstat_cpu])
|
|
|
|
AC_CHECK_LIB([pthread], [pthread_mutex_init])
|
|
|
|
AC_CHECK_LIB([rt], [clock_gettime])
|
|
|
|
AC_CHECK_LIB([sendfile], [sendfile])
|
|
|
|
AC_CHECK_LIB([socket], [socket])
|
|
|
|
AC_SYS_LARGEFILE
|
2014-09-26 20:41:59 +02:00
|
|
|
AM_CONDITIONAL([AIX], [AS_CASE([$host_os],[aix*], [true], [false])])
|
|
|
|
AM_CONDITIONAL([ANDROID], [AS_CASE([$host_os],[linux-android*],[true], [false])])
|
|
|
|
AM_CONDITIONAL([DARWIN], [AS_CASE([$host_os],[darwin*], [true], [false])])
|
|
|
|
AM_CONDITIONAL([DRAGONFLY],[AS_CASE([$host_os],[dragonfly*], [true], [false])])
|
2016-07-28 14:26:01 -05:00
|
|
|
AM_CONDITIONAL([FREEBSD], [AS_CASE([$host_os],[*freebsd*], [true], [false])])
|
2014-09-26 20:41:59 +02:00
|
|
|
AM_CONDITIONAL([LINUX], [AS_CASE([$host_os],[linux*], [true], [false])])
|
|
|
|
AM_CONDITIONAL([NETBSD], [AS_CASE([$host_os],[netbsd*], [true], [false])])
|
|
|
|
AM_CONDITIONAL([OPENBSD], [AS_CASE([$host_os],[openbsd*], [true], [false])])
|
2016-07-05 18:37:45 -04:00
|
|
|
AM_CONDITIONAL([OS390], [AS_CASE([$host_os],[openedition*], [true], [false])])
|
2014-09-26 20:41:59 +02:00
|
|
|
AM_CONDITIONAL([SUNOS], [AS_CASE([$host_os],[solaris*], [true], [false])])
|
|
|
|
AM_CONDITIONAL([WINNT], [AS_CASE([$host_os],[mingw*], [true], [false])])
|
2016-04-12 11:06:36 +10:00
|
|
|
AS_CASE([$host_os],[mingw*], [
|
2016-05-11 13:03:30 +01:00
|
|
|
LIBS="$LIBS -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv -luser32"
|
2016-04-12 11:06:36 +10:00
|
|
|
])
|
2017-05-12 23:25:06 -04:00
|
|
|
AS_CASE([$host_os], [openbsd*], [], [
|
|
|
|
AC_CHECK_LIB([kvm], [kvm_open])
|
|
|
|
])
|
2015-05-27 10:46:57 -04:00
|
|
|
AC_CHECK_HEADERS([sys/ahafs_evProds.h])
|
2013-12-08 22:47:57 +01:00
|
|
|
AC_CHECK_PROG(PKG_CONFIG, pkg-config, yes)
|
2014-02-28 23:19:55 +01:00
|
|
|
AM_CONDITIONAL([HAVE_PKG_CONFIG], [test "x$PKG_CONFIG" != "x"])
|
|
|
|
AS_IF([test "x$PKG_CONFIG" != "x"], [
|
2013-12-08 22:47:57 +01:00
|
|
|
AC_CONFIG_FILES([libuv.pc])
|
2013-12-06 09:43:44 +01:00
|
|
|
])
|
2013-06-27 14:28:00 +02:00
|
|
|
AC_CONFIG_FILES([Makefile])
|
|
|
|
AC_OUTPUT
|