/[jscoverage]/trunk/configure.ac
ViewVC logotype

Diff of /trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 82 by siliconforks, Tue Nov 27 22:40:17 2007 UTC revision 399 by siliconforks, Tue Dec 9 03:37:47 2008 UTC
# Line 1  Line 1 
1  #    configure.ac - configures jscoverage  #    configure.ac - configures jscoverage
2  #    Copyright (C) 2007 siliconforks.com  #    Copyright (C) 2007, 2008 siliconforks.com
3  #  #
4  #    This program is free software; you can redistribute it and/or modify  #    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  #    it under the terms of the GNU General Public License as published by
# Line 16  Line 16 
16  #    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.  #    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17    
18  AC_PREREQ(2.61)  AC_PREREQ(2.61)
19  AC_INIT([jscoverage], [0.3.1])  AC_INIT([jscoverage], [0.4])
20  AM_INIT_AUTOMAKE([-Wall -Werror foreign])  AM_INIT_AUTOMAKE([-Wall foreign])
21  AC_CONFIG_SRCDIR([main.c])  AC_CONFIG_SRCDIR([jscoverage.c])
22    AC_CONFIG_HEADERS([config.h])
23    AC_CANONICAL_HOST
24    
25    # Checks for programs.
26  AC_PROG_CC  AC_PROG_CC
27  AC_PROG_CC_C99  AC_PROG_CC_C99
28  AC_PROG_LIBTOOL  AC_PROG_CXX
29  AC_CONFIG_HEADERS([config.h])  
30    # Checks for libraries.
31    AM_ICONV
32    
33    # Checks for header files.
34    AC_CHECK_HEADERS([pthread.h])
35    AC_CHECK_HEADERS([iconv.h])
36    AC_CHECK_HEADERS([windows.h])
37    
38    # Checks for typedefs, structures, and compiler characteristics.
39    AC_C_BIGENDIAN
40    
41    # Checks for library functions.
42    AC_CHECK_FUNCS([getaddrinfo gethostbyname_r inet_aton strndup vasprintf asprintf])
43    AC_MSG_CHECKING([for MultiByteToWideChar])
44    AC_LANG(C)
45    AC_LINK_IFELSE(
46      [AC_LANG_PROGRAM([[#include <windows.h>]],[[MultiByteToWideChar(0,0,0,0,0,0);]])],
47      [AC_DEFINE([HAVE_MULTIBYTETOWIDECHAR], [1], [Define to 1 if you have the `MultiByteToWideChar' function.])
48       jscoverage_have_multibytetowidechar=yes
49       AC_MSG_RESULT([yes])],
50      [jscoverage_have_multibytetowidechar=no
51       AC_MSG_RESULT([no])])
52    
53    AC_SUBST([EXTRA_SOCKET_LIBS])
54    AC_SUBST([EXTRA_THREAD_LIBS])
55    AC_SUBST([EXTRA_TIMER_LIBS])
56    case "$host_os" in
57      mingw*)
58        EXTRA_SOCKET_LIBS='-lws2_32'
59        EXTRA_THREAD_LIBS=''
60        EXTRA_TIMER_LIBS='-lwinmm'
61        ;;
62      *)
63        EXTRA_SOCKET_LIBS=''
64        EXTRA_THREAD_LIBS='-lpthread'
65        EXTRA_TIMER_LIBS=''
66        ;;
67    esac
68    
69    if test "$am_cv_func_iconv" != yes && test "$jscoverage_have_multibytetowidechar" != yes
70    then
71      echo -ne '\033@<:@1;31m'
72      AC_MSG_WARN([neither iconv nor Windows character encoding conversion functions found])
73      AC_MSG_WARN([only ASCII will be supported])
74      echo -ne '\033@<:@0m'
75    fi
76    
77  AC_CONFIG_FILES([Makefile make-dist.sh make-bin-dist.sh tests/Makefile])  AC_CONFIG_FILES([Makefile make-dist.sh make-bin-dist.sh tests/Makefile])
78  AC_CONFIG_SUBDIRS([js])  AC_CONFIG_SUBDIRS([js])
79  AC_OUTPUT  AC_OUTPUT

Legend:
Removed from v.82  
changed lines
  Added in v.399

  ViewVC Help
Powered by ViewVC 1.1.24