1 dnl Process this file with autoconf to produce a configure script.
5 AM_INIT_AUTOMAKE(libogg,1.2.0)
14 AC_SUBST(LIB_REVISION)
22 AM_CONFIG_HEADER(config.h)
24 dnl Set some options based on environment
27 if test -z "$GCC"; then
31 CFLAGS="-O2 -w -signed"
32 PROFILE="-p -g3 -O2 -signed"
36 CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
37 PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc"
48 DEBUG="-g -Wall -fsigned-char"
49 CFLAGS="-O20 -ffast-math -fsigned-char"
50 PROFILE="-Wall -W -pg -g -O20 -ffast-math -fsigned-char"
54 AC_MSG_CHECKING([if gcc supports -mv8])
57 AC_TRY_COMPILE(, [return 0;], [
62 DEBUG="-g -Wall -fsigned-char $sparc_cpu"
63 CFLAGS="-O20 -ffast-math -fsigned-char $sparc_cpu"
64 PROFILE="-pg -g -O20 -fsigned-char $sparc_cpu"
67 DEBUG="-fno-common -g -Wall -fsigned-char"
68 CFLAGS="-fno-common -O4 -Wall -fsigned-char -ffast-math"
69 PROFILE="-fno-common -O4 -Wall -pg -g -fsigned-char -ffast-math"
72 DEBUG="-g -Wall -fsigned-char"
73 CFLAGS="-O20 -fsigned-char"
74 PROFILE="-O20 -g -pg -fsigned-char"
78 CFLAGS="$CFLAGS $cflags_save"
79 DEBUG="$DEBUG $cflags_save"
80 PROFILE="$PROFILE $cflags_save"
82 dnl Checks for programs.
84 dnl Checks for libraries.
86 dnl Checks for header files.
89 dnl Checks for typedefs, structures, and compiler characteristics.
94 AC_MSG_CHECKING(for int16_t)
95 AC_CACHE_VAL(has_cv_int16_t,
97 #if defined __BEOS__ && !defined __HAIKU__
100 #include <sys/types.h>
102 int main() {return 0;}
108 AC_MSG_RESULT($has_cv_int16_t)
110 AC_MSG_CHECKING(for int32_t)
111 AC_CACHE_VAL(has_cv_int32_t,
113 #if defined __BEOS__ && !defined __HAIKU__
114 #include <inttypes.h>
116 #include <sys/types.h>
118 int main() {return 0;}
124 AC_MSG_RESULT($has_cv_int32_t)
126 AC_MSG_CHECKING(for uint32_t)
127 AC_CACHE_VAL(has_cv_uint32_t,
129 #if defined __BEOS__ && !defined __HAIKU__
130 #include <inttypes.h>
132 #include <sys/types.h>
134 int main() {return 0;}
140 AC_MSG_RESULT($has_cv_uint32_t)
142 AC_MSG_CHECKING(for uint16_t)
143 AC_CACHE_VAL(has_cv_uint16_t,
145 #if defined __BEOS__ && !defined __HAIKU__
146 #include <inttypes.h>
148 #include <sys/types.h>
150 int main() {return 0;}
156 AC_MSG_RESULT($has_cv_uint16_t)
158 AC_MSG_CHECKING(for u_int32_t)
159 AC_CACHE_VAL(has_cv_u_int32_t,
161 #if defined __BEOS__ && !defined __HAIKU__
162 #include <inttypes.h>
164 #include <sys/types.h>
166 int main() {return 0;}
168 has_cv_u_int32_t=yes,
172 AC_MSG_RESULT($has_cv_u_int32_t)
174 AC_MSG_CHECKING(for u_int16_t)
175 AC_CACHE_VAL(has_cv_u_int16_t,
177 #if defined __BEOS__ && !defined __HAIKU__
178 #include <inttypes.h>
180 #include <sys/types.h>
182 int main() {return 0;}
184 has_cv_u_int16_t=yes,
188 AC_MSG_RESULT($has_cv_u_int16_t)
190 AC_MSG_CHECKING(for int64_t)
191 AC_CACHE_VAL(has_cv_int64_t,
193 #if defined __BEOS__ && !defined __HAIKU__
194 #include <inttypes.h>
196 #include <sys/types.h>
198 int main() {return 0;}
204 AC_MSG_RESULT($has_cv_int64_t)
206 AC_CHECK_SIZEOF(short,2)
207 AC_CHECK_SIZEOF(int,4)
208 AC_CHECK_SIZEOF(long,4)
209 AC_CHECK_SIZEOF(long long,8)
212 if test x$has_cv_int16_t = "xyes" ; then
216 $ac_cv_sizeof_short) SIZE16="short";;
217 $ac_cv_sizeof_int) SIZE16="int";;
221 if test x$has_cv_int32_t = "xyes" ; then
225 $ac_cv_sizeof_short) SIZE32="short";;
226 $ac_cv_sizeof_int) SIZE32="int";;
227 $ac_cv_sizeof_long) SIZE32="long";;
231 if test x$has_cv_uint32_t = "xyes" ; then
234 if test x$has_cv_u_int32_t = "xyes" ; then
238 $ac_cv_sizeof_short) USIZE32="unsigned short";;
239 $ac_cv_sizeof_int) USIZE32="unsigned int";;
240 $ac_cv_sizeof_long) USIZE32="unsigned long";;
245 if test x$has_cv_uint16_t = "xyes" ; then
248 if test x$has_cv_u_int16_t = "xyes" ; then
252 $ac_cv_sizeof_short) USIZE16="unsigned short";;
253 $ac_cv_sizeof_int) USIZE16="unsigned int";;
254 $ac_cv_sizeof_long) USIZE16="unsigned long";;
259 if test x$has_cv_int64_t = "xyes" ; then
263 $ac_cv_sizeof_int) SIZE64="int";;
264 $ac_cv_sizeof_long) SIZE64="long";;
265 $ac_cv_sizeof_long_long) SIZE64="long long";;
269 if test -z "$SIZE16"; then
270 AC_MSG_ERROR(No 16 bit type found on this platform!)
272 if test -z "$USIZE16"; then
273 AC_MSG_ERROR(No unsigned 16 bit type found on this platform!)
275 if test -z "$SIZE32"; then
276 AC_MSG_ERROR(No 32 bit type found on this platform!)
278 if test -z "$USIZE32"; then
279 AC_MSG_ERROR(No unsigned 32 bit type found on this platform!)
281 if test -z "$SIZE64"; then
282 AC_MSG_WARN(No 64 bit type found on this platform!)
285 dnl Checks for library functions.
288 dnl Make substitutions
290 AC_SUBST(LIBTOOL_DEPS)
305 doc/Makefile doc/libogg/Makefile
306 include/Makefile include/ogg/Makefile include/ogg/config_types.h