PageRenderTime 58ms CodeModel.GetById 29ms RepoModel.GetById 1ms app.codeStats 0ms

/js/lib/Socket.IO-node/support/expresso/deps/jscoverage/configure.ac

http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs
m4 | 88 lines | 57 code | 10 blank | 21 comment | 0 complexity | 482b951063e080218546ee069d705fe8 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, MPL-2.0-no-copyleft-exception, BSD-3-Clause
  1. # configure.ac - configures jscoverage
  2. # Copyright (C) 2007, 2008 siliconforks.com
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2 of the License, or
  7. # (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License along
  15. # with this program; if not, write to the Free Software Foundation, Inc.,
  16. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  17. AC_PREREQ(2.61)
  18. AC_INIT([jscoverage], [0.4])
  19. AM_INIT_AUTOMAKE([-Wall foreign])
  20. AC_CONFIG_SRCDIR([jscoverage.c])
  21. AC_CONFIG_HEADERS([config.h])
  22. AC_CANONICAL_HOST
  23. # Checks for programs.
  24. AC_PROG_CC
  25. AC_PROG_CC_C99
  26. AC_PROG_CXX
  27. # Checks for libraries.
  28. AM_ICONV
  29. # Checks for header files.
  30. AC_CHECK_HEADERS([pthread.h])
  31. AC_CHECK_HEADERS([iconv.h])
  32. AC_CHECK_HEADERS([windows.h])
  33. # Checks for typedefs, structures, and compiler characteristics.
  34. AC_C_BIGENDIAN
  35. # Checks for library functions.
  36. AC_CHECK_FUNCS([getaddrinfo gethostbyname_r inet_aton strndup vasprintf asprintf])
  37. AC_MSG_CHECKING([for MultiByteToWideChar])
  38. AC_LANG(C)
  39. AC_LINK_IFELSE(
  40. [AC_LANG_PROGRAM([[#include <windows.h>]],[[MultiByteToWideChar(0,0,0,0,0,0);]])],
  41. [AC_DEFINE([HAVE_MULTIBYTETOWIDECHAR], [1], [Define to 1 if you have the `MultiByteToWideChar' function.])
  42. jscoverage_have_multibytetowidechar=yes
  43. AC_MSG_RESULT([yes])],
  44. [jscoverage_have_multibytetowidechar=no
  45. AC_MSG_RESULT([no])])
  46. AC_SUBST([XP_DEF])
  47. case "$host_os" in
  48. mingw*)
  49. XP_DEF='-DXP_WIN'
  50. ;;
  51. *)
  52. XP_DEF='-DXP_UNIX'
  53. ;;
  54. esac
  55. AC_SUBST([EXTRA_SOCKET_LIBS])
  56. AC_SUBST([EXTRA_THREAD_LIBS])
  57. AC_SUBST([EXTRA_TIMER_LIBS])
  58. case "$host_os" in
  59. mingw*)
  60. EXTRA_SOCKET_LIBS='-lws2_32'
  61. EXTRA_THREAD_LIBS=''
  62. EXTRA_TIMER_LIBS='-lwinmm'
  63. ;;
  64. *)
  65. EXTRA_SOCKET_LIBS=''
  66. EXTRA_THREAD_LIBS='-lpthread'
  67. EXTRA_TIMER_LIBS=''
  68. ;;
  69. esac
  70. if test "$am_cv_func_iconv" != yes && test "$jscoverage_have_multibytetowidechar" != yes
  71. then
  72. echo -ne '\033@<:@1;31m'
  73. AC_MSG_WARN([neither iconv nor Windows character encoding conversion functions found])
  74. AC_MSG_WARN([only ASCII will be supported])
  75. echo -ne '\033@<:@0m'
  76. fi
  77. AC_CONFIG_FILES([Makefile make-dist.sh make-bin-dist.sh tests/Makefile])
  78. AC_OUTPUT