VirtualBox

source: vbox/trunk/src/libs/libvorbis-1.3.7/configure.ac@ 105770

最後變更 在這個檔案從105770是 96468,由 vboxsync 提交於 2 年 前

libs/libvorbis-1.3.7: Re-exporting, hopefully this time everything is there. bugref:10275

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 9.4 KB
 
1dnl Process this file with autoconf to produce a configure script
2
3dnl ------------------------------------------------
4dnl Initialization and Versioning
5dnl ------------------------------------------------
6
7
8AC_INIT([libvorbis],[1.3.7],[[email protected]])
9
10AC_CONFIG_MACRO_DIR([m4])
11
12AC_CONFIG_SRCDIR([lib/mdct.c])
13
14AC_CANONICAL_HOST
15
16AM_INIT_AUTOMAKE
17AM_MAINTAINER_MODE
18
19dnl Add parameters for aclocal
20AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
21
22dnl enable silent rules on automake 1.11 and later
23m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
24
25dnl Library versioning
26dnl - library source changed -> increment REVISION
27dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
28dnl - interfaces added -> increment AGE
29dnl - interfaces removed -> AGE = 0
30
31V_LIB_CURRENT=4
32V_LIB_REVISION=9
33V_LIB_AGE=4
34
35VF_LIB_CURRENT=6
36VF_LIB_REVISION=8
37VF_LIB_AGE=3
38
39VE_LIB_CURRENT=2
40VE_LIB_REVISION=12
41VE_LIB_AGE=0
42
43AC_SUBST(V_LIB_CURRENT)
44AC_SUBST(V_LIB_REVISION)
45AC_SUBST(V_LIB_AGE)
46AC_SUBST(VF_LIB_CURRENT)
47AC_SUBST(VF_LIB_REVISION)
48AC_SUBST(VF_LIB_AGE)
49AC_SUBST(VE_LIB_CURRENT)
50AC_SUBST(VE_LIB_REVISION)
51AC_SUBST(VE_LIB_AGE)
52
53dnl --------------------------------------------------
54dnl Check for programs
55dnl --------------------------------------------------
56
57dnl save $CFLAGS since AC_PROG_CC likes to insert "-g -O2"
58dnl if $CFLAGS is blank
59cflags_save="$CFLAGS"
60AC_PROG_CC
61AC_PROG_CPP
62CFLAGS="$cflags_save"
63
64AC_C_INLINE
65
66AC_LIBTOOL_WIN32_DLL
67AC_PROG_LIBTOOL
68AM_PROG_CC_C_O
69
70dnl Check for doxygen
71if test "x$enable_docs" = xyes; then
72 AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false)
73 if test $HAVE_DOXYGEN = "false"; then
74 AC_MSG_WARN([*** doxygen not found, API documentation will not be built])
75 fi
76else
77 HAVE_DOXYGEN=false
78fi
79AM_CONDITIONAL(HAVE_DOXYGEN,$HAVE_DOXYGEN)
80
81dnl latex tools for the specification document
82AC_ARG_ENABLE(docs,
83 AC_HELP_STRING([--enable-docs], [build the documentation]))
84
85if test "x$enable_docs" = xyes; then
86 AC_CHECK_PROGS([PDFLATEX], pdflatex, [/bin/false])
87 AC_CHECK_PROGS([HTLATEX], htlatex, [/bin/false])
88 if test "x$PDFLATEX" = x/bin/false || test "x$HTLATEX" = x/bin/false; then
89 enable_docs=no
90 AC_MSG_WARN([Documentation will not be built!])
91 fi
92fi
93
94AM_CONDITIONAL(BUILD_DOCS, [test "x$enable_docs" = xyes])
95
96AC_ARG_ENABLE(examples,
97 AS_HELP_STRING([--enable-examples], [build the examples]))
98
99AM_CONDITIONAL(BUILD_EXAMPLES, [test "x$enable_examples" = xyes])
100
101dnl --------------------------------------------------
102dnl Set build flags based on environment
103dnl --------------------------------------------------
104
105dnl Set some target options
106
107cflags_save="$CFLAGS"
108if test -z "$GCC"; then
109 case $host in
110 *-*-irix*)
111 dnl If we're on IRIX, we wanna use cc even if gcc
112 dnl is there (unless the user has overriden us)...
113 if test -z "$CC"; then
114 CC=cc
115 fi
116 DEBUG="-g -signed"
117 CFLAGS="-O2 -w -signed"
118 PROFILE="-p -g3 -O2 -signed" ;;
119 sparc-sun-solaris*)
120 DEBUG="-v -g"
121 CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
122 PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc" ;;
123 *)
124 DEBUG="-g"
125 CFLAGS="-O"
126 PROFILE="-g -p" ;;
127 esac
128else
129
130 AC_MSG_CHECKING([GCC version])
131 GCC_VERSION=`$CC -dumpversion`
132 AC_MSG_RESULT([$GCC_VERSION])
133 case $host in
134 *86-*-linux*)
135 DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
136 CFLAGS="-O3 -Wall -Wextra -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char"
137# PROFILE="-Wall -Wextra -pg -g -O3 -ffast-math -D_REENTRANT -fsigned-char -fno-inline -static"
138 PROFILE="-Wall -Wextra -pg -g -O3 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char -fno-inline"
139
140 # glibc < 2.1.3 has a serious FP bug in the math inline header
141 # that will cripple Vorbis. Look to see if the magic FP stack
142 # clobber is missing in the mathinline header, thus indicating
143 # the buggy version
144
145 AC_EGREP_CPP(log10.*fldlg2.*fxch,[
146 #define __LIBC_INTERNAL_MATH_INLINES 1
147 #define __OPTIMIZE__
148 #include <math.h>
149 ],bad=maybe,bad=no)
150 if test ${bad} = "maybe" ;then
151 AC_EGREP_CPP(log10.*fldlg2.*fxch.*st\([[0123456789]]*\),
152 [
153 #define __LIBC_INTERNAL_MATH_INLINES 1
154 #define __OPTIMIZE__
155 #include <math.h>
156 ],bad=no,bad=yes)
157 fi
158 if test ${bad} = "yes" ;then
159 AC_MSG_WARN([ ])
160 AC_MSG_WARN([********************************************************])
161 AC_MSG_WARN([* The glibc headers on this machine have a serious bug *])
162 AC_MSG_WARN([* in /usr/include/bits/mathinline.h This bug affects *])
163 AC_MSG_WARN([* all floating point code, not just Ogg, built on this *])
164 AC_MSG_WARN([* machine. Upgrading to glibc 2.1.3 is strongly urged *])
165 AC_MSG_WARN([* to correct the problem. Note that upgrading glibc *])
166 AC_MSG_WARN([* will not fix any previously built programs; this is *])
167 AC_MSG_WARN([* a compile-time bug. *])
168 AC_MSG_WARN([* To work around the problem for this build of Ogg, *])
169 AC_MSG_WARN([* autoconf is disabling all math inlining. This will *])
170 AC_MSG_WARN([* hurt Ogg performace but is necessary for an Ogg that *])
171 AC_MSG_WARN([* will actually work. Once glibc is upgraded, rerun *])
172 AC_MSG_WARN([* configure and make to build with inlining. *])
173 AC_MSG_WARN([********************************************************])
174 AC_MSG_WARN([ ])
175
176 CFLAGS=${OPT}" -D__NO_MATH_INLINES"
177 PROFILE=${PROFILE}" -D__NO_MATH_INLINES"
178 fi;;
179 powerpc-*-linux*spe)
180 DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES"
181 CFLAGS="-O3 -Wall -Wextra -ffast-math -mfused-madd -D_REENTRANT"
182 PROFILE="-pg -g -O3 -ffast-math -mfused-madd -D_REENTRANT";;
183 powerpc-*-linux*)
184 DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES"
185 CFLAGS="-O3 -Wall -Wextra -ffast-math -mfused-madd -mcpu=750 -D_REENTRANT"
186 PROFILE="-pg -g -O3 -ffast-math -mfused-madd -mcpu=750 -D_REENTRANT";;
187 *-*-linux*)
188 DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
189 CFLAGS="-O3 -Wall -Wextra -ffast-math -D_REENTRANT -fsigned-char"
190 PROFILE="-pg -g -O3 -ffast-math -D_REENTRANT -fsigned-char";;
191 sparc-sun-*)
192 sparc_cpu=""
193 AC_MSG_CHECKING([if gcc supports -mv8])
194 old_cflags="$CFLAGS"
195 CFLAGS="$CFLAGS -mv8"
196 AC_TRY_COMPILE(, [return 0;], [
197 AC_MSG_RESULT([yes])
198 sparc_cpu="-mv8"
199 ])
200 CFLAGS="$old_cflags"
201 DEBUG="-g -Wall -Wextra -D__NO_MATH_INLINES -fsigned-char $sparc_cpu"
202 CFLAGS="-O3 -Wall -Wextra -ffast-math -D__NO_MATH_INLINES -fsigned-char $sparc_cpu"
203 PROFILE="-pg -g -O3 -D__NO_MATH_INLINES -fsigned-char $sparc_cpu" ;;
204 *-*-darwin*)
205 DEBUG="-DDARWIN -fno-common -force_cpusubtype_ALL -Wall -g -O0 -fsigned-char"
206 CFLAGS="-DDARWIN -fno-common -force_cpusubtype_ALL -Wall -g -O3 -ffast-math -fsigned-char"
207 PROFILE="-DDARWIN -fno-common -force_cpusubtype_ALL -Wall -g -pg -O3 -ffast-math -fsigned-char";;
208 *-*-os2*)
209 # Use -W instead of -Wextra because gcc on OS/2 is an old version.
210 DEBUG="-g -Wall -W -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
211 CFLAGS="-O3 -Wall -W -ffast-math -D_REENTRANT -fsigned-char"
212 PROFILE="-pg -g -O3 -ffast-math -D_REENTRANT -fsigned-char";;
213 *)
214 DEBUG="-g -Wall -Wextra -D__NO_MATH_INLINES -fsigned-char"
215 CFLAGS="-O3 -Wall -Wextra -D__NO_MATH_INLINES -fsigned-char"
216 PROFILE="-O3 -g -pg -D__NO_MATH_INLINES -fsigned-char" ;;
217 esac
218
219 AC_ADD_CFLAGS([-Wdeclaration-after-statement])
220fi
221CFLAGS="$CFLAGS $cflags_save"
222
223dnl --------------------------------------------------
224dnl Check for headers
225dnl --------------------------------------------------
226
227AC_CHECK_HEADER(memory.h,CFLAGS="$CFLAGS -DUSE_MEMORY_H",:)
228
229dnl --------------------------------------------------
230dnl Check for typedefs, structures, etc
231dnl --------------------------------------------------
232
233dnl none
234
235dnl --------------------------------------------------
236dnl Check for libraries
237dnl --------------------------------------------------
238
239AC_CHECK_LIB(m, cos, VORBIS_LIBS="-lm", VORBIS_LIBS="")
240AC_CHECK_LIB(pthread, pthread_create, pthread_lib="-lpthread", :)
241
242PKG_PROG_PKG_CONFIG
243
244HAVE_OGG=no
245if test "x$PKG_CONFIG" != "x"
246then
247 PKG_CHECK_MODULES(OGG, ogg >= 1.0, HAVE_OGG=yes, HAVE_OGG=no)
248fi
249if test "x$HAVE_OGG" = "xno"
250then
251 dnl fall back to the old school test
252 XIPH_PATH_OGG(, AC_MSG_ERROR(must have Ogg installed!))
253 libs_save=$LIBS
254 LIBS="$OGG_LIBS $VORBIS_LIBS"
255 AC_CHECK_FUNC(oggpack_writealign, , AC_MSG_ERROR(Ogg >= 1.0 required !))
256 LIBS=$libs_save
257fi
258
259dnl --------------------------------------------------
260dnl Check for library functions
261dnl --------------------------------------------------
262
263AC_FUNC_ALLOCA
264AC_FUNC_MEMCMP
265
266dnl --------------------------------------------------
267dnl Do substitutions
268dnl --------------------------------------------------
269
270AC_SUBST(VORBIS_LIBS)
271AC_SUBST(DEBUG)
272AC_SUBST(PROFILE)
273AC_SUBST(pthread_lib)
274
275dnl The following line causes the libtool distributed with the source
276dnl to be replaced if the build system has a more recent version.
277AC_SUBST(LIBTOOL_DEPS)
278
279AC_CONFIG_FILES([
280Makefile
281m4/Makefile
282lib/Makefile
283lib/modes/Makefile
284lib/books/Makefile
285lib/books/coupled/Makefile
286lib/books/uncoupled/Makefile
287lib/books/floor/Makefile
288doc/Makefile doc/vorbisfile/Makefile doc/vorbisenc/Makefile doc/libvorbis/Makefile
289doc/Doxyfile
290include/Makefile include/vorbis/Makefile
291examples/Makefile
292test/Makefile
293vq/Makefile
294libvorbis.spec
295vorbis.pc
296vorbisenc.pc
297vorbisfile.pc
298vorbis-uninstalled.pc
299vorbisenc-uninstalled.pc
300vorbisfile-uninstalled.pc
301])
302AC_CONFIG_HEADERS([config.h])
303
304AC_OUTPUT
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette