Skip to content

Latest commit

 

History

History
598 lines (497 loc) · 17.4 KB

configure.in

File metadata and controls

598 lines (497 loc) · 17.4 KB
 
May 10, 2002
May 10, 2002
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Process this file with autoconf to produce a configure script.
AC_INIT(physfs.c)
dnl ---------------------------------------------------------------------
dnl System/version info
dnl ---------------------------------------------------------------------
# Making releases:
# MICRO_VERSION += 1;
# INTERFACE_AGE += 1;
# BINARY_AGE += 1;
# if any functions have been added, set INTERFACE_AGE to 0.
# if backwards compatibility has been broken,
# set BINARY_AGE and INTERFACE_AGE to 0.
Jan 8, 2004
Jan 8, 2004
16
MAJOR_VERSION=1
Sep 9, 2005
Sep 9, 2005
17
18
19
20
MINOR_VERSION=0
MICRO_VERSION=1
INTERFACE_AGE=1
BINARY_AGE=1
May 10, 2002
May 10, 2002
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
AC_SUBST(MAJOR_VERSION)
AC_SUBST(MINOR_VERSION)
AC_SUBST(MICRO_VERSION)
AC_SUBST(INTERFACE_AGE)
AC_SUBST(BINARY_AGE)
AC_SUBST(VERSION)
# libtool versioning
LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
LT_REVISION=$INTERFACE_AGE
LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
dnl Detect the canonical host and target build environment
Aug 26, 2003
Aug 26, 2003
42
AC_CANONICAL_SYSTEM
May 10, 2002
May 10, 2002
43
44
45
46
47
48
49
50
51
52
53
dnl Setup for automake
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(physfs, $VERSION)
dnl ---------------------------------------------------------------------
dnl Compilers and other tools
dnl ---------------------------------------------------------------------
AC_PROG_CC
May 24, 2002
May 24, 2002
54
AC_PROG_CXX
May 10, 2002
May 10, 2002
55
56
AC_PROG_INSTALL
AC_PROG_LN_S
Jun 15, 2002
Jun 15, 2002
57
AC_LIBTOOL_WIN32_DLL
Jun 28, 2002
Jun 28, 2002
58
59
LIBTOOL="libtool"
AM_PROG_LIBTOOL
Jun 28, 2002
Jun 28, 2002
60
AC_CHECK_PROG(we_have_sed, sed, yes, no)
May 10, 2002
May 10, 2002
61
62
63
64
65
66
dnl ---------------------------------------------------------------------
dnl Debug mode?
dnl ---------------------------------------------------------------------
AC_ARG_ENABLE(debug,
Dec 1, 2002
Dec 1, 2002
67
[ --enable-debug enable debug mode [default=no]],
Aug 20, 2002
Aug 20, 2002
68
, enable_debug=no)
May 10, 2002
May 10, 2002
69
70
if test x$enable_debug = xyes; then
if test x$ac_cv_prog_cc_g = xyes; then
Mar 23, 2006
Mar 23, 2006
71
PHYSFSCFLAGS="$PHYSFSCFLAGS -g -O0"
May 10, 2002
May 10, 2002
72
else
Mar 23, 2006
Mar 23, 2006
73
PHYSFSCFLAGS="$PHYSFSCFLAGS -O0"
May 10, 2002
May 10, 2002
74
fi
Aug 17, 2002
Aug 17, 2002
75
PHYSFSCFLAGS="$PHYSFSCFLAGS -Werror -Wall"
Jul 11, 2002
Jul 11, 2002
76
77
AC_DEFINE([DEBUG], 1, [define if debug build is enabled])
AC_DEFINE([DEBUG_CHATTER], 1, [define if debug chatter is enabled])
May 10, 2002
May 10, 2002
78
else
Mar 23, 2006
Mar 23, 2006
79
PHYSFSCFLAGS="$PHYSFSCFLAGS -O2"
Jul 11, 2002
Jul 11, 2002
80
AC_DEFINE([NDEBUG], 1, [define if debug build is disabled])
May 10, 2002
May 10, 2002
81
82
83
fi
Mar 23, 2006
Mar 23, 2006
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
dnl ---------------------------------------------------------------------
dnl Have GCC's -fvisibility option?
dnl ---------------------------------------------------------------------
AC_MSG_CHECKING(for GCC -fvisibility=hidden option)
have_gcc_fvisibility=no
visibility_CFLAGS="-fvisibility=hidden"
save_CFLAGS="$CFLAGS"
CFLAGS="$save_CFLAGS $visibility_CFLAGS"
AC_TRY_COMPILE([
int placeholder = 1;
],[
],[
have_gcc_fvisibility=yes
])
AC_MSG_RESULT($have_gcc_fvisibility)
CFLAGS="$save_CFLAGS"
if test x$have_gcc_fvisibility = xyes; then
PHYSFSCFLAGS="$PHYSFSCFLAGS $visibility_CFLAGS"
fi
Aug 20, 2002
Aug 20, 2002
106
107
108
109
110
111
112
113
114
115
116
117
dnl ---------------------------------------------------------------------
dnl Profile sorts, etc?
dnl ---------------------------------------------------------------------
AC_ARG_ENABLE(profiling,
[ --enable-profiling do algorithm profiling [default=no]],
, enable_profiling=no)
if test x$enable_profiling = xyes; then
AC_DEFINE([PHYSFS_PROFILING], 1, [define to profile sorting, etc algorithms])
fi
May 10, 2002
May 10, 2002
118
119
120
121
122
123
dnl ---------------------------------------------------------------------
dnl Build test program?
dnl ---------------------------------------------------------------------
AC_ARG_ENABLE(testprog,
[ --enable-testprog build test program [default=yes]],
Aug 20, 2002
Aug 20, 2002
124
, enable_testprog=yes)
May 10, 2002
May 10, 2002
125
126
127
128
129
130
131
132
133
134
dnl ---------------------------------------------------------------------
dnl Checks for libraries.
dnl ---------------------------------------------------------------------
require_zlib="no"
dnl Check for zip archiver inclusion...
AC_ARG_ENABLE(zip,
[ --enable-zip enable ZIP support [default=yes]],
Aug 20, 2002
Aug 20, 2002
135
, enable_zip=yes)
May 10, 2002
May 10, 2002
136
if test x$enable_zip = xyes; then
Jul 11, 2002
Jul 11, 2002
137
AC_DEFINE([PHYSFS_SUPPORTS_ZIP], 1, [define if zip support is enabled])
May 10, 2002
May 10, 2002
138
139
140
141
require_zlib="yes"
fi
Apr 11, 2006
Apr 11, 2006
142
143
144
145
require_lzma="no"
dnl Check for lzma archiver inclusion...
AC_ARG_ENABLE(lzma,
Apr 11, 2006
Apr 11, 2006
146
[ --enable-lzma enable lzma support [default=yes]],
Apr 11, 2006
Apr 11, 2006
147
148
149
150
151
152
153
, enable_lzma=yes)
if test x$enable_lzma = xyes; then
AC_DEFINE([PHYSFS_SUPPORTS_LZMA], 1, [define if lzma support is enabled])
require_lzma="yes"
fi
Aug 9, 2002
Aug 9, 2002
154
dnl Check for grp archiver inclusion...
May 10, 2002
May 10, 2002
155
156
AC_ARG_ENABLE(grp,
[ --enable-grp enable Build Engine GRP support [default=yes]],
Aug 20, 2002
Aug 20, 2002
157
, enable_grp=yes)
May 10, 2002
May 10, 2002
158
if test x$enable_grp = xyes; then
Jul 11, 2002
Jul 11, 2002
159
AC_DEFINE([PHYSFS_SUPPORTS_GRP], 1, [define if grp support is enabled])
May 10, 2002
May 10, 2002
160
161
fi
Dec 15, 2003
Dec 15, 2003
162
163
164
165
166
167
168
dnl Check for wad archiver inclusion...
AC_ARG_ENABLE(wad,
[ --enable-wad enable Doom WAD support [default=yes]],
, enable_wad=yes)
if test x$enable_wad = xyes; then
AC_DEFINE([PHYSFS_SUPPORTS_WAD], 1, [define if wad support is enabled])
fi
May 10, 2002
May 10, 2002
169
Mar 30, 2003
Mar 30, 2003
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
dnl Check for hog archiver inclusion...
AC_ARG_ENABLE(hog,
[ --enable-hog enable Descent I/II HOG support [default=yes]],
, enable_hog=yes)
if test x$enable_hog = xyes; then
AC_DEFINE([PHYSFS_SUPPORTS_HOG], 1, [define if hog support is enabled])
fi
dnl Check for mvl archiver inclusion...
AC_ARG_ENABLE(mvl,
[ --enable-mvl enable Descent II MVL support [default=yes]],
, enable_mvl=yes)
if test x$enable_mvl = xyes; then
AC_DEFINE([PHYSFS_SUPPORTS_MVL], 1, [define if mvl support is enabled])
fi
Aug 9, 2002
Aug 9, 2002
188
189
190
dnl Check for qpak archiver inclusion...
AC_ARG_ENABLE(qpak,
[ --enable-qpak enable Quake PAK support [default=yes]],
Aug 20, 2002
Aug 20, 2002
191
, enable_qpak=yes)
Aug 9, 2002
Aug 9, 2002
192
193
194
195
if test x$enable_qpak = xyes; then
AC_DEFINE([PHYSFS_SUPPORTS_QPAK], 1, [define if qpak support is enabled])
fi
Apr 9, 2004
Apr 9, 2004
196
197
198
199
200
201
202
203
204
dnl Check for mix archiver inclusion...
AC_ARG_ENABLE(mix,
[ --enable-mix enable Westwood MIX support [default=no]],
, enable_mix=no)
if test x$enable_mix = xyes; then
AC_DEFINE([PHYSFS_SUPPORTS_MIX], 1, [define if mix support is enabled])
fi
Aug 20, 2002
Aug 20, 2002
205
dnl Check if we should statically link the included zlib...
May 10, 2002
May 10, 2002
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
AC_ARG_ENABLE(internal-zlib,
[ --enable-internal-zlib use included zlib [default=only if needed]],
, enable_internal_zlib=maybe)
dnl Check for zlib if needed.
have_external_zlib="no"
if test x$enable_internal_zlib != xyes; then
if test x$require_zlib = xyes; then
AC_CHECK_HEADER(zlib.h, have_zlib_hdr=yes)
AC_CHECK_LIB(z, zlibVersion, have_zlib_lib=yes)
if test x$have_zlib_hdr = xyes -a x$have_zlib_lib = xyes; then
have_external_zlib="yes"
fi
fi
fi
AC_MSG_CHECKING([what zlib to use])
dnl no zlib is needed at all if we aren't supporting ZIP files.
if test x$require_zlib = xno; then
enable_internal_zlib="no"
enable_external_zlib="no"
AC_MSG_RESULT([no zlib needed])
else
if test x$enable_internal_zlib = xmaybe; then
if test x$have_external_zlib = xyes; then
enable_internal_zlib="no"
enable_external_zlib="yes"
else
enable_internal_zlib="yes"
enable_external_zlib="no"
fi
else
if test x$enable_internal_zlib = xno -a x$have_external_zlib = xyes; then
enable_internal_zlib="no"
enable_external_zlib="yes"
fi
fi
if test x$enable_internal_zlib = xyes; then
AC_MSG_RESULT([internal zlib])
Jan 8, 2004
Jan 8, 2004
248
PHYSFSCFLAGS="$PHYSFSCFLAGS -DZ_PREFIX"
May 10, 2002
May 10, 2002
249
250
251
252
253
254
255
256
257
258
259
260
261
262
else
if test x$enable_external_zlib = xyes; then
AC_MSG_RESULT([external zlib])
LIBS="$LIBS -lz"
else
AC_MSG_ERROR([Need zlib, but you disabled our copy and have no system lib])
fi
fi
fi
dnl determine if we should include readline support...
AC_ARG_ENABLE(readline,
[ --enable-readline use GNU readline in test program [default=yes]],
Aug 20, 2002
Aug 20, 2002
263
264
, enable_readline=yes)
May 10, 2002
May 10, 2002
265
266
if test x$enable_readline = xyes; then
AC_CHECK_HEADER(readline/readline.h, have_readline_hdr=yes)
May 16, 2002
May 16, 2002
267
AC_CHECK_LIB(readline, readline, have_readline_lib=yes, , -lcurses)
May 10, 2002
May 10, 2002
268
AC_CHECK_HEADER(readline/history.h, have_history_hdr=yes)
May 16, 2002
May 16, 2002
269
AC_CHECK_LIB(readline, add_history, have_history_lib=yes, , -lcurses)
May 10, 2002
May 10, 2002
270
271
if test x$have_readline_hdr = xyes -a x$have_readline_lib = xyes; then
if test x$have_history_hdr = xyes -a x$have_history_lib = xyes; then
Jul 11, 2002
Jul 11, 2002
272
AC_DEFINE([PHYSFS_HAVE_READLINE], 1, [define if we have readline])
Dec 7, 2003
Dec 7, 2003
273
have_readline="yes"
May 10, 2002
May 10, 2002
274
275
276
277
fi
fi
fi
Jul 25, 2002
Jul 25, 2002
278
279
280
281
282
283
284
285
dnl !!! FIXME: Not sure how to detect this...
dnl check for 64-bit llseek()...
dnl AC_CHECK_LIB(c, llseek, have_llseek=yes)
if test x$have_llseek = xyes; then
AC_DEFINE([PHYSFS_HAVE_LLSEEK], 1, [define if we have llseek])
fi
Jul 25, 2002
Jul 25, 2002
286
287
288
dnl determine if we should use the stubbed pthread code.
AC_ARG_ENABLE(pthreads,
[ --enable-pthreads include POSIX threads support [default=yes]],
Aug 20, 2002
Aug 20, 2002
289
, enable_pthreads=yes)
Jul 25, 2002
Jul 25, 2002
290
291
292
293
294
295
296
if test x$enable_pthreads = xyes; then
AC_CHECK_HEADER(pthread.h, have_pthread_hdr=yes)
if test x$have_pthread_hdr != xyes; then
enable_pthreads=no
fi
fi
Jul 25, 2002
Jul 25, 2002
297
298
299
dnl determine if we should use the stubbed CD-ROM detection code.
AC_ARG_ENABLE(cdrom,
[ --enable-cdrom include CD-ROM support [default=yes]],
Aug 20, 2002
Aug 20, 2002
300
301
, enable_cdrom=yes)
Jul 25, 2002
Jul 25, 2002
302
303
304
305
306
307
308
309
310
311
312
if test x$enable_cdrom = xyes; then
dnl reset this and let header detection reenable...
enable_cdrom=no
dnl BSD systems use sys/ucred.h for getting mounted volumes.
dnl Linux and others use mntent.h.
AC_CHECK_HEADER(sys/ucred.h, have_ucred_hdr=yes)
if test x$have_ucred_hdr = xyes; then
AC_DEFINE([PHYSFS_HAVE_SYS_UCRED_H], 1, [define if we have sys/ucred.h])
enable_cdrom=yes
fi
Jul 25, 2002
Jul 25, 2002
313
Jul 25, 2002
Jul 25, 2002
314
315
316
317
318
AC_CHECK_HEADER(mntent.h, have_mntent_hdr=yes)
if test x$have_mntent_hdr = xyes; then
AC_DEFINE([PHYSFS_HAVE_MNTENT_H], 1, [define if we have mntent.h])
enable_cdrom=yes
fi
Jul 25, 2002
Jul 25, 2002
319
fi
Jul 25, 2002
Jul 25, 2002
320
Jul 28, 2002
Jul 28, 2002
321
322
dnl determine language.
AC_ARG_ENABLE(language,
Jul 30, 2002
Jul 30, 2002
323
[ --enable-language=lang Select natural language. [default=english]],
Aug 20, 2002
Aug 20, 2002
324
physfslang=`echo $enable_language |tr A-Z a-z`, physfslang=english)
Jul 28, 2002
Jul 28, 2002
325
326
327
AC_MSG_CHECKING([if language choice is supported])
physfs_valid_lang=no
Jul 30, 2002
Jul 30, 2002
328
Jul 28, 2002
Jul 28, 2002
329
330
331
332
333
if test x$physfslang = xenglish; then
physfs_valid_lang=yes
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_ENGLISH, [define desired natural language])
fi
Jul 21, 2003
Jul 21, 2003
334
335
336
337
338
if test x$physfslang = xgerman; then
physfs_valid_lang=yes
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_GERMAN, [define desired natural language])
fi
Mar 16, 2005
Mar 16, 2005
339
340
341
342
343
if test x$physfslang = xfrench; then
physfs_valid_lang=yes
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_FRENCH, [define desired natural language])
fi
Sep 23, 2004
Sep 23, 2004
344
345
346
347
348
if test x$physfslang = xspanish; then
physfs_valid_lang=yes
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_SPANISH, [define desired natural language])
fi
Mar 16, 2005
Mar 16, 2005
349
if test x$physfslang = xportuguese-br; then
Jul 30, 2002
Jul 30, 2002
350
physfs_valid_lang=yes
Mar 16, 2005
Mar 16, 2005
351
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_PORTUGUESE_BR, [define desired natural language])
Jul 30, 2002
Jul 30, 2002
352
353
fi
Jul 21, 2003
Jul 21, 2003
354
if test x$physfslang = xrussian-koi8-r; then
Dec 3, 2002
Dec 3, 2002
355
physfs_valid_lang=yes
Jul 21, 2003
Jul 21, 2003
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_RUSSIAN_KOI8_R, [define desired natural language])
fi
if test x$physfslang = xrussian-cp1251; then
physfs_valid_lang=yes
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_RUSSIAN_CP866, [define desired natural language])
fi
if test x$physfslang = xrussian-cp866; then
physfs_valid_lang=yes
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_RUSSIAN_CP866, [define desired natural language])
fi
if test x$physfslang = xrussian-iso-8859-5; then
physfs_valid_lang=yes
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_RUSSIAN_ISO_8859_5, [define desired natural language])
Dec 3, 2002
Dec 3, 2002
372
fi
Jul 30, 2002
Jul 30, 2002
373
Jan 15, 2004
Jan 15, 2004
374
375
376
377
378
if test x$physfslang = xportuguese-br; then
physfs_valid_lang=yes
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_PORTUGUESE_BR, [define desired natural language])
fi
Jul 28, 2002
Jul 28, 2002
379
380
dnl Add other language checks here...
Jul 30, 2002
Jul 30, 2002
381
Jul 28, 2002
Jul 28, 2002
382
383
384
385
386
387
388
389
390
391
AC_MSG_RESULT([$physfs_valid_lang])
if test x$physfs_valid_lang = xno; then
AC_MSG_WARN([***])
AC_MSG_WARN([*** You've asked for "$physfslang" language support...])
AC_MSG_WARN([*** ...but we don't support that.])
AC_MSG_WARN([*** You could choose another language,])
AC_MSG_WARN([*** but is this what you REALLY wanted?])
AC_MSG_WARN([*** Please see the LANG section of physfs_internal.h])
AC_MSG_WARN([*** for info on writing a translation.])
AC_MSG_WARN([***])
Jul 30, 2002
Jul 30, 2002
392
393
AC_MSG_WARN([*** Currently known languages:])
AC_MSG_WARN([*** --enable-language=english])
Sep 23, 2004
Sep 23, 2004
394
AC_MSG_WARN([*** --enable-language=spanish])
May 24, 2003
May 24, 2003
395
396
AC_MSG_WARN([*** --enable-language=german])
AC_MSG_WARN([*** --enable-language=french])
Mar 16, 2005
Mar 16, 2005
397
398
AC_MSG_WARN([*** --enable-language=spanish])
AC_MSG_WARN([*** --enable-language=portuguese-br])
Jul 21, 2003
Jul 21, 2003
399
400
401
402
AC_MSG_WARN([*** --enable-language=russian-koi8-r])
AC_MSG_WARN([*** --enable-language=russian-cp1251])
AC_MSG_WARN([*** --enable-language=russian-cp866])
AC_MSG_WARN([*** --enable-language=russian-iso-8859-5])
Jan 15, 2004
Jan 15, 2004
403
AC_MSG_WARN([*** --enable-language=portuguese-br])
Jul 30, 2002
Jul 30, 2002
404
AC_MSG_WARN([***])
Jul 28, 2002
Jul 28, 2002
405
406
407
AC_MSG_ERROR([*** unsupported language. stop.])
fi
Jul 25, 2002
Jul 25, 2002
408
409
have_non_posix_threads=no
Jun 28, 2002
Jun 28, 2002
410
AC_MSG_CHECKING([if this is BeOS])
Aug 26, 2003
Aug 26, 2003
411
if test x$target_os = xbeos; then
Jun 28, 2002
Jun 28, 2002
412
this_is_beos=yes
Jul 25, 2002
Jul 25, 2002
413
have_non_posix_threads=yes
Jan 8, 2004
Jan 8, 2004
414
415
enable_cdrom=yes
enable_pthreads=no
May 24, 2002
May 24, 2002
416
LIBS="$LIBS -lroot -lbe"
Jun 28, 2002
Jun 28, 2002
417
418
419
420
421
422
else
this_is_beos=no
fi
AC_MSG_RESULT([$this_is_beos])
Jun 29, 2002
Jun 29, 2002
423
AC_MSG_CHECKING([if this is Cygwin])
Aug 26, 2003
Aug 26, 2003
424
if test x$target_os = xcygwin; then
Jun 29, 2002
Jun 29, 2002
425
this_is_cygwin=yes
Aug 17, 2002
Aug 17, 2002
426
PHYSFSCFLAGS="$PHYSFSCFLAGS -DWIN32"
Jan 8, 2004
Jan 8, 2004
427
enable_cdrom=yes
Jul 25, 2002
Jul 25, 2002
428
429
enable_pthreads=no
have_non_posix_threads=yes
Jun 29, 2002
Jun 29, 2002
430
431
432
433
434
else
this_is_cygwin=no
fi
AC_MSG_RESULT([$this_is_cygwin])
Jun 13, 2005
Jun 13, 2005
435
AC_MSG_CHECKING([if this is mingw])
Sep 6, 2005
Sep 6, 2005
436
437
438
if test x$target_os = xmingw32; then
this_is_mingw=yes
fi
Jun 13, 2005
Jun 13, 2005
439
440
if test x$target_os = xmingw32msvc; then
this_is_mingw=yes
Sep 6, 2005
Sep 6, 2005
441
442
fi
if test x$this_is_mingw = xyes; then
Jun 13, 2005
Jun 13, 2005
443
444
445
446
447
448
449
450
451
PHYSFSCFLAGS="$PHYSFSCFLAGS -DWIN32"
enable_cdrom=yes
enable_pthreads=no
have_non_posix_threads=yes
else
this_is_mingw=no
fi
AC_MSG_RESULT([$this_is_mingw])
Jun 28, 2002
Jun 28, 2002
452
453
454
this_is_macosx=no
if test x$we_have_sed = xyes; then
AC_MSG_CHECKING([if this is MacOS X])
Aug 26, 2003
Aug 26, 2003
455
456
x=`echo $target_os |sed "s/darwin.*/darwin/"`
if test x$x = xdarwin -a x$target_vendor = xapple; then
Jun 28, 2002
Jun 28, 2002
457
this_is_macosx=yes
May 24, 2003
May 24, 2003
458
PHYSFSLDFLAGS="$PHYSFSLDFLAGS -Wl,-framework -Wl,Carbon -Wl,-framework -Wl,IOKit"
Jun 28, 2002
Jun 28, 2002
459
460
461
fi
AC_MSG_RESULT([$this_is_macosx])
May 24, 2002
May 24, 2002
462
fi
May 10, 2002
May 10, 2002
463
Jul 17, 2002
Jul 17, 2002
464
465
466
this_is_freebsd=no
if test x$we_have_sed = xyes; then
AC_MSG_CHECKING([if this is FreeBSD])
Aug 26, 2003
Aug 26, 2003
467
x=`echo $target_os |tr A-Z a-z |sed "s/.*freebsd.*/freebsd/"`
Jul 17, 2002
Jul 17, 2002
468
469
if test x$x = xfreebsd; then
this_is_freebsd=yes
Aug 17, 2002
Aug 17, 2002
470
PHYSFSLDFLAGS="$PHYSFSLDFLAGS -pthread"
Jul 17, 2002
Jul 17, 2002
471
472
473
474
475
fi
AC_MSG_RESULT([$this_is_freebsd])
fi
Jul 23, 2002
Jul 23, 2002
476
477
478
this_is_openbsd=no
if test x$we_have_sed = xyes; then
AC_MSG_CHECKING([if this is OpenBSD])
Aug 26, 2003
Aug 26, 2003
479
x=`echo $target_os |tr A-Z a-z |sed "s/.*openbsd.*/openbsd/"`
Jul 23, 2002
Jul 23, 2002
480
481
if test x$x = xopenbsd; then
this_is_openbsd=yes
Aug 17, 2002
Aug 17, 2002
482
PHYSFSLDFLAGS="$PHYSFSLDFLAGS -pthread"
Jul 23, 2002
Jul 23, 2002
483
484
485
486
487
fi
AC_MSG_RESULT([$this_is_openbsd])
fi
Jul 25, 2002
Jul 25, 2002
488
489
490
this_is_atheos=no
if test x$we_have_sed = xyes; then
AC_MSG_CHECKING([if this is AtheOS])
Aug 26, 2003
Aug 26, 2003
491
x=`echo $target_os |tr A-Z a-z |sed "s/.*atheos.*/atheos/"`
Jul 25, 2002
Jul 25, 2002
492
493
494
if test x$x = xatheos; then
this_is_atheos=yes
enable_cdrom=no
Jul 25, 2002
Jul 25, 2002
495
enable_pthreads=no
Jul 25, 2002
Jul 25, 2002
496
497
498
499
500
fi
AC_MSG_RESULT([$this_is_atheos])
fi
Aug 9, 2002
Aug 9, 2002
501
502
503
this_is_os2=no
if test x$we_have_sed = xyes; then
AC_MSG_CHECKING([if this is OS/2])
Aug 26, 2003
Aug 26, 2003
504
x=`echo $target_os |tr A-Z a-z |sed "s/.*os2.*/os2/"`
Aug 9, 2002
Aug 9, 2002
505
506
if test x$x = xos2; then
this_is_os2=yes
Jan 8, 2004
Jan 8, 2004
507
508
509
have_non_posix_threads=yes
enable_cdrom=yes
enable_pthreads=no
Aug 17, 2002
Aug 17, 2002
510
PHYSFSCFLAGS="$PHYSFSCFLAGS -DOS2"
Aug 9, 2002
Aug 9, 2002
511
512
513
514
515
fi
AC_MSG_RESULT([$this_is_os2])
fi
Aug 26, 2003
Aug 26, 2003
516
517
518
519
520
521
522
523
524
525
526
527
this_is_mint=no
if test x$we_have_sed = xyes; then
AC_MSG_CHECKING([if this is MiNT])
x=`echo $target_os |tr A-Z a-z |sed "s/.*mint.*/mint/"`
if test x$x = xmint; then
this_is_mint=yes
enable_cdrom=no
enable_pthreads=no
fi
AC_MSG_RESULT([$this_is_mint])
fi
Aug 9, 2002
Aug 9, 2002
528
529
Jul 25, 2002
Jul 25, 2002
530
531
532
dnl Some platform might disable this, so check this down here...
if test x$enable_cdrom != xyes; then
AC_DEFINE([PHYSFS_NO_CDROM_SUPPORT], 1, [define if we have no CD support])
Jul 25, 2002
Jul 25, 2002
533
534
AC_MSG_WARN([***])
AC_MSG_WARN([*** There is no CD-ROM support in this build!])
Jul 25, 2002
Jul 25, 2002
535
536
537
538
AC_MSG_WARN([*** PhysicsFS will just pretend there are no discs.])
AC_MSG_WARN([*** This may be fine, depending on how PhysicsFS is used,])
AC_MSG_WARN([*** but is this what you REALLY wanted?])
AC_MSG_WARN([*** (Maybe fix configure.in, or write a platform driver?)])
Jul 25, 2002
Jul 25, 2002
539
AC_MSG_WARN([***])
Jul 25, 2002
Jul 25, 2002
540
541
fi
Jul 25, 2002
Jul 25, 2002
542
543
544
545
546
547
548
549
550
551
552
553
554
if test x$enable_pthreads != xyes; then
AC_DEFINE([PHYSFS_NO_PTHREADS_SUPPORT], 1, [define if we have no POSIX threads support])
if test x$have_non_posix_threads != xyes; then
AC_MSG_WARN([***])
AC_MSG_WARN([*** There is no thread support in this build!])
AC_MSG_WARN([*** PhysicsFS will NOT be reentrant!])
AC_MSG_WARN([*** This may be fine, depending on how PhysicsFS is used,])
AC_MSG_WARN([*** but is this what you REALLY wanted?])
AC_MSG_WARN([*** (Maybe fix configure.in, or write a platform driver?)])
AC_MSG_WARN([***])
fi
fi
Jul 25, 2002
Jul 25, 2002
555
May 10, 2002
May 10, 2002
556
557
# Checks for header files.
AC_HEADER_STDC
Nov 22, 2002
Nov 22, 2002
558
AC_CHECK_HEADERS([stdlib.h string.h assert.h])
May 10, 2002
May 10, 2002
559
560
# Checks for typedefs, structures, and compiler characteristics.
Jun 8, 2002
Jun 8, 2002
561
562
dnl AC_C_CONST
dnl AC_TYPE_SIZE_T
May 10, 2002
May 10, 2002
563
564
565
566
567
568
569
570
571
# Checks for library functions.
# This is only in the bleeding edge autoconf distro...
#AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_CHECK_FUNCS([memset strrchr])
Aug 9, 2002
Aug 9, 2002
572
573
AC_CHECK_SIZEOF(int, 4)
Oct 30, 2004
Oct 30, 2004
574
CFLAGS="$PHYSFSCFLAGS $CFLAGS -D_REENTRANT -D_THREAD_SAFE"
Aug 17, 2002
Aug 17, 2002
575
LDFLAGS="$LDFLAGS $PHYSFSLDFLAGS -no-undefined"
Jul 17, 2002
Jul 17, 2002
576
May 10, 2002
May 10, 2002
577
578
dnl Add Makefile conditionals
AM_CONDITIONAL(BUILD_ZLIB, test x$enable_internal_zlib = xyes)
Apr 11, 2006
Apr 11, 2006
579
AM_CONDITIONAL(BUILD_LZMA, test x$enable_lzma = xyes)
May 10, 2002
May 10, 2002
580
AM_CONDITIONAL(BUILD_TEST_PHYSFS, test x$enable_testprog = xyes)
Jun 28, 2002
Jun 28, 2002
581
AM_CONDITIONAL(BUILD_MACOSX, test x$this_is_macosx = xyes)
Jun 28, 2002
Jun 28, 2002
582
AM_CONDITIONAL(BUILD_BEOS, test x$this_is_beos = xyes)
Jun 29, 2002
Jun 29, 2002
583
AM_CONDITIONAL(BUILD_CYGWIN, test x$this_is_cygwin = xyes)
Dec 7, 2003
Dec 7, 2003
584
AM_CONDITIONAL(BUILD_READLINE, test x$have_readline = xyes)
Jun 28, 2002
Jun 28, 2002
585
May 10, 2002
May 10, 2002
586
587
AC_OUTPUT([
Makefile
Jun 28, 2002
Jun 28, 2002
588
589
archivers/Makefile
platform/Makefile
Jul 23, 2005
Jul 23, 2005
590
zlib123/Makefile
Apr 11, 2006
Apr 11, 2006
591
lzma/Makefile
Jun 28, 2002
Jun 28, 2002
592
593
test/Makefile
extras/Makefile
Jul 25, 2002
Jul 25, 2002
594
physfs.spec
May 10, 2002
May 10, 2002
595
])
May 24, 2002
May 24, 2002
596
Jun 28, 2002
Jun 28, 2002
597
dnl end of configure.in ...