1 dnl Process this file with autoconf to produce a configure script.
5 AM_INIT_AUTOMAKE(libogg,1.0)
13 AC_SUBST(LIB_REVISION)
19 dnl Set some options based on environment
22 ldflags_save="$LDFLAGS"
23 if test -z "$GCC"; then
27 CFLAGS="-O2 -w -signed"
28 PROFILE="-p -g3 -O2 -signed"
32 CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
33 PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc"
44 DEBUG="-g -Wall -fsigned-char"
45 CFLAGS="-O20 -ffast-math -fsigned-char"
46 PROFILE="-Wall -W -pg -g -O20 -ffast-math -fsigned-char"
49 DEBUG="-g -Wall -fsigned-char -mv8"
50 CFLAGS="-O20 -ffast-math -fsigned-char -mv8"
51 PROFILE="-pg -g -O20 -fsigned-char -mv8"
54 DEBUG="-fno-common -g -Wall -fsigned-char"
55 CFLAGS="-fno-common -O4 -Wall -fsigned-char -ffast-math"
56 PROFILE="-fno-common -O4 -Wall -pg -g -fsigned-char -ffast-math"
59 DEBUG="-g -Wall -fsigned-char"
60 CFLAGS="-O20 -fsigned-char"
61 PROFILE="-O20 -g -pg -fsigned-char"
65 CFLAGS="$CFLAGS $cflags_save"
66 DEBUG="$DEBUG $cflags_save"
67 PROFILE="$PROFILE $cflags_save"
68 LDFLAGS="$LDFLAGS $ldflags_save"
70 dnl Checks for programs.
72 dnl Checks for libraries.
74 dnl Checks for header files.
77 dnl Checks for typedefs, structures, and compiler characteristics.
82 AC_MSG_CHECKING(for int16_t)
83 AC_CACHE_VAL(has_int16_t,
88 #include <sys/types.h>
90 int main() {return 0;}
96 AC_MSG_RESULT($has_int16_t)
98 AC_MSG_CHECKING(for int32_t)
99 AC_CACHE_VAL(has_int32_t,
102 #include <inttypes.h>
104 #include <sys/types.h>
106 int main() {return 0;}
112 AC_MSG_RESULT($has_int32_t)
114 AC_MSG_CHECKING(for uint32_t)
115 AC_CACHE_VAL(has_uint32_t,
118 #include <inttypes.h>
120 #include <sys/types.h>
122 int main() {return 0;}
128 AC_MSG_RESULT($has_uint32_t)
130 AC_MSG_CHECKING(for u_int32_t)
131 AC_CACHE_VAL(has_u_int32_t,
134 #include <inttypes.h>
136 #include <sys/types.h>
138 int main() {return 0;}
144 AC_MSG_RESULT($has_u_int32_t)
146 AC_MSG_CHECKING(for int64_t)
147 AC_CACHE_VAL(has_int64_t,
150 #include <inttypes.h>
152 #include <sys/types.h>
154 int main() {return 0;}
160 AC_MSG_RESULT($has_int64_t)
162 AC_CHECK_SIZEOF(short)
164 AC_CHECK_SIZEOF(long)
165 AC_CHECK_SIZEOF(long long)
168 if test x$has_int16_t = "xyes" ; then
172 $ac_cv_sizeof_short) SIZE16="short";;
173 $ac_cv_sizeof_int) SIZE16="int";;
177 if test x$has_int32_t = "xyes" ; then
181 $ac_cv_sizeof_short) SIZE32="short";;
182 $ac_cv_sizeof_int) SIZE32="int";;
183 $ac_cv_sizeof_long) SIZE32="long";;
187 if test x$has_uint32_t = "xyes" ; then
190 if test x$has_u_int32_t = "xyes" ; then
194 $ac_cv_sizeof_short) USIZE32="unsigned short";;
195 $ac_cv_sizeof_int) USIZE32="unsigned int";;
196 $ac_cv_sizeof_long) USIZE32="unsigned long";;
201 if test x$has_int64_t = "xyes" ; then
205 $ac_cv_sizeof_int) SIZE64="int";;
206 $ac_cv_sizeof_long) SIZE64="long";;
207 $ac_cv_sizeof_long_long) SIZE64="long long";;
211 if test -z "$SIZE16"; then
212 AC_MSG_ERROR(No 16 bit type found on this platform!)
214 if test -z "$SIZE32"; then
215 AC_MSG_ERROR(No 32 bit type found on this platform!)
217 if test -z "$USIZE32"; then
218 AC_MSG_ERROR(No unsigned 32 bit type found on this platform!)
220 if test -z "$SIZE64"; then
221 AC_MSG_WARN(No 64 bit type found on this platform!)
224 dnl Checks for library functions.
227 dnl Make substitutions
229 AC_SUBST(LIBTOOL_DEPS)
240 AC_OUTPUT(Makefile src/Makefile doc/Makefile doc/ogg/Makefile include/Makefile include/ogg/Makefile include/ogg/config_types.h win32/Makefile debian/Makefile)