1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT([libogg],[1.3.2],[ogg-dev@xiph.org])
5 AC_CONFIG_SRCDIR(src/framing.c)
8 AM_MAINTAINER_MODE([enable])
10 dnl Library versioning
16 AC_SUBST(LIB_REVISION)
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 -Wall -ffast-math -fsigned-char"
49 PROFILE="-Wall -W -pg -g -O20 -ffast-math -fsigned-char"
52 DEBUG="-g -Wall -fsigned-char"
53 CFLAGS="-O20 -ffast-math -fsigned-char"
54 PROFILE="-pg -g -O20 -fsigned-char"
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.
81 AC_CHECK_HEADER(inttypes.h,INCLUDE_INTTYPES_H=1)
82 AC_CHECK_HEADER(stdint.h,INCLUDE_STDINT_H=1)
83 AC_CHECK_HEADER(sys/types.h,INCLUDE_SYS_TYPES_H=1)
85 dnl Checks for typedefs, structures, and compiler characteristics.
90 AC_CHECK_SIZEOF(int16_t)
91 AC_CHECK_SIZEOF(uint16_t)
92 AC_CHECK_SIZEOF(u_int16_t)
93 AC_CHECK_SIZEOF(int32_t)
94 AC_CHECK_SIZEOF(uint32_t)
95 AC_CHECK_SIZEOF(u_int32_t)
96 AC_CHECK_SIZEOF(int64_t)
97 AC_CHECK_SIZEOF(short)
100 AC_CHECK_SIZEOF(long long)
103 $ac_cv_sizeof_int16_t) SIZE16="int16_t";;
104 $ac_cv_sizeof_short) SIZE16="short";;
105 $ac_cv_sizeof_int) SIZE16="int";;
109 $ac_cv_sizeof_uint16_t) USIZE16="uint16_t";;
110 $ac_cv_sizeof_short) USIZE16="unsigned short";;
111 $ac_cv_sizeof_int) USIZE16="unsigned int";;
112 $ac_cv_sizeof_u_int16_t) USIZE16="u_int16_t";;
116 $ac_cv_sizeof_int32_t) SIZE32="int32_t";;
117 $ac_cv_sizeof_short) SIZE32="short";;
118 $ac_cv_sizeof_int) SIZE32="int";;
119 $ac_cv_sizeof_long) SIZE32="long";;
123 $ac_cv_sizeof_uint32_t) USIZE32="uint32_t";;
124 $ac_cv_sizeof_short) USIZE32="unsigned short";;
125 $ac_cv_sizeof_int) USIZE32="unsigned int";;
126 $ac_cv_sizeof_long) USIZE32="unsigned long";;
127 $ac_cv_sizeof_u_int32_t) USIZE32="u_int32_t";;
131 $ac_cv_sizeof_int64_t) SIZE64="int64_t";;
132 $ac_cv_sizeof_int) SIZE64="int";;
133 $ac_cv_sizeof_long) SIZE64="long";;
134 $ac_cv_sizeof_long_long) SIZE64="long long";;
137 if test -z "$SIZE16"; then
138 AC_MSG_ERROR(No 16 bit type found on this platform!)
140 if test -z "$USIZE16"; then
141 AC_MSG_ERROR(No unsigned 16 bit type found on this platform!)
143 if test -z "$SIZE32"; then
144 AC_MSG_ERROR(No 32 bit type found on this platform!)
146 if test -z "$USIZE32"; then
147 AC_MSG_ERROR(No unsigned 32 bit type found on this platform!)
149 if test -z "$SIZE64"; then
150 AC_MSG_WARN(No 64 bit type found on this platform!)
153 dnl Checks for library functions.
156 dnl Make substitutions
158 AC_SUBST(LIBTOOL_DEPS)
159 AC_SUBST(INCLUDE_INTTYPES_H)
160 AC_SUBST(INCLUDE_STDINT_H)
161 AC_SUBST(INCLUDE_SYS_TYPES_H)
177 doc/Makefile doc/libogg/Makefile
178 include/Makefile include/ogg/Makefile include/ogg/config_types.h
183 AC_CONFIG_HEADERS([config.h])