OSDN Git Service

Added AM_PROG_AR
[ccunit/ccunit.git] / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3 dnl    Copyright (C) 2003, 2010, 2013 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.69])
22 LT_PREREQ([2.2.8])
23 AC_INIT([CCUnit],[2.1],[tsntsumi@users.sourceforge.jp],[],[http://ccunit.sourceforge.jp])
24 AC_REVISION([$Revision$])
25 AC_CONFIG_SRCDIR([configure.ac])
26 AC_CONFIG_AUX_DIR([config])
27 AC_CONFIG_HEADER([config/config.h])
28 AC_CONFIG_MACRO_DIR([config])
29
30 AM_INIT_AUTOMAKE([gnu check-news readme-alpha dist-bzip2 dist-zip -Wall])
31
32 AX_PREFIX_CONFIG_H(src/ccunit/config.h,,config/config.h)
33
34 AC_SUBST(DISTDOCDIR,$PACKAGE-$VERSION-doc)
35 AC_SUBST(DISTDOCJADIR,$PACKAGE-$VERSION-docja)
36
37 AC_LANG(C)
38
39 # Checks for programs.
40 AC_USE_SYSTEM_EXTENSIONS
41 AC_PROG_CC(gcc cc)
42 AC_PROG_CC_C_O
43 # AC_PROG_RANLIB
44 AC_PROG_LN_S
45
46 AM_PROG_AR
47 AM_WITH_DMALLOC
48 ARG_WITH_DOXYGEN
49 ARG_ENABLE_COVERAGE
50 AC_ARG_ENABLE(japanese-doc,
51   AS_HELP_STRING([--enable-japanese-doc],[output japanese documents]),
52   [ case "${enableval}" in
53     yes) enable_jadoc=yes;;
54     no)  enable_jadoc=no;;
55     *)   enable_jadoc=no;;
56     esac ], [enable_jadoc=no])
57 AM_CONDITIONAL(ENABLE_JADOC, test x$enable_jadoc = xyes)
58
59 #AC_REQUIRE(AC_CANONICAL_HOST)
60
61 LT_INIT([dlopen win32-dll])
62
63 # Checks for libraries.
64
65 # Checks for header files.
66 AC_HEADER_STDC
67 AC_CHECK_HEADERS([limits.h stdlib.h string.h sys/time.h unistd.h])
68
69 # Checks for typedefs, structures, and compiler characteristics.
70 AC_HEADER_STDBOOL
71 AC_C_CONST
72 AC_C_INLINE
73 AC_TYPE_SIZE_T
74
75     AC_TYPE_LONG_DOUBLE_WIDER
76     ac_cv_c_long_double=$ac_cv_type_long_double_wider
77     if test $ac_cv_c_long_double = yes; then
78       AC_DEFINE([HAVE_LONG_DOUBLE],[1],[Define to 1 if the type `long double' works and has more range or
79          precision than `double'.])
80     fi
81   
82 AC_HEADER_TIME
83 AC_CHECK_TYPES([u_char, u_short, u_int, u_long])
84 AC_CHECK_TYPES([quad_t, int64_t, long long], break)
85 AC_CHECK_TYPES([u_quad_t, u_int64_t, unsigned long long], break)
86
87 # Checks for library functions.
88 AC_FUNC_MALLOC
89 AC_FUNC_REALLOC
90 AC_FUNC_VPRINTF
91 AC_CHECK_FUNCS([gettimeofday memset strcasecmp strerror strncasecmp strrchr strstr])
92 AC_CHECK_FUNCS([atexit on_exit], break)
93 AC_REPLACE_FUNCS([strdup])
94
95 # Initialize the test suite and build position independent wrappers.
96 AC_CONFIG_FILES([Makefile
97                  src/Makefile
98                  src/ccunit/Makefile
99                  src/tools/Makefile
100                  doc/Makefile
101                  doc/Doxyfile
102                  tests/Makefile
103                  examples/Makefile
104                  examples/complex/Makefile])
105
106 AC_OUTPUT