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

Annotation of /trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 427 - (hide annotations)
Wed Feb 18 16:08:33 2009 UTC (10 years, 9 months ago) by siliconforks
File size: 2605 byte(s)
Update Copyright year.
1 siliconforks 2 # configure.ac - configures jscoverage
2 siliconforks 427 # Copyright (C) 2007, 2008, 2009 siliconforks.com
3 siliconforks 2 #
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    
18     AC_PREREQ(2.61)
19 siliconforks 145 AC_INIT([jscoverage], [0.4])
20 siliconforks 83 AM_INIT_AUTOMAKE([-Wall foreign])
21 siliconforks 382 AC_CONFIG_SRCDIR([jscoverage.c])
22 siliconforks 99 AC_CONFIG_HEADERS([config.h])
23 siliconforks 125 AC_CANONICAL_HOST
24 siliconforks 99
25     # Checks for programs.
26 siliconforks 2 AC_PROG_CC
27     AC_PROG_CC_C99
28 siliconforks 399 AC_PROG_CXX
29 siliconforks 99
30     # Checks for libraries.
31 siliconforks 174 AM_ICONV
32 siliconforks 99
33     # Checks for header files.
34 siliconforks 127 AC_CHECK_HEADERS([pthread.h])
35 siliconforks 174 AC_CHECK_HEADERS([iconv.h])
36     AC_CHECK_HEADERS([windows.h])
37 siliconforks 99
38     # Checks for typedefs, structures, and compiler characteristics.
39 siliconforks 174 AC_C_BIGENDIAN
40 siliconforks 99
41     # Checks for library functions.
42 siliconforks 129 AC_CHECK_FUNCS([getaddrinfo gethostbyname_r inet_aton strndup vasprintf asprintf])
43 siliconforks 174 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 siliconforks 99
53 siliconforks 403 AC_SUBST([XP_DEF])
54     case "$host_os" in
55 siliconforks 405 mingw*)
56 siliconforks 403 XP_DEF='-DXP_WIN'
57     ;;
58     *)
59     XP_DEF='-DXP_UNIX'
60     ;;
61     esac
62    
63 siliconforks 125 AC_SUBST([EXTRA_SOCKET_LIBS])
64     AC_SUBST([EXTRA_THREAD_LIBS])
65 siliconforks 364 AC_SUBST([EXTRA_TIMER_LIBS])
66 siliconforks 125 case "$host_os" in
67     mingw*)
68     EXTRA_SOCKET_LIBS='-lws2_32'
69     EXTRA_THREAD_LIBS=''
70 siliconforks 364 EXTRA_TIMER_LIBS='-lwinmm'
71 siliconforks 125 ;;
72     *)
73     EXTRA_SOCKET_LIBS=''
74     EXTRA_THREAD_LIBS='-lpthread'
75 siliconforks 364 EXTRA_TIMER_LIBS=''
76 siliconforks 125 ;;
77     esac
78    
79 siliconforks 174 if test "$am_cv_func_iconv" != yes && test "$jscoverage_have_multibytetowidechar" != yes
80     then
81     echo -ne '\033@<:@1;31m'
82     AC_MSG_WARN([neither iconv nor Windows character encoding conversion functions found])
83     AC_MSG_WARN([only ASCII will be supported])
84     echo -ne '\033@<:@0m'
85     fi
86    
87 siliconforks 2 AC_CONFIG_FILES([Makefile make-dist.sh make-bin-dist.sh tests/Makefile])
88     AC_OUTPUT

  ViewVC Help
Powered by ViewVC 1.1.24