author | Ryan C. Gordon <icculus@icculus.org> |
Tue, 20 Aug 2002 01:34:27 +0000 | |
changeset 464 | 21c8e0d1578c |
parent 461 | 3340aee8ba50 |
child 504 | 3420d82f9b01 |
permissions | -rw-r--r-- |
213 | 1 |
# Process this file with autoconf to produce a configure script. |
2 |
AC_INIT(physfs.c) |
|
3 |
||
4 |
dnl --------------------------------------------------------------------- |
|
5 |
dnl System/version info |
|
6 |
dnl --------------------------------------------------------------------- |
|
7 |
||
8 |
# Making releases: |
|
9 |
# MICRO_VERSION += 1; |
|
10 |
# INTERFACE_AGE += 1; |
|
11 |
# BINARY_AGE += 1; |
|
12 |
# if any functions have been added, set INTERFACE_AGE to 0. |
|
13 |
# if backwards compatibility has been broken, |
|
14 |
# set BINARY_AGE and INTERFACE_AGE to 0. |
|
15 |
||
16 |
MAJOR_VERSION=0 |
|
17 |
MINOR_VERSION=1 |
|
323
6da51f38cfd8
Upped version to 0.1.7.
Ryan C. Gordon <icculus@icculus.org>
parents:
310
diff
changeset
|
18 |
MICRO_VERSION=7 |
213 | 19 |
INTERFACE_AGE=0 |
20 |
BINARY_AGE=0 |
|
21 |
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION |
|
22 |
||
23 |
AC_SUBST(MAJOR_VERSION) |
|
24 |
AC_SUBST(MINOR_VERSION) |
|
25 |
AC_SUBST(MICRO_VERSION) |
|
26 |
AC_SUBST(INTERFACE_AGE) |
|
27 |
AC_SUBST(BINARY_AGE) |
|
28 |
AC_SUBST(VERSION) |
|
29 |
||
30 |
# libtool versioning |
|
31 |
LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION |
|
32 |
LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE` |
|
33 |
LT_REVISION=$INTERFACE_AGE |
|
34 |
LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE` |
|
35 |
||
36 |
AC_SUBST(LT_RELEASE) |
|
37 |
AC_SUBST(LT_CURRENT) |
|
38 |
AC_SUBST(LT_REVISION) |
|
39 |
AC_SUBST(LT_AGE) |
|
40 |
||
41 |
dnl Detect the canonical host and target build environment |
|
296
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
42 |
AC_CANONICAL_BUILD |
213 | 43 |
AC_CANONICAL_HOST |
44 |
AC_CANONICAL_TARGET |
|
45 |
||
46 |
dnl Setup for automake |
|
47 |
AM_CONFIG_HEADER(config.h) |
|
48 |
AM_INIT_AUTOMAKE(physfs, $VERSION) |
|
49 |
||
50 |
||
51 |
dnl --------------------------------------------------------------------- |
|
52 |
dnl Compilers and other tools |
|
53 |
dnl --------------------------------------------------------------------- |
|
54 |
||
55 |
AC_PROG_CC |
|
234 | 56 |
AC_PROG_CXX |
213 | 57 |
AC_PROG_INSTALL |
58 |
AC_PROG_LN_S |
|
289
a0bca1a03a54
Can now build shared libraries under BeOS, and probably Cygwin, too.
Ryan C. Gordon <icculus@icculus.org>
parents:
285
diff
changeset
|
59 |
AC_LIBTOOL_WIN32_DLL |
302
b6fe2b615045
Build dance continues.
Ryan C. Gordon <icculus@icculus.org>
parents:
296
diff
changeset
|
60 |
LIBTOOL="libtool" |
b6fe2b615045
Build dance continues.
Ryan C. Gordon <icculus@icculus.org>
parents:
296
diff
changeset
|
61 |
AM_PROG_LIBTOOL |
296
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
62 |
AC_CHECK_PROG(we_have_sed, sed, yes, no) |
213 | 63 |
|
64 |
dnl --------------------------------------------------------------------- |
|
65 |
dnl Debug mode? |
|
66 |
dnl --------------------------------------------------------------------- |
|
67 |
||
68 |
AC_ARG_ENABLE(debug, |
|
216
d297da72cd4e
--enable-debug is default.
Ryan C. Gordon <icculus@icculus.org>
parents:
214
diff
changeset
|
69 |
[ --enable-debug enable debug mode [default=yes]], |
461
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
70 |
, enable_debug=no) |
213 | 71 |
if test x$enable_debug = xyes; then |
72 |
if test x$ac_cv_prog_cc_g = xyes; then |
|
459
5fa02060a63f
Hopefully fix broken autoconfs.
Ryan C. Gordon <icculus@icculus.org>
parents:
454
diff
changeset
|
73 |
PHYSFSCFLAGS="-g -O0" |
213 | 74 |
else |
459
5fa02060a63f
Hopefully fix broken autoconfs.
Ryan C. Gordon <icculus@icculus.org>
parents:
454
diff
changeset
|
75 |
PHYSFSCFLAGS="-O0" |
213 | 76 |
fi |
459
5fa02060a63f
Hopefully fix broken autoconfs.
Ryan C. Gordon <icculus@icculus.org>
parents:
454
diff
changeset
|
77 |
PHYSFSCFLAGS="$PHYSFSCFLAGS -Werror -Wall" |
331
822f78a88aba
Now makes newer autoconfs happier.
Ryan C. Gordon <icculus@icculus.org>
parents:
323
diff
changeset
|
78 |
AC_DEFINE([DEBUG], 1, [define if debug build is enabled]) |
822f78a88aba
Now makes newer autoconfs happier.
Ryan C. Gordon <icculus@icculus.org>
parents:
323
diff
changeset
|
79 |
AC_DEFINE([DEBUG_CHATTER], 1, [define if debug chatter is enabled]) |
213 | 80 |
else |
459
5fa02060a63f
Hopefully fix broken autoconfs.
Ryan C. Gordon <icculus@icculus.org>
parents:
454
diff
changeset
|
81 |
PHYSFSCFLAGS="-O2" |
331
822f78a88aba
Now makes newer autoconfs happier.
Ryan C. Gordon <icculus@icculus.org>
parents:
323
diff
changeset
|
82 |
AC_DEFINE([NDEBUG], 1, [define if debug build is disabled]) |
213 | 83 |
fi |
84 |
||
85 |
||
86 |
dnl --------------------------------------------------------------------- |
|
461
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
87 |
dnl Profile sorts, etc? |
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
88 |
dnl --------------------------------------------------------------------- |
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
89 |
|
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
90 |
AC_ARG_ENABLE(profiling, |
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
91 |
[ --enable-profiling do algorithm profiling [default=no]], |
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
92 |
, enable_profiling=no) |
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
93 |
if test x$enable_profiling = xyes; then |
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
94 |
AC_DEFINE([PHYSFS_PROFILING], 1, [define to profile sorting, etc algorithms]) |
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
95 |
fi |
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
96 |
|
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
97 |
|
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
98 |
dnl --------------------------------------------------------------------- |
213 | 99 |
dnl Build test program? |
100 |
dnl --------------------------------------------------------------------- |
|
101 |
||
102 |
AC_ARG_ENABLE(testprog, |
|
103 |
[ --enable-testprog build test program [default=yes]], |
|
461
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
104 |
, enable_testprog=yes) |
213 | 105 |
|
106 |
dnl --------------------------------------------------------------------- |
|
107 |
dnl Checks for libraries. |
|
108 |
dnl --------------------------------------------------------------------- |
|
109 |
||
110 |
require_zlib="no" |
|
111 |
||
112 |
dnl Check for zip archiver inclusion... |
|
113 |
AC_ARG_ENABLE(zip, |
|
114 |
[ --enable-zip enable ZIP support [default=yes]], |
|
461
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
115 |
, enable_zip=yes) |
213 | 116 |
if test x$enable_zip = xyes; then |
331
822f78a88aba
Now makes newer autoconfs happier.
Ryan C. Gordon <icculus@icculus.org>
parents:
323
diff
changeset
|
117 |
AC_DEFINE([PHYSFS_SUPPORTS_ZIP], 1, [define if zip support is enabled]) |
213 | 118 |
require_zlib="yes" |
119 |
fi |
|
120 |
||
121 |
||
453
108de3bb1b6b
Added qpak.c to build systems.
Ryan C. Gordon <icculus@icculus.org>
parents:
444
diff
changeset
|
122 |
dnl Check for grp archiver inclusion... |
213 | 123 |
AC_ARG_ENABLE(grp, |
124 |
[ --enable-grp enable Build Engine GRP support [default=yes]], |
|
461
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
125 |
, enable_grp=yes) |
213 | 126 |
if test x$enable_grp = xyes; then |
331
822f78a88aba
Now makes newer autoconfs happier.
Ryan C. Gordon <icculus@icculus.org>
parents:
323
diff
changeset
|
127 |
AC_DEFINE([PHYSFS_SUPPORTS_GRP], 1, [define if grp support is enabled]) |
213 | 128 |
fi |
129 |
||
130 |
||
453
108de3bb1b6b
Added qpak.c to build systems.
Ryan C. Gordon <icculus@icculus.org>
parents:
444
diff
changeset
|
131 |
dnl Check for qpak archiver inclusion... |
108de3bb1b6b
Added qpak.c to build systems.
Ryan C. Gordon <icculus@icculus.org>
parents:
444
diff
changeset
|
132 |
AC_ARG_ENABLE(qpak, |
108de3bb1b6b
Added qpak.c to build systems.
Ryan C. Gordon <icculus@icculus.org>
parents:
444
diff
changeset
|
133 |
[ --enable-qpak enable Quake PAK support [default=yes]], |
461
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
134 |
, enable_qpak=yes) |
453
108de3bb1b6b
Added qpak.c to build systems.
Ryan C. Gordon <icculus@icculus.org>
parents:
444
diff
changeset
|
135 |
if test x$enable_qpak = xyes; then |
108de3bb1b6b
Added qpak.c to build systems.
Ryan C. Gordon <icculus@icculus.org>
parents:
444
diff
changeset
|
136 |
AC_DEFINE([PHYSFS_SUPPORTS_QPAK], 1, [define if qpak support is enabled]) |
108de3bb1b6b
Added qpak.c to build systems.
Ryan C. Gordon <icculus@icculus.org>
parents:
444
diff
changeset
|
137 |
fi |
108de3bb1b6b
Added qpak.c to build systems.
Ryan C. Gordon <icculus@icculus.org>
parents:
444
diff
changeset
|
138 |
|
461
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
139 |
dnl Check if we should statically link the included zlib... |
213 | 140 |
AC_ARG_ENABLE(internal-zlib, |
141 |
[ --enable-internal-zlib use included zlib [default=only if needed]], |
|
142 |
, enable_internal_zlib=maybe) |
|
143 |
||
144 |
dnl Check for zlib if needed. |
|
145 |
have_external_zlib="no" |
|
146 |
if test x$enable_internal_zlib != xyes; then |
|
147 |
if test x$require_zlib = xyes; then |
|
148 |
AC_CHECK_HEADER(zlib.h, have_zlib_hdr=yes) |
|
149 |
AC_CHECK_LIB(z, zlibVersion, have_zlib_lib=yes) |
|
150 |
if test x$have_zlib_hdr = xyes -a x$have_zlib_lib = xyes; then |
|
151 |
have_external_zlib="yes" |
|
152 |
fi |
|
153 |
fi |
|
154 |
fi |
|
155 |
||
156 |
AC_MSG_CHECKING([what zlib to use]) |
|
157 |
||
158 |
dnl no zlib is needed at all if we aren't supporting ZIP files. |
|
159 |
if test x$require_zlib = xno; then |
|
160 |
enable_internal_zlib="no" |
|
161 |
enable_external_zlib="no" |
|
162 |
AC_MSG_RESULT([no zlib needed]) |
|
163 |
else |
|
164 |
||
165 |
if test x$enable_internal_zlib = xmaybe; then |
|
166 |
if test x$have_external_zlib = xyes; then |
|
167 |
enable_internal_zlib="no" |
|
168 |
enable_external_zlib="yes" |
|
169 |
else |
|
170 |
enable_internal_zlib="yes" |
|
171 |
enable_external_zlib="no" |
|
172 |
fi |
|
173 |
else |
|
174 |
if test x$enable_internal_zlib = xno -a x$have_external_zlib = xyes; then |
|
175 |
enable_internal_zlib="no" |
|
176 |
enable_external_zlib="yes" |
|
177 |
fi |
|
178 |
fi |
|
179 |
||
180 |
if test x$enable_internal_zlib = xyes; then |
|
181 |
AC_MSG_RESULT([internal zlib]) |
|
182 |
else |
|
183 |
if test x$enable_external_zlib = xyes; then |
|
184 |
AC_MSG_RESULT([external zlib]) |
|
185 |
LIBS="$LIBS -lz" |
|
186 |
else |
|
187 |
AC_MSG_ERROR([Need zlib, but you disabled our copy and have no system lib]) |
|
188 |
fi |
|
189 |
fi |
|
190 |
fi |
|
191 |
||
192 |
||
193 |
dnl determine if we should include readline support... |
|
194 |
AC_ARG_ENABLE(readline, |
|
195 |
[ --enable-readline use GNU readline in test program [default=yes]], |
|
461
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
196 |
, enable_readline=yes) |
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
197 |
|
213 | 198 |
if test x$enable_readline = xyes; then |
199 |
AC_CHECK_HEADER(readline/readline.h, have_readline_hdr=yes) |
|
218
9415dcace296
readline detection fixes by Edward Rudd.
Ryan C. Gordon <icculus@icculus.org>
parents:
216
diff
changeset
|
200 |
AC_CHECK_LIB(readline, readline, have_readline_lib=yes, , -lcurses) |
213 | 201 |
AC_CHECK_HEADER(readline/history.h, have_history_hdr=yes) |
218
9415dcace296
readline detection fixes by Edward Rudd.
Ryan C. Gordon <icculus@icculus.org>
parents:
216
diff
changeset
|
202 |
AC_CHECK_LIB(readline, add_history, have_history_lib=yes, , -lcurses) |
213 | 203 |
if test x$have_readline_hdr = xyes -a x$have_readline_lib = xyes; then |
204 |
if test x$have_history_hdr = xyes -a x$have_history_lib = xyes; then |
|
331
822f78a88aba
Now makes newer autoconfs happier.
Ryan C. Gordon <icculus@icculus.org>
parents:
323
diff
changeset
|
205 |
AC_DEFINE([PHYSFS_HAVE_READLINE], 1, [define if we have readline]) |
218
9415dcace296
readline detection fixes by Edward Rudd.
Ryan C. Gordon <icculus@icculus.org>
parents:
216
diff
changeset
|
206 |
LIBS="$LIBS -lreadline -lcurses" |
213 | 207 |
fi |
208 |
fi |
|
209 |
fi |
|
210 |
||
382
7c63d65fd179
Made CD-ROM stuff a bit more automatic.
Ryan C. Gordon <icculus@icculus.org>
parents:
381
diff
changeset
|
211 |
dnl !!! FIXME: Not sure how to detect this... |
7c63d65fd179
Made CD-ROM stuff a bit more automatic.
Ryan C. Gordon <icculus@icculus.org>
parents:
381
diff
changeset
|
212 |
dnl check for 64-bit llseek()... |
7c63d65fd179
Made CD-ROM stuff a bit more automatic.
Ryan C. Gordon <icculus@icculus.org>
parents:
381
diff
changeset
|
213 |
dnl AC_CHECK_LIB(c, llseek, have_llseek=yes) |
7c63d65fd179
Made CD-ROM stuff a bit more automatic.
Ryan C. Gordon <icculus@icculus.org>
parents:
381
diff
changeset
|
214 |
if test x$have_llseek = xyes; then |
7c63d65fd179
Made CD-ROM stuff a bit more automatic.
Ryan C. Gordon <icculus@icculus.org>
parents:
381
diff
changeset
|
215 |
AC_DEFINE([PHYSFS_HAVE_LLSEEK], 1, [define if we have llseek]) |
7c63d65fd179
Made CD-ROM stuff a bit more automatic.
Ryan C. Gordon <icculus@icculus.org>
parents:
381
diff
changeset
|
216 |
fi |
7c63d65fd179
Made CD-ROM stuff a bit more automatic.
Ryan C. Gordon <icculus@icculus.org>
parents:
381
diff
changeset
|
217 |
|
384
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
218 |
|
390
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
219 |
dnl determine if we should use the stubbed pthread code. |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
220 |
AC_ARG_ENABLE(pthreads, |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
221 |
[ --enable-pthreads include POSIX threads support [default=yes]], |
461
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
222 |
, enable_pthreads=yes) |
390
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
223 |
if test x$enable_pthreads = xyes; then |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
224 |
AC_CHECK_HEADER(pthread.h, have_pthread_hdr=yes) |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
225 |
if test x$have_pthread_hdr != xyes; then |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
226 |
enable_pthreads=no |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
227 |
fi |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
228 |
fi |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
229 |
|
381
b65d27fdc8a9
Can now disable CD-ROM code on Unix systems at build time if need be. The
Ryan C. Gordon <icculus@icculus.org>
parents:
378
diff
changeset
|
230 |
dnl determine if we should use the stubbed CD-ROM detection code. |
384
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
231 |
AC_ARG_ENABLE(cdrom, |
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
232 |
[ --enable-cdrom include CD-ROM support [default=yes]], |
461
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
233 |
, enable_cdrom=yes) |
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
234 |
|
384
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
235 |
if test x$enable_cdrom = xyes; then |
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
236 |
dnl reset this and let header detection reenable... |
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
237 |
enable_cdrom=no |
382
7c63d65fd179
Made CD-ROM stuff a bit more automatic.
Ryan C. Gordon <icculus@icculus.org>
parents:
381
diff
changeset
|
238 |
|
384
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
239 |
dnl BSD systems use sys/ucred.h for getting mounted volumes. |
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
240 |
dnl Linux and others use mntent.h. |
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
241 |
AC_CHECK_HEADER(sys/ucred.h, have_ucred_hdr=yes) |
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
242 |
if test x$have_ucred_hdr = xyes; then |
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
243 |
AC_DEFINE([PHYSFS_HAVE_SYS_UCRED_H], 1, [define if we have sys/ucred.h]) |
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
244 |
enable_cdrom=yes |
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
245 |
fi |
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
246 |
|
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
247 |
AC_CHECK_HEADER(mntent.h, have_mntent_hdr=yes) |
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
248 |
if test x$have_mntent_hdr = xyes; then |
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
249 |
AC_DEFINE([PHYSFS_HAVE_MNTENT_H], 1, [define if we have mntent.h]) |
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
250 |
enable_cdrom=yes |
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
251 |
fi |
382
7c63d65fd179
Made CD-ROM stuff a bit more automatic.
Ryan C. Gordon <icculus@icculus.org>
parents:
381
diff
changeset
|
252 |
fi |
7c63d65fd179
Made CD-ROM stuff a bit more automatic.
Ryan C. Gordon <icculus@icculus.org>
parents:
381
diff
changeset
|
253 |
|
427
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
254 |
dnl determine language. |
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
255 |
AC_ARG_ENABLE(language, |
435
c4daca3b09b9
Spanish translation added by Pedro J. P�rez.
Ryan C. Gordon <icculus@icculus.org>
parents:
434
diff
changeset
|
256 |
[ --enable-language=lang Select natural language. [default=english]], |
461
3340aee8ba50
Corrected some wrong behaviour, added profiling option.
Ryan C. Gordon <icculus@icculus.org>
parents:
459
diff
changeset
|
257 |
physfslang=`echo $enable_language |tr A-Z a-z`, physfslang=english) |
427
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
258 |
|
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
259 |
AC_MSG_CHECKING([if language choice is supported]) |
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
260 |
physfs_valid_lang=no |
435
c4daca3b09b9
Spanish translation added by Pedro J. P�rez.
Ryan C. Gordon <icculus@icculus.org>
parents:
434
diff
changeset
|
261 |
|
427
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
262 |
if test x$physfslang = xenglish; then |
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
263 |
physfs_valid_lang=yes |
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
264 |
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_ENGLISH, [define desired natural language]) |
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
265 |
fi |
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
266 |
|
434
19a16ec64f82
Changed russian to russian-koi8-r.
Ryan C. Gordon <icculus@icculus.org>
parents:
431
diff
changeset
|
267 |
if test x$physfslang = xrussian-koi8-r; then |
431
a1cb2bf24ce5
Added Russian translation by Ed Sinjiashvili.
Ryan C. Gordon <icculus@icculus.org>
parents:
427
diff
changeset
|
268 |
physfs_valid_lang=yes |
434
19a16ec64f82
Changed russian to russian-koi8-r.
Ryan C. Gordon <icculus@icculus.org>
parents:
431
diff
changeset
|
269 |
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_RUSSIAN_KOI8_R, [define desired natural language]) |
431
a1cb2bf24ce5
Added Russian translation by Ed Sinjiashvili.
Ryan C. Gordon <icculus@icculus.org>
parents:
427
diff
changeset
|
270 |
fi |
a1cb2bf24ce5
Added Russian translation by Ed Sinjiashvili.
Ryan C. Gordon <icculus@icculus.org>
parents:
427
diff
changeset
|
271 |
|
444
06f6a31057a0
More Russian codepages.
Ryan C. Gordon <icculus@icculus.org>
parents:
441
diff
changeset
|
272 |
if test x$physfslang = xrussian-cp1251; then |
06f6a31057a0
More Russian codepages.
Ryan C. Gordon <icculus@icculus.org>
parents:
441
diff
changeset
|
273 |
physfs_valid_lang=yes |
06f6a31057a0
More Russian codepages.
Ryan C. Gordon <icculus@icculus.org>
parents:
441
diff
changeset
|
274 |
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_RUSSIAN_CP866, [define desired natural language]) |
06f6a31057a0
More Russian codepages.
Ryan C. Gordon <icculus@icculus.org>
parents:
441
diff
changeset
|
275 |
fi |
06f6a31057a0
More Russian codepages.
Ryan C. Gordon <icculus@icculus.org>
parents:
441
diff
changeset
|
276 |
|
06f6a31057a0
More Russian codepages.
Ryan C. Gordon <icculus@icculus.org>
parents:
441
diff
changeset
|
277 |
if test x$physfslang = xrussian-cp866; then |
06f6a31057a0
More Russian codepages.
Ryan C. Gordon <icculus@icculus.org>
parents:
441
diff
changeset
|
278 |
physfs_valid_lang=yes |
06f6a31057a0
More Russian codepages.
Ryan C. Gordon <icculus@icculus.org>
parents:
441
diff
changeset
|
279 |
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_RUSSIAN_CP866, [define desired natural language]) |
06f6a31057a0
More Russian codepages.
Ryan C. Gordon <icculus@icculus.org>
parents:
441
diff
changeset
|
280 |
fi |
06f6a31057a0
More Russian codepages.
Ryan C. Gordon <icculus@icculus.org>
parents:
441
diff
changeset
|
281 |
|
06f6a31057a0
More Russian codepages.
Ryan C. Gordon <icculus@icculus.org>
parents:
441
diff
changeset
|
282 |
if test x$physfslang = xrussian-iso-8859-5; then |
06f6a31057a0
More Russian codepages.
Ryan C. Gordon <icculus@icculus.org>
parents:
441
diff
changeset
|
283 |
physfs_valid_lang=yes |
06f6a31057a0
More Russian codepages.
Ryan C. Gordon <icculus@icculus.org>
parents:
441
diff
changeset
|
284 |
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_RUSSIAN_ISO_8859_5, [define desired natural language]) |
06f6a31057a0
More Russian codepages.
Ryan C. Gordon <icculus@icculus.org>
parents:
441
diff
changeset
|
285 |
fi |
06f6a31057a0
More Russian codepages.
Ryan C. Gordon <icculus@icculus.org>
parents:
441
diff
changeset
|
286 |
|
435
c4daca3b09b9
Spanish translation added by Pedro J. P�rez.
Ryan C. Gordon <icculus@icculus.org>
parents:
434
diff
changeset
|
287 |
if test x$physfslang = xspanish; then |
c4daca3b09b9
Spanish translation added by Pedro J. P�rez.
Ryan C. Gordon <icculus@icculus.org>
parents:
434
diff
changeset
|
288 |
physfs_valid_lang=yes |
c4daca3b09b9
Spanish translation added by Pedro J. P�rez.
Ryan C. Gordon <icculus@icculus.org>
parents:
434
diff
changeset
|
289 |
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_SPANISH, [define desired natural language]) |
c4daca3b09b9
Spanish translation added by Pedro J. P�rez.
Ryan C. Gordon <icculus@icculus.org>
parents:
434
diff
changeset
|
290 |
fi |
c4daca3b09b9
Spanish translation added by Pedro J. P�rez.
Ryan C. Gordon <icculus@icculus.org>
parents:
434
diff
changeset
|
291 |
|
441
12831102c972
French support in build system.
Ryan C. Gordon <icculus@icculus.org>
parents:
435
diff
changeset
|
292 |
if test x$physfslang = xfrench; then |
12831102c972
French support in build system.
Ryan C. Gordon <icculus@icculus.org>
parents:
435
diff
changeset
|
293 |
physfs_valid_lang=yes |
12831102c972
French support in build system.
Ryan C. Gordon <icculus@icculus.org>
parents:
435
diff
changeset
|
294 |
AC_DEFINE([PHYSFS_LANG], PHYSFS_LANG_FRENCH, [define desired natural language]) |
12831102c972
French support in build system.
Ryan C. Gordon <icculus@icculus.org>
parents:
435
diff
changeset
|
295 |
fi |
12831102c972
French support in build system.
Ryan C. Gordon <icculus@icculus.org>
parents:
435
diff
changeset
|
296 |
|
435
c4daca3b09b9
Spanish translation added by Pedro J. P�rez.
Ryan C. Gordon <icculus@icculus.org>
parents:
434
diff
changeset
|
297 |
|
427
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
298 |
dnl Add other language checks here... |
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
299 |
|
435
c4daca3b09b9
Spanish translation added by Pedro J. P�rez.
Ryan C. Gordon <icculus@icculus.org>
parents:
434
diff
changeset
|
300 |
|
427
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
301 |
AC_MSG_RESULT([$physfs_valid_lang]) |
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
302 |
if test x$physfs_valid_lang = xno; then |
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
303 |
AC_MSG_WARN([***]) |
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
304 |
AC_MSG_WARN([*** You've asked for "$physfslang" language support...]) |
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
305 |
AC_MSG_WARN([*** ...but we don't support that.]) |
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
306 |
AC_MSG_WARN([*** You could choose another language,]) |
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
307 |
AC_MSG_WARN([*** but is this what you REALLY wanted?]) |
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
308 |
AC_MSG_WARN([*** Please see the LANG section of physfs_internal.h]) |
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
309 |
AC_MSG_WARN([*** for info on writing a translation.]) |
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
310 |
AC_MSG_WARN([***]) |
435
c4daca3b09b9
Spanish translation added by Pedro J. P�rez.
Ryan C. Gordon <icculus@icculus.org>
parents:
434
diff
changeset
|
311 |
AC_MSG_WARN([*** Currently known languages:]) |
c4daca3b09b9
Spanish translation added by Pedro J. P�rez.
Ryan C. Gordon <icculus@icculus.org>
parents:
434
diff
changeset
|
312 |
AC_MSG_WARN([*** --enable-language=english]) |
c4daca3b09b9
Spanish translation added by Pedro J. P�rez.
Ryan C. Gordon <icculus@icculus.org>
parents:
434
diff
changeset
|
313 |
AC_MSG_WARN([*** --enable-language=spanish]) |
c4daca3b09b9
Spanish translation added by Pedro J. P�rez.
Ryan C. Gordon <icculus@icculus.org>
parents:
434
diff
changeset
|
314 |
AC_MSG_WARN([*** --enable-language=russian-koi8-r]) |
444
06f6a31057a0
More Russian codepages.
Ryan C. Gordon <icculus@icculus.org>
parents:
441
diff
changeset
|
315 |
AC_MSG_WARN([*** --enable-language=russian-cp1251]) |
06f6a31057a0
More Russian codepages.
Ryan C. Gordon <icculus@icculus.org>
parents:
441
diff
changeset
|
316 |
AC_MSG_WARN([*** --enable-language=russian-cp866]) |
06f6a31057a0
More Russian codepages.
Ryan C. Gordon <icculus@icculus.org>
parents:
441
diff
changeset
|
317 |
AC_MSG_WARN([*** --enable-language=russian-iso-8859-5]) |
441
12831102c972
French support in build system.
Ryan C. Gordon <icculus@icculus.org>
parents:
435
diff
changeset
|
318 |
AC_MSG_WARN([*** --enable-language=french]) |
435
c4daca3b09b9
Spanish translation added by Pedro J. P�rez.
Ryan C. Gordon <icculus@icculus.org>
parents:
434
diff
changeset
|
319 |
AC_MSG_WARN([***]) |
427
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
320 |
AC_MSG_ERROR([*** unsupported language. stop.]) |
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
321 |
fi |
c38ace41039f
Natural language #defines and build system support.
Ryan C. Gordon <icculus@icculus.org>
parents:
390
diff
changeset
|
322 |
|
390
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
323 |
have_non_posix_threads=no |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
324 |
|
296
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
325 |
AC_MSG_CHECKING([if this is BeOS]) |
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
326 |
if test x$build_os = xbeos; then |
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
327 |
this_is_beos=yes |
390
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
328 |
enable_pthreads=no |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
329 |
have_non_posix_threads=yes |
234 | 330 |
LIBS="$LIBS -lroot -lbe" |
296
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
331 |
else |
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
332 |
this_is_beos=no |
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
333 |
fi |
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
334 |
|
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
335 |
AC_MSG_RESULT([$this_is_beos]) |
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
336 |
|
310
f8bca4a93fd5
Patched to compile on Cygwin.
Ryan C. Gordon <icculus@icculus.org>
parents:
307
diff
changeset
|
337 |
AC_MSG_CHECKING([if this is Cygwin]) |
f8bca4a93fd5
Patched to compile on Cygwin.
Ryan C. Gordon <icculus@icculus.org>
parents:
307
diff
changeset
|
338 |
if test x$build_os = xcygwin; then |
f8bca4a93fd5
Patched to compile on Cygwin.
Ryan C. Gordon <icculus@icculus.org>
parents:
307
diff
changeset
|
339 |
this_is_cygwin=yes |
459
5fa02060a63f
Hopefully fix broken autoconfs.
Ryan C. Gordon <icculus@icculus.org>
parents:
454
diff
changeset
|
340 |
PHYSFSCFLAGS="$PHYSFSCFLAGS -DWIN32" |
390
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
341 |
enable_pthreads=no |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
342 |
have_non_posix_threads=yes |
310
f8bca4a93fd5
Patched to compile on Cygwin.
Ryan C. Gordon <icculus@icculus.org>
parents:
307
diff
changeset
|
343 |
else |
f8bca4a93fd5
Patched to compile on Cygwin.
Ryan C. Gordon <icculus@icculus.org>
parents:
307
diff
changeset
|
344 |
this_is_cygwin=no |
f8bca4a93fd5
Patched to compile on Cygwin.
Ryan C. Gordon <icculus@icculus.org>
parents:
307
diff
changeset
|
345 |
fi |
f8bca4a93fd5
Patched to compile on Cygwin.
Ryan C. Gordon <icculus@icculus.org>
parents:
307
diff
changeset
|
346 |
|
f8bca4a93fd5
Patched to compile on Cygwin.
Ryan C. Gordon <icculus@icculus.org>
parents:
307
diff
changeset
|
347 |
AC_MSG_RESULT([$this_is_cygwin]) |
f8bca4a93fd5
Patched to compile on Cygwin.
Ryan C. Gordon <icculus@icculus.org>
parents:
307
diff
changeset
|
348 |
|
296
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
349 |
this_is_macosx=no |
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
350 |
if test x$we_have_sed = xyes; then |
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
351 |
AC_MSG_CHECKING([if this is MacOS X]) |
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
352 |
x=`echo $build_os |sed "s/darwin.*/darwin/"` |
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
353 |
if test x$x = xdarwin -a x$build_vendor = xapple; then |
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
354 |
this_is_macosx=yes |
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
355 |
fi |
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
356 |
|
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
357 |
AC_MSG_RESULT([$this_is_macosx]) |
234 | 358 |
fi |
213 | 359 |
|
347
56ce50a62241
FreeBSD patches; appears to be fully functional now.
Ryan C. Gordon <icculus@icculus.org>
parents:
331
diff
changeset
|
360 |
this_is_freebsd=no |
56ce50a62241
FreeBSD patches; appears to be fully functional now.
Ryan C. Gordon <icculus@icculus.org>
parents:
331
diff
changeset
|
361 |
if test x$we_have_sed = xyes; then |
56ce50a62241
FreeBSD patches; appears to be fully functional now.
Ryan C. Gordon <icculus@icculus.org>
parents:
331
diff
changeset
|
362 |
AC_MSG_CHECKING([if this is FreeBSD]) |
56ce50a62241
FreeBSD patches; appears to be fully functional now.
Ryan C. Gordon <icculus@icculus.org>
parents:
331
diff
changeset
|
363 |
x=`echo $build_os |tr A-Z a-z |sed "s/.*freebsd.*/freebsd/"` |
56ce50a62241
FreeBSD patches; appears to be fully functional now.
Ryan C. Gordon <icculus@icculus.org>
parents:
331
diff
changeset
|
364 |
if test x$x = xfreebsd; then |
56ce50a62241
FreeBSD patches; appears to be fully functional now.
Ryan C. Gordon <icculus@icculus.org>
parents:
331
diff
changeset
|
365 |
this_is_freebsd=yes |
459
5fa02060a63f
Hopefully fix broken autoconfs.
Ryan C. Gordon <icculus@icculus.org>
parents:
454
diff
changeset
|
366 |
PHYSFSLDFLAGS="$PHYSFSLDFLAGS -pthread" |
347
56ce50a62241
FreeBSD patches; appears to be fully functional now.
Ryan C. Gordon <icculus@icculus.org>
parents:
331
diff
changeset
|
367 |
fi |
56ce50a62241
FreeBSD patches; appears to be fully functional now.
Ryan C. Gordon <icculus@icculus.org>
parents:
331
diff
changeset
|
368 |
|
56ce50a62241
FreeBSD patches; appears to be fully functional now.
Ryan C. Gordon <icculus@icculus.org>
parents:
331
diff
changeset
|
369 |
AC_MSG_RESULT([$this_is_freebsd]) |
56ce50a62241
FreeBSD patches; appears to be fully functional now.
Ryan C. Gordon <icculus@icculus.org>
parents:
331
diff
changeset
|
370 |
fi |
56ce50a62241
FreeBSD patches; appears to be fully functional now.
Ryan C. Gordon <icculus@icculus.org>
parents:
331
diff
changeset
|
371 |
|
378
41cda991e23a
Added build system support for OpenBSD.
Ryan C. Gordon <icculus@icculus.org>
parents:
353
diff
changeset
|
372 |
this_is_openbsd=no |
41cda991e23a
Added build system support for OpenBSD.
Ryan C. Gordon <icculus@icculus.org>
parents:
353
diff
changeset
|
373 |
if test x$we_have_sed = xyes; then |
41cda991e23a
Added build system support for OpenBSD.
Ryan C. Gordon <icculus@icculus.org>
parents:
353
diff
changeset
|
374 |
AC_MSG_CHECKING([if this is OpenBSD]) |
41cda991e23a
Added build system support for OpenBSD.
Ryan C. Gordon <icculus@icculus.org>
parents:
353
diff
changeset
|
375 |
x=`echo $build_os |tr A-Z a-z |sed "s/.*openbsd.*/openbsd/"` |
41cda991e23a
Added build system support for OpenBSD.
Ryan C. Gordon <icculus@icculus.org>
parents:
353
diff
changeset
|
376 |
if test x$x = xopenbsd; then |
41cda991e23a
Added build system support for OpenBSD.
Ryan C. Gordon <icculus@icculus.org>
parents:
353
diff
changeset
|
377 |
this_is_openbsd=yes |
459
5fa02060a63f
Hopefully fix broken autoconfs.
Ryan C. Gordon <icculus@icculus.org>
parents:
454
diff
changeset
|
378 |
PHYSFSLDFLAGS="$PHYSFSLDFLAGS -pthread" |
378
41cda991e23a
Added build system support for OpenBSD.
Ryan C. Gordon <icculus@icculus.org>
parents:
353
diff
changeset
|
379 |
fi |
41cda991e23a
Added build system support for OpenBSD.
Ryan C. Gordon <icculus@icculus.org>
parents:
353
diff
changeset
|
380 |
|
41cda991e23a
Added build system support for OpenBSD.
Ryan C. Gordon <icculus@icculus.org>
parents:
353
diff
changeset
|
381 |
AC_MSG_RESULT([$this_is_openbsd]) |
41cda991e23a
Added build system support for OpenBSD.
Ryan C. Gordon <icculus@icculus.org>
parents:
353
diff
changeset
|
382 |
fi |
41cda991e23a
Added build system support for OpenBSD.
Ryan C. Gordon <icculus@icculus.org>
parents:
353
diff
changeset
|
383 |
|
381
b65d27fdc8a9
Can now disable CD-ROM code on Unix systems at build time if need be. The
Ryan C. Gordon <icculus@icculus.org>
parents:
378
diff
changeset
|
384 |
this_is_atheos=no |
b65d27fdc8a9
Can now disable CD-ROM code on Unix systems at build time if need be. The
Ryan C. Gordon <icculus@icculus.org>
parents:
378
diff
changeset
|
385 |
if test x$we_have_sed = xyes; then |
b65d27fdc8a9
Can now disable CD-ROM code on Unix systems at build time if need be. The
Ryan C. Gordon <icculus@icculus.org>
parents:
378
diff
changeset
|
386 |
AC_MSG_CHECKING([if this is AtheOS]) |
b65d27fdc8a9
Can now disable CD-ROM code on Unix systems at build time if need be. The
Ryan C. Gordon <icculus@icculus.org>
parents:
378
diff
changeset
|
387 |
x=`echo $build_os |tr A-Z a-z |sed "s/.*atheos.*/atheos/"` |
b65d27fdc8a9
Can now disable CD-ROM code on Unix systems at build time if need be. The
Ryan C. Gordon <icculus@icculus.org>
parents:
378
diff
changeset
|
388 |
if test x$x = xatheos; then |
b65d27fdc8a9
Can now disable CD-ROM code on Unix systems at build time if need be. The
Ryan C. Gordon <icculus@icculus.org>
parents:
378
diff
changeset
|
389 |
this_is_atheos=yes |
b65d27fdc8a9
Can now disable CD-ROM code on Unix systems at build time if need be. The
Ryan C. Gordon <icculus@icculus.org>
parents:
378
diff
changeset
|
390 |
enable_cdrom=no |
390
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
391 |
enable_pthreads=no |
381
b65d27fdc8a9
Can now disable CD-ROM code on Unix systems at build time if need be. The
Ryan C. Gordon <icculus@icculus.org>
parents:
378
diff
changeset
|
392 |
fi |
b65d27fdc8a9
Can now disable CD-ROM code on Unix systems at build time if need be. The
Ryan C. Gordon <icculus@icculus.org>
parents:
378
diff
changeset
|
393 |
|
b65d27fdc8a9
Can now disable CD-ROM code on Unix systems at build time if need be. The
Ryan C. Gordon <icculus@icculus.org>
parents:
378
diff
changeset
|
394 |
AC_MSG_RESULT([$this_is_atheos]) |
b65d27fdc8a9
Can now disable CD-ROM code on Unix systems at build time if need be. The
Ryan C. Gordon <icculus@icculus.org>
parents:
378
diff
changeset
|
395 |
fi |
b65d27fdc8a9
Can now disable CD-ROM code on Unix systems at build time if need be. The
Ryan C. Gordon <icculus@icculus.org>
parents:
378
diff
changeset
|
396 |
|
454
e1353730f8c6
Check for OS/2, in case anyone ever gets autoconf, etc working on their box.
Ryan C. Gordon <icculus@icculus.org>
parents:
453
diff
changeset
|
397 |
this_is_os2=no |
e1353730f8c6
Check for OS/2, in case anyone ever gets autoconf, etc working on their box.
Ryan C. Gordon <icculus@icculus.org>
parents:
453
diff
changeset
|
398 |
if test x$we_have_sed = xyes; then |
e1353730f8c6
Check for OS/2, in case anyone ever gets autoconf, etc working on their box.
Ryan C. Gordon <icculus@icculus.org>
parents:
453
diff
changeset
|
399 |
AC_MSG_CHECKING([if this is OS/2]) |
e1353730f8c6
Check for OS/2, in case anyone ever gets autoconf, etc working on their box.
Ryan C. Gordon <icculus@icculus.org>
parents:
453
diff
changeset
|
400 |
x=`echo $build_os |tr A-Z a-z |sed "s/.*os2.*/os2/"` |
e1353730f8c6
Check for OS/2, in case anyone ever gets autoconf, etc working on their box.
Ryan C. Gordon <icculus@icculus.org>
parents:
453
diff
changeset
|
401 |
if test x$x = xos2; then |
e1353730f8c6
Check for OS/2, in case anyone ever gets autoconf, etc working on their box.
Ryan C. Gordon <icculus@icculus.org>
parents:
453
diff
changeset
|
402 |
this_is_os2=yes |
459
5fa02060a63f
Hopefully fix broken autoconfs.
Ryan C. Gordon <icculus@icculus.org>
parents:
454
diff
changeset
|
403 |
PHYSFSCFLAGS="$PHYSFSCFLAGS -DOS2" |
454
e1353730f8c6
Check for OS/2, in case anyone ever gets autoconf, etc working on their box.
Ryan C. Gordon <icculus@icculus.org>
parents:
453
diff
changeset
|
404 |
fi |
e1353730f8c6
Check for OS/2, in case anyone ever gets autoconf, etc working on their box.
Ryan C. Gordon <icculus@icculus.org>
parents:
453
diff
changeset
|
405 |
|
e1353730f8c6
Check for OS/2, in case anyone ever gets autoconf, etc working on their box.
Ryan C. Gordon <icculus@icculus.org>
parents:
453
diff
changeset
|
406 |
AC_MSG_RESULT([$this_is_os2]) |
e1353730f8c6
Check for OS/2, in case anyone ever gets autoconf, etc working on their box.
Ryan C. Gordon <icculus@icculus.org>
parents:
453
diff
changeset
|
407 |
fi |
e1353730f8c6
Check for OS/2, in case anyone ever gets autoconf, etc working on their box.
Ryan C. Gordon <icculus@icculus.org>
parents:
453
diff
changeset
|
408 |
|
e1353730f8c6
Check for OS/2, in case anyone ever gets autoconf, etc working on their box.
Ryan C. Gordon <icculus@icculus.org>
parents:
453
diff
changeset
|
409 |
|
e1353730f8c6
Check for OS/2, in case anyone ever gets autoconf, etc working on their box.
Ryan C. Gordon <icculus@icculus.org>
parents:
453
diff
changeset
|
410 |
|
381
b65d27fdc8a9
Can now disable CD-ROM code on Unix systems at build time if need be. The
Ryan C. Gordon <icculus@icculus.org>
parents:
378
diff
changeset
|
411 |
dnl Some platform might disable this, so check this down here... |
b65d27fdc8a9
Can now disable CD-ROM code on Unix systems at build time if need be. The
Ryan C. Gordon <icculus@icculus.org>
parents:
378
diff
changeset
|
412 |
if test x$enable_cdrom != xyes; then |
b65d27fdc8a9
Can now disable CD-ROM code on Unix systems at build time if need be. The
Ryan C. Gordon <icculus@icculus.org>
parents:
378
diff
changeset
|
413 |
AC_DEFINE([PHYSFS_NO_CDROM_SUPPORT], 1, [define if we have no CD support]) |
384
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
414 |
AC_MSG_WARN([***]) |
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
415 |
AC_MSG_WARN([*** There is no CD-ROM support in this build!]) |
390
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
416 |
AC_MSG_WARN([*** PhysicsFS will just pretend there are no discs.]) |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
417 |
AC_MSG_WARN([*** This may be fine, depending on how PhysicsFS is used,]) |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
418 |
AC_MSG_WARN([*** but is this what you REALLY wanted?]) |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
419 |
AC_MSG_WARN([*** (Maybe fix configure.in, or write a platform driver?)]) |
384
9f6761c089fa
Changed cd detection stuff again. More robust.
Ryan C. Gordon <icculus@icculus.org>
parents:
382
diff
changeset
|
420 |
AC_MSG_WARN([***]) |
381
b65d27fdc8a9
Can now disable CD-ROM code on Unix systems at build time if need be. The
Ryan C. Gordon <icculus@icculus.org>
parents:
378
diff
changeset
|
421 |
fi |
b65d27fdc8a9
Can now disable CD-ROM code on Unix systems at build time if need be. The
Ryan C. Gordon <icculus@icculus.org>
parents:
378
diff
changeset
|
422 |
|
390
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
423 |
if test x$enable_pthreads != xyes; then |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
424 |
AC_DEFINE([PHYSFS_NO_PTHREADS_SUPPORT], 1, [define if we have no POSIX threads support]) |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
425 |
if test x$have_non_posix_threads != xyes; then |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
426 |
AC_MSG_WARN([***]) |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
427 |
AC_MSG_WARN([*** There is no thread support in this build!]) |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
428 |
AC_MSG_WARN([*** PhysicsFS will NOT be reentrant!]) |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
429 |
AC_MSG_WARN([*** This may be fine, depending on how PhysicsFS is used,]) |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
430 |
AC_MSG_WARN([*** but is this what you REALLY wanted?]) |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
431 |
AC_MSG_WARN([*** (Maybe fix configure.in, or write a platform driver?)]) |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
432 |
AC_MSG_WARN([***]) |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
433 |
fi |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
434 |
fi |
6649d6caecf2
Stub code for platforms without functional pthreads.
Ryan C. Gordon <icculus@icculus.org>
parents:
389
diff
changeset
|
435 |
|
381
b65d27fdc8a9
Can now disable CD-ROM code on Unix systems at build time if need be. The
Ryan C. Gordon <icculus@icculus.org>
parents:
378
diff
changeset
|
436 |
|
213 | 437 |
# Checks for header files. |
438 |
AC_HEADER_STDC |
|
439 |
AC_CHECK_HEADERS([stdlib.h string.h]) |
|
440 |
||
441 |
# Checks for typedefs, structures, and compiler characteristics. |
|
269
d41c0a399a99
Removed some unnecessary things that broke BeOS builds.
Ryan C. Gordon <icculus@icculus.org>
parents:
261
diff
changeset
|
442 |
dnl AC_C_CONST |
d41c0a399a99
Removed some unnecessary things that broke BeOS builds.
Ryan C. Gordon <icculus@icculus.org>
parents:
261
diff
changeset
|
443 |
dnl AC_TYPE_SIZE_T |
213 | 444 |
|
445 |
# Checks for library functions. |
|
446 |
||
447 |
# This is only in the bleeding edge autoconf distro... |
|
448 |
#AC_FUNC_MALLOC |
|
449 |
||
450 |
AC_FUNC_MEMCMP |
|
451 |
AC_CHECK_FUNCS([memset strrchr]) |
|
452 |
||
453
108de3bb1b6b
Added qpak.c to build systems.
Ryan C. Gordon <icculus@icculus.org>
parents:
444
diff
changeset
|
453 |
AC_CHECK_SIZEOF(int, 4) |
108de3bb1b6b
Added qpak.c to build systems.
Ryan C. Gordon <icculus@icculus.org>
parents:
444
diff
changeset
|
454 |
|
459
5fa02060a63f
Hopefully fix broken autoconfs.
Ryan C. Gordon <icculus@icculus.org>
parents:
454
diff
changeset
|
455 |
CFLAGS="$CFLAGS $PHYSFSCFLAGS -D_REENTRANT -D_THREAD_SAFE" |
5fa02060a63f
Hopefully fix broken autoconfs.
Ryan C. Gordon <icculus@icculus.org>
parents:
454
diff
changeset
|
456 |
LDFLAGS="$LDFLAGS $PHYSFSLDFLAGS -no-undefined" |
347
56ce50a62241
FreeBSD patches; appears to be fully functional now.
Ryan C. Gordon <icculus@icculus.org>
parents:
331
diff
changeset
|
457 |
|
213 | 458 |
dnl Add Makefile conditionals |
459 |
AM_CONDITIONAL(BUILD_ZLIB, test x$enable_internal_zlib = xyes) |
|
460 |
AM_CONDITIONAL(BUILD_TEST_PHYSFS, test x$enable_testprog = xyes) |
|
296
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
461 |
AM_CONDITIONAL(BUILD_MACOSX, test x$this_is_macosx = xyes) |
307 | 462 |
AM_CONDITIONAL(BUILD_BEOS, test x$this_is_beos = xyes) |
310
f8bca4a93fd5
Patched to compile on Cygwin.
Ryan C. Gordon <icculus@icculus.org>
parents:
307
diff
changeset
|
463 |
AM_CONDITIONAL(BUILD_CYGWIN, test x$this_is_cygwin = xyes) |
302
b6fe2b615045
Build dance continues.
Ryan C. Gordon <icculus@icculus.org>
parents:
296
diff
changeset
|
464 |
|
213 | 465 |
AC_OUTPUT([ |
466 |
Makefile |
|
296
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
467 |
archivers/Makefile |
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
468 |
platform/Makefile |
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
469 |
zlib114/Makefile |
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
470 |
test/Makefile |
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
471 |
extras/Makefile |
389
b35668cd8b3e
Moved the RPM spec file to spec.in, so version dynamically keeps up.
Ryan C. Gordon <icculus@icculus.org>
parents:
384
diff
changeset
|
472 |
physfs.spec |
213 | 473 |
]) |
231
e4f81b0f1c93
Corrected to fix "make dist".
Ryan C. Gordon <icculus@icculus.org>
parents:
224
diff
changeset
|
474 |
|
296
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
475 |
dnl end of configure.in ... |
32658d27c62f
Build system should now work everywhere, including older autoconfs. I hope.
Ryan C. Gordon <icculus@icculus.org>
parents:
289
diff
changeset
|
476 |