]> git.jsancho.org Git - lugaru.git/blob - libogg-1.0/configure.in
Simplified web browser launching on Linux.
[lugaru.git] / libogg-1.0 / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_INIT(src/framing.c)
4
5 AM_INIT_AUTOMAKE(libogg,1.0)
6
7 dnl Library versioning
8
9 LIB_CURRENT=4
10 LIB_REVISION=0
11 LIB_AGE=4
12 AC_SUBST(LIB_CURRENT)
13 AC_SUBST(LIB_REVISION)
14 AC_SUBST(LIB_AGE)
15
16 AC_PROG_CC
17 AM_PROG_LIBTOOL
18
19 dnl Set some options based on environment
20
21 cflags_save="$CFLAGS"
22 ldflags_save="$LDFLAGS"
23 if test -z "$GCC"; then
24         case $host in 
25         *-*-irix*)
26                 DEBUG="-g -signed" 
27                 CFLAGS="-O2 -w -signed"
28                 PROFILE="-p -g3 -O2 -signed"
29                 ;;
30         sparc-sun-solaris*)
31                 DEBUG="-v -g"
32                 CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
33                 PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc"
34                 ;;
35         *)
36                 DEBUG="-g"
37                 CFLAGS="-O"
38                 PROFILE="-g -p" 
39                 ;;
40         esac
41 else
42         case $host in 
43         *-*-linux*)
44                 DEBUG="-g -Wall -fsigned-char"
45                 CFLAGS="-O20 -ffast-math -fsigned-char"
46                 PROFILE="-Wall -W -pg -g -O20 -ffast-math -fsigned-char"
47                 ;;
48         sparc-sun-*)
49                 DEBUG="-g -Wall -fsigned-char -mv8"
50                 CFLAGS="-O20 -ffast-math -fsigned-char -mv8"
51                 PROFILE="-pg -g -O20 -fsigned-char -mv8" 
52                 ;;
53         *-*-darwin*)
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"
57                 ;;
58         *)
59                 DEBUG="-g -Wall -fsigned-char"
60                 CFLAGS="-O20 -fsigned-char"
61                 PROFILE="-O20 -g -pg -fsigned-char" 
62                 ;;
63         esac
64 fi
65 CFLAGS="$CFLAGS $cflags_save"
66 DEBUG="$DEBUG $cflags_save"
67 PROFILE="$PROFILE $cflags_save"
68 LDFLAGS="$LDFLAGS $ldflags_save"
69
70 dnl Checks for programs.
71
72 dnl Checks for libraries.
73
74 dnl Checks for header files.
75 AC_HEADER_STDC
76
77 dnl Checks for typedefs, structures, and compiler characteristics.
78 AC_C_CONST
79
80 dnl Check for types
81
82 AC_MSG_CHECKING(for int16_t)
83 AC_CACHE_VAL(has_int16_t,
84 [AC_TRY_RUN([
85 #ifdef __BEOS__
86 #include <inttypes.h>
87 #endif
88 #include <sys/types.h>
89 int16_t foo;
90 int main() {return 0;}
91 ],
92 has_int16_t=yes,
93 has_int16_t=no,
94 has_int16_t=no
95 )])
96 AC_MSG_RESULT($has_int16_t)
97
98 AC_MSG_CHECKING(for int32_t)
99 AC_CACHE_VAL(has_int32_t,
100 [AC_TRY_RUN([
101 #ifdef __BEOS__
102 #include <inttypes.h>
103 #endif
104 #include <sys/types.h>
105 int32_t foo;
106 int main() {return 0;}
107 ],
108 has_int32_t=yes,
109 has_int32_t=no,
110 has_int32_t=no
111 )])
112 AC_MSG_RESULT($has_int32_t)
113
114 AC_MSG_CHECKING(for uint32_t)
115 AC_CACHE_VAL(has_uint32_t,
116 [AC_TRY_RUN([
117 #ifdef __BEOS__
118 #include <inttypes.h>
119 #endif
120 #include <sys/types.h>
121 uint32_t foo;
122 int main() {return 0;}
123 ],
124 has_uint32_t=yes,
125 has_uint32_t=no,
126 has_uint32_t=no
127 )])
128 AC_MSG_RESULT($has_uint32_t)
129
130 AC_MSG_CHECKING(for u_int32_t)
131 AC_CACHE_VAL(has_u_int32_t,
132 [AC_TRY_RUN([
133 #ifdef __BEOS__
134 #include <inttypes.h>
135 #endif
136 #include <sys/types.h>
137 u_int32_t foo;
138 int main() {return 0;}
139 ],
140 has_u_int32_t=yes,
141 has_u_int32_t=no,
142 has_u_int32_t=no
143 )])
144 AC_MSG_RESULT($has_u_int32_t)
145
146 AC_MSG_CHECKING(for int64_t)
147 AC_CACHE_VAL(has_int64_t,
148 [AC_TRY_RUN([
149 #ifdef __BEOS__
150 #include <inttypes.h>
151 #endif
152 #include <sys/types.h>
153 int64_t foo;
154 int main() {return 0;}
155 ],
156 has_int64_t=yes,
157 has_int64_t=no,
158 has_int64_t=no
159 )])
160 AC_MSG_RESULT($has_int64_t)
161
162 AC_CHECK_SIZEOF(short)
163 AC_CHECK_SIZEOF(int)
164 AC_CHECK_SIZEOF(long)
165 AC_CHECK_SIZEOF(long long)
166
167
168 if test x$has_int16_t = "xyes" ; then
169         SIZE16="int16_t"
170 else
171         case 2 in
172                 $ac_cv_sizeof_short) SIZE16="short";;
173                 $ac_cv_sizeof_int) SIZE16="int";;
174         esac
175 fi
176
177 if test x$has_int32_t = "xyes" ; then
178         SIZE32="int32_t"
179 else
180         case 4 in
181                 $ac_cv_sizeof_short) SIZE32="short";;
182                 $ac_cv_sizeof_int) SIZE32="int";;
183                 $ac_cv_sizeof_long) SIZE32="long";;
184         esac
185 fi
186
187 if test x$has_uint32_t = "xyes" ; then
188         USIZE32="uint32_t"
189 else
190         if test x$has_u_int32_t = "xyes" ; then
191                 USIZE32="u_int32_t"
192         else
193                 case 4 in
194                         $ac_cv_sizeof_short) USIZE32="unsigned short";;
195                         $ac_cv_sizeof_int) USIZE32="unsigned int";;
196                         $ac_cv_sizeof_long) USIZE32="unsigned long";;
197                 esac
198         fi
199 fi
200
201 if test x$has_int64_t = "xyes" ; then
202         SIZE64="int64_t"
203 else
204 case 8 in
205         $ac_cv_sizeof_int) SIZE64="int";;
206         $ac_cv_sizeof_long) SIZE64="long";;
207         $ac_cv_sizeof_long_long) SIZE64="long long";;
208 esac
209 fi
210
211 if test -z "$SIZE16"; then
212         AC_MSG_ERROR(No 16 bit type found on this platform!)
213 fi
214 if test -z "$SIZE32"; then
215         AC_MSG_ERROR(No 32 bit type found on this platform!)
216 fi
217 if test -z "$USIZE32"; then
218         AC_MSG_ERROR(No unsigned 32 bit type found on this platform!)
219 fi
220 if test -z "$SIZE64"; then
221         AC_MSG_WARN(No 64 bit type found on this platform!)
222 fi
223
224 dnl Checks for library functions.
225 AC_FUNC_MEMCMP
226
227 dnl Make substitutions
228
229 AC_SUBST(LIBTOOL_DEPS)
230 AC_SUBST(SIZE16)
231 AC_SUBST(SIZE32)
232 AC_SUBST(USIZE32)
233 AC_SUBST(SIZE64)
234 AC_SUBST(OPT)
235 AC_SUBST(LIBS)
236 AC_SUBST(DEBUG)
237 AC_SUBST(CFLAGS)
238 AC_SUBST(PROFILE)
239
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)