comparison configure.ac @ 1138:402ee2120cb1 trunk

[svn] - added options in configure.ac to disable sse2 and altivec support (madplug) even if available on the system
author giacomo
date Sun, 27 May 2007 17:11:58 -0700
parents 325c52b01e56
children 5896bd827cbc
comparison
equal deleted inserted replaced
1137:48b586065895 1138:402ee2120cb1
285 have_coreaudio=no 285 have_coreaudio=no
286 fi 286 fi
287 287
288 dnl *** AltiVec 288 dnl *** AltiVec
289 289
290 AC_CHECK_HEADERS(altivec.h, 290 AC_ARG_ENABLE(altivec,
291 [AC_DEFINE(HAVE_ALTIVEC, 1, [Define to 1 if your system has AltiVec.]) 291 [ --disable-altivec disable AltiVec support. (default=enabled) ],
292 AC_DEFINE(HAVE_ALTIVEC_H, 1, [Define to 1 if your system has an altivec.h file.]) 292 [enable_altivec=$enableval],
293 AC_DEFINE(ARCH_POWERPC, 1, [Define to 1 if your system is a PowerPC.]) 293 [enable_altivec=yes]
294 DCT64=dct64_altivec.c 294 )
295 SIMD_CFLAGS=-maltivec 295 if test "x$enable_altivec" = "xyes"; then
296 AC_SUBST(SIMD_CFLAGS)], 296 AC_CHECK_HEADERS(altivec.h,
297 [DCT64=dct64.c] 297 [AC_DEFINE(HAVE_ALTIVEC, 1, [Define to 1 if your system has AltiVec.])
298 ) 298 AC_DEFINE(HAVE_ALTIVEC_H, 1, [Define to 1 if your system has an altivec.h file.])
299 AC_DEFINE(ARCH_POWERPC, 1, [Define to 1 if your system is a PowerPC.])
300 DCT64=dct64_altivec.c
301 SIMD_CFLAGS=-maltivec
302 AC_SUBST(SIMD_CFLAGS)],
303 [DCT64=dct64.c]
304 )
305 fi
299 AC_SUBST(DCT64) 306 AC_SUBST(DCT64)
300 307
301 dnl *** SSE2 308 dnl *** SSE2
302 309
303 AC_MSG_CHECKING(SSE2) 310 AC_ARG_ENABLE(sse2,
304 ac_save_CFLAGS="$CFLAGS" 311 [ --disable-sse2 disable SSE2 support. (default=enabled) ],
305 CFLAGS="-msse2" 312 [enable_sse2=$enableval],
306 AC_TRY_RUN([ 313 [enable_sse2=yes]
307 #include <emmintrin.h> 314 )
308 int main() 315 if test "x$enable_sse2" = "xyes"; then
309 { 316 AC_MSG_CHECKING(SSE2)
310 _mm_setzero_pd(); 317 ac_save_CFLAGS="$CFLAGS"
311 return 0; 318 CFLAGS="-msse2"
312 } 319 AC_TRY_RUN([
313 ], 320 #include <emmintrin.h>
314 [AC_MSG_RESULT(SSE2 yes) 321 int main()
315 AC_DEFINE(HAVE_SSE2, 1, [Define to 1 if your system has SSE2]) 322 {
316 SIMD_CFLAGS=-msse2], 323 _mm_setzero_pd();
317 [AC_MSG_RESULT(SSE2 no)], 324 return 0;
318 ) 325 }
326 ],
327 [AC_MSG_RESULT(SSE2 yes)
328 AC_DEFINE(HAVE_SSE2, 1, [Define to 1 if your system has SSE2])
329 SIMD_CFLAGS=-msse2],
330 [AC_MSG_RESULT(SSE2 no)],
331 )
332 fi
319 AC_SUBST(SIMD_CFLAGS) 333 AC_SUBST(SIMD_CFLAGS)
320 CFLAGS="$ac_save_CFLAGS" 334 CFLAGS="$ac_save_CFLAGS"
321 335
322 dnl *** MP3 336 dnl *** MP3
323 337