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

Contents of /trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 382 - (show annotations)
Thu Oct 30 03:12:18 2008 UTC (11 years ago) by siliconforks
File size: 2469 byte(s)
Rename main.c to jscoverage.c.
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
18 AC_PREREQ(2.61)
19 AC_INIT([jscoverage], [0.4])
20 AM_INIT_AUTOMAKE([-Wall foreign])
21 AC_CONFIG_SRCDIR([jscoverage.c])
22 AC_CONFIG_HEADERS([config.h])
23 AC_CANONICAL_HOST
24
25 # Checks for programs.
26 AC_PROG_CC
27 AC_PROG_CC_C99
28
29 # Checks for libraries.
30 AM_ICONV
31
32 # Checks for header files.
33 AC_CHECK_HEADERS([pthread.h])
34 AC_CHECK_HEADERS([iconv.h])
35 AC_CHECK_HEADERS([windows.h])
36
37 # Checks for typedefs, structures, and compiler characteristics.
38 AC_C_BIGENDIAN
39
40 # Checks for library functions.
41 AC_CHECK_FUNCS([getaddrinfo gethostbyname_r inet_aton strndup vasprintf asprintf])
42 AC_MSG_CHECKING([for MultiByteToWideChar])
43 AC_LANG(C)
44 AC_LINK_IFELSE(
45 [AC_LANG_PROGRAM([[#include <windows.h>]],[[MultiByteToWideChar(0,0,0,0,0,0);]])],
46 [AC_DEFINE([HAVE_MULTIBYTETOWIDECHAR], [1], [Define to 1 if you have the `MultiByteToWideChar' function.])
47 jscoverage_have_multibytetowidechar=yes
48 AC_MSG_RESULT([yes])],
49 [jscoverage_have_multibytetowidechar=no
50 AC_MSG_RESULT([no])])
51
52 AC_SUBST([EXTRA_SOCKET_LIBS])
53 AC_SUBST([EXTRA_THREAD_LIBS])
54 AC_SUBST([EXTRA_TIMER_LIBS])
55 case "$host_os" in
56 mingw*)
57 EXTRA_SOCKET_LIBS='-lws2_32'
58 EXTRA_THREAD_LIBS=''
59 EXTRA_TIMER_LIBS='-lwinmm'
60 ;;
61 *)
62 EXTRA_SOCKET_LIBS=''
63 EXTRA_THREAD_LIBS='-lpthread'
64 EXTRA_TIMER_LIBS=''
65 ;;
66 esac
67
68 if test "$am_cv_func_iconv" != yes && test "$jscoverage_have_multibytetowidechar" != yes
69 then
70 echo -ne '\033@<:@1;31m'
71 AC_MSG_WARN([neither iconv nor Windows character encoding conversion functions found])
72 AC_MSG_WARN([only ASCII will be supported])
73 echo -ne '\033@<:@0m'
74 fi
75
76 AC_CONFIG_FILES([Makefile make-dist.sh make-bin-dist.sh tests/Makefile])
77 AC_OUTPUT

  ViewVC Help
Powered by ViewVC 1.1.24