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

Diff of /trunk/configure.ac

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

revision 83 by siliconforks, Tue Nov 27 23:06:50 2007 UTC revision 505 by siliconforks, Sat Jan 2 04:55:54 2010 UTC
# Line 1  Line 1 
1  #    configure.ac - configures jscoverage  #    configure.ac - configures jscoverage
2  #    Copyright (C) 2007 siliconforks.com  #    Copyright (C) 2007, 2008, 2009, 2010 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], [SVN])
20  AM_INIT_AUTOMAKE([-Wall 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    case "$host_os" in
31      cygwin*)
32        CC="$CC -mno-cygwin"
33        CXX="$CXX -mno-cygwin"
34        ;;
35    esac
36    
37    # Checks for libraries.
38    AM_ICONV
39    
40    # Checks for header files.
41    AC_CHECK_HEADERS([pthread.h])
42    AC_CHECK_HEADERS([iconv.h])
43    AC_CHECK_HEADERS([windows.h])
44    
45    # Checks for typedefs, structures, and compiler characteristics.
46    AC_C_BIGENDIAN
47    
48    # Checks for library functions.
49    AC_CHECK_FUNCS([getaddrinfo gethostbyname_r inet_aton strndup vasprintf asprintf])
50    AC_MSG_CHECKING([for MultiByteToWideChar])
51    AC_LANG(C)
52    AC_LINK_IFELSE(
53      [AC_LANG_PROGRAM([[#include <windows.h>]],[[MultiByteToWideChar(0,0,0,0,0,0);]])],
54      [AC_DEFINE([HAVE_MULTIBYTETOWIDECHAR], [1], [Define to 1 if you have the `MultiByteToWideChar' function.])
55       jscoverage_have_multibytetowidechar=yes
56       AC_MSG_RESULT([yes])],
57      [jscoverage_have_multibytetowidechar=no
58       AC_MSG_RESULT([no])])
59    
60    AC_SUBST([XP_DEF])
61    case "$host_os" in
62      mingw*|cygwin*)
63        XP_DEF='-DXP_WIN'
64        ;;
65      *)
66        XP_DEF='-DXP_UNIX'
67        ;;
68    esac
69    
70    AC_SUBST([EXTRA_SOCKET_LIBS])
71    AC_SUBST([EXTRA_THREAD_LIBS])
72    AC_SUBST([EXTRA_TIMER_LIBS])
73    case "$host_os" in
74      mingw*|cygwin*)
75        EXTRA_SOCKET_LIBS='-lws2_32'
76        EXTRA_THREAD_LIBS=''
77        EXTRA_TIMER_LIBS='-lwinmm'
78        ;;
79      *)
80        EXTRA_SOCKET_LIBS=''
81        EXTRA_THREAD_LIBS='-lpthread'
82        EXTRA_TIMER_LIBS=''
83        ;;
84    esac
85    
86    AC_SUBST([SPIDERMONKEY_LIBS])
87    case "$host_os" in
88      mingw*|cygwin*)
89        SPIDERMONKEY_LIBS='js/libjs3250.a'
90        ;;
91      *)
92        SPIDERMONKEY_LIBS='js/libmozjs.a'
93        ;;
94    esac
95    
96    if test "$am_cv_func_iconv" != yes && test "$jscoverage_have_multibytetowidechar" != yes
97    then
98      echo -ne '\033@<:@1;31m'
99      AC_MSG_WARN([neither iconv nor Windows character encoding conversion functions found])
100      AC_MSG_WARN([only ASCII will be supported])
101      echo -ne '\033@<:@0m'
102    fi
103    
104  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])
105  AC_CONFIG_SUBDIRS([js])  AC_CONFIG_SUBDIRS([js])
106  AC_OUTPUT  AC_OUTPUT

Legend:
Removed from v.83  
changed lines
  Added in v.505

  ViewVC Help
Powered by ViewVC 1.1.24