1 | dnl Process this file with autoconf to produce a configure script.
|
---|
2 |
|
---|
3 | AC_INIT([libogg],[1.3.5],[[email protected]])
|
---|
4 |
|
---|
5 | LT_INIT
|
---|
6 | AC_CONFIG_MACRO_DIR([m4])
|
---|
7 | AC_CONFIG_SRCDIR(src/framing.c)
|
---|
8 |
|
---|
9 | AM_INIT_AUTOMAKE
|
---|
10 | AM_MAINTAINER_MODE([enable])
|
---|
11 |
|
---|
12 | dnl Library versioning
|
---|
13 |
|
---|
14 | LIB_CURRENT=8
|
---|
15 | LIB_REVISION=5
|
---|
16 | LIB_AGE=8
|
---|
17 | AC_SUBST(LIB_CURRENT)
|
---|
18 | AC_SUBST(LIB_REVISION)
|
---|
19 | AC_SUBST(LIB_AGE)
|
---|
20 |
|
---|
21 | AC_PROG_CC
|
---|
22 | AM_PROG_CC_C_O
|
---|
23 |
|
---|
24 | dnl Set some options based on environment
|
---|
25 |
|
---|
26 | cflags_save="$CFLAGS"
|
---|
27 | if test -z "$GCC"; then
|
---|
28 | case $host in
|
---|
29 | *-*-irix*)
|
---|
30 | DEBUG="-g -signed"
|
---|
31 | CFLAGS="-O2 -w -signed"
|
---|
32 | PROFILE="-p -g3 -O2 -signed"
|
---|
33 | ;;
|
---|
34 | sparc-sun-solaris*)
|
---|
35 | DEBUG="-v -g"
|
---|
36 | CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
|
---|
37 | PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc"
|
---|
38 | ;;
|
---|
39 | *)
|
---|
40 | DEBUG="-g"
|
---|
41 | CFLAGS="-O"
|
---|
42 | PROFILE="-g -p"
|
---|
43 | ;;
|
---|
44 | esac
|
---|
45 | else
|
---|
46 | case $host in
|
---|
47 | *-*-linux*)
|
---|
48 | DEBUG="-g -Wall -fsigned-char"
|
---|
49 | CFLAGS="-O2 -Wall -ffast-math -fsigned-char"
|
---|
50 | PROFILE="-Wall -W -pg -g -O2 -ffast-math -fsigned-char"
|
---|
51 | ;;
|
---|
52 | sparc-sun-*)
|
---|
53 | DEBUG="-g -Wall -fsigned-char"
|
---|
54 | CFLAGS="-O2 -ffast-math -fsigned-char"
|
---|
55 | PROFILE="-pg -g -O2 -fsigned-char"
|
---|
56 | ;;
|
---|
57 | *-*-darwin*)
|
---|
58 | DEBUG="-fno-common -g -Wall -fsigned-char"
|
---|
59 | CFLAGS="-fno-common -O4 -Wall -fsigned-char -ffast-math"
|
---|
60 | PROFILE="-fno-common -O4 -Wall -pg -g -fsigned-char -ffast-math"
|
---|
61 | ;;
|
---|
62 | *)
|
---|
63 | DEBUG="-g -Wall -fsigned-char"
|
---|
64 | CFLAGS="-O2 -fsigned-char"
|
---|
65 | PROFILE="-O2 -g -pg -fsigned-char"
|
---|
66 | ;;
|
---|
67 | esac
|
---|
68 | fi
|
---|
69 | CFLAGS="$CFLAGS $cflags_save"
|
---|
70 | DEBUG="$DEBUG $cflags_save"
|
---|
71 | PROFILE="$PROFILE $cflags_save"
|
---|
72 |
|
---|
73 | dnl Checks for programs.
|
---|
74 |
|
---|
75 | dnl Checks for libraries.
|
---|
76 |
|
---|
77 | dnl Checks for header files.
|
---|
78 | AC_HEADER_STDC
|
---|
79 | INCLUDE_INTTYPES_H=0
|
---|
80 | INCLUDE_STDINT_H=0
|
---|
81 | INCLUDE_SYS_TYPES_H=0
|
---|
82 | AC_CHECK_HEADER(inttypes.h,INCLUDE_INTTYPES_H=1)
|
---|
83 | AC_CHECK_HEADER(stdint.h,INCLUDE_STDINT_H=1)
|
---|
84 | AC_CHECK_HEADER(sys/types.h,INCLUDE_SYS_TYPES_H=1)
|
---|
85 |
|
---|
86 | dnl Checks for typedefs, structures, and compiler characteristics.
|
---|
87 | AC_C_CONST
|
---|
88 |
|
---|
89 | dnl Check for types
|
---|
90 |
|
---|
91 | AC_CHECK_SIZEOF(int16_t)
|
---|
92 | AC_CHECK_SIZEOF(uint16_t)
|
---|
93 | AC_CHECK_SIZEOF(u_int16_t)
|
---|
94 | AC_CHECK_SIZEOF(int32_t)
|
---|
95 | AC_CHECK_SIZEOF(uint32_t)
|
---|
96 | AC_CHECK_SIZEOF(u_int32_t)
|
---|
97 | AC_CHECK_SIZEOF(int64_t)
|
---|
98 | AC_CHECK_SIZEOF(uint64_t)
|
---|
99 | AC_CHECK_SIZEOF(short)
|
---|
100 | AC_CHECK_SIZEOF(int)
|
---|
101 | AC_CHECK_SIZEOF(long)
|
---|
102 | AC_CHECK_SIZEOF(long long)
|
---|
103 |
|
---|
104 | case 2 in
|
---|
105 | $ac_cv_sizeof_int16_t) SIZE16="int16_t";;
|
---|
106 | $ac_cv_sizeof_short) SIZE16="short";;
|
---|
107 | $ac_cv_sizeof_int) SIZE16="int";;
|
---|
108 | esac
|
---|
109 |
|
---|
110 | case 2 in
|
---|
111 | $ac_cv_sizeof_uint16_t) USIZE16="uint16_t";;
|
---|
112 | $ac_cv_sizeof_short) USIZE16="unsigned short";;
|
---|
113 | $ac_cv_sizeof_int) USIZE16="unsigned int";;
|
---|
114 | $ac_cv_sizeof_u_int16_t) USIZE16="u_int16_t";;
|
---|
115 | esac
|
---|
116 |
|
---|
117 | case 4 in
|
---|
118 | $ac_cv_sizeof_int32_t) SIZE32="int32_t";;
|
---|
119 | $ac_cv_sizeof_short) SIZE32="short";;
|
---|
120 | $ac_cv_sizeof_int) SIZE32="int";;
|
---|
121 | $ac_cv_sizeof_long) SIZE32="long";;
|
---|
122 | esac
|
---|
123 |
|
---|
124 | case 4 in
|
---|
125 | $ac_cv_sizeof_uint32_t) USIZE32="uint32_t";;
|
---|
126 | $ac_cv_sizeof_short) USIZE32="unsigned short";;
|
---|
127 | $ac_cv_sizeof_int) USIZE32="unsigned int";;
|
---|
128 | $ac_cv_sizeof_long) USIZE32="unsigned long";;
|
---|
129 | $ac_cv_sizeof_u_int32_t) USIZE32="u_int32_t";;
|
---|
130 | esac
|
---|
131 |
|
---|
132 | case 8 in
|
---|
133 | $ac_cv_sizeof_int64_t) SIZE64="int64_t";;
|
---|
134 | $ac_cv_sizeof_int) SIZE64="int";;
|
---|
135 | $ac_cv_sizeof_long) SIZE64="long";;
|
---|
136 | $ac_cv_sizeof_long_long) SIZE64="long long";;
|
---|
137 | esac
|
---|
138 |
|
---|
139 | case 8 in
|
---|
140 | $ac_cv_sizeof_uint64_t) USIZE64="uint64_t";;
|
---|
141 | $ac_cv_sizeof_unsigned_int) USIZE64="unsigned int";;
|
---|
142 | $ac_cv_sizeof_unsigned_long) USIZE64="unsigned long";;
|
---|
143 | $ac_cv_sizeof_unsigned_long_long) USIZE64="unsigned long long";;
|
---|
144 | esac
|
---|
145 |
|
---|
146 | if test -z "$SIZE16"; then
|
---|
147 | AC_MSG_ERROR(No 16 bit type found on this platform!)
|
---|
148 | fi
|
---|
149 | if test -z "$USIZE16"; then
|
---|
150 | AC_MSG_ERROR(No unsigned 16 bit type found on this platform!)
|
---|
151 | fi
|
---|
152 | if test -z "$SIZE32"; then
|
---|
153 | AC_MSG_ERROR(No 32 bit type found on this platform!)
|
---|
154 | fi
|
---|
155 | if test -z "$USIZE32"; then
|
---|
156 | AC_MSG_ERROR(No unsigned 32 bit type found on this platform!)
|
---|
157 | fi
|
---|
158 | if test -z "$SIZE64"; then
|
---|
159 | AC_MSG_WARN(No 64 bit type found on this platform!)
|
---|
160 | fi
|
---|
161 | if test -z "$USIZE64"; then
|
---|
162 | AC_MSG_WARN(No unsigned 64 bit type found on this platform!)
|
---|
163 | fi
|
---|
164 |
|
---|
165 | AC_ARG_ENABLE([crc],
|
---|
166 | [AS_HELP_STRING([--disable-crc],
|
---|
167 | [Disable CRC in the demuxer])],,
|
---|
168 | [enable_crc=yes])
|
---|
169 |
|
---|
170 | AM_CONDITIONAL([DISABLE_CRC], [test "$enable_crc" = "no"])
|
---|
171 |
|
---|
172 | AS_IF([test "$enable_crc" = "no"],[
|
---|
173 | AC_DEFINE([DISABLE_CRC], [1], [Do not build with CRC])
|
---|
174 | ])
|
---|
175 |
|
---|
176 | dnl Checks for library functions.
|
---|
177 | AC_FUNC_MEMCMP
|
---|
178 |
|
---|
179 | dnl Make substitutions
|
---|
180 |
|
---|
181 | AC_SUBST(LIBTOOL_DEPS)
|
---|
182 | AC_SUBST(INCLUDE_INTTYPES_H)
|
---|
183 | AC_SUBST(INCLUDE_STDINT_H)
|
---|
184 | AC_SUBST(INCLUDE_SYS_TYPES_H)
|
---|
185 | AC_SUBST(SIZE16)
|
---|
186 | AC_SUBST(USIZE16)
|
---|
187 | AC_SUBST(SIZE32)
|
---|
188 | AC_SUBST(USIZE32)
|
---|
189 | AC_SUBST(SIZE64)
|
---|
190 | AC_SUBST(USIZE64)
|
---|
191 | AC_SUBST(OPT)
|
---|
192 | AC_SUBST(LIBS)
|
---|
193 | AC_SUBST(DEBUG)
|
---|
194 | AC_SUBST(CFLAGS)
|
---|
195 | AC_SUBST(PROFILE)
|
---|
196 |
|
---|
197 |
|
---|
198 | AC_CONFIG_FILES([
|
---|
199 | Makefile
|
---|
200 | src/Makefile
|
---|
201 | doc/Makefile doc/libogg/Makefile
|
---|
202 | include/Makefile include/ogg/Makefile include/ogg/config_types.h
|
---|
203 | libogg.spec
|
---|
204 | ogg.pc
|
---|
205 | ogg-uninstalled.pc
|
---|
206 | ])
|
---|
207 | AC_CONFIG_HEADERS([config.h])
|
---|
208 |
|
---|
209 | AC_OUTPUT
|
---|