File: configure.in

package info (click to toggle)
cppunit 1.8.0-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,664 kB
  • ctags: 1,779
  • sloc: cpp: 10,756; sh: 7,005; makefile: 362; ansic: 266
file content (113 lines) | stat: -rw-r--r-- 3,210 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
dnl Process this file with autoconf to produce a configure script.
AC_INIT(Makefile.am)

# autoconf 2.50 or higher to rebuild aclocal.m4, because the
# AC_CREATE_PREFIX_CONFIG_H macro needs the AS_DIRNAME macro.
AC_PREREQ(2.50)

# Making releases:
#   CPPUNIT_MICRO_VERSION += 1;
#   CPPUNIT_INTERFACE_AGE += 1;
#   CPPUNIT_BINARY_AGE += 1;
# if any functions have been added, set CPPUNIT_INTERFACE_AGE to 0.
# if backwards compatibility has been broken,
# set CPPUNIT_BINARY_AGE and CPPUNIT_INTERFACE_AGE to 0.
#
CPPUNIT_MAJOR_VERSION=1
CPPUNIT_MINOR_VERSION=8
CPPUNIT_MICRO_VERSION=0
CPPUNIT_INTERFACE_AGE=0
CPPUNIT_BINARY_AGE=0
CPPUNIT_VERSION=$CPPUNIT_MAJOR_VERSION.$CPPUNIT_MINOR_VERSION.$CPPUNIT_MICRO_VERSION
AC_SUBST(CPPUNIT_MAJOR_VERSION)
AC_SUBST(CPPUNIT_MINOR_VERSION)
AC_SUBST(CPPUNIT_MICRO_VERSION)
AC_SUBST(CPPUNIT_INTERFACE_AGE)
AC_SUBST(CPPUNIT_BINARY_AGE)
AC_SUBST(CPPUNIT_VERSION)

# libtool versioning
LT_RELEASE=$CPPUNIT_MAJOR_VERSION.$CPPUNIT_MINOR_VERSION
LT_CURRENT=`expr $CPPUNIT_MICRO_VERSION - $CPPUNIT_INTERFACE_AGE`
LT_REVISION=$CPPUNIT_INTERFACE_AGE
LT_AGE=`expr $CPPUNIT_BINARY_AGE - $CPPUNIT_INTERFACE_AGE`
AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)

AC_CONFIG_AUX_DIR(config)
AM_CONFIG_HEADER(config/config.h)
AM_INIT_AUTOMAKE(cppunit, $CPPUNIT_VERSION)

# General "with" options
# ----------------------------------------------------------------------------

dnl Checks for programs.

AC_PROG_MAKE_SET
AC_PROG_INSTALL

# The libtool macro AC_PROG_LIBTOOL checks for the C preprocessor.
# Configure gets confused if we try to check for a C preprocessor
# without first checking for the C compiler
# (see http://sources.redhat.com/ml/autoconf/2001-07/msg00036.html),
# so we invoke AC_PROG_CC explicitly.
AC_PROG_CC
AC_PROG_CXX
AC_LANG(C++)

AC_PROG_LIBTOOL

# check for doxygen
BB_ENABLE_DOXYGEN


# Check for headers
# Note that the fourth argument to AC_CHECK_HEADERS is non-empty to force
# the configure probe to try compiling "#include <header>".  See autoconf docs.
# ----------------------------------------------------------------------------

AC_CHECK_HEADERS(cmath,[],[],[/**/])

# Check for compiler characteristics 
# ----------------------------------------------------------------------------

AC_CXX_RTTI
AC_CXX_STRING_COMPARE_STRING_FIRST
AC_CXX_HAVE_SSTREAM
AC_CXX_HAVE_STRSTREAM

cppunit_val='CPPUNIT_HAVE_RTTI'
AC_ARG_ENABLE(typeinfo-name,
[  --disable-typeinfo-name disable use of RTTI for class names],
[  
    test x$enableval = 'xno' && cppunit_val='0' 
])

AC_DEFINE_UNQUOTED(USE_TYPEINFO_NAME,$cppunit_val,
[Define to 1 to use type_info::name() for class names])


AC_OUTPUT([
  Makefile 
  cppunit.spec
  cppunit-config
  src/Makefile
  src/cppunit/Makefile
  include/Makefile
  include/cppunit/Makefile
  include/cppunit/extensions/Makefile
  include/cppunit/ui/Makefile
  include/cppunit/ui/mfc/Makefile
  include/cppunit/ui/qt/Makefile
  include/cppunit/ui/text/Makefile
  doc/Makefile
  doc/Doxyfile
  examples/Makefile
  examples/hierarchy/Makefile
  examples/cppunittest/Makefile
],[chmod a+x cppunit-config])

AC_CREATE_PREFIX_CONFIG_H([include/cppunit/config-auto.h], 
        $PACKAGE, [config/config.h])