18 |
|
AC_ARG_WITH(esd, [ --with-esd support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes]) |
19 |
|
AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [default=yes]], [WANT_GTK=$withval], [WANT_GTK=yes]) |
20 |
|
AC_ARG_WITH(mon, [ --with-mon use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=yes]) |
21 |
+ |
AC_ARG_WITH(dgcc, [ --with-dgcc=COMPILER use C++ COMPILER to compile synthetic opcodes], [DYNGEN_CC=$withval]) |
22 |
|
|
23 |
|
dnl Checks for programs. |
24 |
|
AC_PROG_CC |
648 |
|
#endif |
649 |
|
], [AC_MSG_RESULT(yes); HAVE_GCC30=yes], AC_MSG_RESULT(no)) |
650 |
|
|
651 |
+ |
dnl Check for ICC. |
652 |
+ |
AC_MSG_CHECKING(for ICC) |
653 |
+ |
HAVE_ICC=no |
654 |
+ |
if $CXX -V -v 2>&1 | grep -q "Intel(R) C++ Compiler"; then |
655 |
+ |
HAVE_ICC=yes |
656 |
+ |
fi |
657 |
+ |
AC_MSG_RESULT($HAVE_ICC) |
658 |
+ |
|
659 |
|
# Test if the compiler can generate ELF objects |
660 |
|
AC_CACHE_CHECK([whether the compiler can generate ELF objects], |
661 |
|
ac_cv_elf_objects, [ |
699 |
|
ac_cv_use_dyngen=no |
700 |
|
;; |
701 |
|
esac |
702 |
+ |
dnl Check for a suitable synthetic opcodes compiler (icc is faking itself as gcc 3.2.2) |
703 |
+ |
if [[ -z "$DYNGEN_CC" ]]; then |
704 |
+ |
if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_ICC" = "xno" ]]; then |
705 |
+ |
DYNGEN_CC=$CXX |
706 |
+ |
else |
707 |
+ |
for p in /usr/bin /usr/local/bin; do |
708 |
+ |
gxx="$p/g++" |
709 |
+ |
if [[ -x "$gxx" ]]; then |
710 |
+ |
DYNGEN_CC="$gxx" |
711 |
+ |
fi |
712 |
+ |
done |
713 |
+ |
fi |
714 |
+ |
fi |
715 |
+ |
if [[ -z "$DYNGEN_CC" ]] || ! { echo '#include <limits>' | $DYNGEN_CC -xc++ -c -o /dev/null - >& /dev/null; }; then |
716 |
+ |
ac_cv_use_dyngen=no |
717 |
+ |
fi |
718 |
|
]) |
719 |
|
if [[ "x$ac_cv_use_dyngen" = "xyes" ]]; then |
720 |
|
case $host_cpu in |
779 |
|
|
780 |
|
dnl Generate Makefile. |
781 |
|
AC_SUBST(DYNGENSRCS) |
782 |
+ |
AC_SUBST(DYNGEN_CC) |
783 |
|
AC_SUBST(DYNGEN_OP_FLAGS) |
784 |
|
AC_SUBST(SYSSRCS) |
785 |
|
AC_SUBST(CPUSRCS) |