1 dnl Process this file with autoconf to produce a configure script.
5 AM_INIT_AUTOMAKE(libogg,1.1.4svn)
14 AC_SUBST(LIB_REVISION)
21 AM_CONFIG_HEADER(config.h)
23 dnl Set some options based on environment
26 if test -z "$GCC"; then
30 CFLAGS="-O2 -w -signed"
31 PROFILE="-p -g3 -O2 -signed"
35 CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
36 PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc"
47 DEBUG="-g -Wall -fsigned-char"
48 CFLAGS="-O20 -ffast-math -fsigned-char"
49 PROFILE="-Wall -W -pg -g -O20 -ffast-math -fsigned-char"
52 DEBUG="-g -Wall -fsigned-char -mv8"
53 CFLAGS="-O20 -ffast-math -fsigned-char -mv8"
54 PROFILE="-pg -g -O20 -fsigned-char -mv8"
57 DEBUG="-fno-common -g -Wall -fsigned-char"
58 CFLAGS="-fno-common -O4 -Wall -fsigned-char -ffast-math"
59 PROFILE="-fno-common -O4 -Wall -pg -g -fsigned-char -ffast-math"
62 DEBUG="-g -Wall -fsigned-char"
63 CFLAGS="-O20 -fsigned-char"
64 PROFILE="-O20 -g -pg -fsigned-char"
68 CFLAGS="$CFLAGS $cflags_save"
69 DEBUG="$DEBUG $cflags_save"
70 PROFILE="$PROFILE $cflags_save"
72 dnl Checks for programs.
74 dnl Checks for libraries.
76 dnl Checks for header files.
79 dnl Checks for typedefs, structures, and compiler characteristics.
84 AC_MSG_CHECKING(for int16_t)
85 AC_CACHE_VAL(has_int16_t,
87 #if defined __BEOS__ && !defined __HAIKU__
90 #include <sys/types.h>
92 int main() {return 0;}
98 AC_MSG_RESULT($has_int16_t)
100 AC_MSG_CHECKING(for int32_t)
101 AC_CACHE_VAL(has_int32_t,
103 #if defined __BEOS__ && !defined __HAIKU__
104 #include <inttypes.h>
106 #include <sys/types.h>
108 int main() {return 0;}
114 AC_MSG_RESULT($has_int32_t)
116 AC_MSG_CHECKING(for uint32_t)
117 AC_CACHE_VAL(has_uint32_t,
119 #if defined __BEOS__ && !defined __HAIKU__
120 #include <inttypes.h>
122 #include <sys/types.h>
124 int main() {return 0;}
130 AC_MSG_RESULT($has_uint32_t)
132 AC_MSG_CHECKING(for uint16_t)
133 AC_CACHE_VAL(has_uint16_t,
135 #if defined __BEOS__ && !defined __HAIKU__
136 #include <inttypes.h>
138 #include <sys/types.h>
140 int main() {return 0;}
146 AC_MSG_RESULT($has_uint16_t)
148 AC_MSG_CHECKING(for u_int32_t)
149 AC_CACHE_VAL(has_u_int32_t,
151 #if defined __BEOS__ && !defined __HAIKU__
152 #include <inttypes.h>
154 #include <sys/types.h>
156 int main() {return 0;}
162 AC_MSG_RESULT($has_u_int32_t)
164 AC_MSG_CHECKING(for u_int16_t)
165 AC_CACHE_VAL(has_u_int16_t,
167 #if defined __BEOS__ && !defined __HAIKU__
168 #include <inttypes.h>
170 #include <sys/types.h>
172 int main() {return 0;}
178 AC_MSG_RESULT($has_u_int16_t)
180 AC_MSG_CHECKING(for int64_t)
181 AC_CACHE_VAL(has_int64_t,
183 #if defined __BEOS__ && !defined __HAIKU__
184 #include <inttypes.h>
186 #include <sys/types.h>
188 int main() {return 0;}
194 AC_MSG_RESULT($has_int64_t)
196 AC_CHECK_SIZEOF(short,2)
197 AC_CHECK_SIZEOF(int,4)
198 AC_CHECK_SIZEOF(long,4)
199 AC_CHECK_SIZEOF(long long,8)
202 if test x$has_int16_t = "xyes" ; then
206 $ac_cv_sizeof_short) SIZE16="short";;
207 $ac_cv_sizeof_int) SIZE16="int";;
211 if test x$has_int32_t = "xyes" ; then
215 $ac_cv_sizeof_short) SIZE32="short";;
216 $ac_cv_sizeof_int) SIZE32="int";;
217 $ac_cv_sizeof_long) SIZE32="long";;
221 if test x$has_uint32_t = "xyes" ; then
224 if test x$has_u_int32_t = "xyes" ; then
228 $ac_cv_sizeof_short) USIZE32="unsigned short";;
229 $ac_cv_sizeof_int) USIZE32="unsigned int";;
230 $ac_cv_sizeof_long) USIZE32="unsigned long";;
235 if test x$has_uint16_t = "xyes" ; then
238 if test x$has_u_int16_t = "xyes" ; then
242 $ac_cv_sizeof_short) USIZE16="unsigned short";;
243 $ac_cv_sizeof_int) USIZE16="unsigned int";;
244 $ac_cv_sizeof_long) USIZE16="unsigned long";;
249 if test x$has_int64_t = "xyes" ; then
253 $ac_cv_sizeof_int) SIZE64="int";;
254 $ac_cv_sizeof_long) SIZE64="long";;
255 $ac_cv_sizeof_long_long) SIZE64="long long";;
259 if test -z "$SIZE16"; then
260 AC_MSG_ERROR(No 16 bit type found on this platform!)
262 if test -z "$USIZE16"; then
263 AC_MSG_ERROR(No unsigned 16 bit type found on this platform!)
265 if test -z "$SIZE32"; then
266 AC_MSG_ERROR(No 32 bit type found on this platform!)
268 if test -z "$USIZE32"; then
269 AC_MSG_ERROR(No unsigned 32 bit type found on this platform!)
271 if test -z "$SIZE64"; then
272 AC_MSG_WARN(No 64 bit type found on this platform!)
275 dnl Checks for library functions.
278 dnl Make substitutions
280 AC_SUBST(LIBTOOL_DEPS)
295 doc/Makefile doc/libogg/Makefile
296 include/Makefile include/ogg/Makefile include/ogg/config_types.h