OSDN Git Service

It was modified because it didn't need to generate a JavaDoc comment.
[ccunit/ccunit.git] / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3 dnl    Copyright (C) 2003 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.57)
22 AC_INIT(CCUnit, 0.6.1, [tsutsumi@users.sourceforge.jp])
23 AC_CONFIG_SRCDIR([configure.ac])
24 AC_CONFIG_AUX_DIR([config])
25 AC_CONFIG_HEADER([config/config.h])
26
27 AM_INIT_AUTOMAKE([gnu check-news readme-alpha dist-bzip2 dist-zip -Wall])
28
29 AC_LANG(C)
30
31 # Checks for programs.
32 AC_GNU_SOURCE
33 AC_PROG_CC(gcc cc)
34 AC_PROG_CC_C_O
35 AC_PROG_RANLIB
36 AC_PROG_LN_S
37 AM_WITH_DMALLOC
38 ARG_WITH_DOXYGEN
39
40 # Checks for libraries.
41
42 # Checks for header files.
43 AC_HEADER_STDC
44 AC_CHECK_HEADERS([limits.h stdlib.h string.h sys/time.h unistd.h])
45
46 # Checks for typedefs, structures, and compiler characteristics.
47 AC_HEADER_STDBOOL
48 AC_C_CONST
49 AC_C_INLINE
50 AC_TYPE_SIZE_T
51 AC_C_LONG_DOUBLE
52 AC_HEADER_TIME
53 AC_CHECK_TYPES(u_char)
54 AC_CHECK_TYPES(u_short)
55 AC_CHECK_TYPES(u_int)
56 AC_CHECK_TYPES(u_long)
57 AC_CHECK_TYPES(quad_t,,
58         AC_CHECK_TYPES(int64_t,,AC_CHECK_TYPES(long long)))
59 AC_CHECK_TYPES(u_quad_t,,
60         AC_CHECK_TYPES(u_int64_t,,AC_CHECK_TYPES(unsigned long long)))
61
62 # Checks for library functions.
63 AC_FUNC_MALLOC
64 AC_FUNC_REALLOC
65 AC_FUNC_VPRINTF
66 AC_CHECK_FUNCS([gettimeofday strerror strncasecmp strrchr memset])
67 AC_REPLACE_FUNCS([strdup])
68
69 # Initialize the test suite and build position independent wrappers.
70
71 AC_CONFIG_FILES([Makefile
72                  src/Makefile
73                  src/ccunit/Makefile
74                  src/tools/Makefile
75                  doc/Makefile
76                  doc/Doxyfile
77                  tests/Makefile])
78
79 cwdir=`pwd`
80 cd tests
81 for t in test*.c
82 do
83     testsrcs="$testsrcs$t "
84     testobjs="$testobjs`basename $t .c`.o "
85 done
86 for f in fail*.c
87 do
88     failsrcs="$failsrcs$f "
89     failobjs="$failobjs`basename $f .c`.o "
90 done
91
92 AC_SUBST(TESTSRCS,[$testsrcs])
93 AC_SUBST(TESTOBJS,[$testobjs])
94 AC_SUBST(FAILSRCS,[$failsrcs])
95 AC_SUBST(FAILOBJS,[$failobjs])
96 cd $cwdir
97
98 AC_OUTPUT
99
100 AC_CREATE_PREFIX_CONFIG_H(src/ccunit/config.h,,config/config.h)