File: configure.ac

package info (click to toggle)
atlas-cpp 0.5.98-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,652 kB
  • ctags: 2,284
  • sloc: sh: 8,305; cpp: 6,372; python: 1,471; makefile: 216
file content (151 lines) | stat: -rw-r--r-- 2,999 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
dnl Initialise autoconf

AC_INIT(Atlas-C++, 0.5.98, alriddoch@zepler.org, Atlas-C++)
AC_CONFIG_SRCDIR([Atlas/Bridge.cpp])
AC_CONFIG_HEADERS([config.h])

dnl Detect the canonical host environment

AC_CANONICAL_HOST

dnl Initialise automake

AM_INIT_AUTOMAKE([dist-bzip2 check-news])

dnl Initialise automake

INTERFACE_VERSION='-version-info 0:0:0'

AC_SUBST(INTERFACE_VERSION)

dnl Test for GNU libtool

AC_DISABLE_STATIC
AC_PROG_LIBTOOL

dnl Test for C++ compiler

AC_PROG_CXX

AC_ARG_ENABLE(debug,
    [  --enable-debug          enable debug information [default=no]],
    [
        if test "$enableval" = "yes"; then
            CXXFLAGS="$CXXFLAGS -Wall -Werror -DDEBUG"
        else
            CXXFLAGS="$CXXFLAGS -Wall -Werror -DNDEBUG"
        fi
    ],[
        CXXFLAGS="$CXXFLAGS -Wall -Werror -DNDEBUG"
    ]
)

AC_LANG(C++)

dnl Test for <cassert> header file

AC_CHECK_HEADERS(cassert)

dnl Test for <cstdio> header file

AC_CHECK_HEADERS(cstdio)

dnl Test for <iostream> header file

AC_CHECK_HEADERS(iostream)

dnl Test for <list> header file

AC_CHECK_HEADERS(list)

dnl Test for <map> header file

AC_CHECK_HEADERS(map)

dnl Test for <cstdlib> header file

AC_CHECK_HEADERS(string)

dnl Test for <vector> header file

AC_CHECK_HEADERS(vector)

OTHER_LIBS=

dnl Test for gzip compression library

AC_ARG_WITH(zlib,
[  --with-zlib=DIR         gzip compression library (optional)],
[with_zlib="$withval"],
[with_zlib=""])

ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS -I$with_zlib/include"
LIBS="$LIBS -L$with_zlib/lib"

AC_CHECK_LIB(z, inflate,
    [
        AC_DEFINE(HAVE_LIBZ, 1, ["True if zlib is available"])
        OTHER_LIBS="$OTHER_LIBS -lz"
    ])

AC_CHECK_HEADERS(zlib.h)

CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"

dnl Test for bzip2 compression library

AC_ARG_WITH(bzlib,
[  --with-bzlib=DIR        bzip2 compression library (optional)],
[with_bzlib="$withval"],
[with_bzlib=""])

ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS -I$with_bzlib/include"
LIBS="$LIBS -L$with_bzlib/lib"

AC_CHECK_LIB(bz2, BZ2_bzDecompressInit,
    [
        AC_DEFINE(HAVE_LIBBZ2, 1, ["True if libbz2 is available"])
        OTHER_LIBS="$OTHER_LIBS -lbz2"
    ])

AC_CHECK_HEADERS(bzlib.h)

CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"

SYSTEM_LIBS="$SYSTEM_LIBS -lm"
ATLAS_CFLAGS=""
ATLAS_LIB_SUFFIX="-0.6"
ATLAS_LIBS="-lAtlasObjects$ATLAS_LIB_SUFFIX -lAtlasNet$ATLAS_LIB_SUFFIX -lAtlas$ATLAS_LIB_SUFFIX -lAtlasCodecs$ATLAS_LIB_SUFFIX -lAtlasMessage$ATLAS_LIB_SUFFIX -lAtlas$ATLAS_LIB_SUFFIX"

AC_SUBST(ATLAS_CFLAGS)
AC_SUBST(ATLAS_LIB_SUFFIX)
AC_SUBST(ATLAS_LIBS)
AC_SUBST(SYSTEM_LIBS)
AC_SUBST(OTHER_LIBS)

dnl Generate files

AC_CONFIG_FILES([
	Makefile
	Atlas/Makefile
	Atlas/Codecs/Makefile
	Atlas/Filters/Makefile
	Atlas/Funky/Makefile
	Atlas/Message/Makefile
	Atlas/Net/Makefile
	Atlas/Objects/Makefile
	tests/Makefile
	tests/Objects/Makefile
	tools/Makefile
	benchmark/Makefile
	tutorial/Makefile
	atlas-cpp.spec
	atlascpp-0.6.pc
])
AC_OUTPUT