| | 670 | |
|---|
| | 671 | |
|---|
| | 672 | dnl ************************************************** |
|---|
| | 673 | dnl * libemu support * |
|---|
| | 674 | dnl ************************************************** |
|---|
| | 675 | |
|---|
| | 676 | AC_ARG_WITH(emu-lib, |
|---|
| | 677 | [ --with-emu-lib=PATH specify path to libemu library], |
|---|
| | 678 | [emu_lib=$withval], |
|---|
| | 679 | [emu_lib=no]) |
|---|
| | 680 | AC_ARG_WITH(emu-include, |
|---|
| | 681 | [ --with-emu-include=PATH specify path to libemu include files], |
|---|
| | 682 | [emu_inc=$withval], |
|---|
| | 683 | [emu_inc=no]) |
|---|
| | 684 | |
|---|
| | 685 | AC_ARG_ENABLE(emu, [ --enable-emu Enable Support [default=auto]], |
|---|
| | 686 | enable_emu="$enableval", enable_emu="no") |
|---|
| | 687 | |
|---|
| | 688 | |
|---|
| | 689 | if test x$enable_emu = xyes; then |
|---|
| | 690 | |
|---|
| | 691 | AC_MSG_CHECKING(for libemu - x86 emulation library) |
|---|
| | 692 | |
|---|
| | 693 | dnl ************************************************** |
|---|
| | 694 | dnl * emu headers * |
|---|
| | 695 | dnl ************************************************** |
|---|
| | 696 | |
|---|
| | 697 | orig_cppflags=$CPPFLAGS |
|---|
| | 698 | |
|---|
| | 699 | if test "x$emu_inc" != xno; then |
|---|
| | 700 | CPPFLAGS="-I$emu_inc $CPPFLAGS" |
|---|
| | 701 | fi |
|---|
| | 702 | |
|---|
| | 703 | AC_CHECK_HEADER(emu/emu.h, [found=yes], [found=no]) |
|---|
| | 704 | |
|---|
| | 705 | if test "x$found" != "xno"; then |
|---|
| | 706 | |
|---|
| | 707 | |
|---|
| | 708 | dnl ************************************************** |
|---|
| | 709 | dnl * emu lib * |
|---|
| | 710 | dnl ************************************************** |
|---|
| | 711 | |
|---|
| | 712 | orig_ldflags=$LDFLAGS |
|---|
| | 713 | if test "x$emu_lib" != "xno"; then |
|---|
| | 714 | LDFLAGS="-L$emu_lib $LDFLAGS" |
|---|
| | 715 | fi |
|---|
| | 716 | AC_CHECK_LIB(emu, emu_new, [found=yes], [found=no]) |
|---|
| | 717 | |
|---|
| | 718 | if test "x$found" != "xyes"; then |
|---|
| | 719 | LDFLAGS=$orig_ldflags |
|---|
| | 720 | fi |
|---|
| | 721 | else |
|---|
| | 722 | CPPFLAGS=$orig_cppflags |
|---|
| | 723 | |
|---|
| | 724 | fi |
|---|
| | 725 | |
|---|
| | 726 | if test "x$found" != "xyes"; then |
|---|
| | 727 | enable_emu=no |
|---|
| | 728 | else |
|---|
| | 729 | AC_DEFINE(HAVE_EMU, 1 , [Define if we have emu client library]) |
|---|
| | 730 | LIB_EMU="-lemu" |
|---|
| | 731 | fi |
|---|
| | 732 | fi |
|---|