1
0

configure.ac 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl>
  2. #
  3. # Permission to use, copy, modify, and/or distribute this software for any
  4. # purpose with or without fee is hereby granted, provided that the above
  5. # copyright notice and this permission notice appear in all copies.
  6. #
  7. # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8. # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9. # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10. # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11. # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12. # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13. # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. AC_PREREQ(2.57)
  15. AC_INIT([libuv], [0.11.19], [https://github.com/joyent/libuv/issues])
  16. AC_CONFIG_MACRO_DIR([m4])
  17. m4_include([m4/libuv-extra-automake-flags.m4])
  18. AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects] UV_EXTRA_AUTOMAKE_FLAGS)
  19. AC_CANONICAL_HOST
  20. AC_ENABLE_SHARED
  21. AC_ENABLE_STATIC
  22. AC_PROG_CC
  23. AM_PROG_CC_C_O
  24. # AM_PROG_AR is not available in automake v0.11 but it's essential in v0.12.
  25. m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
  26. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  27. LT_INIT
  28. # TODO(bnoordhuis) Check for -pthread vs. -pthreads
  29. AC_CHECK_LIB([dl], [dlopen])
  30. AC_CHECK_LIB([kstat], [kstat_lookup])
  31. AC_CHECK_LIB([kvm], [kvm_open])
  32. AC_CHECK_LIB([nsl], [gethostbyname])
  33. AC_CHECK_LIB([perfstat], [perfstat_cpu])
  34. AC_CHECK_LIB([pthread], [pthread_mutex_init])
  35. AC_CHECK_LIB([rt], [clock_gettime])
  36. AC_CHECK_LIB([sendfile], [sendfile])
  37. AC_CHECK_LIB([socket], [socket])
  38. AC_SYS_LARGEFILE
  39. AM_CONDITIONAL([AIX], [AS_CASE([$host_os], [aix*], [true], [false])])
  40. AM_CONDITIONAL([DARWIN], [AS_CASE([$host_os], [darwin*], [true], [false])])
  41. AM_CONDITIONAL([FREEBSD], [AS_CASE([$host_os], [freebsd*], [true], [false])])
  42. AM_CONDITIONAL([LINUX], [AS_CASE([$host_os], [linux*], [true], [false])])
  43. AM_CONDITIONAL([NETBSD], [AS_CASE([$host_os], [netbsd*], [true], [false])])
  44. AM_CONDITIONAL([OPENBSD], [AS_CASE([$host_os], [openbsd*], [true], [false])])
  45. AM_CONDITIONAL([SUNOS], [AS_CASE([$host_os], [solaris*], [true], [false])])
  46. AM_CONDITIONAL([WINNT], [AS_CASE([$host_os], [mingw*], [true], [false])])
  47. PANDORA_ENABLE_DTRACE
  48. AC_CHECK_PROG(PKG_CONFIG, pkg-config, yes)
  49. AM_CONDITIONAL([HAVE_PKG_CONFIG], [test "x$PKG_CONFIG" = "xyes"])
  50. AS_IF([test "x$PKG_CONFIG" = "xyes"], [
  51. AC_CONFIG_FILES([libuv.pc])
  52. ])
  53. AC_CONFIG_FILES([Makefile])
  54. AC_OUTPUT