Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/libogg-1.1.3/configure.in @ 21

Last change on this file since 21 was 15, checked in by landauf, 17 years ago

added libogg

File size: 6.3 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2
3AC_INIT(src/framing.c)
4
5AM_INIT_AUTOMAKE(libogg,1.1.3)
6AM_MAINTAINER_MODE
7
8dnl Library versioning
9
10LIB_CURRENT=5
11LIB_REVISION=3
12LIB_AGE=5
13AC_SUBST(LIB_CURRENT)
14AC_SUBST(LIB_REVISION)
15AC_SUBST(LIB_AGE)
16
17AC_PROG_CC
18AM_PROG_LIBTOOL
19
20dnl config.h
21AM_CONFIG_HEADER(config.h)
22
23dnl Set some options based on environment
24
25cflags_save="$CFLAGS"
26if test -z "$GCC"; then
27        case $host in
28        *-*-irix*)
29                DEBUG="-g -signed"
30                CFLAGS="-O2 -w -signed"
31                PROFILE="-p -g3 -O2 -signed"
32                ;;
33        sparc-sun-solaris*)
34                DEBUG="-v -g"
35                CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
36                PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc"
37                ;;
38        *)
39                DEBUG="-g"
40                CFLAGS="-O"
41                PROFILE="-g -p"
42                ;;
43        esac
44else
45        case $host in
46        *-*-linux*)
47                DEBUG="-g -Wall -fsigned-char"
48                CFLAGS="-O20 -ffast-math -fsigned-char"
49                PROFILE="-Wall -W -pg -g -O20 -ffast-math -fsigned-char"
50                ;;
51        sparc-sun-*)
52                DEBUG="-g -Wall -fsigned-char -mv8"
53                CFLAGS="-O20 -ffast-math -fsigned-char -mv8"
54                PROFILE="-pg -g -O20 -fsigned-char -mv8"
55                ;;
56        *-*-darwin*)
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"
60                ;;
61        *)
62                DEBUG="-g -Wall -fsigned-char"
63                CFLAGS="-O20 -fsigned-char"
64                PROFILE="-O20 -g -pg -fsigned-char"
65                ;;
66        esac
67fi
68CFLAGS="$CFLAGS $cflags_save"
69DEBUG="$DEBUG $cflags_save"
70PROFILE="$PROFILE $cflags_save"
71
72dnl Checks for programs.
73
74dnl Checks for libraries.
75
76dnl Checks for header files.
77AC_HEADER_STDC
78
79dnl Checks for typedefs, structures, and compiler characteristics.
80AC_C_CONST
81
82dnl Check for types
83
84AC_MSG_CHECKING(for int16_t)
85AC_CACHE_VAL(has_int16_t,
86[AC_TRY_RUN([
87#ifdef __BEOS__
88#include <inttypes.h>
89#endif
90#include <sys/types.h>
91int16_t foo;
92int main() {return 0;}
93],
94has_int16_t=yes,
95has_int16_t=no,
96has_int16_t=no
97)])
98AC_MSG_RESULT($has_int16_t)
99
100AC_MSG_CHECKING(for int32_t)
101AC_CACHE_VAL(has_int32_t,
102[AC_TRY_RUN([
103#ifdef __BEOS__
104#include <inttypes.h>
105#endif
106#include <sys/types.h>
107int32_t foo;
108int main() {return 0;}
109],
110has_int32_t=yes,
111has_int32_t=no,
112has_int32_t=no
113)])
114AC_MSG_RESULT($has_int32_t)
115
116AC_MSG_CHECKING(for uint32_t)
117AC_CACHE_VAL(has_uint32_t,
118[AC_TRY_RUN([
119#ifdef __BEOS__
120#include <inttypes.h>
121#endif
122#include <sys/types.h>
123uint32_t foo;
124int main() {return 0;}
125],
126has_uint32_t=yes,
127has_uint32_t=no,
128has_uint32_t=no
129)])
130AC_MSG_RESULT($has_uint32_t)
131
132AC_MSG_CHECKING(for uint16_t)
133AC_CACHE_VAL(has_uint16_t,
134[AC_TRY_RUN([
135#ifdef __BEOS__
136#include <inttypes.h>
137#endif
138#include <sys/types.h>
139uint16_t foo;
140int main() {return 0;}
141],
142has_uint16_t=yes,
143has_uint16_t=no,
144has_uint16_t=no
145)])
146AC_MSG_RESULT($has_uint16_t)
147
148AC_MSG_CHECKING(for u_int32_t)
149AC_CACHE_VAL(has_u_int32_t,
150[AC_TRY_RUN([
151#ifdef __BEOS__
152#include <inttypes.h>
153#endif
154#include <sys/types.h>
155u_int32_t foo;
156int main() {return 0;}
157],
158has_u_int32_t=yes,
159has_u_int32_t=no,
160has_u_int32_t=no
161)])
162AC_MSG_RESULT($has_u_int32_t)
163
164AC_MSG_CHECKING(for u_int16_t)
165AC_CACHE_VAL(has_u_int16_t,
166[AC_TRY_RUN([
167#ifdef __BEOS__
168#include <inttypes.h>
169#endif
170#include <sys/types.h>
171u_int16_t foo;
172int main() {return 0;}
173],
174has_u_int16_t=yes,
175has_u_int16_t=no,
176has_u_int16_t=no
177)])
178AC_MSG_RESULT($has_u_int16_t)
179
180AC_MSG_CHECKING(for int64_t)
181AC_CACHE_VAL(has_int64_t,
182[AC_TRY_RUN([
183#ifdef __BEOS__
184#include <inttypes.h>
185#endif
186#include <sys/types.h>
187int64_t foo;
188int main() {return 0;}
189],
190has_int64_t=yes,
191has_int64_t=no,
192has_int64_t=no
193)])
194AC_MSG_RESULT($has_int64_t)
195
196AC_CHECK_SIZEOF(short)
197AC_CHECK_SIZEOF(int)
198AC_CHECK_SIZEOF(long)
199AC_CHECK_SIZEOF(long long)
200
201
202if test x$has_int16_t = "xyes" ; then
203        SIZE16="int16_t"
204else
205        case 2 in
206                $ac_cv_sizeof_short) SIZE16="short";;
207                $ac_cv_sizeof_int) SIZE16="int";;
208        esac
209fi
210
211if test x$has_int32_t = "xyes" ; then
212        SIZE32="int32_t"
213else
214        case 4 in
215                $ac_cv_sizeof_short) SIZE32="short";;
216                $ac_cv_sizeof_int) SIZE32="int";;
217                $ac_cv_sizeof_long) SIZE32="long";;
218        esac
219fi
220
221if test x$has_uint32_t = "xyes" ; then
222        USIZE32="uint32_t"
223else
224        if test x$has_u_int32_t = "xyes" ; then
225                USIZE32="u_int32_t"
226        else
227                case 4 in
228                        $ac_cv_sizeof_short) USIZE32="unsigned short";;
229                        $ac_cv_sizeof_int) USIZE32="unsigned int";;
230                        $ac_cv_sizeof_long) USIZE32="unsigned long";;
231                esac
232        fi
233fi
234
235if test x$has_uint16_t = "xyes" ; then
236        USIZE16="uint16_t"
237else
238        if test x$has_u_int16_t = "xyes" ; then
239                USIZE16="u_int16_t"
240        else
241                case 2 in
242                        $ac_cv_sizeof_short) USIZE16="unsigned short";;
243                        $ac_cv_sizeof_int) USIZE16="unsigned int";;
244                        $ac_cv_sizeof_long) USIZE16="unsigned long";;
245                esac
246        fi
247fi
248
249if test x$has_int64_t = "xyes" ; then
250        SIZE64="int64_t"
251else
252case 8 in
253        $ac_cv_sizeof_int) SIZE64="int";;
254        $ac_cv_sizeof_long) SIZE64="long";;
255        $ac_cv_sizeof_long_long) SIZE64="long long";;
256esac
257fi
258
259if test -z "$SIZE16"; then
260        AC_MSG_ERROR(No 16 bit type found on this platform!)
261fi
262if test -z "$USIZE16"; then
263        AC_MSG_ERROR(No unsigned 16 bit type found on this platform!)
264fi
265if test -z "$SIZE32"; then
266        AC_MSG_ERROR(No 32 bit type found on this platform!)
267fi
268if test -z "$USIZE32"; then
269        AC_MSG_ERROR(No unsigned 32 bit type found on this platform!)
270fi
271if test -z "$SIZE64"; then
272        AC_MSG_WARN(No 64 bit type found on this platform!)
273fi
274
275dnl Checks for library functions.
276AC_FUNC_MEMCMP
277
278dnl Make substitutions
279
280AC_SUBST(LIBTOOL_DEPS)
281AC_SUBST(SIZE16)
282AC_SUBST(USIZE16)
283AC_SUBST(SIZE32)
284AC_SUBST(USIZE32)
285AC_SUBST(SIZE64)
286AC_SUBST(OPT)
287AC_SUBST(LIBS)
288AC_SUBST(DEBUG)
289AC_SUBST(CFLAGS)
290AC_SUBST(PROFILE)
291
292AC_OUTPUT([
293Makefile
294src/Makefile
295doc/Makefile doc/libogg/Makefile
296include/Makefile include/ogg/Makefile include/ogg/config_types.h
297win32/Makefile
298libogg.spec
299ogg.pc
300ogg-uninstalled.pc
301])
Note: See TracBrowser for help on using the repository browser.