2001-04-10 05:04:59 +04:00
dnl // Process this file with autoconf to produce a configure script.
2002-09-26 06:19:14 +04:00
AC_PREREQ(2.50)
2001-04-10 05:04:59 +04:00
AC_INIT(bochs.h)
2011-02-25 18:32:08 +03:00
AC_REVISION([[$Id$]])
2001-04-10 05:04:59 +04:00
AC_CONFIG_HEADER(config.h)
2002-10-25 01:07:56 +04:00
AC_CONFIG_HEADER(ltdlconf.h)
2001-04-10 05:04:59 +04:00
2001-11-10 06:48:22 +03:00
dnl // Put Bochs version information right here so that it gets substituted
dnl // into all the right places.
2015-05-03 20:03:26 +03:00
VERSION="2.6.8.svn"
VER_STRING="2.6.8.svn"
2008-02-09 10:51:15 +03:00
dnl // WIN_VER_STRING format is "a, b, c, d"
2009-04-30 21:58:05 +04:00
dnl // c should be > 90 for pre-release of next version otherwise patch level
2011-04-01 20:19:15 +04:00
dnl // d should be 0 for release and 1 for svn version
2015-05-03 20:03:26 +03:00
WIN_VER_STRING="2, 6, 8, 1"
REL_STRING="Built from SVN snapshot after release 2.6.8"
2001-11-10 06:48:22 +03:00
2001-04-10 05:04:59 +04:00
changequote(<<, >>)
changequote([, ])
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
dnl Detect host and target
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
2002-09-25 01:35:04 +04:00
AC_MSG_CHECKING(if you are configuring for another platform)
2005-03-30 20:41:31 +04:00
if test "$cross_compiling" = yes -o "$target_os" = "windows"; then
2002-09-25 01:35:04 +04:00
AC_MSG_RESULT(yes)
cross_configure=1
2005-03-30 20:41:31 +04:00
else
AC_MSG_RESULT(no)
cross_configure=0
2002-09-25 01:35:04 +04:00
fi
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
# this case statement defines the compile flags which are needed to
2008-02-06 01:57:43 +03:00
# compile bochs on a platform. Don't put things like optimization settings
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
# into the configure.in file, since people will want to be able to change
# those settings by defining CFLAGS and CXXFLAGS before running configure.
2002-12-12 22:43:40 +03:00
NO_LT=0
2011-06-23 01:52:35 +04:00
MSVC_TARGET=0
2002-12-14 01:02:05 +03:00
need_dlcompat_for_plugins=0
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
case "$target" in
*-pc-windows* | *-pc-winnt*)
2013-12-30 00:04:16 +04:00
DEFAULT_GUI=win32 # default to win32 gui
NO_LT=1 # do not use libtool at all
2011-06-23 01:52:35 +04:00
MSVC_TARGET=1
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
;;
2013-12-22 16:17:28 +04:00
*-cygwin* | *-mingw32*)
2013-12-30 00:04:16 +04:00
NO_LT=1 # do not use libtool at all
2002-09-23 09:15:06 +04:00
if test "$with_term" = yes; then
2013-12-22 16:17:28 +04:00
# ncurses won't compile with -DWIN32
2002-09-23 09:15:06 +04:00
# also, I can't get it to link without this -DBROKEN_LINKER=1 hack.
# see /usr/include/curses.h for details.
ADD_FLAGS="-DBROKEN_LINKER=1"
else
# default case
2013-12-22 16:17:28 +04:00
ADD_FLAGS="-DWIN32" # required for cygwin/mingw compile+win32 gui
2011-04-20 21:44:00 +04:00
DEFAULT_GUI=win32 # default to win32 gui
2002-09-23 09:15:06 +04:00
fi
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
;;
*-macosx* | *-darwin*)
2007-11-18 22:53:43 +03:00
ADD_FLAGS="-fpascal-strings -fno-common -Wno-four-char-constants -Wno-unknown-pragmas -Dmacintosh" # required for macosx compile
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
DEFAULT_GUI=carbon # default to carbon
2002-12-14 01:02:05 +03:00
need_dlcompat_for_plugins=1
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
;;
*-macos*)
DEFAULT_GUI=macos # macos defaults to macos
;;
2003-02-21 17:40:59 +03:00
*-amigaos* | *-morphos*)
DEFAULT_GUI=amigaos # amigaos or morphos defaults to amigaos gui
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
;;
2004-08-11 15:09:01 +04:00
*-solaris*)
2005-07-03 13:57:41 +04:00
ADD_FLAGS="-D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__" # required for correct function prototypes
2006-11-06 20:00:53 +03:00
LIBS="$LIBS -lsocket -lnsl"
2004-08-11 15:09:01 +04:00
DEFAULT_GUI=x11
;;
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
*)
DEFAULT_GUI=x11
;;
esac
2002-10-01 00:31:14 +04:00
if test "${ADD_FLAGS:+set}" = set; then
2002-09-30 18:11:21 +04:00
CFLAGS="$CFLAGS $ADD_FLAGS"
CXXFLAGS="$CXXFLAGS $ADD_FLAGS"
2004-08-11 15:09:01 +04:00
CPPFLAGS="$CPPFLAGS $ADD_FLAGS"
2002-09-30 18:11:21 +04:00
fi
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
AC_MSG_CHECKING(for standard CFLAGS on this platform)
AC_MSG_RESULT($ADD_FLAGS)
2014-06-28 00:53:20 +04:00
dnl // make sure the default gui is enabled if no other chosen
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
if (test "$with_sdl" != yes) && \
2014-06-28 00:53:20 +04:00
(test "$with_sdl2" != yes) && \
2002-11-21 22:26:07 +03:00
(test "$with_svga" != yes) && \
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
(test "$with_x11" != yes) && \
(test "$with_win32" != yes) && \
(test "$with_nogui" != yes) && \
(test "$with_term" != yes) && \
(test "$with_rfb" != yes) && \
2013-05-30 21:18:30 +04:00
(test "$with_vncsrv" != yes) && \
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
(test "$with_amigaos" != yes) && \
(test "$with_carbon" != yes) && \
2002-04-18 04:22:20 +04:00
(test "$with_wx" != yes) && \
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
(test "$with_macos" != yes); then
# use DEFAULT_GUI. Set the appropriate variable.
# DEFAULT_GUI must be set to one of the names above. Otherwise, no
# valid $with_* variable will be set and who knows what will happen?
eval "with_${DEFAULT_GUI}=yes"
fi
2001-04-10 05:04:59 +04:00
AC_PROG_CC
AC_PROG_CXX
AC_PROG_MAKE_SET
2002-10-25 01:07:56 +04:00
2013-12-30 00:04:16 +04:00
if test "$NO_LT" != 1; then
2012-02-20 18:27:45 +04:00
dnl------------ libtool configuration
dnl Configure libtool, and default to shared libraries. Libtool will only be
dnl used for compiling and linking plugins.
AC_DISABLE_STATIC
dnl Check for dlopen support
AC_LIBTOOL_DLOPEN
dnl Configure libtool
AC_PROG_LIBTOOL
dnl Configure the ltdl library. This must go after AC_PROG_LIBTOOL or
dnl else it disables shared libraries somehow.
AC_LIB_LTDL
2014-01-04 01:58:04 +04:00
else
RANLIB="echo"
2012-02-20 18:27:45 +04:00
fi
2001-04-10 05:04:59 +04:00
2012-08-07 22:28:00 +04:00
AC_PATH_PROG(PKGCONFIG, pkg-config, not_found)
if test "$PKGCONFIG" = not_found; then
AC_PATH_XTRA
fi
2001-04-10 05:04:59 +04:00
AC_C_BIGENDIAN
AC_C_INLINE
AC_CHECK_SIZEOF(unsigned char)
AC_CHECK_SIZEOF(unsigned short)
AC_CHECK_SIZEOF(unsigned int)
AC_CHECK_SIZEOF(unsigned long)
AC_CHECK_SIZEOF(unsigned long long)
2001-04-10 05:50:00 +04:00
AC_CHECK_SIZEOF(int *)
2001-11-11 08:43:12 +03:00
AC_CHECK_FUNCS(getenv, AC_DEFINE(BX_HAVE_GETENV))
2002-11-18 05:32:53 +03:00
AC_CHECK_FUNCS(setenv, AC_DEFINE(BX_HAVE_SETENV))
2001-04-10 05:50:00 +04:00
AC_CHECK_FUNCS(snprintf, AC_DEFINE(BX_HAVE_SNPRINTF))
2004-02-08 13:22:29 +03:00
AC_CHECK_FUNCS(vsnprintf, AC_DEFINE(BX_HAVE_VSNPRINTF))
2012-02-20 18:27:45 +04:00
if test "$MSVC_TARGET" != 1; then
AC_CHECK_FUNCS(select, AC_DEFINE(BX_HAVE_SELECT))
AC_CHECK_TYPE(socklen_t, AC_DEFINE(BX_HAVE_SOCKLEN_T), , [#include <sys/types.h>
#include <sys/socket.h>])
AC_CHECK_FUNCS(strtoull, AC_DEFINE(BX_HAVE_STRTOULL))
AC_CHECK_FUNCS(strtouq, AC_DEFINE(BX_HAVE_STRTOUQ))
AC_CHECK_FUNCS(strdup, AC_DEFINE(BX_HAVE_STRDUP))
AC_CHECK_FUNCS(strrev, AC_DEFINE(BX_HAVE_STRREV))
AC_CHECK_FUNCS(stricmp, AC_DEFINE(BX_HAVE_STRICMP))
AC_CHECK_FUNCS(strcasecmp, AC_DEFINE(BX_HAVE_STRCASECMP))
AC_CHECK_FUNCS(mkstemp, AC_DEFINE(BX_HAVE_MKSTEMP))
AC_CHECK_HEADER(sys/mman.h, AC_DEFINE(BX_HAVE_SYS_MMAN_H))
AC_CHECK_FUNCS(gettimeofday, AC_DEFINE(BX_HAVE_GETTIMEOFDAY))
AC_CHECK_FUNCS(usleep, AC_DEFINE(BX_HAVE_USLEEP))
AC_MSG_CHECKING(for __builtin_bswap32)
AC_TRY_LINK([],[
__builtin_bswap32(0x12345678);
],[
AC_DEFINE(BX_HAVE___BUILTIN_BSWAP32, 1, [Define to 1 if you have the '__builtin_bswap32' function.])
AC_MSG_RESULT(yes)
],[
AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(for __builtin_bswap64)
AC_TRY_LINK([],[
__builtin_bswap64(0x12345678);
],[
AC_DEFINE(BX_HAVE___BUILTIN_BSWAP64, 1, [Define to 1 if you have the '__builtin_bswap64' function.])
AC_MSG_RESULT(yes)
],[
AC_MSG_RESULT(no)
])
2012-08-26 18:43:14 +04:00
AC_CHECK_FUNCS(tmpfile64, AC_DEFINE(BX_HAVE_TMPFILE64))
AC_CHECK_FUNCS(fseek64, AC_DEFINE(BX_HAVE_FSEEK64))
AC_CHECK_FUNCS(fseeko64, AC_DEFINE(BX_HAVE_FSEEKO64))
2013-12-04 21:04:15 +04:00
AC_CHECK_TYPE(ssize_t, AC_DEFINE(BX_HAVE_SSIZE_T), , [#include <sys/types.h>])
2012-02-20 18:27:45 +04:00
else
AC_DEFINE(BX_HAVE_SELECT, 1)
AC_DEFINE(BX_HAVE_SOCKLEN_T, 0)
AC_DEFINE(BX_HAVE_STRTOULL, 1)
AC_DEFINE(BX_HAVE_STRTOUQ, 0)
AC_DEFINE(BX_HAVE_STRDUP, 1)
AC_DEFINE(BX_HAVE_STRREV, 1)
AC_DEFINE(BX_HAVE_STRICMP, 1)
AC_DEFINE(BX_HAVE_STRCASECMP, 0)
AC_DEFINE(BX_HAVE_MKSTEMP, 0)
AC_DEFINE(BX_HAVE_SYS_MMAN_H, 0)
AC_DEFINE(BX_HAVE_GETTIMEOFDAY, 0)
AC_DEFINE(BX_HAVE_USLEEP, 0)
AC_DEFINE(BX_HAVE___BUILTIN_BSWAP32, 0)
AC_DEFINE(BX_HAVE___BUILTIN_BSWAP64, 0)
2012-08-26 18:43:14 +04:00
AC_DEFINE(BX_HAVE_TMPFILE64, 0)
AC_DEFINE(BX_HAVE_FSEEK64, 0)
AC_DEFINE(BX_HAVE_FSEEKO64, 0)
2013-12-04 21:04:15 +04:00
AC_DEFINE(BX_HAVE_SSIZE_T, 0)
2014-04-21 10:58:15 +04:00
AC_DEFINE(BX_HAVE_SETENV, 0)
2012-02-20 18:27:45 +04:00
fi
2001-10-05 17:52:25 +04:00
AC_CHECK_FUNCS(sleep, AC_DEFINE(BX_HAVE_SLEEP))
2001-09-24 09:28:42 +04:00
AC_CHECK_FUNCS(nanosleep, AC_DEFINE(BX_HAVE_NANOSLEEP))
2001-10-07 04:10:19 +04:00
AC_CHECK_FUNCS(abort, AC_DEFINE(BX_HAVE_ABORT))
2002-11-09 00:29:16 +03:00
AC_CHECK_MEMBER(struct sockaddr_in.sin_len, AC_DEFINE(BX_HAVE_SOCKADDR_IN_SIN_LEN), , [#include <sys/socket.h>
#include <netinet/in.h> ])
2003-10-02 15:33:42 +04:00
AC_CHECK_FUNCS(timelocal, AC_DEFINE(BX_HAVE_TIMELOCAL))
2003-10-02 11:38:00 +04:00
AC_CHECK_FUNCS(gmtime, AC_DEFINE(BX_HAVE_GMTIME))
AC_CHECK_FUNCS(mktime, AC_DEFINE(BX_HAVE_MKTIME))
2001-04-10 05:04:59 +04:00
2002-10-11 17:21:15 +04:00
dnl As of autoconf 2.53, the standard largefile test fails for Linux/gcc.
dnl It does not put the largefiles arguments into CFLAGS, even though Linux/gcc
2011-01-23 23:21:21 +03:00
dnl does need them. So we do it ourselves.
2002-09-30 20:24:25 +04:00
AC_SYS_LARGEFILE
2002-10-11 17:21:15 +04:00
dnl we need to define _FILE_OFFSET_BITS or _LARGE_FILES on the compiler command
dnl line because otherwise the system headers risk being included before
dnl config.h which defines these constants leading to inconsistent
dnl sizeof(off_t) in different source files of the same program and linking
dnl problems
2011-01-23 23:21:21 +03:00
case "x$ac_cv_sys_file_offset_bits" in #(
xno | xunknown) ;;
*)
2002-10-11 17:21:15 +04:00
if test "x$ac_cv_sys_file_offset_bits" = "x64"; then
BX_LARGEFILE_FLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES"
2008-02-06 01:57:43 +03:00
else
2002-10-11 17:21:15 +04:00
BX_LARGEFILE_FLAGS="-D_LARGE_FILES"
fi
CPPFLAGS="$CPPFLAGS $BX_LARGEFILE_FLAGS"
CFLAGS="$CFLAGS $BX_LARGEFILE_FLAGS"
CXXFLAGS="$CXXFLAGS $BX_LARGEFILE_FLAGS"
2011-01-23 23:21:21 +03:00
;;
esac
2002-10-11 17:21:15 +04:00
dnl ---end of largefile tests
2002-09-30 20:24:25 +04:00
2001-04-10 05:50:00 +04:00
AC_MSG_CHECKING(if compiler allows __attribute__)
2008-02-06 01:57:43 +03:00
AC_TRY_COMPILE([], [typedef struct { } __attribute__ ((packed)) junk;],
2001-04-10 05:50:00 +04:00
AC_MSG_RESULT(yes),
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_NO_ATTRIBUTES)
])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
2003-08-04 20:03:09 +04:00
AC_MSG_CHECKING(for set)
AC_TRY_COMPILE([#include <set>], [],
[
AC_MSG_RESULT(yes)
AC_DEFINE(BX_HAVE_SET)
], AC_MSG_RESULT(no))
AC_MSG_CHECKING(for set.h)
AC_TRY_COMPILE([#include <set.h>], [],
[
AC_MSG_RESULT(yes)
AC_DEFINE(BX_HAVE_SET_H)
2001-04-10 05:50:00 +04:00
], AC_MSG_RESULT(no))
2009-05-03 22:31:23 +04:00
AC_MSG_CHECKING(for map)
AC_TRY_COMPILE([#include <map>], [],
[
AC_MSG_RESULT(yes)
AC_DEFINE(BX_HAVE_MAP)
], AC_MSG_RESULT(no))
AC_MSG_CHECKING(for map.h)
AC_TRY_COMPILE([#include <map.h>], [],
[
AC_MSG_RESULT(yes)
AC_DEFINE(BX_HAVE_MAP_H)
], AC_MSG_RESULT(no))
2001-05-23 12:16:07 +04:00
AC_LANG_RESTORE
2002-10-25 01:07:56 +04:00
dnl Implement a check for each gui library to see if has a chance of compiling.
if test "$with_all_libs" = yes; then
if test "$cross_configure" = 1; then
AC_MSG_WARN([[Using --with-all-libs while cross configuring is very unlikely to be what you want. You should specify the --with-* args yourself.]])
fi
if test "$with_amigaos" != yes; then
can_compile_amigaos=1
AC_CHECK_HEADER([proto/intuition.h], [], [ can_compile_amigaos=0 ])
2003-02-21 17:40:59 +03:00
AC_CHECK_HEADER([intuition/intuitionbase.h], [], [ can_compile_amigaos=0 ])
AC_CHECK_HEADER([cybergraphx/cybergraphics.h], [], [ can_compile_amigaos=0 ])
2002-10-25 01:07:56 +04:00
AC_CHECK_HEADER([devices/trackdisk.h], [], [ can_compile_amigaos=0 ])
if test $can_compile_amigaos = 1; then
with_amigaos=yes
fi
fi
if test "$with_macos" != yes; then
can_compile_macos=1
AC_CHECK_HEADER([Quickdraw.h], [], [ can_compile_macos=0 ])
AC_CHECK_HEADER([Dialogs.h], [], [ can_compile_macos=0 ])
if test $can_compile_macos = 1; then
with_macos=yes
fi
fi
if test "$with_carbon" != yes; then
can_compile_carbon=1
AC_CHECK_HEADER([Carbon.h], [], [ can_compile_carbon=0 ])
AC_CHECK_HEADER([ApplicationServices/ApplicationServices.h], [], [ can_compile_carbon=0 ])
if test $can_compile_carbon = 1; then
with_carbon=yes
fi
fi
if test "$with_win32" != yes; then
can_compile_win32=1
AC_CHECK_HEADER([windows.h], [], [ can_compile_win32=0 ])
AC_CHECK_HEADER([commctrl.h], [], [ can_compile_win32=0 ])
if test $can_compile_win32 = 1; then
with_win32=yes
fi
fi
2014-07-06 21:45:21 +04:00
if test "$with_sdl" != yes -a "$with_sdl2" != yes; then
can_compile_sdl=2
AC_CHECK_HEADER([SDL2/SDL.h], [], [ can_compile_sdl=0 ])
AC_CHECK_HEADER([SDL2/SDL_main.h], [], [ can_compile_sdl=0 ])
if test $can_compile_sdl != 2; then
can_compile_sdl=1
AC_CHECK_HEADER([SDL/SDL.h], [], [ can_compile_sdl=0 ])
AC_CHECK_HEADER([SDL/SDL_main.h], [], [ can_compile_sdl=0 ])
if test $can_compile_sdl = 1; then
with_sdl=yes
fi
else
with_sdl2=yes
2002-10-25 01:07:56 +04:00
fi
fi
2002-11-21 22:26:07 +03:00
if test "$with_svga" != yes; then
can_compile_svga=1
AC_CHECK_HEADER([vga.h], [], [ can_compile_svga=0 ])
AC_CHECK_HEADER([vgagl.h], [], [ can_compile_svga=0 ])
if test $can_compile_svga = 1; then
with_svga=yes
fi
fi
2002-10-25 01:07:56 +04:00
if test "$with_x11" != yes; then
can_compile_x11=1
AC_CHECK_HEADER([X11/Xlib.h], [], [ can_compile_x11=0 ])
AC_CHECK_HEADER([X11/Xutil.h], [], [ can_compile_x11=0 ])
if test $can_compile_x11 = 1; then
with_x11=yes
fi
fi
if test "$with_rfb" != yes; then
can_compile_rfb=1
case $target in
2013-10-20 18:48:38 +04:00
*-pc-windows* | *-pc-winnt* | *-cygwin* | *-mingw32*)
2014-02-15 16:18:15 +04:00
AC_CHECK_HEADER([winsock2.h], [], [ can_compile_rfb=0 ])
2002-10-25 01:07:56 +04:00
AC_CHECK_HEADER([process.h], [], [ can_compile_rfb=0 ])
;;
*)
AC_CHECK_HEADER([sys/socket.h], [], [ can_compile_rfb=0 ])
AC_CHECK_HEADER([netinet/tcp.h], [], [ can_compile_rfb=0 ])
AC_CHECK_HEADER([pthread.h], [], [ can_compile_rfb=0 ])
;;
esac
if test $can_compile_rfb = 1; then
with_rfb=yes
fi
fi
2013-05-30 21:18:30 +04:00
if test "$with_vncsrv" != yes; then
can_compile_vncsrv=1
case $target in
2013-10-20 18:48:38 +04:00
*-pc-windows* | *-pc-winnt* | *-cygwin*)
2013-05-30 21:18:30 +04:00
can_compile_vncsrv=0
;;
2013-05-31 20:46:15 +04:00
*-mingw32*)
AC_CHECK_HEADER([rfb/rfb.h], [], [ can_compile_vncsrv=0 ])
;;
2013-05-30 21:18:30 +04:00
*)
2013-05-31 20:46:15 +04:00
AC_CHECK_HEADER([rfb/rfb.h], [], [ can_compile_vncsrv=0 ])
AC_CHECK_HEADER([pthread.h], [], [ can_compile_vncsrv=0 ])
;;
2013-05-30 21:18:30 +04:00
esac
if test $can_compile_vncsrv = 1; then
with_vncsrv=yes
fi
fi
2002-10-25 01:07:56 +04:00
if test "$with_term" != yes; then
can_compile_term=1
AC_CHECK_HEADER([curses.h], [], [ can_compile_term=0 ])
AC_CHECK_HEADER([signal.h], [], [ can_compile_term=0 ])
if test $can_compile_term = 1; then
with_term=yes
fi
fi
if test "$with_nogui" != yes; then
with_nogui=yes
fi
fi # end of if $with_all_libs = yes
2014-06-28 00:53:20 +04:00
if test "$with_sdl" = yes -a "$with_sdl2" = yes; then
AC_MSG_ERROR([[--with-sdl and --with-sdl2 are mutually exclusive]])
fi
2001-11-12 03:43:59 +03:00
AC_MSG_CHECKING(for idle hack)
AC_ARG_ENABLE(idle-hack,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-idle-hack], [use Roland Mainz's idle hack (no)]),
2001-11-12 03:43:59 +03:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_USE_IDLE_HACK, 1)
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_USE_IDLE_HACK, 0)
fi],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_USE_IDLE_HACK, 0)
]
)
AC_SUBST(BX_USE_IDLE_HACK)
2002-10-25 01:07:56 +04:00
AC_CHECK_HEADER(dlfcn.h, AC_DEFINE(BX_HAVE_DLFCN_H, 1))
AC_CHECK_HEADER(assert.h, AC_DEFINE(HAVE_ASSERT_H, 1))
AC_MSG_CHECKING(for plugins support)
AC_ARG_ENABLE(plugins,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-plugins], [enable plugin support (no)]),
2002-10-25 01:07:56 +04:00
[if test "$enableval" = yes; then
bx_plugins=1
else
bx_plugins=0
fi],
[
bx_plugins=0
]
)
if test "$bx_plugins" = 1; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_PLUGINS, 1)
GUI_NON_PLUGIN_OBJS='$(OBJS_THAT_CANNOT_BE_PLUGINS)'
GUI_PLUGIN_OBJS='$(OBJS_THAT_CAN_BE_PLUGINS)'
2002-11-18 05:32:53 +03:00
DEFINE_PLUGIN_PATH='-DBX_PLUGIN_PATH="\"${plugdir}\""'
2002-10-25 01:07:56 +04:00
# and the $(OBJS_THAT_SUPPORT_OTHER_PLUGINS) will be built and linked
2013-12-30 00:04:16 +04:00
if test "$NO_LT" != 1; then
# by special link rules for the plugins that they support.
LIBS="$LIBS $LIBADD_DL"
have_ltdl=0
AC_CHECK_HEADER(ltdl.h, [AC_CHECK_LIB(ltdl, lt_dlinit, [have_ltdl=1]]))
if test "$have_ltdl" = 1; then
PLUGIN_LIB="-lltdl"
AC_DEFINE(BX_HAVE_LTDL,1)
else
PLUGIN_VAR="ltdl.o"
PLUGIN_LIB="ltdl.o"
fi
2011-01-23 23:21:21 +03:00
fi
2002-10-25 01:07:56 +04:00
PLUGIN_TARGET=bochs_plugins
2014-04-06 11:22:16 +04:00
PLUGIN_TARGET_2=plugins_gcc
2002-10-25 01:07:56 +04:00
INSTALL_PLUGINS_VAR=install_libtool_plugins
2003-05-24 21:09:26 +04:00
NONPLUGIN_GUI_LINK_OPTS=''
2008-02-06 01:57:43 +03:00
else
2002-10-25 01:07:56 +04:00
AC_MSG_RESULT(no)
bx_plugins=0
AC_DEFINE(BX_PLUGINS, 0)
GUI_NON_PLUGIN_OBJS='$(OBJS_THAT_CANNOT_BE_PLUGINS) $(OBJS_THAT_CAN_BE_PLUGINS) $(OBJS_THAT_SUPPORT_OTHER_PLUGINS)'
GUI_PLUGIN_OBJS=''
2003-05-24 21:09:26 +04:00
NONPLUGIN_GUI_LINK_OPTS='$(GUI_LINK_OPTS)'
2002-10-25 01:07:56 +04:00
fi
2002-11-18 05:32:53 +03:00
AC_SUBST(DEFINE_PLUGIN_PATH)
2003-05-24 21:09:26 +04:00
AC_SUBST(NONPLUGIN_GUI_LINK_OPTS)
2002-10-25 01:07:56 +04:00
# copy gui variables into iodev variables. Later, we will add to the gui
# objs list, according to which display libraries are enabled.
IODEV_NON_PLUGIN_OBJS=$GUI_NON_PLUGIN_OBJS
IODEV_PLUGIN_OBJS=$GUI_PLUGIN_OBJS
2012-01-14 21:03:00 +04:00
IODEV_EXT_NON_PLUGIN_OBJS=$GUI_NON_PLUGIN_OBJS
IODEV_EXT_PLUGIN_OBJS=$GUI_PLUGIN_OBJS
2001-08-15 21:51:10 +04:00
2002-12-14 01:02:05 +03:00
# on MacOSX if they enabled plugins, make sure that dlopen() was found.
# It is provided by a library called dlcompat.
if test "$bx_plugins" = 1 -a "$need_dlcompat_for_plugins" = 1; then
have_dlopen=0
AC_CHECK_LIB(dl, dlopen, [have_dlopen=1])
AC_MSG_CHECKING(if you have dlcompat, required for MacOSX plugins)
if test "$have_dlopen" = 0; then
AC_MSG_RESULT(no)
AC_MSG_ERROR([To use plugins on MacOSX you must use a library called dlcompat. The configure script was not able to find dlcompat. If it is already installed then you must set up your environment variables to point to it, as is done in .conf.macosx. If you cannot resolve this, you should turn off plugins.])
else
AC_MSG_RESULT(yes)
fi
fi
2001-04-10 06:06:10 +04:00
AC_MSG_CHECKING(if compiler allows LL for 64-bit constants)
AC_TRY_COMPILE([], [ { 42LL; } ],
AC_MSG_RESULT(yes),
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_64BIT_CONSTANTS_USE_LL, 0)
])
2009-03-10 19:28:01 +03:00
AC_MSG_CHECKING(for A20 support)
AC_ARG_ENABLE(a20-pin,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-a20-pin], [compile in support for A20 pin (yes)]),
2009-03-10 19:28:01 +03:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_A20, 1)
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_A20, 0)
fi
],
[
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_A20, 1)
]
)
2002-09-12 11:16:37 +04:00
use_x86_64=0
AC_MSG_CHECKING(for x86-64 support)
AC_ARG_ENABLE(x86-64,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-x86-64], [compile in support for x86-64 instructions (no)]),
2002-09-12 11:16:37 +04:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
2002-09-14 09:46:57 +04:00
OBJS64='$(OBJS64)'
2002-09-12 11:16:37 +04:00
AC_DEFINE(BX_SUPPORT_X86_64, 1)
use_x86_64=1
else
AC_MSG_RESULT(no)
2002-09-14 09:46:57 +04:00
OBJS64=''
2002-09-12 11:16:37 +04:00
AC_DEFINE(BX_SUPPORT_X86_64, 0)
fi
],
[
AC_MSG_RESULT(no)
2002-09-14 09:46:57 +04:00
OBJS64=''
2002-09-12 11:16:37 +04:00
AC_DEFINE(BX_SUPPORT_X86_64, 0)
]
)
2002-09-14 09:46:57 +04:00
AC_SUBST(OBJS64)
2002-09-12 11:16:37 +04:00
2006-01-18 21:35:38 +03:00
use_smp=0
AC_MSG_CHECKING(for SMP support)
AC_ARG_ENABLE(smp,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-smp], [compile in support for SMP configurations (no)]),
2006-01-18 21:35:38 +03:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_SMP, 1)
AC_DEFINE(BX_USE_CPU_SMF, 0)
use_smp=1
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_SMP, 0)
fi
],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_SMP, 0)
]
)
2001-04-10 05:04:59 +04:00
AC_MSG_CHECKING(for cpu level)
AC_ARG_ENABLE(cpu-level,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-cpu-level], [select cpu level (3,4,5,6 - default is 6)]),
2001-04-10 05:04:59 +04:00
[case "$enableval" in
3)
AC_MSG_RESULT(3)
AC_DEFINE(BX_CPU_LEVEL, 3)
;;
4)
AC_MSG_RESULT(4)
AC_DEFINE(BX_CPU_LEVEL, 4)
;;
5)
AC_MSG_RESULT(5)
AC_DEFINE(BX_CPU_LEVEL, 5)
;;
2001-05-23 12:16:07 +04:00
6)
AC_MSG_RESULT(6)
AC_DEFINE(BX_CPU_LEVEL, 6)
;;
2001-04-10 05:04:59 +04:00
*)
echo " "
echo "ERROR: you must supply a valid CPU level to --enable-cpu-level"
exit 1
;;
esac
2001-05-23 19:54:05 +04:00
bx_cpu_level=$enableval
2011-09-24 16:48:47 +04:00
if test "$use_smp" = 1 -a "$enableval" -lt 5; then
echo "ERROR: with >1 processor, use --enable-cpu-level=5 or more"
2001-05-23 12:16:07 +04:00
exit 1
fi
2010-03-01 21:53:53 +03:00
if test "$use_x86_64" = 1 -a "$enableval" -lt 6; then
echo "ERROR: --enable-cpu-level=6 required for x86-64 emulation"
exit 1
fi
2001-04-10 05:04:59 +04:00
],
[
2010-02-28 17:52:17 +03:00
AC_MSG_RESULT(6)
AC_DEFINE(BX_CPU_LEVEL, 6)
bx_cpu_level=6
2001-04-10 05:04:59 +04:00
]
)
2010-05-12 18:55:12 +04:00
AC_MSG_CHECKING(for larger than 32 bit physical address emulation)
AC_ARG_ENABLE(long-phy-address,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-long-phy-address], [compile in support for physical address larger than 32 bit (yes, if cpu level >= 5)]),
2010-05-12 18:55:12 +04:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_PHY_ADDRESS_LONG, 1)
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_PHY_ADDRESS_LONG, 0)
fi
],
[
if test "$bx_cpu_level" -ge 5; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_PHY_ADDRESS_LONG, 1)
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_PHY_ADDRESS_LONG, 0)
fi
]
)
2011-07-22 21:46:06 +04:00
AC_MSG_CHECKING(for large ramfile support)
AC_ARG_ENABLE(large-ramfile,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-large-ramfile], [enable large ramfile support (yes)]),
2011-07-22 21:46:06 +04:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_LARGE_RAMFILE, 1)
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_LARGE_RAMFILE, 0)
fi],
[
2012-08-23 23:31:33 +04:00
AC_MSG_RESULT(yes)
AC_DEFINE(BX_LARGE_RAMFILE, 1)
2011-07-22 21:46:06 +04:00
]
)
AC_SUBST(BX_LARGE_RAMFILE)
2001-04-10 05:04:59 +04:00
2014-03-23 16:00:58 +04:00
AC_MSG_CHECKING(for repeated IO and mem copy speedups)
AC_ARG_ENABLE(repeat-speedups,
AS_HELP_STRING([--enable-repeat-speedups], [support repeated IO and mem copy speedups (no)]),
2001-04-10 05:04:59 +04:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
2014-03-23 16:00:58 +04:00
speedup_repeat=1
2001-04-10 05:04:59 +04:00
else
AC_MSG_RESULT(no)
2014-03-23 16:00:58 +04:00
speedup_repeat=0
2001-04-10 05:04:59 +04:00
fi],
[
AC_MSG_RESULT(no)
2014-03-23 16:00:58 +04:00
speedup_repeat=0
2001-04-10 05:04:59 +04:00
]
)
2014-12-12 21:45:32 +03:00
AC_MSG_CHECKING(for gcc / MSVC nmake fast function calls optimization)
2014-03-23 16:00:58 +04:00
AC_ARG_ENABLE(fast-function-calls,
2014-12-12 21:45:32 +03:00
AS_HELP_STRING([--enable-fast-function-calls], [support for fast function calls (no - gcc on x86 and MSVC nmake only)]),
2001-04-10 05:04:59 +04:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
2014-03-23 16:00:58 +04:00
speedup_fastcall=1
2001-04-10 05:04:59 +04:00
else
AC_MSG_RESULT(no)
2014-03-23 16:00:58 +04:00
speedup_fastcall=0
2001-04-10 05:04:59 +04:00
fi],
[
2014-03-23 16:00:58 +04:00
AC_MSG_RESULT(no)
speedup_fastcall=0
2001-04-10 05:04:59 +04:00
]
)
2014-03-23 16:00:58 +04:00
AC_MSG_CHECKING(for handlers chaining speedups)
AC_ARG_ENABLE(handlers-chaining,
AS_HELP_STRING([--enable-handlers-chaining], [support handlers-chaining emulation speedups (no)]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
speedup_handlers_chaining=1
else
AC_MSG_RESULT(no)
speedup_handlers_chaining=0
fi],
2004-01-15 05:08:37 +03:00
[
AC_MSG_RESULT(no)
2014-03-23 16:00:58 +04:00
speedup_handlers_chaining=0
]
)
2004-01-15 05:08:37 +03:00
2014-05-01 22:30:23 +04:00
AC_MSG_CHECKING(for trace linking speedups support)
AC_ARG_ENABLE(trace-linking,
AS_HELP_STRING([--enable-trace-linking], [enable trace linking speedups support (no)]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
enable_trace_linking=1
else
AC_MSG_RESULT(no)
enable_trace_linking=0
fi],
[
AC_MSG_RESULT(no)
enable_trace_linking=0
]
)
2014-03-23 16:00:58 +04:00
AC_MSG_CHECKING(support for configurable MSR registers)
AC_ARG_ENABLE(configurable-msrs,
AS_HELP_STRING([--enable-configurable-msrs], [support for configurable MSR registers (yes if cpu level >= 5)]),
2003-01-28 19:58:10 +03:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
2014-03-23 16:00:58 +04:00
AC_DEFINE(BX_CONFIGURE_MSRS, 1)
2003-01-28 19:58:10 +03:00
else
AC_MSG_RESULT(no)
2014-03-23 16:00:58 +04:00
AC_DEFINE(BX_CONFIGURE_MSRS, 0)
2003-01-28 19:58:10 +03:00
fi],
[
2014-03-23 16:00:58 +04:00
if test "$bx_cpu_level" -ge 5; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_CONFIGURE_MSRS, 1)
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_CONFIGURE_MSRS, 0)
fi
2003-01-28 19:58:10 +03:00
]
)
2014-03-23 16:00:58 +04:00
AC_MSG_CHECKING(show IPS)
AC_ARG_ENABLE(show-ips,
AS_HELP_STRING([--enable-show-ips], [show IPS in Bochs status bar / log file (yes)]),
2009-01-19 12:48:12 +03:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
2014-03-23 16:00:58 +04:00
AC_DEFINE(BX_SHOW_IPS, 1)
2009-01-19 12:48:12 +03:00
else
AC_MSG_RESULT(no)
2014-03-23 16:00:58 +04:00
AC_DEFINE(BX_SHOW_IPS, 0)
2009-01-19 12:48:12 +03:00
fi],
[
2014-03-23 16:00:58 +04:00
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SHOW_IPS, 1)
2009-01-19 12:48:12 +03:00
]
)
2014-03-23 16:00:58 +04:00
AC_MSG_CHECKING(for use of .cpp as suffix)
AC_ARG_ENABLE(cpp,
AS_HELP_STRING([--enable-cpp], [use .cpp as C++ suffix (no)]),
2011-07-05 22:31:15 +04:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
2014-03-23 16:00:58 +04:00
SUFFIX_LINE='.SUFFIXES: .cpp'
CPP_SUFFIX='cpp'
2011-07-05 22:31:15 +04:00
else
AC_MSG_RESULT(no)
2014-03-23 16:00:58 +04:00
SUFFIX_LINE='.SUFFIXES: .cc'
CPP_SUFFIX='cc'
2011-07-05 22:31:15 +04:00
fi],
[
AC_MSG_RESULT(no)
2014-03-23 16:00:58 +04:00
SUFFIX_LINE='.SUFFIXES: .cc'
CPP_SUFFIX='cc'
2011-07-05 22:31:15 +04:00
]
)
2014-03-23 16:00:58 +04:00
AC_SUBST(SUFFIX_LINE)
AC_SUBST(CPP_SUFFIX)
2011-07-05 22:31:15 +04:00
2014-03-23 16:00:58 +04:00
if test "$enable_cpp" = yes; then
echo "moving .cc source files to .cpp"
sourcefiles=`find . -name "*.cc" -print`
if test "$sourcefiles" != ""; then
for ccname in $sourcefiles
do
cppname=`echo $ccname | sed -e "s/\.cc$/.cpp/"`
echo "mv $ccname $cppname"
mv $ccname $cppname
done
else
echo "no more .cc source files to rename"
2012-02-17 23:08:58 +04:00
fi
2009-01-19 12:48:12 +03:00
fi
2007-03-18 14:17:28 +03:00
2014-03-23 16:00:58 +04:00
AC_MSG_CHECKING(for Bochs internal debugger support)
AC_ARG_ENABLE(debugger,
AS_HELP_STRING([--enable-debugger], [compile in support for Bochs internal debugger (no)]),
2004-01-13 22:21:21 +03:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
2014-03-23 16:00:58 +04:00
AC_DEFINE(BX_DEBUGGER, 1)
DEBUGGER_VAR='$(DEBUGGER_LIB)'
NO_FLEX_YACC=''
AC_PATH_PROG(FLEX, flex, not_found)
AC_PATH_PROG(YACC, yacc, not_found)
AC_MSG_CHECKING(whether to generate parser / lexer files)
if test "$FLEX" = not_found -o "$YACC" = not_found -o "$MSVC_TARGET" = 1; then
NO_FLEX_YACC='#'
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
fi
AC_SUBST(NO_FLEX_YACC)
bx_debugger=1
2004-01-13 22:21:21 +03:00
else
AC_MSG_RESULT(no)
2014-03-23 16:00:58 +04:00
AC_DEFINE(BX_DEBUGGER, 0)
DEBUGGER_VAR=''
bx_debugger=0
fi
],
2004-01-13 22:21:21 +03:00
[
AC_MSG_RESULT(no)
2014-03-23 16:00:58 +04:00
AC_DEFINE(BX_DEBUGGER, 0)
DEBUGGER_VAR=''
bx_debugger=0
2004-01-13 22:21:21 +03:00
]
)
2014-03-23 16:00:58 +04:00
AC_SUBST(DEBUGGER_VAR)
2004-01-13 22:21:21 +03:00
2014-03-23 16:00:58 +04:00
AC_MSG_CHECKING(for disassembler support)
AC_ARG_ENABLE(disasm,
AS_HELP_STRING([--enable-disasm], [compile in support for disassembler (no)]),
2011-12-14 00:53:44 +04:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
2014-03-23 16:00:58 +04:00
AC_DEFINE(BX_DISASM, 1)
DISASM_VAR='$(DISASM_LIB)'
2011-12-14 00:53:44 +04:00
else
AC_MSG_RESULT(no)
2014-03-23 16:00:58 +04:00
if test "$bx_debugger" = 1; then
echo "ERROR: debugger is enabled, so --enable-disasm is required"
exit 1
fi
AC_DEFINE(BX_DISASM, 0)
DISASM_VAR=''
2011-12-14 00:53:44 +04:00
fi],
[
2014-03-23 16:00:58 +04:00
AC_MSG_RESULT(yes)
AC_DEFINE(BX_DISASM, 1)
DISASM_VAR='$(DISASM_LIB)'
])
AC_SUBST(DISASM_VAR)
2011-12-14 00:53:44 +04:00
2014-03-23 16:00:58 +04:00
AC_MSG_CHECKING(enable Bochs internal debugger GUI)
AC_ARG_ENABLE(debugger-gui,
AS_HELP_STRING([--enable-debugger-gui], [compile in support for Bochs internal debugger GUI (yes, if debugger is on)]),
2002-09-02 22:44:35 +04:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
2014-03-23 16:00:58 +04:00
gui_debugger=1
2002-09-02 22:44:35 +04:00
else
AC_MSG_RESULT(no)
2014-03-23 16:00:58 +04:00
AC_DEFINE(BX_DEBUGGER_GUI, 0)
gui_debugger=0
2002-09-02 22:44:35 +04:00
fi],
[
2014-03-23 16:00:58 +04:00
if test "$bx_debugger" = 1; then
AC_MSG_RESULT(yes)
gui_debugger=1
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_DEBUGGER_GUI, 0)
gui_debugger=0
fi
2002-09-02 22:44:35 +04:00
]
)
2002-09-19 23:17:20 +04:00
2014-03-23 16:00:58 +04:00
bx_gdb_stub=0
AC_MSG_CHECKING(for gdb stub enable)
AC_ARG_ENABLE(gdb-stub,
AS_HELP_STRING([--enable-gdb-stub], [enable gdb stub support (no)]),
2003-03-03 02:59:12 +03:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
2014-03-23 16:00:58 +04:00
AC_DEFINE(BX_GDBSTUB, 1)
GDBSTUB_VAR='$(GDBSTUB_OBJS)'
bx_gdb_stub=1
if test "$bx_debugger" = 1; then
AC_MSG_ERROR([[--enable-debugger and --enable-gdb-stub are mutually exclusive]])
fi
2003-03-03 02:59:12 +03:00
else
AC_MSG_RESULT(no)
2014-03-23 16:00:58 +04:00
AC_DEFINE(BX_GDBSTUB, 0)
GDBSTUB_VAR=''
2003-03-03 02:59:12 +03:00
fi],
[
AC_MSG_RESULT(no)
2014-03-23 16:00:58 +04:00
AC_DEFINE(BX_GDBSTUB, 0)
GDBSTUB_VAR=''
2003-03-03 02:59:12 +03:00
]
)
2014-03-23 16:00:58 +04:00
AC_SUBST(GDBSTUB_VAR)
2003-03-03 02:59:12 +03:00
2011-08-21 18:31:08 +04:00
2014-03-23 16:00:58 +04:00
AC_MSG_CHECKING(for I/O Interface to the debugger)
IODEBUG_OBJS=''
AC_ARG_ENABLE(iodebug,
AS_HELP_STRING([--enable-iodebug], [enable I/O interface to debugger (yes, if debugger is on)]),
2008-12-28 23:30:48 +03:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
2014-03-23 16:00:58 +04:00
AC_DEFINE(BX_SUPPORT_IODEBUG, 1)
IODEBUG_OBJS='iodebug.o'
2008-12-28 23:30:48 +03:00
else
AC_MSG_RESULT(no)
2014-03-23 16:00:58 +04:00
AC_DEFINE(BX_SUPPORT_IODEBUG, 0)
fi
],
2008-12-28 23:30:48 +03:00
[
2014-03-23 16:00:58 +04:00
if test "$bx_debugger" = 1; then
# enable by default if debugger is on
2008-12-28 23:30:48 +03:00
AC_MSG_RESULT(yes)
2014-03-23 16:00:58 +04:00
AC_DEFINE(BX_SUPPORT_IODEBUG, 1)
IODEBUG_OBJS='iodebug.o'
2008-12-28 23:30:48 +03:00
else
AC_MSG_RESULT(no)
fi
]
)
2014-03-23 16:00:58 +04:00
AC_SUBST(IODEBUG_OBJS)
2008-12-28 23:30:48 +03:00
2001-04-10 05:04:59 +04:00
2014-03-23 16:00:58 +04:00
AC_MSG_CHECKING(for ALL optimizations enabled)
AC_ARG_ENABLE(all-optimizations,
AS_HELP_STRING([--enable-all-optimizations], [compile in all possible optimizations (no)]),
2001-04-10 05:04:59 +04:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
2014-03-23 16:00:58 +04:00
speedups_all=1
2001-04-10 05:04:59 +04:00
else
AC_MSG_RESULT(no)
2014-03-23 16:00:58 +04:00
speedups_all=0
fi
],
2001-04-10 05:04:59 +04:00
[
AC_MSG_RESULT(no)
2014-03-23 16:00:58 +04:00
speedups_all=0
2001-04-10 05:04:59 +04:00
]
)
2014-03-23 16:00:58 +04:00
#
# Optimizations section. Decide what the status of various optimizations
# should be based on configure choices and other factors.
#
2001-04-10 05:04:59 +04:00
2014-03-23 16:00:58 +04:00
if test "$speedups_all" = 1; then
# Configure requested to force all options enabled.
speedup_repeat=1
speedup_fastcall=1
speedup_handlers_chaining=1
2014-05-01 22:30:23 +04:00
enable_trace_linking=1
2014-03-23 16:00:58 +04:00
fi
2002-09-30 06:02:06 +04:00
if test "$speedup_repeat" = 1; then
2011-08-21 18:31:08 +04:00
AC_DEFINE(BX_SUPPORT_REPEAT_SPEEDUPS, 1)
2002-09-30 06:02:06 +04:00
else
2011-08-21 18:31:08 +04:00
AC_DEFINE(BX_SUPPORT_REPEAT_SPEEDUPS, 0)
2002-09-30 06:02:06 +04:00
fi
2003-03-03 02:59:12 +03:00
if test "$speedup_fastcall" = 1; then
AC_DEFINE(BX_FAST_FUNC_CALL, 1)
else
AC_DEFINE(BX_FAST_FUNC_CALL, 0)
fi
2002-09-30 06:02:06 +04:00
2011-08-27 18:29:11 +04:00
if test "$bx_debugger" = 1 -a "$speedup_handlers_chaining" = 1; then
2011-08-26 23:08:37 +04:00
speedup_handlers_chaining=0
2011-09-24 16:55:38 +04:00
echo "ERROR: handlers-chaining speedups are not supported with internal debugger or gdbstub yet"
2011-08-21 18:31:08 +04:00
fi
2011-11-10 23:27:29 +04:00
if test "$bx_gdb_stub" = 1 -a "$speedup_handlers_chaining" = 1; then
speedup_handlers_chaining=0
echo "ERROR: handlers-chaining speedups are not supported with internal debugger or gdbstub yet"
fi
2011-08-21 18:31:08 +04:00
if test "$speedup_handlers_chaining" = 1; then
AC_DEFINE(BX_SUPPORT_HANDLERS_CHAINING_SPEEDUPS, 1)
else
AC_DEFINE(BX_SUPPORT_HANDLERS_CHAINING_SPEEDUPS, 0)
fi
2014-05-01 22:30:23 +04:00
if test "$enable_trace_linking" = 1; then
AC_DEFINE(BX_ENABLE_TRACE_LINKING, 1)
else
AC_DEFINE(BX_ENABLE_TRACE_LINKING, 0)
fi
2002-09-30 06:02:06 +04:00
2001-10-04 22:00:48 +04:00
READLINE_LIB=""
rl_without_curses_ok=no
rl_with_curses_ok=no
AC_MSG_CHECKING(whether user wants readline)
2001-06-07 06:51:20 +04:00
AC_ARG_ENABLE(readline,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-readline], [use readline library, if available (no)]),
2001-06-07 06:51:20 +04:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
want_readline=yes
else
AC_MSG_RESULT(no)
want_readline=no
fi],
2001-10-04 22:00:48 +04:00
[
2001-06-07 06:51:20 +04:00
AC_MSG_RESULT(yes)
2001-10-04 22:00:48 +04:00
want_readline=yes
]
2001-06-07 06:51:20 +04:00
)
2002-09-05 23:59:20 +04:00
use_readline=0
2001-10-04 22:00:48 +04:00
AC_MSG_CHECKING(whether to use readline)
2001-06-07 06:51:20 +04:00
if test "$want_readline" = yes; then
2001-10-04 22:00:48 +04:00
if test "$bx_debugger" = 1; then
2003-07-05 09:31:40 +04:00
AC_MSG_CHECKING(if readline works without -lcurses)
OLD_LIBS=$LIBS
LIBS="$LIBS -lreadline"
AC_TRY_RUN([
#include <stdio.h>
#include <readline/readline.h>
int main() { rl_initialize(); exit(0); }
2008-02-06 01:57:43 +03:00
],
2003-07-05 09:31:40 +04:00
[ AC_MSG_RESULT(yes)
rl_without_curses_ok=yes ],
[ AC_MSG_RESULT(no) ]
)
AC_MSG_CHECKING(if readline works with -lcurses)
LIBS="$LIBS -lcurses"
AC_TRY_RUN([
#include <stdio.h>
#include <readline/readline.h>
int main() { rl_initialize(); exit(0); }
2008-02-06 01:57:43 +03:00
],
2003-07-05 09:31:40 +04:00
[AC_MSG_RESULT(yes)
rl_with_curses_ok=yes ],
[ AC_MSG_RESULT(no) ]
)
LIBS=$OLD_LIBS
2001-10-04 22:00:48 +04:00
if test "$rl_without_curses_ok" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_LIBREADLINE, 1)
READLINE_LIB="-lreadline"
2002-09-05 23:59:20 +04:00
use_readline=1
2001-10-04 22:00:48 +04:00
elif test "$rl_with_curses_ok" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_LIBREADLINE, 1)
READLINE_LIB="-lreadline -lcurses"
2002-09-05 23:59:20 +04:00
use_readline=1
2001-10-04 22:00:48 +04:00
else
2001-10-03 16:33:53 +04:00
AC_MSG_RESULT(no)
2001-10-04 22:07:06 +04:00
echo WARNING: The readline library was disabled because it was not found.
2001-10-03 16:33:53 +04:00
fi
else
2001-10-04 22:00:48 +04:00
AC_MSG_RESULT(no)
2001-10-03 16:33:53 +04:00
fi
2001-10-04 22:00:48 +04:00
else
AC_MSG_RESULT(no)
2001-06-07 06:51:20 +04:00
fi
2001-10-04 22:05:29 +04:00
AC_SUBST(READLINE_LIB)
2001-05-23 12:16:07 +04:00
AC_CHECK_HEADER(readline/history.h,
AC_DEFINE(HAVE_READLINE_HISTORY_H)
)
2001-04-10 05:04:59 +04:00
INSTRUMENT_DIR='instrument/stubs'
AC_MSG_CHECKING(for instrumentation support)
AC_ARG_ENABLE(instrumentation,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-instrumentation=instrument-dir], [compile in support for instrumentation (no)]),
2001-04-10 05:04:59 +04:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_INSTRUMENTATION, 1)
INSTRUMENT_VAR='$(INSTRUMENT_LIB)'
elif test "$enableval" = no; then
AC_MSG_RESULT(no)
AC_DEFINE(BX_INSTRUMENTATION, 0)
INSTRUMENT_VAR=''
else
AC_MSG_RESULT(yes)
AC_DEFINE(BX_INSTRUMENTATION, 1)
INSTRUMENT_DIR=$enableval
INSTRUMENT_VAR='$(INSTRUMENT_LIB)'
fi],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_INSTRUMENTATION, 0)
INSTRUMENT_VAR=''
]
)
AC_SUBST(INSTRUMENT_DIR)
AC_SUBST(INSTRUMENT_VAR)
2007-10-30 21:57:46 +03:00
AC_MSG_CHECKING(enable logging)
AC_ARG_ENABLE(logging,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-logging], [enable logging (yes)]),
2007-10-30 21:57:46 +03:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_NO_LOGGING, 0)
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_NO_LOGGING, 1)
fi],
[
AC_MSG_RESULT(yes)
AC_DEFINE(BX_NO_LOGGING, 0)
]
)
2014-10-14 19:59:10 +04:00
AC_MSG_CHECKING(enable statistics collection)
AC_ARG_ENABLE(stats,
AS_HELP_STRING([--enable-stats], [enable statistics collection (yes)]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_ENABLE_STATISTICS, 1)
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_ENABLE_STATISTICS, 0)
fi],
[
AC_MSG_RESULT(yes)
AC_DEFINE(BX_ENABLE_STATISTICS, 1)
]
)
2008-06-13 01:02:54 +04:00
AC_MSG_CHECKING(enable assert checks)
AC_ARG_ENABLE(assert-checks,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-assert-checks], [enable BX_ASSERT checks (yes, if debugger is on)]),
2008-06-13 01:02:54 +04:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_ASSERT_ENABLE, 1)
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_ASSERT_ENABLE, 0)
fi],
[
if test "$bx_debugger" = 1; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_ASSERT_ENABLE, 1)
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_ASSERT_ENABLE, 0)
fi
]
)
2014-03-23 16:00:58 +04:00
support_fpu=1
AC_MSG_CHECKING(for FPU emulation)
FPU_VAR=''
AC_ARG_ENABLE(fpu,
AS_HELP_STRING([--enable-fpu], [compile in FPU emulation (yes)]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_FPU, 1)
FPU_VAR='$(FPU_LIB)'
elif test "$enableval" = no; then
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_FPU, 0)
support_fpu=0
else
echo " "
echo "ERROR: --enable-fpu does not accept a path"
exit 1
fi
],
[
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_FPU, 1)
FPU_VAR='$(FPU_LIB)'
]
)
AC_SUBST(FPU_VAR)
support_vmx=0
AC_MSG_CHECKING(for VMX support)
AC_ARG_ENABLE(vmx,
AS_HELP_STRING([--enable-vmx], [VMX (virtualization extensions) emulation (--enable-vmx=[no|1|2])]),
[case "$enableval" in
no | 0)
support_vmx=0
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_VMX, 0)
;;
yes | 1)
support_vmx=1
AC_MSG_RESULT(1)
AC_DEFINE(BX_SUPPORT_VMX, 1)
;;
2)
support_vmx=2
AC_MSG_RESULT(2)
AC_DEFINE(BX_SUPPORT_VMX, 2)
;;
*)
echo "ERROR: --enable-vmx=$enableval not understood. Use --enable-vmx=[no|1|2]"
exit 1
;;
esac
],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_VMX, 0)
]
)
if test "$support_vmx" -gt 0 -a "$bx_cpu_level" -lt 6; then
AC_MSG_ERROR([for VMX support the CPU level must be set to 6])
fi
if test "$support_vmx" -gt 1 -a "$use_x86_64" = 0; then
AC_MSG_ERROR([VMXx2 support require x86-64 enabled])
fi
support_svm=0
AC_MSG_CHECKING(for SVM support)
AC_ARG_ENABLE(svm,
AS_HELP_STRING([--enable-svm], [SVM (AMD: secure virtual machine) emulation (no)]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_SVM, 1)
support_svm=1
elif test "$enableval" = no; then
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_SVM, 0)
fi
],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_SVM, 0)
]
)
if test "$support_svm" -gt 0 -a "$bx_cpu_level" -lt 6; then
AC_MSG_ERROR([for SVM support the CPU level must be set to 6])
fi
if test "$support_svm" -gt 1 -a "$use_x86_64" = 0; then
AC_MSG_ERROR([SVM support require x86-64 enabled])
fi
AC_MSG_CHECKING(for 3DNow! support)
AC_ARG_ENABLE(3dnow,
AS_HELP_STRING([--enable-3dnow], [3DNow! support (no - incomplete)]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_3DNOW, 1)
elif test "$enableval" = no; then
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_3DNOW, 0)
fi
],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_3DNOW, 0)
]
)
AC_MSG_CHECKING(for alignment check support)
AC_ARG_ENABLE(alignment-check,
AS_HELP_STRING([--enable-alignment-check], [alignment check (#AC) support (yes, if cpu level > 3)]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_ALIGNMENT_CHECK, 1)
elif test "$enableval" = no; then
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_ALIGNMENT_CHECK, 0)
fi
],
[
if test "$bx_cpu_level" -gt 3; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_ALIGNMENT_CHECK, 1)
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_ALIGNMENT_CHECK, 0)
fi
]
)
AC_MSG_CHECKING(for MONITOR/MWAIT instructions support (experimental))
AC_ARG_ENABLE(monitor_mwait,
AS_HELP_STRING([--enable-monitor-mwait], [support for MONITOR/MWAIT instructions (yes, if cpu level > 5 - experimental)]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_MONITOR_MWAIT, 1)
elif test "$enableval" = no; then
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_MONITOR_MWAIT, 0)
fi
],
[
if test "$bx_cpu_level" -gt 5; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_MONITOR_MWAIT, 1)
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_MONITOR_MWAIT, 0)
fi
]
)
2014-10-15 12:04:38 +04:00
AC_MSG_CHECKING(for limited hardware performance monitoring emulation support (experimental))
AC_ARG_ENABLE(perfmon,
2015-02-19 23:23:08 +03:00
AS_HELP_STRING([--enable-perfmon], [support for limited hardware performance monitoring emulation (yes, if cpu level > 5 - experimental)]),
2014-10-15 12:04:38 +04:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_PERFMON, 1)
elif test "$enableval" = no; then
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_PERFMON, 0)
fi
],
[
if test "$bx_cpu_level" -gt 5; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_PERFMON, 1)
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_PERFMON, 0)
fi
]
)
2015-02-19 23:23:08 +03:00
AC_MSG_CHECKING(for memory type support)
2015-02-21 21:30:26 +03:00
AC_ARG_ENABLE(memtype,
2015-02-19 23:23:08 +03:00
AS_HELP_STRING([--enable-memtype], [support for memory type]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_MEMTYPE, 1)
elif test "$enableval" = no; then
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_MEMTYPE, 0)
fi
],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_MEMTYPE, 0)
]
)
2014-03-23 16:00:58 +04:00
support_avx=0
2014-07-25 12:35:06 +04:00
AVX_LIB_VAR=''
2014-03-23 16:00:58 +04:00
AC_MSG_CHECKING(for AVX instructions support)
AC_ARG_ENABLE(avx,
AS_HELP_STRING([--enable-avx], [support for AVX instructions (no)]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
2014-07-25 12:35:06 +04:00
AVX_LIB_VAR='$(AVX_LIB)'
2014-03-23 16:00:58 +04:00
AC_DEFINE(BX_SUPPORT_AVX, 1)
support_avx=1
elif test "$enableval" = no; then
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_AVX, 0)
fi
],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_AVX, 0)
]
)
2014-07-25 12:35:06 +04:00
AC_SUBST(AVX_LIB_VAR)
2014-03-23 16:00:58 +04:00
if test "$support_avx" -gt 0 -a "$use_x86_64" = 0; then
AC_MSG_ERROR([for AVX support x86-64 emulation must be compiled in!])
fi
support_evex=0
AC_MSG_CHECKING(for EVEX prefix and AVX-512 extensions support)
AC_ARG_ENABLE(evex,
AS_HELP_STRING([--enable-evex], [support for EVEX prefix and AVX-512 extensions (no)]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_EVEX, 1)
support_evex=1
elif test "$enableval" = no; then
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_EVEX, 0)
fi
],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_EVEX, 0)
]
)
if test "$support_evex" -gt 0 -a "$support_avx" = 0; then
AC_MSG_ERROR([for EVEX and AVX-512 support AVX emulation must be compiled in!])
fi
AC_MSG_CHECKING(for x86 debugger support)
AC_ARG_ENABLE(x86-debugger,
AS_HELP_STRING([--enable-x86-debugger], [x86 debugger support (no)]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_X86_DEBUGGER, 1)
elif test "$enableval" = no; then
AC_MSG_RESULT(no)
AC_DEFINE(BX_X86_DEBUGGER, 0)
fi
],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_X86_DEBUGGER, 0)
]
)
dnl devices configuration section
AC_MSG_CHECKING(for i440FX PCI support)
AC_ARG_ENABLE(pci,
AS_HELP_STRING([--enable-pci], [enable i440FX PCI support (yes)]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_PCI, 1)
pci=1
PCI_OBJS='pci.o pci2isa.o pci_ide.o acpi.o'
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_PCI, 0)
pci=0
PCI_OBJS=''
fi],
[
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_PCI, 1)
pci=1
PCI_OBJS='pci.o pci2isa.o pci_ide.o acpi.o'
]
)
AC_SUBST(PCI_OBJS)
AC_MSG_CHECKING(for PCI host device mapping support)
AC_ARG_ENABLE(pcidev,
AS_HELP_STRING([--enable-pcidev], [enable PCI host device mapping support (no - linux host only)]),
[
if test "$enableval" = "yes"; then
AC_MSG_RESULT(yes)
if test "$pci" != "1"; then
AC_MSG_ERROR([PCI host device mapping requires PCI support])
fi
case "$target" in
*-linux*)
AC_MSG_NOTICE([Linux detected as host for PCI host device mapping])
linux_version=`uname -r`
case "$linux_version" in
2.4*)
PCIDEV_MODULE_MAKE_ALL="all-kernel24"
KERNEL_MODULE_SUFFIX="o"
;;
2.6*|3.*)
PCIDEV_MODULE_MAKE_ALL="all-kernel26"
KERNEL_MODULE_SUFFIX="ko"
;;
*)
AC_MSG_ERROR([Linux kernel 2.4, 2.6 or 3.x is required for PCI host device mapping])
;;
esac
KERNELDIR="/lib/modules/$linux_version/build"
LSMOD="lsmod"
INSMOD="insmod"
RMMOD="rmmod"
DEPMOD="depmod"
CLEAN_PCIDEV_VAR=clean_pcidev
AC_SUBST(KERNELDIR)
AC_SUBST(LSMOD)
AC_SUBST(INSMOD)
AC_SUBST(RMMOD)
AC_SUBST(DEPMOD)
AC_SUBST(PCIDEV_MODULE_MAKE_ALL)
AC_SUBST(KERNEL_MODULE_SUFFIX)
AC_SUBST(CLEAN_PCIDEV_VAR)
;;
*)
AC_MSG_ERROR([PCI host device mapping requires Linux as host])
;;
esac
AC_DEFINE(BX_SUPPORT_PCIDEV, 1)
PCI_OBJS="$PCI_OBJS pcidev.o"
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_PCIDEV, 0)
fi
],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_PCIDEV, 0)
]
)
use_usb=0
USBHC_OBJS=''
2014-12-28 22:13:02 +03:00
USBHC_DLL_TARGETS=''
2014-03-23 16:00:58 +04:00
AC_MSG_CHECKING(for USB UHCI support)
AC_ARG_ENABLE(usb,
AS_HELP_STRING([--enable-usb], [enable USB UHCI support (no)]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_USB_UHCI, 1)
USBHC_OBJS="usb_uhci.o"
2014-12-28 22:13:02 +03:00
USBHC_DLL_TARGETS="bx_usb_uhci.dll"
2014-03-23 16:00:58 +04:00
use_usb=1
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_USB_UHCI, 0)
fi],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_USB_UHCI, 0)
]
)
AC_MSG_CHECKING(for USB OHCI support)
AC_ARG_ENABLE(usb-ohci,
AS_HELP_STRING([--enable-usb-ohci], [enable USB OHCI support (no)]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_USB_OHCI, 1)
USBHC_OBJS="$USBHC_OBJS usb_ohci.o"
2014-12-29 02:57:53 +03:00
USBHC_DLL_TARGETS="$USBHC_DLL_TARGETS bx_usb_ohci.dll"
2014-03-23 16:00:58 +04:00
use_usb=1
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_USB_OHCI, 0)
fi],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_USB_OHCI, 0)
]
)
AC_MSG_CHECKING(for experimental USB xHCI support)
AC_ARG_ENABLE(usb-xhci,
AS_HELP_STRING([--enable-usb-xhci], [enable experimental USB xHCI support (no - incomplete)]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_USB_XHCI, 1)
USBHC_OBJS="$USBHC_OBJS usb_xhci.o"
2014-12-28 22:13:02 +03:00
USBHC_DLL_TARGETS="$USBHC_DLL_TARGETS bx_usb_xhci.dll"
2014-03-23 16:00:58 +04:00
use_usb=1
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_USB_XHCI, 0)
fi],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_USB_XHCI, 0)
]
)
if test "$use_usb" = 1; then
if test "$pci" != "1"; then
AC_MSG_ERROR([USB requires PCI support])
fi
USBCORE_OBJ="usb_common.o"
USBDEV_OBJS="usb_hid.o usb_hub.o usb_msd.o usb_printer.o"
SCSI_OBJS="scsi_device.o"
if test "$bx_plugins" = 0; then
USB_LIB_VAR='iodev/usb/libusb.a'
AC_SUBST(USB_LIB_VAR)
fi
fi
2014-12-28 22:13:02 +03:00
AC_SUBST(USBHC_OBJS)
AC_SUBST(USBCORE_OBJ)
AC_SUBST(USBDEV_OBJS)
AC_SUBST(SCSI_OBJS)
AC_SUBST(USBHC_DLL_TARGETS)
2014-03-23 16:00:58 +04:00
networking=no
NETDEV_OBJS=''
2014-12-28 22:13:02 +03:00
NETDEV_DLL_TARGETS=''
2014-03-23 16:00:58 +04:00
AC_MSG_CHECKING(for NE2000 support)
AC_ARG_ENABLE(ne2000,
AS_HELP_STRING([--enable-ne2000], [enable NE2000 support (no)]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_NE2K, 1)
NETDEV_OBJS='ne2k.o'
2014-12-28 22:13:02 +03:00
NETDEV_DLL_TARGETS="bx_ne2k.dll"
2014-03-23 16:00:58 +04:00
networking=yes
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_NE2K, 0)
fi],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_NE2K, 0)
]
)
AC_MSG_CHECKING(for PCI pseudo NIC support)
AC_ARG_ENABLE(pnic,
AS_HELP_STRING([--enable-pnic], [enable PCI pseudo NIC support (no)]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_PCIPNIC, 1)
NETDEV_OBJS="$NETDEV_OBJS pcipnic.o"
2014-12-28 22:13:02 +03:00
NETDEV_DLL_TARGETS="$NETDEV_DLL_TARGETS bx_pcipnic.dll"
2014-03-23 16:00:58 +04:00
networking=yes
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_PCIPNIC, 0)
fi],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_PCIPNIC, 0)
]
)
AC_MSG_CHECKING(for Intel(R) Gigabit Ethernet support)
AC_ARG_ENABLE(e1000,
AS_HELP_STRING([--enable-e1000], [enable Intel(R) Gigabit Ethernet support (no)]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
if test "$pci" != "1"; then
AC_MSG_ERROR([E1000 network adapter requires PCI support])
fi
AC_DEFINE(BX_SUPPORT_E1000, 1)
NETDEV_OBJS="$NETDEV_OBJS e1000.o"
2014-12-28 22:13:02 +03:00
NETDEV_DLL_TARGETS="$NETDEV_DLL_TARGETS bx_e1000.dll"
2014-03-23 16:00:58 +04:00
networking=yes
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_E1000, 0)
fi],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_E1000, 0)
]
)
NETLOW_OBJS=''
if test "$networking" = yes; then
NETLOW_OBJS='eth_null.o eth_vnet.o'
ethernet_modules='null vnet'
2014-04-02 21:38:09 +04:00
can_compile_slirp=0
2014-03-23 16:00:58 +04:00
case "$target" in
*-cygwin* | *-mingw32*)
2014-04-02 21:38:09 +04:00
can_compile_slirp=1
2014-03-23 16:00:58 +04:00
DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS -liphlpapi"
;;
*-pc-windows* | *-pc-winnt*)
2014-04-02 21:38:09 +04:00
can_compile_slirp=1
2014-03-23 16:00:58 +04:00
DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS iphlpapi.lib"
;;
*)
2014-04-02 21:38:09 +04:00
AC_CHECK_HEADER([netinet/in.h], [ can_compile_slirp=1 ], [])
2014-03-23 16:00:58 +04:00
;;
esac
2014-04-02 21:38:09 +04:00
if test $can_compile_slirp = 1; then
NETLOW_OBJS="$NETLOW_OBJS eth_slirp.o \$(SLIRP_OBJS)"
ethernet_modules="$ethernet_modules slirp"
AC_DEFINE(BX_NETMOD_SLIRP, 1)
2014-03-23 16:00:58 +04:00
fi
if test "$MSVC_TARGET" != 1; then
AC_CHECK_HEADER(net/bpf.h, [
NETLOW_OBJS="$NETLOW_OBJS eth_fbsd.o"
ethernet_modules="$ethernet_modules fbsd"
AC_DEFINE(BX_NETMOD_FBSD, 1)
])
AC_CHECK_HEADER(netpacket/packet.h, [
NETLOW_OBJS="$NETLOW_OBJS eth_linux.o"
ethernet_modules="$ethernet_modules linux"
AC_DEFINE(BX_NETMOD_LINUX, 1)
])
fi
case "$target" in
*-pc-windows* | *-pc-winnt* | *-cygwin* | *-mingw32*)
NETLOW_OBJS="$NETLOW_OBJS eth_win32.o"
ethernet_modules="$ethernet_modules win32"
AC_DEFINE(BX_NETMOD_WIN32, 1)
;;
*-macosx* | *-darwin*)
NETLOW_OBJS="$NETLOW_OBJS eth_tuntap.o"
ethernet_modules="$ethernet_modules tuntap"
AC_DEFINE(BX_NETMOD_TUNTAP, 1)
;;
*)
AC_CHECK_HEADER(net/if.h, [
use_ethertap=yes
AC_DEFINE(BX_HAVE_NET_IF_H, 1)
], [],
[
#include <sys/types.h>
#include <sys/socket.h>
])
AC_CHECK_HEADER(linux/netlink.h, [
use_ethertap=yes
], [],
[
#include <asm/types.h>
#include <sys/socket.h>
])
if test "$use_ethertap" = yes; then
NETLOW_OBJS="$NETLOW_OBJS eth_tap.o eth_vde.o"
ethernet_modules="$ethernet_modules tap vde"
AC_DEFINE(BX_NETMOD_TAP, 1)
AC_DEFINE(BX_NETMOD_VDE, 1)
fi
AC_CHECK_HEADER(net/if_tun.h, [
use_tuntap=yes
], [],
[
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
])
AC_CHECK_HEADER(linux/if_tun.h, [
use_tuntap=yes
], [],
[
#include <asm/types.h>
#include <sys/socket.h>
])
if test "$use_tuntap" = yes; then
NETLOW_OBJS="$NETLOW_OBJS eth_tuntap.o"
ethernet_modules="$ethernet_modules tuntap"
AC_DEFINE(BX_NETMOD_TUNTAP, 1)
fi
;;
esac
if test "$bx_plugins" = 0; then
NETWORK_LIB_VAR='iodev/network/libnetwork.a'
AC_SUBST(NETWORK_LIB_VAR)
fi
AC_DEFINE(BX_NETWORKING, 1)
AC_MSG_CHECKING(for ethernet modules)
AC_MSG_RESULT($ethernet_modules)
else
AC_DEFINE(BX_NETWORKING, 0)
fi
AC_SUBST(NETDEV_OBJS)
AC_SUBST(NETLOW_OBJS)
2014-12-28 22:13:02 +03:00
AC_SUBST(NETDEV_DLL_TARGETS)
2014-03-23 16:00:58 +04:00
dnl // serial mode 'socket' needs ws2_32.dll in non-plugin mode
if test "$bx_plugins" = 0; then
case $target in
*-pc-windows*)
DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS ws2_32.lib"
;;
*-mingw32* | *-cygwin*)
DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS -lws2_32"
;;
esac
fi
2004-01-17 23:33:19 +03:00
AC_MSG_CHECKING(for raw serial support)
AC_ARG_ENABLE(raw-serial,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-raw-serial], [use raw serial port access (no - incomplete)]),
2004-01-17 23:33:19 +03:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(USE_RAW_SERIAL, 1)
else
AC_MSG_RESULT(no)
AC_DEFINE(USE_RAW_SERIAL, 0)
fi],
[
AC_MSG_RESULT(no)
AC_DEFINE(USE_RAW_SERIAL, 0)
]
)
2012-09-11 00:49:29 +04:00
DISPLAY_OBJS=''
2014-12-28 22:13:02 +03:00
DISPLAY_DLL_TARGETS=''
2004-08-16 12:07:23 +04:00
AC_MSG_CHECKING(for CLGD54XX emulation)
AC_ARG_ENABLE(clgd54xx,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-clgd54xx], [enable CLGD54XX emulation (no)]),
2004-08-16 12:07:23 +04:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_CLGD54XX, 1)
2012-09-11 00:49:29 +04:00
DISPLAY_OBJS="svga_cirrus.o"
2014-12-28 22:13:02 +03:00
DISPLAY_DLL_TARGETS="bx_svga_cirrus.dll"
2004-08-16 12:07:23 +04:00
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_CLGD54XX, 0)
fi],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_CLGD54XX, 0)
]
)
2012-09-15 01:50:50 +04:00
AC_MSG_CHECKING(for 3dfx Voodoo Graphics emulation)
AC_ARG_ENABLE(voodoo,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-voodoo], [enable 3dfx Voodoo Graphics emulation (no)]),
2012-09-15 01:50:50 +04:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
2012-09-26 17:40:37 +04:00
if test "$pci" != "1"; then
AC_MSG_ERROR([3dfx Voodoo Graphics emulation requires PCI support])
fi
2012-09-15 01:50:50 +04:00
AC_DEFINE(BX_SUPPORT_VOODOO, 1)
DISPLAY_OBJS="$DISPLAY_OBJS voodoo.o"
2014-12-28 22:13:02 +03:00
DISPLAY_DLL_TARGETS="$DISPLAY_DLL_TARGETS bx_voodoo.dll"
2012-09-15 01:50:50 +04:00
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_VOODOO, 0)
fi],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_VOODOO, 0)
]
)
2012-09-11 00:49:29 +04:00
AC_SUBST(DISPLAY_OBJS)
2014-12-28 22:13:02 +03:00
AC_SUBST(DISPLAY_DLL_TARGETS)
2004-08-16 12:07:23 +04:00
2013-11-06 15:15:22 +04:00
AC_MSG_CHECKING(for lowlevel CDROM support)
2001-04-10 05:04:59 +04:00
AC_ARG_ENABLE(cdrom,
2013-11-06 15:15:22 +04:00
AS_HELP_STRING([--enable-cdrom], [lowlevel CDROM support (yes)]),
2001-12-08 00:56:15 +03:00
[if test "$enableval" = no; then
2002-10-27 01:51:19 +04:00
bx_cdrom=0
2001-04-10 05:04:59 +04:00
else
2002-10-27 16:28:30 +03:00
bx_cdrom=1
2002-10-27 01:51:19 +04:00
fi],
[ bx_cdrom=1 ]
)
2013-11-10 15:14:42 +04:00
CDROM_OBJS='cdrom.o'
2002-10-27 01:51:19 +04:00
if test "$bx_cdrom" = 1; then
2011-09-25 22:49:20 +04:00
AC_MSG_RESULT(yes)
case $target in
2013-10-20 18:48:38 +04:00
*-pc-windows* | *-pc-winnt* | *-cygwin* | *-mingw32*)
2011-10-03 11:23:44 +04:00
CDROM_OBJS="$CDROM_OBJS cdrom_win32.o"
2013-11-06 15:15:22 +04:00
AC_DEFINE(LOWLEVEL_CDROM, cdrom_win32_c)
2011-09-25 22:49:20 +04:00
AC_DEFINE(BX_SUPPORT_CDROM, 1)
;;
*)
AC_CHECK_HEADER(IOKit/storage/IOCDMedia.h,
can_use_osx_cdrom=yes
)
if test "$with_amigaos" = yes; then
# use the amiga cdrom file instead.
2011-10-03 11:23:44 +04:00
CDROM_OBJS="$CDROM_OBJS cdrom_amigaos.o"
2013-11-06 15:15:22 +04:00
AC_DEFINE(LOWLEVEL_CDROM, cdrom_amigaos_c)
2011-09-25 22:49:20 +04:00
elif test "$can_use_osx_cdrom" = yes; then
# use cdrom_osx
AC_MSG_RESULT(Using OSX IOKit CD Interface)
2011-10-10 21:32:53 +04:00
CDROM_OBJS="$CDROM_OBJS cdrom_osx.o"
2013-11-06 15:15:22 +04:00
AC_DEFINE(LOWLEVEL_CDROM, cdrom_osx_c)
2011-09-25 22:49:20 +04:00
EXTRA_LINK_OPTS="${EXTRA_LINK_OPTS} -framework IOKit -framework CoreFoundation "'$(GUI_LINK_OPTS)'
2011-10-03 11:23:44 +04:00
else
CDROM_OBJS="$CDROM_OBJS cdrom_misc.o"
2013-11-06 15:15:22 +04:00
AC_DEFINE(LOWLEVEL_CDROM, cdrom_misc_c)
2011-09-25 22:49:20 +04:00
fi
AC_DEFINE(BX_SUPPORT_CDROM, 1)
;;
esac
2002-10-27 01:51:19 +04:00
else
2011-09-25 22:49:20 +04:00
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_CDROM, 0)
2002-10-27 01:51:19 +04:00
fi
2001-12-08 01:18:40 +03:00
2001-04-10 05:04:59 +04:00
AC_SUBST(CDROM_OBJS)
2014-12-28 22:13:02 +03:00
SOUNDHW_OBJS=''
SOUNDHW_DLL_TARGETS=''
2003-12-26 16:53:40 +03:00
SOUNDLOW_OBJS=''
GAME_OBJS=''
2013-08-04 18:35:06 +04:00
soundlow_drivers=''
soundlow_default=''
2011-03-12 20:37:26 +03:00
soundcard_present=0
2003-12-26 16:53:40 +03:00
gameport_present=0
2011-03-12 20:37:26 +03:00
AC_MSG_CHECKING(for Sound Blaster 16 support)
2001-04-10 05:04:59 +04:00
AC_ARG_ENABLE(sb16,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-sb16], [Sound Blaster 16 Support (no)]),
2011-03-12 20:37:26 +03:00
[if test "$enableval" = yes; then
2014-12-28 22:13:02 +03:00
AC_MSG_RESULT(yes)
SOUNDHW_OBJS='sb16.o'
SOUNDHW_DLL_TARGETS="bx_sb16.dll"
2011-03-12 20:37:26 +03:00
soundcard_present=1
2001-04-10 05:04:59 +04:00
AC_DEFINE(BX_SUPPORT_SB16, 1)
2003-12-26 16:53:40 +03:00
GAME_OBJS='gameport.o'
gameport_present=1
2011-03-12 20:37:26 +03:00
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_SB16, 0)
2001-04-10 05:04:59 +04:00
fi],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_SB16, 0)
]
)
2011-03-12 20:37:26 +03:00
AC_MSG_CHECKING(for ES1370 soundcard support)
AC_ARG_ENABLE(es1370,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-es1370], [enable ES1370 soundcard support (no)]),
2011-03-12 20:37:26 +03:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
if test "$pci" != "1"; then
AC_MSG_ERROR([ES1370 soundcard requires PCI support])
fi
2014-12-29 02:57:53 +03:00
SOUNDHW_OBJS="$SOUNDHW_OBJS es1370.o"
2014-12-28 22:13:02 +03:00
SOUNDHW_DLL_TARGETS="$SOUNDHW_DLL_TARGETS bx_es1370.dll"
2011-03-12 20:37:26 +03:00
soundcard_present=1
AC_DEFINE(BX_SUPPORT_ES1370, 1)
GAME_OBJS='gameport.o'
gameport_present=1
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_ES1370, 0)
fi],
[
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_ES1370, 0)
]
)
if test "$soundcard_present" = 1; then
2011-03-19 15:57:13 +03:00
AC_DEFINE(BX_SUPPORT_SOUNDLOW, 1)
2011-03-12 20:37:26 +03:00
case "$target" in
*-linux* | *-freebsd*)
SOUNDLOW_OBJS='soundlnx.o'
2013-08-04 18:35:06 +04:00
soundlow_drivers="oss"
soundlow_default="oss"
2015-02-24 00:32:34 +03:00
AC_DEFINE(BX_HAVE_SOUND_OSS, 1)
2011-03-12 20:37:26 +03:00
bx_have_alsa=0
AC_CHECK_HEADER([alsa/asoundlib.h], [bx_have_alsa=1])
if test "$bx_have_alsa" = 1; then
2013-07-14 19:14:53 +04:00
SOUNDLOW_OBJS="$SOUNDLOW_OBJS soundalsa.o"
2013-08-04 18:35:06 +04:00
soundlow_default="alsa"
soundlow_drivers="alsa $soundlow_drivers"
2015-02-24 00:32:34 +03:00
AC_DEFINE(BX_HAVE_SOUND_ALSA, 1)
2011-03-12 20:37:26 +03:00
if test "$bx_plugins" = 1; then
SOUND_LINK_OPTS="$SOUND_LINK_OPTS -lasound"
else
DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS -lasound"
fi
fi
;;
*-pc-windows*)
SOUNDLOW_OBJS='soundwin.o'
DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS winmm.lib"
2013-08-04 18:35:06 +04:00
soundlow_drivers="win"
soundlow_default="win"
2015-02-24 00:32:34 +03:00
AC_DEFINE(BX_HAVE_SOUND_WIN, 1)
2011-03-12 20:37:26 +03:00
;;
*-cygwin* | *-mingw32*)
SOUNDLOW_OBJS='soundwin.o'
DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS -lwinmm"
2013-08-04 18:35:06 +04:00
soundlow_drivers="win"
soundlow_default="win"
2015-02-24 00:32:34 +03:00
AC_DEFINE(BX_HAVE_SOUND_WIN, 1)
2011-03-12 20:37:26 +03:00
;;
2011-04-12 20:17:22 +04:00
*-macosx* | *-macos* | *-apple-darwin*)
2011-03-12 20:37:26 +03:00
SOUNDLOW_OBJS='soundosx.o'
2011-04-19 16:50:22 +04:00
DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS -framework CoreServices -framework AudioUnit -framework AudioToolbox"
2013-08-04 18:35:06 +04:00
soundlow_drivers="osx"
soundlow_default="osx"
2015-02-24 00:32:34 +03:00
AC_DEFINE(BX_HAVE_SOUND_OSX, 1)
2011-03-12 20:37:26 +03:00
;;
*)
SOUNDLOW_OBJS=''
2013-08-04 18:35:06 +04:00
soundlow_default="dummy"
2011-03-12 20:37:26 +03:00
;;
esac
2012-06-09 14:12:05 +04:00
if test "$with_sdl" = yes; then
SOUNDLOW_OBJS="$SOUNDLOW_OBJS soundsdl.o"
if test "$bx_plugins" = 1; then
SOUND_LINK_OPTS="$SOUND_LINK_OPTS `sdl-config --libs`"
fi
2013-08-04 18:35:06 +04:00
soundlow_drivers="$soundlow_drivers sdl"
if test "$soundlow_default" = "dummy"; then
soundlow_default="sdl"
fi
2015-02-24 00:32:34 +03:00
AC_DEFINE(BX_HAVE_SOUND_SDL, 1)
2014-06-28 00:53:20 +04:00
elif test "$with_sdl2" = yes; then
SOUNDLOW_OBJS="$SOUNDLOW_OBJS soundsdl.o"
if test "$bx_plugins" = 1; then
SOUND_LINK_OPTS="$SOUND_LINK_OPTS `sdl2-config --libs`"
fi
soundlow_drivers="$soundlow_drivers sdl"
if test "$soundlow_default" = "dummy"; then
soundlow_default="sdl"
fi
2015-02-24 00:32:34 +03:00
AC_DEFINE(BX_HAVE_SOUND_SDL, 1)
2012-06-09 14:12:05 +04:00
fi
2012-02-17 23:08:58 +04:00
if test "$bx_plugins" = 0; then
SOUND_LIB_VAR='iodev/sound/libsound.a'
AC_SUBST(SOUND_LIB_VAR)
fi
2013-08-04 18:35:06 +04:00
AC_MSG_CHECKING(for sound lowlevel modules)
AC_MSG_RESULT($soundlow_drivers)
AC_MSG_CHECKING(for default sound lowlevel module)
AC_MSG_RESULT($soundlow_default)
2014-11-22 14:43:40 +03:00
AC_DEFINE_UNQUOTED(BX_SOUND_LOWLEVEL_NAME, "$soundlow_default")
2011-03-19 15:57:13 +03:00
else
AC_DEFINE(BX_SUPPORT_SOUNDLOW, 0)
2011-03-12 20:37:26 +03:00
fi
2014-12-28 22:13:02 +03:00
AC_SUBST(SOUNDHW_OBJS)
2002-11-13 00:07:17 +03:00
AC_SUBST(SOUNDLOW_OBJS)
2008-07-12 19:21:36 +04:00
AC_SUBST(SOUND_LINK_OPTS)
2014-12-28 22:13:02 +03:00
AC_SUBST(SOUNDHW_DLL_TARGETS)
2001-04-10 05:04:59 +04:00
2003-12-26 16:53:40 +03:00
AC_MSG_CHECKING(for standard PC gameport support)
AC_ARG_ENABLE(gameport,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-gameport], [enable standard PC gameport support (yes, if soundcard present)]),
2003-12-26 16:53:40 +03:00
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
2006-04-05 22:49:35 +04:00
AC_DEFINE(BX_SUPPORT_GAMEPORT, 1)
2003-12-26 16:53:40 +03:00
if test "$gameport_present" = 0; then
GAME_OBJS='gameport.o'
case $target in
*-cygwin* | *-mingw32*)
DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS -lwinmm"
;;
esac
fi
else
AC_MSG_RESULT(no)
GAME_OBJS=''
2006-04-05 22:49:35 +04:00
AC_DEFINE(BX_SUPPORT_GAMEPORT, 0)
2003-12-26 16:53:40 +03:00
fi],
[
if test "$gameport_present" = 1; then
2006-04-05 22:49:35 +04:00
AC_DEFINE(BX_SUPPORT_GAMEPORT, 1)
2003-12-26 16:53:40 +03:00
AC_MSG_RESULT(yes)
else
2006-04-05 22:49:35 +04:00
AC_DEFINE(BX_SUPPORT_GAMEPORT, 0)
2003-12-26 16:53:40 +03:00
AC_MSG_RESULT(no)
fi]
)
AC_SUBST(GAME_OBJS)
2014-03-23 16:00:58 +04:00
BUSM_OBJS=''
2014-12-28 22:13:02 +03:00
bx_busmouse=0
2014-03-23 16:00:58 +04:00
AC_MSG_CHECKING(for Busmouse support)
AC_ARG_ENABLE(busmouse,
AS_HELP_STRING([--enable-busmouse], [enable Busmouse support (InPort)]),
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(BX_SUPPORT_BUSMOUSE, 1)
BUSM_OBJS='busmouse.o'
2014-12-28 22:13:02 +03:00
bx_busmouse=1
2014-03-23 16:00:58 +04:00
else
AC_MSG_RESULT(no)
AC_DEFINE(BX_SUPPORT_BUSMOUSE, 0)
fi],
[
AC_DEFINE(BX_SUPPORT_BUSMOUSE, 0)
AC_MSG_RESULT(no)]
)
AC_SUBST(BUSM_OBJS)
2002-12-13 20:52:16 +03:00
AC_PATH_PROG(DOCBOOK2HTML, docbook2html, not_found)
AC_MSG_CHECKING(whether to build docbook documentation)
build_docbook=0
AC_ARG_ENABLE(docbook,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-docbook], [build the Docbook documentation (yes, if docbook present)]),
2002-12-13 20:52:16 +03:00
[
2008-02-06 01:57:43 +03:00
if test "$enableval" = yes; then build_docbook=1; fi
2002-12-13 20:52:16 +03:00
],
[
dnl Not specified. If they have docbook2html, then yes.
if test "$DOCBOOK2HTML" != not_found; then build_docbook=1; fi
]
)
if test $build_docbook = 1; then
AC_MSG_RESULT(yes)
2002-12-13 23:37:38 +03:00
BUILD_DOCBOOK_VAR=build_docbook
2002-12-13 20:52:16 +03:00
INSTALL_DOCBOOK_VAR=install_docbook
2012-04-11 20:53:02 +04:00
CLEAN_DOCBOOK_VAR=clean_docbook
2005-03-30 20:41:31 +04:00
if test "$DOCBOOK2HTML" = not_found; then
2005-03-21 22:17:00 +03:00
echo "ERROR: docbook2html must be installed to build the documentation"
exit 1
fi
2002-12-13 20:52:16 +03:00
else
AC_MSG_RESULT(no)
fi
2002-12-13 23:37:38 +03:00
AC_SUBST(BUILD_DOCBOOK_VAR)
2002-12-13 20:52:16 +03:00
AC_SUBST(INSTALL_DOCBOOK_VAR)
2012-04-11 20:53:02 +04:00
AC_SUBST(CLEAN_DOCBOOK_VAR)
2002-12-13 20:52:16 +03:00
AC_SUBST(DOCBOOK2HTML)
2001-09-18 09:25:29 +04:00
2001-04-10 05:04:59 +04:00
PRIMARY_TARGET='bochs'
2002-11-14 21:45:49 +03:00
PLUGIN_LIBNAME_TRANSFORMATION='%.o=libbx_%.la'
2001-04-10 05:04:59 +04:00
2012-08-05 22:13:38 +04:00
if test "$bx_plugins" = 0; then
HDIMAGE_LIB_VAR='iodev/hdimage/libhdimage.a'
AC_SUBST(HDIMAGE_LIB_VAR)
2012-09-11 00:49:29 +04:00
DISPLAY_LIB_VAR='iodev/display/libdisplay.a'
AC_SUBST(DISPLAY_LIB_VAR)
2012-08-05 22:13:38 +04:00
fi
2001-06-07 20:00:58 +04:00
IODEV_LIB_VAR='iodev/libiodev.a'
NONINLINE_VAR='$(NONINLINE_OBJS)'
2001-04-10 05:04:59 +04:00
2001-06-07 20:00:58 +04:00
AC_SUBST(IODEV_LIB_VAR)
2002-10-02 04:09:49 +04:00
AC_SUBST(EXTRA_BX_OBJS)
2001-04-10 05:04:59 +04:00
AC_SUBST(NONINLINE_VAR)
AC_SUBST(INLINE_VAR)
AC_SUBST(EXTERNAL_DEPENDENCY)
2003-06-06 23:57:25 +04:00
AC_SUBST(RC_CMD)
2001-04-10 05:04:59 +04:00
AC_ARG_WITH(x11,
[ --with-x11 use X11 GUI],
)
AC_ARG_WITH(win32,
[ --with-win32 use Win32 GUI],
)
AC_ARG_WITH(macos,
[ --with-macos use Macintosh/CodeWarrior environment],
)
2001-09-26 04:13:16 +04:00
AC_ARG_WITH(carbon,
[ --with-carbon compile for MacOS X with Carbon GUI],
)
2001-04-10 05:04:59 +04:00
AC_ARG_WITH(nogui,
[ --with-nogui no native GUI, just use blank stubs],
)
2001-05-08 23:07:26 +04:00
AC_ARG_WITH(term,
[ --with-term textmode terminal environment],
)
2001-05-24 05:07:09 +04:00
AC_ARG_WITH(rfb,
[ --with-rfb use RFB protocol, works with VNC viewer],
)
2013-05-30 21:18:30 +04:00
AC_ARG_WITH(vncsrv,
[ --with-vncsrv use LibVNCServer, works with VNC viewer],
)
2001-08-16 00:33:47 +04:00
AC_ARG_WITH(amigaos,
2003-02-21 17:40:59 +03:00
[ --with-amigaos use AmigaOS (or MorphOS) GUI],
2001-12-08 00:56:15 +03:00
)
2002-02-05 20:37:11 +03:00
AC_ARG_WITH(sdl,
[ --with-sdl use SDL libraries],
)
2014-06-28 00:53:20 +04:00
AC_ARG_WITH(sdl2,
[ --with-sdl2 use SDL2 libraries],
)
2002-11-21 22:26:07 +03:00
AC_ARG_WITH(svga,
2002-12-13 20:52:16 +03:00
[ --with-svga use SVGALib libraries],
2002-11-21 22:26:07 +03:00
)
2002-04-18 04:22:20 +04:00
AC_ARG_WITH(wx,
2005-01-05 22:54:32 +03:00
[ --with-wx use wxWidgets libraries],
2002-04-18 04:22:20 +04:00
)
2002-10-25 01:07:56 +04:00
AC_ARG_WITH(all-libs,
[ --with-all-libs compile all guis that Bochs supports],
)
2001-04-10 05:04:59 +04:00
dnl // DASH is option prefix for your platform
dnl // SLASH is directory for your platform
dnl // CXXFP is C++ File Prefix; the flag that tells the compiler
dnl // this is a C++ source file
dnl // CFP is C File Prefix; the flag that tells the compiler
dnl // this is a C source file
dnl // OFP is Object File Prefix; the flag that tells the compiler
dnl // generate an object file with this name
DASH="-"
SLASH="/"
CXXFP=""
CFP=""
OFP="-o "
2002-09-14 09:46:57 +04:00
MAKELIB="ar rv \$@"
2001-04-10 05:04:59 +04:00
RMCOMMAND="rm -f "
2002-12-12 22:43:40 +03:00
# first define link variables without libtool
LINK="\$(CXX) -o \$@ \$(CXXFLAGS) \$(LDFLAGS)"
LINK_CONSOLE="\$(CXX) -o \$@ \$(CXXFLAGS_CONSOLE) \$(LDFLAGS)"
# unless NO_LT is set, add libtool to the front of the link command
if test "$NO_LT" != 1; then
2012-07-14 11:01:43 +04:00
LINK="\$(LIBTOOL) --mode=link --tag CXX $LINK"
LINK_CONSOLE="\$(LIBTOOL) --mode=link --tag CXX $LINK_CONSOLE"
2002-12-12 22:43:40 +03:00
fi
2001-04-10 05:04:59 +04:00
EXE=""
COMMAND_SEPARATOR="&& \\"
CD_UP_ONE="echo done"
CD_UP_TWO="echo done"
2004-01-15 05:08:37 +03:00
CD_UP_THREE="echo done"
2001-04-10 05:04:59 +04:00
2001-10-05 10:06:21 +04:00
INSTALL_TARGET=install_unix
INSTALL_LIST_FOR_PLATFORM=
2005-01-05 22:54:32 +03:00
# check for existence of and usable version of wxWidgets. This comes
2002-09-24 01:41:35 +04:00
# early so that it could affect which one gets chosen.
2002-10-03 06:26:32 +04:00
if test x$WX_CONFIG = x; then
AC_CHECK_PROG(WX_CONFIG, [ wx-config --version ], wx-config, not_found)
fi
2005-01-05 22:54:32 +03:00
AC_MSG_CHECKING(for wxWidgets configuration script)
2002-10-03 06:26:32 +04:00
AC_MSG_RESULT($WX_CONFIG)
2008-02-06 01:57:43 +03:00
2002-09-24 01:41:35 +04:00
ok_wx_version=0
2006-03-13 20:18:33 +03:00
wx_multi_lib=0
2009-01-31 13:04:25 +03:00
needs_gtk2=0
2012-06-30 16:43:55 +04:00
wx_needs_gdk2=0
2005-01-05 22:54:32 +03:00
AC_MSG_CHECKING(for wxWidgets library version)
2002-09-25 01:35:04 +04:00
if test x$WX_CONFIG != xnot_found; then
2002-09-24 01:41:35 +04:00
WX_VERSION=`$WX_CONFIG --version`
2005-10-03 14:28:56 +04:00
WX_BASENAME=`$WX_CONFIG --basename`
2002-09-24 01:41:35 +04:00
[
# test that version >= 2.3.2. Anybody have a better way to do this? Yuck.
2008-02-06 01:57:43 +03:00
case x$WX_VERSION in
2002-09-24 01:41:35 +04:00
x2.[012]*) ;; # less than version 2.3.x
x2.3.[01]) ;; # less than version 2.3.2
2005-05-17 22:07:04 +04:00
x2.3.[2-4]*) ok_wx_version=1 ;; # 2.3.2 or greater
x2.[4-5]*) ok_wx_version=1 ;; # version 2.4 / 2.5
2005-10-03 14:28:56 +04:00
x2.[6-9]*) # version 2.6 or greater
ok_wx_version=1
2006-03-13 20:18:33 +03:00
wx_multi_lib=1
case x$WX_BASENAME in
2012-06-30 16:43:55 +04:00
xwx_gtk2|xwx_gtk2u) wx_needs_gdk2=1 ;;
2009-02-01 15:41:28 +03:00
*) ;;
2006-03-13 20:18:33 +03:00
esac
2005-10-03 14:28:56 +04:00
;;
2002-09-24 01:41:35 +04:00
x[3-9]*) ok_wx_version=1 ;; # version 3 or greater
*) ;; # who knows?
esac
]
fi
2002-09-25 01:35:04 +04:00
AC_MSG_RESULT($WX_VERSION)
2002-10-25 01:07:56 +04:00
if test "$cross_configure" = 0; then
if test "$ok_wx_version" = 1; then
# detected a usable version
if test "$with_all_libs" = yes; then
with_wx=yes
fi
else
2006-10-12 21:58:09 +04:00
if test "$with_wx" = yes; then
AC_MSG_WARN([Bochs for wxWidgets cannot be compiled here, disabling it])
fi
2002-10-25 01:07:56 +04:00
with_wx=no
fi
fi
2002-09-24 01:41:35 +04:00
2002-03-08 07:47:33 +03:00
AC_MSG_CHECKING(for default gui on this platform)
AC_MSG_RESULT($DEFAULT_GUI)
2002-10-25 01:07:56 +04:00
display_libs=""
2014-12-28 22:13:02 +03:00
GUI_DLL_TARGETS=""
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
# the $with_* variable tells the gui library to use, but does NOT necessarily
# indicate the platform. Settings that depend on the platform should be
# handled later.
2003-06-13 20:05:03 +04:00
XPM_LIB=''
2001-04-10 05:04:59 +04:00
if test "$with_x11" = yes; then
2002-10-25 01:07:56 +04:00
display_libs="$display_libs X11"
2001-06-02 07:11:51 +04:00
if test "$no_x" = yes; then
echo ERROR: X windows gui was selected, but X windows libraries were not found.
exit 1
fi
2012-06-30 16:43:55 +04:00
2003-08-10 20:05:41 +04:00
check_xpm=0
AC_MSG_CHECKING(whether user wants XPM support)
AC_ARG_ENABLE(xpm,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-xpm], [enable the check for XPM support (yes)]),
2003-08-10 20:05:41 +04:00
[if test "$enableval" = yes; then
check_xpm=0
AC_MSG_RESULT(yes)
check_xpm=1
else
AC_MSG_RESULT(no)
check_xpm=0
fi],
[
AC_MSG_RESULT(yes)
check_xpm=1
]
)
if test $check_xpm = 1; then
AC_CHECK_HEADER(X11/xpm.h, [
AC_DEFINE(BX_HAVE_XPM_H)
XPM_LIB='-lXpm'
])
fi
2012-06-30 16:43:55 +04:00
2012-08-07 22:28:00 +04:00
if test "$PKGCONFIG" != not_found; then
X_CFLAGS="`pkg-config --cflags x11`"
X_LIBS="`pkg-config --libs x11` $XPM_LIB -lXrandr"
else
X_LIBS="$X_LIBS -lX11 $XPM_LIB -lXrandr"
fi
2012-06-30 16:43:55 +04:00
AC_DEFINE(BX_WITH_X11, 1)
SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_X11)"
GUI_CFLAGS="$GUI_CFLAGS \$(X_CFLAGS)"
GUI_CXXFLAGS="$GUI_CXXFLAGS \$(X_CFLAGS)"
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_X)"
# The enhanced X debugger depends on GTK2
if test "$gui_debugger" = 1; then
needs_gtk2=1
fi
2002-10-25 01:07:56 +04:00
fi
2012-06-30 16:43:55 +04:00
AC_SUBST(X_CFLAGS)
AC_SUBST(X_LIBS)
2002-10-25 01:07:56 +04:00
if test "$with_sdl" = yes; then
display_libs="$display_libs sdl"
2014-12-28 22:13:02 +03:00
GUI_DLL_TARGETS="$GUI_DLL_TARGETS bx_sdl.dll"
2002-10-25 01:07:56 +04:00
AC_DEFINE(BX_WITH_SDL, 1)
SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_SDL)"
- add -lwinmm to the link lines anytime you use --enable-sb16=win. Now
instead of winmm being a part of GUI_LINK_OPTS_WIN32 only, it is
placed in @DEVICE_LINE_OPTS@ so that it will be used for sdl, rfb, wx,
etc.
- solve compile problems when building bximage, niclist, and any other
console based program. The compile flags returned by wx-config and
sdl-config did strange things to these console programs, for example
redefining main to SDL_main. Because I wanted to use the
configure-generated CFLAGS to compile the programs, but I wanted to
avoid including GUI specific compile options, I split up the configure's
@CFLAGS@ variable into @CFLAGS@ and @GUI_CFLAGS@, and split
@CXXFLAGS@ into @CXXFLAGS@ and @GUI_CXXFLAGS@. All programs in the
Bochs binary will use both, but the console programs will just use
@CFLAGS@ or @CXXFLAGS@.
- gui/Makefile.in, I no longer use the gui specific CFLAGS variables,
SDL_CFLAGS and WX_CXXFLAGS. These values are included in CFLAGS and
CXXFLAGS now.
- modified: configure.in, configure, all Makefile.in's
2002-10-02 03:37:50 +04:00
# GUI_*FLAGS are added to the compilation of every bochs file, not just
# the files in gui/*.cc.
2006-03-13 20:18:33 +03:00
SDL_CFLAGS=`sdl-config --cflags`
GUI_CFLAGS="$GUI_CFLAGS $SDL_CFLAGS"
GUI_CXXFLAGS="$GUI_CXXFLAGS $SDL_CFLAGS"
2014-06-21 12:22:22 +04:00
GUI_LINK_OPTS_SDL="`sdl-config --libs`"
2002-10-25 01:07:56 +04:00
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_SDL)"
2009-02-01 15:41:28 +03:00
# The enhanced X debugger depends on GTK2
if test "$gui_debugger" = 1 -a "$DEFAULT_GUI" != win32; then
needs_gtk2=1
fi
2003-07-14 03:30:55 +04:00
if test "$with_win32" != yes -a "$with_wx" != yes; then
2003-05-23 20:06:42 +04:00
case $target in
2003-06-06 23:57:25 +04:00
*-pc-windows*)
RC_CMD="rc /fo"
EXTRA_BX_OBJS="$EXTRA_BX_OBJS win32res.o"
;;
2003-05-23 20:06:42 +04:00
*-cygwin* | *-mingw32*)
2012-02-20 10:43:53 +04:00
RC_CMD="windres -I. -o "
2003-05-23 20:06:42 +04:00
EXTRA_BX_OBJS="$EXTRA_BX_OBJS win32res.o"
;;
esac
fi
2002-10-25 01:07:56 +04:00
fi
2014-06-28 00:53:20 +04:00
if test "$with_sdl2" = yes; then
display_libs="$display_libs sdl2"
2014-12-28 22:13:02 +03:00
GUI_DLL_TARGETS="$GUI_DLL_TARGETS bx_sdl2.dll"
2014-06-28 00:53:20 +04:00
AC_DEFINE(BX_WITH_SDL2, 1)
SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_SDL2)"
# GUI_*FLAGS are added to the compilation of every bochs file, not just
# the files in gui/*.cc.
SDL2_CFLAGS=`sdl2-config --cflags`
GUI_CFLAGS="$GUI_CFLAGS $SDL2_CFLAGS"
GUI_CXXFLAGS="$GUI_CXXFLAGS $SDL2_CFLAGS"
GUI_LINK_OPTS_SDL2="`sdl2-config --libs`"
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_SDL2)"
# The enhanced X debugger depends on GTK2
if test "$gui_debugger" = 1 -a "$DEFAULT_GUI" != win32; then
needs_gtk2=1
fi
if test "$with_win32" != yes -a "$with_wx" != yes; then
case $target in
*-pc-windows*)
RC_CMD="rc /fo"
EXTRA_BX_OBJS="$EXTRA_BX_OBJS win32res.o"
;;
*-cygwin* | *-mingw32*)
RC_CMD="windres -I. -o "
EXTRA_BX_OBJS="$EXTRA_BX_OBJS win32res.o"
;;
esac
fi
fi
2002-11-21 22:26:07 +03:00
if test "$with_svga" = yes; then
display_libs="$display_libs svga"
AC_DEFINE(BX_WITH_SVGA, 1)
SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_SVGA)"
# GUI_*FLAGS are added to the compilation of every bochs file, not just
# the files in gui/*.cc.
GUI_CFLAGS="$GUI_CFLAGS"
GUI_CXXFLAGS="$GUI_CXXFLAGS"
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_SVGA)"
fi
2002-10-25 01:07:56 +04:00
if test "$with_rfb" = yes; then
display_libs="$display_libs rfb"
2014-12-28 22:13:02 +03:00
GUI_DLL_TARGETS="$GUI_DLL_TARGETS bx_rfb.dll"
2001-05-24 05:07:09 +04:00
AC_DEFINE(BX_WITH_RFB, 1)
2002-10-25 01:07:56 +04:00
SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_RFB)"
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_RFB)"
fi
2013-05-30 21:18:30 +04:00
if test "$with_vncsrv" = yes; then
2013-05-31 20:46:15 +04:00
AC_CHECK_PROG(LIBVNCSERVER_CONFIG, [ libvncserver-config --version ], libvncserver-config, not_found)
AC_MSG_CHECKING(for LibVNCServer configuration script)
AC_MSG_RESULT($LIBVNCSERVER_CONFIG_CONFIG)
if test x$LIBVNCSERVER_CONFIG != xnot_found; then
display_libs="$display_libs vncsrv"
AC_DEFINE(BX_WITH_VNCSRV, 1)
VNCSRV_CXXFLAGS="`$LIBVNCSERVER_CONFIG --cflags`"
GUI_LINK_OPTS_VNCSRV="`$LIBVNCSERVER_CONFIG --libs`"
SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_VNCSRV)"
GUI_CXXFLAGS="$GUI_CXXFLAGS $VNCSRV_CXXFLAGS"
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_VNCSRV)"
else
AC_MSG_WARN([Bochs for LibVNCServer cannot be compiled here, disabling it])
with_vncsrv=no
fi
2013-05-30 21:18:30 +04:00
fi
2002-10-25 01:07:56 +04:00
if test "$with_amigaos" = yes; then
display_libs="$display_libs amigaos"
2001-08-16 00:33:47 +04:00
AC_DEFINE(BX_WITH_AMIGAOS, 1)
2002-10-25 01:07:56 +04:00
SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_AMIGAOS)"
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_AMIGAOS)"
fi
if test "$with_win32" = yes; then
display_libs="$display_libs win32"
2014-12-28 22:13:02 +03:00
GUI_DLL_TARGETS="$GUI_DLL_TARGETS bx_win32.dll"
2001-04-10 05:04:59 +04:00
AC_DEFINE(BX_WITH_WIN32, 1)
2002-10-25 01:07:56 +04:00
SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_WIN32)"
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
case $target in
*-pc-windows*)
2003-07-14 03:30:55 +04:00
if test "$with_wx" != yes; then
RC_CMD="rc /fo"
EXTRA_BX_OBJS="$EXTRA_BX_OBJS win32res.o"
fi
2002-10-25 01:07:56 +04:00
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_WIN32_VCPP)"
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
;;
2002-03-28 03:29:57 +03:00
*-cygwin* | *-mingw32*)
2003-07-14 03:30:55 +04:00
if test "$with_wx" != yes; then
2012-02-20 10:43:53 +04:00
RC_CMD="windres -I. -o "
2003-07-14 03:30:55 +04:00
EXTRA_BX_OBJS="$EXTRA_BX_OBJS win32res.o"
fi
2002-10-25 01:07:56 +04:00
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_WIN32)"
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
;;
*) echo Unsupported compile setup: GUI library is win32, but target is neither windows nor cygwin.
;;
esac
2002-10-25 01:07:56 +04:00
fi
if test "$with_macos" = yes; then
display_libs="$display_libs macos"
2001-04-10 05:04:59 +04:00
AC_DEFINE(BX_WITH_MACOS, 1)
2002-10-25 01:07:56 +04:00
SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_MACOS)"
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_MACOS)"
fi
if test "$with_carbon" = yes; then
display_libs="$display_libs carbon"
2001-09-26 04:13:16 +04:00
AC_DEFINE(BX_WITH_CARBON, 1)
2002-10-25 01:07:56 +04:00
SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_CARBON)"
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_CARBON)"
2002-11-01 20:53:52 +03:00
if test "$bx_plugins" = 1; then
PRIMARY_TARGET=bochs.app/.build_plugins # only for carbon application
else
PRIMARY_TARGET=bochs.app/.build # only for carbon application
fi
2002-11-22 09:44:44 +03:00
INSTALL_TARGET='install_macosx'
2002-10-25 01:07:56 +04:00
fi
if test "$with_term" = yes; then
display_libs="$display_libs term"
2001-05-08 23:07:26 +04:00
AC_DEFINE(BX_WITH_TERM, 1)
2002-10-25 01:07:56 +04:00
SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_TERM)"
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_TERM)"
2001-05-08 23:07:26 +04:00
use_curses=yes
2002-10-25 01:07:56 +04:00
fi
if test "$with_wx" = yes; then
2005-01-05 22:54:32 +03:00
display_libs="$display_libs wxWidgets"
2002-09-25 01:35:04 +04:00
if test "$cross_configure" = 1; then
true # do not insist, if configuring for another machine
else
if test x$ok_wx_version != x1; then
2008-02-06 01:57:43 +03:00
echo ERROR: A usable version of wxWidgets was not found.
2002-09-25 01:35:04 +04:00
echo Upgrade the library or choose another gui.
exit 1
fi
2002-09-24 01:41:35 +04:00
fi
2002-04-18 04:22:20 +04:00
AC_DEFINE(BX_WITH_WX, 1)
2002-10-25 01:07:56 +04:00
SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_WX)"
2002-10-28 08:49:42 +03:00
SPECIFIC_GUI_SUPPORT_OBJS="$SPECIFIC_GUI_SUPPORT_OBJS \$(GUI_OBJS_WX_SUPPORT)"
2006-03-13 20:18:33 +03:00
WX_CFLAGS="`$WX_CONFIG --cflags`"
WX_CXXFLAGS="`$WX_CONFIG --cxxflags`"
2012-06-30 16:43:55 +04:00
if test "$wx_needs_gdk2" = 1; then
GDK_CFLAGS="`pkg-config --cflags gdk-2.0`"
WX_CFLAGS="$WX_CFLAGS $GDK_CFLAGS"
WX_CXXFLAGS="$WX_CXXFLAGS $GDK_CFLAGS"
fi
2006-03-13 20:18:33 +03:00
if test "$wx_multi_lib" = 1; then
GUI_LINK_OPTS_WX="`$WX_CONFIG --libs core,base`"
else
GUI_LINK_OPTS_WX="`$WX_CONFIG --libs`"
fi
2002-10-25 01:07:56 +04:00
# GUI_C*FLAGS are added to the compilation of every bochs file, not just
# the files in gui/*.cc. They are not used when building other things
# such as bximage.
GUI_CFLAGS="$GUI_CFLAGS $WX_CFLAGS"
GUI_CXXFLAGS="$GUI_CXXFLAGS $WX_CXXFLAGS"
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_WX)"
2002-09-05 23:59:20 +04:00
# using debugger with readline is failing due to thread/signal handler
# problems.
2002-10-02 04:09:49 +04:00
case $target in
*-pc-windows* | *-cygwin* | *-mingw32*)
EXTRA_BX_OBJS="$EXTRA_BX_OBJS wxbochs_resources.o"
Next step for plugin support with MSVC nmake: device plugins that need special
rules can be built now (keyboard, pit, gameport, serial, vga, svga_cirrus,
hdimage, netmod, soundmod, usb_common). The generated DLLs are usable with the
BOCHS.EXE built with the IDE, but the nmake won't work at all yet.
2014-04-21 22:43:22 +04:00
GUI_LINK_OPTS_WX="$GUI_LINK_OPTS_WX"
2002-10-02 04:09:49 +04:00
;;
2012-08-26 11:17:43 +04:00
*)
# This is required for XStringToKeysym
if test "$with_x11" != yes -a "$bx_plugins" != 1; then
GUI_LINK_OPTS="$GUI_LINK_OPTS -lX11"
fi
;;
2002-10-02 04:09:49 +04:00
esac
2014-08-31 21:08:58 +04:00
# The enhanced X debugger depends on GTK2
2012-08-26 11:17:43 +04:00
if test "$gui_debugger" = 1 -a "$DEFAULT_GUI" != win32; then
needs_gtk2=1
fi
2002-10-25 01:07:56 +04:00
fi
if test "$with_nogui" = yes; then
display_libs="$display_libs nogui"
2014-12-28 22:13:02 +03:00
GUI_DLL_TARGETS="$GUI_DLL_TARGETS bx_nogui.dll"
2001-04-10 05:04:59 +04:00
AC_DEFINE(BX_WITH_NOGUI, 1)
2002-10-25 01:07:56 +04:00
SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_NOGUI)"
fi
AC_MSG_CHECKING(for display libraries)
AC_MSG_RESULT($display_libs)
if test "$display_libs" = ""; then
echo "No display libraries were selected. Use --with-* options to enable"
echo "individual display libraries, or --with-all-libs to detect the ones"
echo "that Bochs supports."
exit 1
fi
2009-01-31 13:04:25 +03:00
# some display libraries and the enhanced debugger may depend on the GTK+ software package
2014-11-15 16:32:49 +03:00
bx_have_gtk2=0
2009-01-31 13:04:25 +03:00
if test "$needs_gtk2" = 1; then
2012-08-07 22:28:00 +04:00
# pkg-config is required to set TOOLKIT_CXXFLAGS and LIBS
if test "$PKGCONFIG" != not_found; then
2014-11-15 16:32:49 +03:00
pkg-config --exists gtk+-2.0
if test x$? = x0; then
TOOLKIT_CXXFLAGS="`pkg-config --cflags gtk+-2.0`"
LIBS="$LIBS `pkg-config --libs gtk+-2.0`"
bx_have_gtk2=1
fi
2009-01-31 13:04:25 +03:00
else
echo "ERROR: pkg-config was not found, or unable to access the gtk+-2.0 package."
echo "Install pkg-config and the gtk+ development package,"
echo "or disable the gui debugger, or the wxWidgets display library (whichever is being used)."
exit 1
fi
fi
2005-01-05 22:54:32 +03:00
dnl To use wxWidgets you must select it as both the configuration interface
2002-10-25 01:07:56 +04:00
dnl and the display library. In the simplest case where the user has
2008-02-06 01:57:43 +03:00
dnl only configured with --with-wx, set both defaults to wxWidgets.
2002-10-25 01:07:56 +04:00
dnl Without this setting, the config interface would default to the text
2005-01-05 22:54:32 +03:00
dnl mode config interface, and then the wxWidgets display library would not
2002-10-25 01:07:56 +04:00
dnl be usable.
2005-01-05 22:54:32 +03:00
if test "$display_libs" = " wxWidgets"; then
2002-10-25 01:07:56 +04:00
AC_MSG_CHECKING(for default configuration interface)
2005-01-05 22:54:32 +03:00
AC_MSG_RESULT(wxWidgets)
2002-10-25 01:07:56 +04:00
AC_MSG_CHECKING(for default display library)
2005-01-05 22:54:32 +03:00
AC_MSG_RESULT(wxWidgets)
2002-10-25 01:07:56 +04:00
AC_DEFINE(BX_DEFAULT_CONFIG_INTERFACE, "wx")
AC_DEFINE(BX_DEFAULT_DISPLAY_LIBRARY, "wx")
2004-01-29 22:28:46 +03:00
AC_DEFINE(BX_USE_TEXTCONFIG, 0)
else
AC_DEFINE(BX_USE_TEXTCONFIG, 1)
2002-10-25 01:07:56 +04:00
fi
if test "$bx_plugins" = 1; then
2002-10-28 08:49:42 +03:00
# every item in this list will be compiled as a plugin. Do not include
# support objs; they will be mentioned in plugin-specific makefile rules.
2002-10-25 01:07:56 +04:00
GUI_PLUGIN_OBJS="$GUI_PLUGIN_OBJS $SPECIFIC_GUI_OBJS"
else
2002-10-28 08:49:42 +03:00
# include support objs
GUI_NON_PLUGIN_OBJS="$GUI_NON_PLUGIN_OBJS $SPECIFIC_GUI_OBJS $SPECIFIC_GUI_SUPPORT_OBJS"
2001-04-10 05:04:59 +04:00
fi
2001-05-08 23:07:26 +04:00
- add -lwinmm to the link lines anytime you use --enable-sb16=win. Now
instead of winmm being a part of GUI_LINK_OPTS_WIN32 only, it is
placed in @DEVICE_LINE_OPTS@ so that it will be used for sdl, rfb, wx,
etc.
- solve compile problems when building bximage, niclist, and any other
console based program. The compile flags returned by wx-config and
sdl-config did strange things to these console programs, for example
redefining main to SDL_main. Because I wanted to use the
configure-generated CFLAGS to compile the programs, but I wanted to
avoid including GUI specific compile options, I split up the configure's
@CFLAGS@ variable into @CFLAGS@ and @GUI_CFLAGS@, and split
@CXXFLAGS@ into @CXXFLAGS@ and @GUI_CXXFLAGS@. All programs in the
Bochs binary will use both, but the console programs will just use
@CFLAGS@ or @CXXFLAGS@.
- gui/Makefile.in, I no longer use the gui specific CFLAGS variables,
SDL_CFLAGS and WX_CXXFLAGS. These values are included in CFLAGS and
CXXFLAGS now.
- modified: configure.in, configure, all Makefile.in's
2002-10-02 03:37:50 +04:00
AC_SUBST(GUI_CFLAGS)
AC_SUBST(GUI_CXXFLAGS)
2002-10-03 06:26:32 +04:00
AC_SUBST(WX_CONFIG)
2002-09-05 19:12:13 +04:00
AC_SUBST(WX_CFLAGS)
AC_SUBST(WX_CXXFLAGS)
2009-01-31 13:04:25 +03:00
AC_SUBST(TOOLKIT_CXXFLAGS)
2002-09-05 19:12:13 +04:00
2005-07-30 19:04:26 +04:00
AC_CHECK_PROGS(WGET, wget curl fetch, not_found)
2008-02-06 01:57:43 +03:00
if test "$WGET" = not_found; then
2005-07-30 19:04:26 +04:00
AC_MSG_WARN([cannot find wget (or equivalent) command])
fi
# everybody has to re-invent the wheel. differently.
test "${WGET}" = "curl" && WGET="curl -O"
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
# modify settings based on target platform
case "$target" in
2002-12-12 14:07:13 +03:00
*-macosx*)
AC_DEFINE(BX_HAVE_STRDUP, 0)
;;
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
*-macos*)
AC_DEFINE(BX_HAVE_STRDUP, 0)
2002-12-12 14:07:13 +03:00
AC_DEFINE(BX_PLUGINS, 0)
AC_DEFINE(BX_HAVE_DLFCN_H, 0)
AC_DEFINE(BX_HAVE_SOCKLEN_T, 0)
AC_DEFINE(BX_HAVE_SELECT, 0)
AC_DEFINE(BX_HAVE_GETTIMEOFDAY, 0)
AC_DEFINE(BX_NO_ATTRIBUTES, 1)
2011-02-26 23:33:28 +03:00
AC_DEFINE(BX_NETMOD_TUNTAP, 0)
AC_DEFINE(BX_NETMOD_TAP, 0)
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
;;
*-pc-windows*)
INSTALL_TARGET='install_win32'
CC="cl"
CXX="$CC"
#C_OPT="/Zi" # for debugging
2014-12-12 21:45:32 +03:00
if test "$speedup_fastcall" = 1; then
C_OPT="/O2 /Gr" # optimize for speed, using fastcall everywhere
else
C_OPT="/O2" # optimize for speed, no fastcall
fi
2014-12-23 14:53:35 +03:00
if test "$bx_debugger" = 1; then
C_OPT="$C_OPT /EHsc"
else
C_OPT="$C_OPT /EHs-c-"
fi
2011-06-23 01:52:35 +04:00
if test "$bx_plugins" = 1; then
2014-12-23 14:53:35 +03:00
CFLAGS="/nologo /MD /W3 /DNDEBUG /DWIN32 /D_WINDOWS /D_CRT_SECURE_NO_WARNINGS $C_OPT"
2011-06-23 01:52:35 +04:00
else
2014-12-23 14:53:35 +03:00
CFLAGS="/nologo /MT /W3 /DNDEBUG /DWIN32 /D_WINDOWS /D_CRT_SECURE_NO_WARNINGS $C_OPT"
2011-06-23 01:52:35 +04:00
fi
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
CXXFLAGS="$CFLAGS"
DASH="/"
SLASH="\\"
CXXFP="/Tp"
CFP="/Tc"
OFP="/Fo"
2002-11-20 15:42:53 +03:00
MAKE=nmake
2015-02-21 12:52:39 +03:00
MAKELIB="lib /nologo /subsystem:console,\"5.01\" /verbose /out:\$@"
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
RMCOMMAND="-del"
#L_OPT="/debug" # for debugging
L_OPT="" # no debug info
2015-02-21 12:52:39 +03:00
LINK="link $L_OPT /nologo /subsystem:console,\"5.01\" /incremental:no /out:\$@ "
- add -lwinmm to the link lines anytime you use --enable-sb16=win. Now
instead of winmm being a part of GUI_LINK_OPTS_WIN32 only, it is
placed in @DEVICE_LINE_OPTS@ so that it will be used for sdl, rfb, wx,
etc.
- solve compile problems when building bximage, niclist, and any other
console based program. The compile flags returned by wx-config and
sdl-config did strange things to these console programs, for example
redefining main to SDL_main. Because I wanted to use the
configure-generated CFLAGS to compile the programs, but I wanted to
avoid including GUI specific compile options, I split up the configure's
@CFLAGS@ variable into @CFLAGS@ and @GUI_CFLAGS@, and split
@CXXFLAGS@ into @CXXFLAGS@ and @GUI_CXXFLAGS@. All programs in the
Bochs binary will use both, but the console programs will just use
@CFLAGS@ or @CXXFLAGS@.
- gui/Makefile.in, I no longer use the gui specific CFLAGS variables,
SDL_CFLAGS and WX_CXXFLAGS. These values are included in CFLAGS and
CXXFLAGS now.
- modified: configure.in, configure, all Makefile.in's
2002-10-02 03:37:50 +04:00
LINK_CONSOLE=$LINK
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
EXE=".exe"
2005-05-14 18:41:27 +04:00
PRIMARY_TARGET="bochs.exe"
BXIMAGE_LINK_OPTS="user32.lib"
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
# also compile niclist if networking is on
if test "$networking" = yes; then
2013-11-18 20:49:56 +04:00
OPTIONAL_TARGET="$OPTIONAL_TARGET niclist.exe"
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
fi
COMMAND_SEPARATOR=""
CD_UP_ONE="cd .."
CD_UP_TWO="cd ..\.."
2004-01-15 05:08:37 +03:00
CD_UP_THREE="cd ..\..\.."
2002-09-22 05:56:18 +04:00
have_gettimeofday=0 # even though it may exist in build environment
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
AC_DEFINE(BX_64BIT_CONSTANTS_USE_LL, 0)
2009-04-07 20:12:19 +04:00
AC_DEFINE(inline, __forceinline)
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
AC_DEFINE(BX_NO_ATTRIBUTES, 1)
AC_DEFINE(HAVE_LIBREADLINE, 0)
2011-03-03 19:03:59 +03:00
AC_DEFINE(HAVE_READLINE_HISTORY_H, 0)
READLINE_LIB="";
2002-10-25 01:07:56 +04:00
AC_DEFINE(BX_HAVE_DLFCN_H, 0)
2011-02-26 23:33:28 +03:00
AC_DEFINE(BX_NETMOD_TAP, 0)
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
;;
2013-10-20 18:48:38 +04:00
*-cygwin*)
2004-09-12 15:25:01 +04:00
EXE=".exe"
PRIMARY_TARGET="bochs.exe"
2005-05-14 18:41:27 +04:00
BXIMAGE_LINK_OPTS="-luser32"
2004-09-12 15:25:01 +04:00
if test "$networking" = yes; then
2013-11-18 20:49:56 +04:00
OPTIONAL_TARGET="$OPTIONAL_TARGET niclist.exe"
2004-09-12 15:25:01 +04:00
fi
2005-07-03 11:38:13 +04:00
AC_DEFINE(BX_HAVE_SELECT, 1)
2004-09-12 15:25:01 +04:00
;;
2005-05-14 18:41:27 +04:00
*-pc-mingw*)
BXIMAGE_LINK_OPTS="-luser32"
if test "$networking" = yes; then
2013-11-18 20:49:56 +04:00
OPTIONAL_TARGET="$OPTIONAL_TARGET niclist"
2005-05-14 18:41:27 +04:00
fi
2005-07-03 11:38:13 +04:00
AC_DEFINE(BX_HAVE_SELECT, 1)
2005-05-14 18:41:27 +04:00
;;
- commit patch.check-platform. For full details, pull up the patch itself
and look at the description at the top. Here's an intro.
This patch makes significant changes to the configure script. It adds the
lines AC_CANONICAL_HOST and AC_CANONICAL_TARGET which detect the OS and
processor type. The configure script, knowing the OS and processor type, can
then make intelligent decisions about which CFLAGS are needed and what is the
default GUI for that platform. One of the goals of this patch is to make it
so that on all supported platforms, "configure;make" will compile cleanly.
Configure detects the target platform, but it can be overridden by using
--target=___. This is important when using one platform to generate
Makefiles and header files for another platform. See config.guess script for
the exact details of platform naming.
The defaults that are currently implemented in the modified configure script
include:
If platform is windows* or winnt*, use win32 gui.
If platform is cygwin*, use win32 gui and compile with
"-mno-cygwin -DWIN32".
If platform is macosx* or darwin*, use carbon gui and compile
with "-fpascal-strings -fno-common -arch ppc -Wno-four-char-constants
-Wno-unknown-pragmas -Dmacintosh"
If platform is macos, use macos gui.
If platform is beos, use beos gui.
If platform is amigaos, use amigaos gui.
Otherwise, use X windows gui.
2002-03-07 19:00:39 +03:00
esac
2013-10-29 00:31:34 +04:00
# bximage specific settings
case "$target" in
*-pc-windows*)
BXIMAGE_FLAG="/DBXIMAGE"
CXXFLAGS_CONSOLE="/nologo /MT /W3 /EHs-c- /DNDEBUG /DWIN32 /D_WINDOWS /D_CRT_SECURE_NO_WARNINGS $C_OPT"
;;
*)
BXIMAGE_FLAG="-DBXIMAGE"
CXXFLAGS_CONSOLE="$CXXFLAGS"
;;
esac
AC_SUBST(BXIMAGE_FLAG)
AC_SUBST(BXIMAGE_LINK_OPTS)
AC_SUBST(CXXFLAGS_CONSOLE)
2009-01-31 13:04:25 +03:00
ENH_DBG_OBJS=""
if test "$gui_debugger" = 1; then
2014-11-15 16:32:49 +03:00
if test "$bx_have_gtk2" = 1; then
2014-11-01 13:13:40 +03:00
ENH_DBG_OBJS="enh_dbg.o gtk_enh_dbg_osdep.o"
AC_DEFINE(BX_DEBUGGER_GUI, 1)
2012-11-06 23:59:18 +04:00
elif test "$DEFAULT_GUI" = win32 -o "$with_win32" = yes; then
2014-11-01 13:13:40 +03:00
ENH_DBG_OBJS="enh_dbg.o win32_enh_dbg_osdep.o"
AC_DEFINE(BX_DEBUGGER_GUI, 1)
else
AC_MSG_WARN([The Bochs debugger gui cannot be compiled here, disabling it])
2009-01-31 13:04:25 +03:00
fi
fi
AC_SUBST(ENH_DBG_OBJS)
2003-05-22 00:33:24 +04:00
DIALOG_OBJS=""
2005-06-14 00:28:38 +04:00
EXPORT_DYNAMIC="-export-dynamic"
2008-02-06 01:57:43 +03:00
case $target in
2011-06-15 21:24:32 +04:00
*-pc-windows* | *-pc-winnt*)
if test "$bx_plugins" = 1; then
# set variables for building DLL plugins
PLUGIN_VAR=""
PLUGIN_LIBNAME_TRANSFORMATION='%.o=bx_%.dll'
INSTALL_PLUGINS_VAR=install_dll_plugins
2014-05-02 21:14:16 +04:00
WIN32_DLL_IMPORT_LIB="bochs.lib"
2015-02-21 12:52:39 +03:00
LINK_DLL="link /dll /nologo /subsystem:console,\"5.01\" /incremental:no /out:\$@"
2011-06-15 21:24:32 +04:00
LIBS="$LIBS advapi32.lib comctl32.lib comdlg32.lib gdi32.lib shell32.lib user32.lib"
2014-04-06 11:22:16 +04:00
PLUGIN_TARGET_2=plugins_msvc
2014-05-02 21:14:16 +04:00
LINK_VAR="_VCPP"
2014-12-28 22:13:02 +03:00
EXT_MSVC_DLL_RULES="!INCLUDE makeincl.vc"
2014-05-02 21:14:16 +04:00
echo -e "# DLL PLUGIN TEST\n" > iodev/makeincl.vc
IODEV_DLL_TARGETS=""
2014-12-28 22:13:02 +03:00
IODEV_DLL_LIST="biosdev cmos dma extfpuirq harddrv ioapic parallel pic speaker unmapped"
2014-05-03 14:58:10 +04:00
if test "$pci" = "1"; then
2014-12-28 22:13:02 +03:00
IODEV_DLL_LIST="$IODEV_DLL_LIST acpi pci pci2isa pci_ide"
2014-05-03 14:58:10 +04:00
fi
if test "$bx_debugger" = 1; then
2014-12-28 22:13:02 +03:00
IODEV_DLL_LIST="$IODEV_DLL_LIST iodebug"
fi
if test "$bx_busmouse" = 1; then
IODEV_DLL_LIST="$IODEV_DLL_LIST busmouse"
2014-05-03 14:58:10 +04:00
fi
2014-12-28 22:13:02 +03:00
for i in $IODEV_DLL_LIST
2014-05-02 21:14:16 +04:00
do
echo -e "bx_$i.dll: $i.o" >> iodev/makeincl.vc
2015-02-21 12:52:39 +03:00
echo -e "\tlink /dll /nologo /subsystem:console,\"5.01\" /incremental:no /out:\$@ $i.o \$(WIN32_DLL_IMPORT_LIBRARY)\n" >> iodev/makeincl.vc
2014-05-02 21:14:16 +04:00
IODEV_DLL_TARGETS="$IODEV_DLL_TARGETS bx_$i.dll"
done
2011-06-15 21:24:32 +04:00
else
if test "$with_win32" != yes; then
2011-06-23 01:52:35 +04:00
LIBS="$LIBS comctl32.lib"
2011-06-15 21:24:32 +04:00
fi
fi
2013-03-18 23:08:26 +04:00
DIALOG_OBJS="win32dialog.o win32paramdlg.o scrollwin.o"
2011-06-15 21:24:32 +04:00
EXPORT_DYNAMIC=""
;;
*-cygwin* | *-mingw*)
2008-02-06 01:57:43 +03:00
if test "$bx_plugins" = 1; then
2005-06-14 00:28:38 +04:00
# set variables for building DLL plugins
PRIMARY_TARGET=".win32_dll_plugin_target"
PLUGIN_LIBNAME_TRANSFORMATION='%.o=bx_%.dll'
2002-10-25 01:07:56 +04:00
INSTALL_PLUGINS_VAR=install_dll_plugins
2014-05-02 21:14:16 +04:00
WIN32_DLL_IMPORT_LIB="dllexports.a"
LINK_DLL="\$(CXX) \$(CXXFLAGS) -shared -o \$@"
2005-10-09 14:34:43 +04:00
else
2005-10-20 21:25:38 +04:00
if test "$with_win32" != yes; then
LIBS="$LIBS -lcomctl32"
fi
2005-06-14 00:28:38 +04:00
fi
2013-03-19 00:47:08 +04:00
DIALOG_OBJS="win32dialog.o win32paramdlg.o scrollwin.o"
2005-06-14 00:28:38 +04:00
EXPORT_DYNAMIC=""
2002-10-25 01:07:56 +04:00
;;
2008-02-06 01:57:43 +03:00
esac
2003-05-22 00:33:24 +04:00
AC_SUBST(DIALOG_OBJS)
2005-06-14 00:28:38 +04:00
AC_SUBST(EXPORT_DYNAMIC)
2002-10-25 01:07:56 +04:00
2002-09-26 22:23:34 +04:00
if test "$use_curses" = yes -a "$cross_configure" = 0; then
2001-05-08 23:07:26 +04:00
AC_CHECK_LIB(curses, mvaddch, GUI_LINK_OPTS_TERM='-lcurses')
AC_CHECK_LIB(ncurses, mvaddch, GUI_LINK_OPTS_TERM='-lncurses')
AC_CHECK_LIB(termlib, mvaddch, GUI_LINK_OPTS_TERM='-ltermlib')
2002-11-20 15:23:42 +03:00
AC_CHECK_LIB(pdcurses, mvaddch, GUI_LINK_OPTS_TERM='-lpdcurses')
2001-05-08 23:07:26 +04:00
if test "$GUI_LINK_OPTS_TERM" = ""; then
2002-11-20 15:23:42 +03:00
echo Curses library not found: tried curses, ncurses, termlib and pdcurses.
2001-05-08 23:07:26 +04:00
exit 1
fi
fi
2002-09-26 06:36:04 +04:00
if test "$with_term" = yes; then
old_LIBS="$LIBS"
LIBS="$LIBS $GUI_LINK_OPTS_TERM"
AC_CHECK_FUNCS(color_set, AC_DEFINE(BX_HAVE_COLOR_SET, 1))
2003-08-18 03:40:39 +04:00
AC_CHECK_FUNCS(mvhline, AC_DEFINE(BX_HAVE_MVHLINE, 1))
AC_CHECK_FUNCS(mvvline, AC_DEFINE(BX_HAVE_MVVLINE, 1))
2002-09-26 06:36:04 +04:00
LIBS="$old_LIBS"
fi
2003-07-06 13:00:36 +04:00
if test "$with_rfb" = yes; then
# we need the socket function
case $target in
2013-12-22 16:17:28 +04:00
*-pc-windows* | *-pc-winnt*)
2014-02-15 16:18:15 +04:00
RFB_LIBS="$RFB_LIBS ws2_32.lib"
2004-08-18 15:52:25 +04:00
have_socket=yes
;;
2013-12-22 16:17:28 +04:00
*-mingw32*)
2014-02-15 16:18:15 +04:00
RFB_LIBS="$RFB_LIBS -lws2_32"
2003-07-06 15:46:31 +04:00
have_socket=yes
2003-07-06 13:00:36 +04:00
;;
2013-12-22 16:17:28 +04:00
*-cygwin*)
# is this okay without a check ?
have_socket=yes
;;
2003-07-06 13:00:36 +04:00
*)
AC_CHECK_FUNCS(socket, have_socket=yes)
if test "$have_socket" != yes; then
AC_CHECK_LIB(socket, socket,
[
RFB_LIBS="$RFB_LIBS -lsocket"
have_socket=yes
])
fi
;;
esac
2002-09-26 05:45:10 +04:00
if test "$have_socket" != yes; then
2003-07-06 13:00:36 +04:00
echo 'ERROR: socket function required for RFB compile'
exit 1
2002-09-26 05:45:10 +04:00
fi
fi
2002-04-18 04:22:20 +04:00
2008-02-06 01:57:43 +03:00
# The ACX_PTHREAD function was written by
# Steven G. Johnson <stevenj@alum.mit.edu> and
# Alejandro Forero Cuervo <bachue@bachue.com>
2002-04-18 04:22:20 +04:00
# I found it in the ac-archive project on Source Forge.
AC_DEFUN([ACX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
acx_pthread_ok=no
# First, check if the POSIX threads header, pthread.h, is available.
# If it isn't, don't bother looking for the threads libraries.
AC_CHECK_HEADER(pthread.h, , acx_pthread_ok=noheader)
# We must check for the threads library under a number of different
# names; the ordering is very important because some systems
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).
# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
2002-09-16 04:06:16 +04:00
CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
2002-04-18 04:22:20 +04:00
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
AC_MSG_RESULT($acx_pthread_ok)
if test x"$acx_pthread_ok" = xno; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
fi
# Create a list of thread flags to try. Items starting with a "-" are
# C compiler flags, and other items are library names, except for "none"
# which indicates that we try without any flags at all.
acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
# pthreads: AIX (must check this before -lpthread)
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
# -pthreads: Solaris/gcc
# -mthreads: Mingw32/gcc, Lynx/gcc
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads too;
# also defines -D_REENTRANT)
# pthread: Linux, etcetera
# --thread-safe: KAI C++
case "${host_cpu}-${host_os}" in
*solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (We need to link with -pthread or
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
# a function called by this macro, so we could check for that, but
# who knows whether they'll stub that too in a future libc.) So,
# we'll just look for -pthreads and -lpthread first:
acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
;;
esac
if test x"$acx_pthread_ok" = xno; then
for flag in $acx_pthread_flags; do
case $flag in
none)
AC_MSG_CHECKING([whether pthreads work without any flags])
;;
-*)
AC_MSG_CHECKING([whether pthreads work with $flag])
PTHREAD_CFLAGS="$flag"
;;
*)
AC_MSG_CHECKING([for the pthreads library -l$flag])
PTHREAD_LIBS="-l$flag"
;;
esac
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we
# need a special flag -Kthread to make this header compile.)
# We check for pthread_join because it is in -lpthread on IRIX
# while pthread_create is in libc. We check for pthread_attr_init
# due to DEC craziness with -lpthreads. We check for
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
AC_TRY_LINK([#include <pthread.h>],
[pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[acx_pthread_ok=yes])
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT($acx_pthread_ok)
if test "x$acx_pthread_ok" = xyes; then
break;
fi
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
# Various other checks:
if test "x$acx_pthread_ok" = xyes; then
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: threads are created detached by default
# and the JOINABLE attribute has a nonstandard name (UNDETACHED).
AC_MSG_CHECKING([for joinable pthread attribute])
AC_TRY_LINK([#include <pthread.h>],
[int attr=PTHREAD_CREATE_JOINABLE;],
ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
if test x"$ok" = xunknown; then
AC_TRY_LINK([#include <pthread.h>],
[int attr=PTHREAD_CREATE_UNDETACHED;],
ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
fi
if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
[Define to the necessary symbol if this constant
uses a non-standard name on your system.])
fi
AC_MSG_RESULT(${ok})
if test x"$ok" = xunknown; then
AC_MSG_WARN([we do not know how to create joinable pthreads])
fi
AC_MSG_CHECKING([if more special flags are required for pthreads])
flag=no
case "${host_cpu}-${host_os}" in
*-aix* | *-freebsd*) flag="-D_THREAD_SAFE";;
*solaris* | alpha*-osf*) flag="-D_REENTRANT";;
esac
AC_MSG_RESULT(${flag})
if test "x$flag" != xno; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# More AIX lossage: must compile with cc_r
AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
else
PTHREAD_CC="$CC"
fi
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_CC)
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$acx_pthread_ok" = xyes; then
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
:
else
acx_pthread_ok=no
$2
fi
])dnl ACX_PTHREAD
pthread_ok=no
2008-02-06 01:57:43 +03:00
ACX_PTHREAD([
2002-04-18 04:22:20 +04:00
pthread_ok=yes
#echo Using PTHREAD_LIBS=$PTHREAD_LIBS
#echo Using PTHREAD_CFLAGS=$PTHREAD_CFLAGS
#echo Using PTHREAD_CC=$PTHREAD_CC
])
2012-05-20 21:22:50 +04:00
# since some features need the pthread library, check that it was found.
2002-09-26 22:23:34 +04:00
# But on win32 platforms, the pthread library is not needed.
2012-05-20 21:22:50 +04:00
if test "$cross_configure" = 0; then
2014-12-20 10:51:11 +03:00
# assuming that the GUI debuggers require pthreads or are for Win32
2015-05-03 20:03:26 +03:00
if test "$pthread_ok" = yes; then
if test "$with_rfb" = yes; then
RFB_LIBS="$RFB_LIBS $PTHREAD_LIBS"
fi
if test "$with_vncsrv" = yes; then
GUI_LINK_OPTS_VNCSRV="$GUI_LINK_OPTS_VNCSRV $PTHREAD_LIBS"
fi
if test "$soundcard_present" = 1; then
if test "$bx_plugins" = 1; then
SOUND_LINK_OPTS="$SOUND_LINK_OPTS $PTHREAD_LIBS"
else
DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS $PTHREAD_LIBS"
2012-05-20 21:22:50 +04:00
fi
fi
2015-05-03 20:03:26 +03:00
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC"
else
case "$target" in
*-pc-windows* | *-pc-winnt* | *-cygwin* | *-mingw32*)
# pthread not needed for win32 platform
;;
*)
echo ERROR: the pthread library is required, but could not be found.; exit 1
esac
2002-04-18 04:22:20 +04:00
fi
fi
2005-10-03 14:28:56 +04:00
dnl // DEPRECATED configure options - force users to remove them
2011-11-18 17:15:17 +04:00
AC_MSG_CHECKING(for instruction trace cache support (deprecated))
2011-06-02 00:34:04 +04:00
AC_ARG_ENABLE(trace-cache,
2012-10-25 20:02:03 +04:00
AS_HELP_STRING([--enable-trace-cache], [support instruction trace cache (deprecated)]),
2011-06-02 00:34:04 +04:00
[AC_MSG_RESULT($enableval)
AC_MSG_ERROR([DEPRECATED - this feature will be enabled in all configurations])
],
[
AC_MSG_RESULT(no)
])
2009-04-23 22:28:17 +04:00
2012-12-20 23:43:11 +04:00
AC_MSG_CHECKING(for misaligned SSE support (deprecated))
AC_ARG_ENABLE(misaligned-sse,
AS_HELP_STRING([--enable-misaligned-sse], [misaligned SSE support (deprecated)]),
[AC_MSG_RESULT($enableval)
AC_MSG_ERROR([DEPRECATED - moved to runtime .bochsrc option])
],
[
AC_MSG_RESULT(no)
])
2008-02-06 01:57:43 +03:00
# Create some subdirectories for when you run configure from some other
2001-12-05 19:46:00 +03:00
# directory.
if test ! -d instrument; then mkdir instrument; fi
if test ! -d build; then mkdir build; fi
if test ! -d build/linux; then mkdir build/linux; fi
2002-11-21 06:43:04 +03:00
if test ! -d build/win32; then mkdir build/win32; fi
if test ! -d build/win32/nsis; then mkdir build/win32/nsis; fi
2001-12-05 19:46:00 +03:00
2001-10-05 10:06:21 +04:00
AC_SUBST(INSTALL_TARGET)
AC_SUBST(INSTALL_LIST_FOR_PLATFORM)
2001-06-02 07:07:28 +04:00
AC_SUBST(RFB_LIBS)
2013-05-31 20:46:15 +04:00
AC_SUBST(GUI_LINK_OPTS_VNCSRV)
2014-06-21 12:22:22 +04:00
AC_SUBST(GUI_LINK_OPTS_SDL)
2014-06-28 00:53:20 +04:00
AC_SUBST(GUI_LINK_OPTS_SDL2)
2001-04-10 05:04:59 +04:00
AC_SUBST(GUI_OBJS)
- add -lwinmm to the link lines anytime you use --enable-sb16=win. Now
instead of winmm being a part of GUI_LINK_OPTS_WIN32 only, it is
placed in @DEVICE_LINE_OPTS@ so that it will be used for sdl, rfb, wx,
etc.
- solve compile problems when building bximage, niclist, and any other
console based program. The compile flags returned by wx-config and
sdl-config did strange things to these console programs, for example
redefining main to SDL_main. Because I wanted to use the
configure-generated CFLAGS to compile the programs, but I wanted to
avoid including GUI specific compile options, I split up the configure's
@CFLAGS@ variable into @CFLAGS@ and @GUI_CFLAGS@, and split
@CXXFLAGS@ into @CXXFLAGS@ and @GUI_CXXFLAGS@. All programs in the
Bochs binary will use both, but the console programs will just use
@CFLAGS@ or @CXXFLAGS@.
- gui/Makefile.in, I no longer use the gui specific CFLAGS variables,
SDL_CFLAGS and WX_CXXFLAGS. These values are included in CFLAGS and
CXXFLAGS now.
- modified: configure.in, configure, all Makefile.in's
2002-10-02 03:37:50 +04:00
AC_SUBST(DEVICE_LINK_OPTS)
2001-04-10 05:04:59 +04:00
AC_SUBST(GUI_LINK_OPTS)
2001-05-08 23:07:26 +04:00
AC_SUBST(GUI_LINK_OPTS_TERM)
2002-09-05 19:12:13 +04:00
AC_SUBST(GUI_LINK_OPTS_WX)
2001-04-10 05:04:59 +04:00
AC_SUBST(DASH)
AC_SUBST(SLASH)
AC_SUBST(CXXFP)
AC_SUBST(CFP)
AC_SUBST(OFP)
AC_SUBST(MAKELIB)
AC_SUBST(RMCOMMAND)
AC_SUBST(LINK)
- add -lwinmm to the link lines anytime you use --enable-sb16=win. Now
instead of winmm being a part of GUI_LINK_OPTS_WIN32 only, it is
placed in @DEVICE_LINE_OPTS@ so that it will be used for sdl, rfb, wx,
etc.
- solve compile problems when building bximage, niclist, and any other
console based program. The compile flags returned by wx-config and
sdl-config did strange things to these console programs, for example
redefining main to SDL_main. Because I wanted to use the
configure-generated CFLAGS to compile the programs, but I wanted to
avoid including GUI specific compile options, I split up the configure's
@CFLAGS@ variable into @CFLAGS@ and @GUI_CFLAGS@, and split
@CXXFLAGS@ into @CXXFLAGS@ and @GUI_CXXFLAGS@. All programs in the
Bochs binary will use both, but the console programs will just use
@CFLAGS@ or @CXXFLAGS@.
- gui/Makefile.in, I no longer use the gui specific CFLAGS variables,
SDL_CFLAGS and WX_CXXFLAGS. These values are included in CFLAGS and
CXXFLAGS now.
- modified: configure.in, configure, all Makefile.in's
2002-10-02 03:37:50 +04:00
AC_SUBST(LINK_CONSOLE)
2014-04-21 10:58:15 +04:00
AC_SUBST(LINK_DLL)
Next step for plugin support with MSVC nmake: device plugins that need special
rules can be built now (keyboard, pit, gameport, serial, vga, svga_cirrus,
hdimage, netmod, soundmod, usb_common). The generated DLLs are usable with the
BOCHS.EXE built with the IDE, but the nmake won't work at all yet.
2014-04-21 22:43:22 +04:00
AC_SUBST(LINK_VAR)
2001-04-10 05:04:59 +04:00
AC_SUBST(EXE)
AC_SUBST(PRIMARY_TARGET)
2013-11-18 20:49:56 +04:00
AC_SUBST(OPTIONAL_TARGET)
2002-10-25 01:07:56 +04:00
AC_SUBST(PLUGIN_LIBNAME_TRANSFORMATION)
2001-04-10 05:04:59 +04:00
AC_SUBST(COMMAND_SEPARATOR)
AC_SUBST(CD_UP_ONE)
AC_SUBST(CD_UP_TWO)
2004-01-15 05:08:37 +03:00
AC_SUBST(CD_UP_THREE)
2001-11-10 06:48:22 +03:00
AC_SUBST(VERSION)
AC_SUBST(VER_STRING)
2008-02-09 10:51:15 +03:00
AC_SUBST(WIN_VER_STRING)
2001-11-10 06:48:22 +03:00
AC_SUBST(REL_STRING)
2001-12-08 00:56:15 +03:00
AC_SUBST(EXTRA_LINK_OPTS)
2002-10-25 01:07:56 +04:00
AC_SUBST(GUI_NON_PLUGIN_OBJS)
AC_SUBST(GUI_PLUGIN_OBJS)
AC_SUBST(IODEV_NON_PLUGIN_OBJS)
AC_SUBST(IODEV_PLUGIN_OBJS)
2012-01-14 21:03:00 +04:00
AC_SUBST(IODEV_EXT_NON_PLUGIN_OBJS)
AC_SUBST(IODEV_EXT_PLUGIN_OBJS)
2002-10-25 01:07:56 +04:00
AC_SUBST(PLUGIN_VAR)
2013-11-10 21:00:21 +04:00
AC_SUBST(PLUGIN_LIB)
2002-10-25 01:07:56 +04:00
AC_SUBST(PLUGIN_TARGET)
2014-04-06 11:22:16 +04:00
AC_SUBST(PLUGIN_TARGET_2)
2014-12-28 22:13:02 +03:00
AC_SUBST(EXT_MSVC_DLL_RULES)
AC_SUBST(GUI_DLL_TARGETS)
2014-05-02 21:14:16 +04:00
AC_SUBST(IODEV_DLL_TARGETS)
2014-04-21 10:58:15 +04:00
AC_SUBST(WIN32_DLL_IMPORT_LIB)
2002-10-25 01:07:56 +04:00
AC_SUBST(INSTALL_PLUGINS_VAR)
2001-04-10 05:04:59 +04:00
2001-05-23 12:16:07 +04:00
AC_PATH_PROG(GZIP, gzip)
AC_PATH_PROG(TAR, tar)
2001-04-10 05:04:59 +04:00
2012-09-11 00:49:29 +04:00
AC_OUTPUT(Makefile iodev/Makefile iodev/display/Makefile iodev/hdimage/Makefile \
iodev/usb/Makefile iodev/network/Makefile iodev/sound/Makefile \
2014-07-25 12:35:06 +04:00
bx_debug/Makefile bios/Makefile cpu/Makefile cpu/avx/Makefile \
cpu/cpudb/Makefile cpu/fpu/Makefile memory/Makefile gui/Makefile \
disasm/Makefile ${INSTRUMENT_DIR}/Makefile misc/Makefile \
doc/docbook/Makefile build/linux/bochs-dlx bxversion.h bxversion.rc \
build/macosx/Info.plist build/win32/nsis/Makefile \
build/win32/nsis/bochs.nsi host/linux/pcidev/Makefile)