OSDN Git Service

rewrite
[ccunit/ccunit.git] / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3 dnl    Copyright (C) 2003, 2010 TSUTSUMI Kikuo.
4 dnl    This file is part of the CCUnit Library.
5
6 dnl    The CCUnit Library is free software; you can redistribute it and/or
7 dnl    modify it under the terms of the GNU Lesser General Public License
8 dnl    as published by the Free Software Foundation; either version 2.1 of
9 dnl    the License, or (at your option) any later version.
10
11 dnl    The CCUnit Library is distributed in the hope that it will be
12 dnl    useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 dnl    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 dnl    GNU Lesser General Public License for more details.
15
16 dnl    You should have received a copy of the GNU Lesser General Public
17 dnl    License along with the CCUnit Library; see the file COPYING.LESSER.
18 dnl    If not, write to the Free Software Foundation, Inc., 59 Temple
19 dnl    Place - Suite 330, Boston, MA 02111-1307, USA.  
20
21 AC_PREREQ(2.50)
22 AC_INIT(CCUnit, 1.2, [tsutsumi@users.sourceforge.jp])
23 AC_REVISION([$Revision$])
24 AC_CONFIG_SRCDIR([configure.ac])
25 AC_CONFIG_AUX_DIR([config])
26 AC_CONFIG_HEADER([config/config.h])
27
28 AM_INIT_AUTOMAKE([gnu check-news readme-alpha dist-bzip2 dist-zip -Wall])
29
30 AC_SUBST(DISTDOCDIR,$PACKAGE-$VERSION-doc)
31 AC_SUBST(DISTDOCJADIR,$PACKAGE-$VERSION-docja)
32
33 AC_LANG(C)
34
35 # Checks for programs.
36 AC_GNU_SOURCE
37 AC_PROG_CC(gcc cc)
38 AC_PROG_CC_C_O
39 # AC_PROG_RANLIB
40 AC_PROG_LN_S
41
42 AM_WITH_DMALLOC
43 ARG_WITH_DOXYGEN
44 ARG_ENABLE_COVERAGE
45 AC_ARG_ENABLE(japanese-doc,
46   AC_HELP_STRING([--enable-japanese-doc],[output japanese documents]),
47   [ case "${enableval}" in
48     yes) enable_jadoc=yes;;
49     no)  enable_jadoc=no;;
50     *)   enable_jadoc=no;;
51     esac ], [enable_jadoc=no])
52 AM_CONDITIONAL(ENABLE_JADOC, test x$enable_jadoc = xyes)
53
54 AC_LIBTOOL_WIN32_DLL
55 AC_LIBTOOL_DLOPEN
56 AC_PROG_LIBTOOL
57
58 # Checks for libraries.
59
60 # Checks for header files.
61 AC_HEADER_STDC
62 AC_CHECK_HEADERS([limits.h stdlib.h string.h sys/time.h unistd.h])
63
64 # Checks for typedefs, structures, and compiler characteristics.
65 AC_HEADER_STDBOOL
66 AC_C_CONST
67 AC_C_INLINE
68 AC_TYPE_SIZE_T
69 AC_C_LONG_DOUBLE
70 AC_HEADER_TIME
71 AC_CHECK_TYPES([u_char, u_short, u_int, u_long])
72 AC_CHECK_TYPES([quad_t, int64_t, long long], break)
73 AC_CHECK_TYPES([u_quad_t, u_int64_t, unsigned long long], break)
74
75 # Checks for library functions.
76 AC_FUNC_MALLOC
77 AC_FUNC_REALLOC
78 AC_FUNC_VPRINTF
79 AC_CHECK_FUNCS([gettimeofday memset strcasecmp strdup strerror strncasecmp strrchr strstr])
80 AC_CHECK_FUNCS([atexit on_exit], break)
81 AC_REPLACE_FUNCS([strdup])
82
83 # Initialize the test suite and build position independent wrappers.
84 AC_CONFIG_FILES([Makefile
85                  src/Makefile
86                  src/ccunit/Makefile
87                  src/tools/Makefile
88                  doc/Makefile
89                  doc/Doxyfile
90                  tests/Makefile
91                  examples/Makefile
92                  examples/complex/Makefile])
93
94 AC_OUTPUT
95
96 AC_CREATE_PREFIX_CONFIG_H(src/ccunit/config.h,,config/config.h)