Debian Codegraph @

configure.ac

raw ◀ ▶
Source reconstructed at patch state 0 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
1 dnl Copyright 2000, 2001 Alexandre Duret-Lutz <[email protected]>
2 dnl
3 dnl This file is part of Heroes.
4 dnl
5 dnl Heroes is free software; you can redistribute it and/or modify it under
6 dnl the terms of the GNU General Public License version 2 as published by
7 dnl the Free Software Foundation.
8 dnl
9 dnl Heroes is distributed in the hope that it will be useful, but WITHOUT
10 dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 dnl for more details.
13 dnl
14 dnl You should have received a copy of the GNU General Public License along
15 dnl with this program; if not, write to the Free Software Foundation, Inc.,
16 dnl 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 dnl
18
19 AC_PREREQ(2.50)
20
21 AC_INIT([heroes], [0.21], [[email protected]])
22 AC_CONFIG_AUX_DIR(tools)
23 AC_CONFIG_SRCDIR([src/heroes.c])
24 AM_INIT_AUTOMAKE([heroes], [0.21])
25
26 AC_COPYRIGHT([Copyright 2000, 2001, 2002 Alexandre Duret-Lutz])
27
28 heroes_CHECK_OBSOLETE_OPTIONS
29
30 AC_CANONICAL_HOST
31 AC_DEFINE_UNQUOTED([HOST],["$host"],[The canonical host])
32
33 # If the user didn't supplied a CFLAGS value,
34 # set an empty one to prevent autoconf to stick -O2 -g here.
35 test -z "$CFLAGS" && CFLAGS=""
36
37 # ===================
38 # Check for programs.
39 # ===================
40
41 AC_PROG_CC
42 AC_ISC_POSIX
43 AC_PROG_CC_STDC
44 AM_PROG_CC_C_O
45 AC_PROG_CPP
46 AC_PROG_AWK
47 AC_PROG_RANLIB
48 AC_PROG_LN_S
49
50 AM_MISSING_PROG([HELP2MAN], [help2man])
51 AM_MISSING_PROG([ZIP], [zip])
52 AM_MISSING_PROG([UNZIP], [unzip])
53 AM_MISSING_PROG([AUTOGEN], [autogen])
54
55 AC_PATH_PROG([GPERF], [gperf])
56 AM_CONDITIONAL(HAVE_GPERF, [test \! -z "$GPERF"])
57
58 AC_CACHE_SAVE
59
60 # Set _GNU_SOURCE before any other tests.
61 AC__GNU_SOURCE
62
63 # =====================
64 # Checks for libraries.
65 # =====================
66
67 dnl pass a third argument to AC_CHECK_LIB to
68 dnl prevent HAVE_LIBM from being defined (we don't need it).
69 AC_CHECK_LIB([m], [sin], [LIBS="-lm $LIBS"])
70 heroes_MEDIALIB_SELECTION
71
72 # ================================
73 # Check for any malloc() debugger.
74 # ================================
75
76 adl_WITH_MPATROL
77 adl_WITH_MTRACE
78 adl_WITH_DMALLOC
79 adl_WITH_EFENCE
80 adl_ENABLE_MEM_DEBUG
81
82 # ==============================================
83 # Now that we have all the libraries, check that
84 # compiled programs are still runnable.
85 # ==============================================
86
87 adl_RUN_CHECK
88
89 # ========================
90 # Checks for header files.
91 # ========================
92
93 AC_HEADER_STDC
94 AC_HEADER_DIRENT
95 AC_CHECK_HEADERS(
96 [direct.h] dnl
97 [io.h] dnl
98 [memory.h] dnl
99 [stdbool.h] dnl
100 [stdint.h] dnl
101 [string.h] dnl
102 [strings.h] dnl
103 [stdlib.h] dnl
104 [sys/time.h] dnl
105 [unistd.h] dnl
106 [windows.h] dnl
107 )
108 AC_HEADER_TIME
109 AC_HEADER_STAT
110
111 # ==============================================================
112 # Checks for typedefs, structures, and compiler characteristics.
113 # ==============================================================
114
115 AM_C_PROTOTYPES
116 AC_C_CONST
117 AC_TYPE_UID_T dnl This checks for gid_t too.
118 AC_CHECK_TYPES([ssize_t])
119
120 # =============================
121 # Checks for library functions.
122 # =============================
123
124 AC_CHECK_DECLS([malloc, realloc, calloc, free, memrchr, stpcpy, strcasecmp,
125 strnlen])
126 AC_CHECK_FUNCS([gettimeofday memcpy sleep getegid setgid setegid setregid])
127
128 adl_FUNC_READDIR
129
130 AC_FUNC_VPRINTF
131 AC_FUNC_MKDIR
132
133 AC_REPLACE_FUNCS([memrchr stpcpy strndup strcasecmp])
134 jm_FUNC_MALLOC
135
136 # We used to clear LIBS to work around a bug (?) on
137 # alphaev56-dec-osf4.0d where conftest (run by jm_FUNC_REALLOC) never
138 # exits when linked with `-lgii' or `-lggi'. But today `-lggi' and
139 # `-lgii' are not put in LIBS any longer.
140 jm_FUNC_REALLOC
141
142 # for error.c
143 AC_CHECK_FUNCS([strerror])
144 AC_CHECK_DECLS([strerror])
145 AC_FUNC_STRERROR_R
146
147 jm_FUNC_FTRUNCATE
148 adl_FUNC_GETOPT_LONG
149 adl_FILELOCK
150
151 # ====================
152 # Check for endianess.
153 # ====================
154
155 AC_C_BIGENDIAN_CROSS
156
157 # ===============
158 # Filename style.
159 # ===============
160
161 jm_AC_DOS
162
163 # =====================
164 # Internationalization.
165 # =====================
166
167 ALL_LINGUAS="de fr it nl pt_BR"
168 AM_GNU_GETTEXT(,[need-ngettext])
169
170 # ===================================
171 # Setup the correct compiler options.
172 # ===================================
173
174 adl_ENABLE_DEVEL
175 adl_NDEBUG
176 adl_ENABLE_GPROF
177 adl_ENABLE_DEBUG
178 ad_GCC_OPTIM
179 ad_GCC_WARNINGS
180
181 # ==========================
182 # Directories configuration.
183 # ==========================
184
185 heroes_COMPUTE_PATHS
186
187 # ==============
188 # Misc. options.
189 # ==============
190
191 adl_ENABLE_HTML_DOC
192 heroes_DEBUG
193
194 # ============
195 # Output files
196 # ============
197
198 # Put config.h in the base directory because libintl expects it here,
199 # but keep src/config.h.in in the src/ directory to keep the base directory
200 # as clean as possible.
201 dnl Don't quote the following argument, it is parsed by automake.
202 AM_CONFIG_HEADER(config.h:src/config.h.in)
203
204 AC_CONFIG_FILES([
205 Makefile
206 doc/Makefile
207 intl/Makefile
208 lib/Makefile
209 man/Makefile
210 po/Makefile.in
211 src/Makefile
212 tests/Makefile
213 ])
214 AC_OUTPUT
215
216 eval bindir="$bindir"
217 eval bindir="$bindir"
218 eval datadir="$datadir"
219 eval mandir="$mandir"
220 eval infodir="$infodir"
221 eval htmldir="$htmldir"
222
223 eval vkm_libalt_name='$adl_libalt_'$selection_vkm'_name'
224 eval j_libalt_name='$adl_libalt_'$selection_j'_name'
225 eval s_libalt_name='$adl_libalt_'$selection_s'_name'
226 eval m_libalt_name='$adl_libalt_'$selection_m'_name'
227
228 echo "
229 Heroes configuration
230 --------------------
231 Heroes version : $VERSION
232 host : $host
233
234 binary install path : $bindir
235 data install path : ${datadir}/heroes
236 manual page install path : $mandir
237 info manual install path : $infodir
238 html doc install path : $htmldir
239
240 compiler : $CC
241 general options
242 CFLAGS : $CFLAGS $MORE_WARNINGS_CFLAGS
243 LIBS : $LDFLAGS $LIBS
244
245 display, keyboard, mouse : ${vkm_libalt_name}
246 joystick : ${j_libalt_name}
247 sound : ${s_libalt_name}
248 main : ${m_libalt_name}"