497 |
|
AUDIOSRC=Irix/audio_irix.cpp |
498 |
|
LIBS="$LIBS -laudio" |
499 |
|
WANT_ESD=no |
500 |
+ |
|
501 |
+ |
dnl Check if our compiler supports -IPA (MIPSPro) |
502 |
+ |
HAVE_IPA=no |
503 |
+ |
ocflags="$CFLAGS" |
504 |
+ |
CFLAGS=`echo " $CFLAGS -IPA" | sed -e "s/ -g //g"` |
505 |
+ |
AC_MSG_CHECKING(if "-IPA" works) |
506 |
+ |
dnl Do a test compile of an empty function |
507 |
+ |
AC_TRY_COMPILE([#if defined __GNUC__ |
508 |
+ |
# error GCC does not support IPA yet |
509 |
+ |
#endif],, [AC_MSG_RESULT(yes); HAVE_IPA=yes], AC_MSG_RESULT(no)) |
510 |
+ |
CFLAGS="$ocflags" |
511 |
|
;; |
512 |
|
esac |
513 |
|
|
1293 |
|
i?86:elf) |
1294 |
|
ac_cv_use_dyngen=yes |
1295 |
|
;; |
1296 |
+ |
mips:elf) |
1297 |
+ |
ac_cv_use_dyngen=yes |
1298 |
+ |
;; |
1299 |
|
powerpc:mach) |
1300 |
|
ac_cv_use_dyngen=yes |
1301 |
|
;; |
1328 |
|
i?86) |
1329 |
|
DYNGEN_OP_FLAGS="-fomit-frame-pointer -mpreferred-stack-boundary=2" |
1330 |
|
;; |
1331 |
+ |
mips) |
1332 |
+ |
DYNGEN_OP_FLAGS="-fno-delayed-branch -mno-abicalls" |
1333 |
+ |
;; |
1334 |
|
powerpc) |
1335 |
|
if [[ "x$ac_cv_object_format" = "xmach" ]]; then |
1336 |
|
DYNGEN_OP_FLAGS="-mdynamic-no-pic" |
1346 |
|
if [[ "x$HAVE_GCC30" = "xyes" ]]; then |
1347 |
|
DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -fno-reorder-blocks -fno-optimize-sibling-calls" |
1348 |
|
fi |
1349 |
+ |
if [[ "x$DYNGEN_CC" != "x$CXX" ]]; then |
1350 |
+ |
DYNGEN_CFLAGS="-O2 $CFLAGS" |
1351 |
+ |
DYNGEN_CXXFLAGS="-O2 $CXXFLAGS" |
1352 |
+ |
else |
1353 |
+ |
DYNGEN_CFLAGS="\$(CFLAGS)" |
1354 |
+ |
DYNGEN_CXXFLAGS="\$(CXXFLAGS)" |
1355 |
+ |
fi |
1356 |
|
else |
1357 |
|
WANT_JIT=no |
1358 |
|
fi |
1401 |
|
CPPFLAGS="$CPPFLAGS -DUSE_JIT" |
1402 |
|
fi |
1403 |
|
|
1404 |
+ |
dnl Higher level optimizations with MIPSPro compilers are possible |
1405 |
+ |
if [[ "x$HAVE_IPA" = "xyes" ]]; then |
1406 |
+ |
CFLAGS="`echo $CFLAGS | sed -e 's/-g//g'` -O3 -OPT:Olimit=0 -IPA" |
1407 |
+ |
CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-g//g'` -O3 -OPT:Olimit=0 -IPA" |
1408 |
+ |
CXXFLAGS="-LANG:std $CXXFLAGS" |
1409 |
+ |
LDFLAGS="$LDFLAGS -O3 -OPT:Olimit=0 -IPA" |
1410 |
+ |
fi |
1411 |
+ |
|
1412 |
|
dnl Generate Makefile. |
1413 |
|
AC_SUBST(PERL) |
1414 |
|
AC_SUBST(USE_DYNGEN, [$ac_cv_use_dyngen]) |
1415 |
|
AC_SUBST(DYNGENSRCS) |
1416 |
|
AC_SUBST(DYNGEN_CC) |
1417 |
+ |
AC_SUBST(DYNGEN_CFLAGS) |
1418 |
+ |
AC_SUBST(DYNGEN_CXXFLAGS) |
1419 |
|
AC_SUBST(DYNGEN_OP_FLAGS) |
1420 |
|
AC_SUBST(SYSSRCS) |
1421 |
|
AC_SUBST(CPUSRCS) |