1 dnl // Process this file with autoconf to produce a configure script.
5 AC_REVISION([[$Id: configure.in,v 1.375 2008/10/21 13:45:03 sshwarts Exp $]])
6 AC_CONFIG_HEADER(config.h)
7 AC_CONFIG_HEADER(ltdlconf.h)
9 dnl // Put Bochs version information right here so that it gets substituted
10 dnl // into all the right places.
12 VER_STRING="2.3.7.cvs"
13 dnl // WIN_VER_STRING format is "a, b, c, d"
14 dnl // d should be 0 for release and 1 for cvs version
15 WIN_VER_STRING="2, 3, 7, 1"
16 REL_STRING="Build from CVS snapshot, after release 2.3.7"
21 dnl Detect host and target
25 AC_MSG_CHECKING(if you are configuring for another platform)
26 if test "$cross_compiling" = yes -o "$target_os" = "windows"; then
34 # this case statement defines the compile flags which are needed to
35 # compile bochs on a platform. Don't put things like optimization settings
36 # into the configure.in file, since people will want to be able to change
37 # those settings by defining CFLAGS and CXXFLAGS before running configure.
39 need_dlcompat_for_plugins=0
41 *-pc-windows* | *-pc-winnt*)
42 DEFAULT_GUI=win32 # default to win32 gui
44 *-pc-cygwin* | *-pc-mingw32*)
45 NO_LT=1 # do not use libtool at all on cygwin
46 if test "$with_term" = yes; then
47 # ncurses won't compile with -mno-cygwin or -DWIN32
48 # also, I can't get it to link without this -DBROKEN_LINKER=1 hack.
49 # see /usr/include/curses.h for details.
50 ADD_FLAGS="-DBROKEN_LINKER=1"
53 ADD_FLAGS="-mno-cygwin -DWIN32" # required for cygwin compile+win32 gui
54 DEFAULT_GUI=win32 # default to win32 gui
57 *-macosx* | *-darwin*)
58 ADD_FLAGS="-fpascal-strings -fno-common -Wno-four-char-constants -Wno-unknown-pragmas -Dmacintosh" # required for macosx compile
59 DEFAULT_GUI=carbon # default to carbon
60 need_dlcompat_for_plugins=1
63 DEFAULT_GUI=macos # macos defaults to macos
66 ADD_FLAGS="-Wno-multichar"
67 DEFAULT_GUI=beos # beos defaults to beos
69 *-amigaos* | *-morphos*)
70 DEFAULT_GUI=amigaos # amigaos or morphos defaults to amigaos gui
73 ADD_FLAGS="-D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__" # required for correct function prototypes
74 LIBS="$LIBS -lsocket -lnsl"
81 if test "${ADD_FLAGS:+set}" = set; then
82 CFLAGS="$CFLAGS $ADD_FLAGS"
83 CXXFLAGS="$CXXFLAGS $ADD_FLAGS"
84 CPPFLAGS="$CPPFLAGS $ADD_FLAGS"
87 AC_MSG_CHECKING(for standard CFLAGS on this platform)
88 AC_MSG_RESULT($ADD_FLAGS)
90 dnl // make sure X Windows is default if no other chosen
91 if (test "$with_sdl" != yes) && \
92 (test "$with_svga" != yes) && \
93 (test "$with_x11" != yes) && \
94 (test "$with_beos" != yes) && \
95 (test "$with_win32" != yes) && \
96 (test "$with_nogui" != yes) && \
97 (test "$with_term" != yes) && \
98 (test "$with_rfb" != yes) && \
99 (test "$with_amigaos" != yes) && \
100 (test "$with_carbon" != yes) && \
101 (test "$with_wx" != yes) && \
102 (test "$with_macos" != yes); then
103 # use DEFAULT_GUI. Set the appropriate variable.
104 # DEFAULT_GUI must be set to one of the names above. Otherwise, no
105 # valid $with_* variable will be set and who knows what will happen?
106 eval "with_${DEFAULT_GUI}=yes"
113 dnl------------ libtool configuration
114 dnl Configure libtool, and default to shared libraries. Libtool will only be
115 dnl used for compiling and linking plugins.
117 dnl Check for dlopen support
119 dnl Configure libtool
121 dnl Configure the ltdl library. This must go after AC_PROG_LIBTOOL or
122 dnl else it disables shared libraries somehow. The values from this macro
123 dnl are written to ltdlconf.h.
130 AC_CHECK_SIZEOF(unsigned char)
131 AC_CHECK_SIZEOF(unsigned short)
132 AC_CHECK_SIZEOF(unsigned int)
133 AC_CHECK_SIZEOF(unsigned long)
134 AC_CHECK_SIZEOF(unsigned long long)
135 AC_CHECK_SIZEOF(int *)
136 AC_CHECK_FUNCS(getenv, AC_DEFINE(BX_HAVE_GETENV))
137 AC_CHECK_FUNCS(setenv, AC_DEFINE(BX_HAVE_SETENV))
138 AC_CHECK_FUNCS(select, AC_DEFINE(BX_HAVE_SELECT))
139 AC_CHECK_FUNCS(snprintf, AC_DEFINE(BX_HAVE_SNPRINTF))
140 AC_CHECK_FUNCS(vsnprintf, AC_DEFINE(BX_HAVE_VSNPRINTF))
141 AC_CHECK_FUNCS(strtoull, AC_DEFINE(BX_HAVE_STRTOULL))
142 AC_CHECK_FUNCS(strtouq, AC_DEFINE(BX_HAVE_STRTOUQ))
143 AC_CHECK_FUNCS(strdup, AC_DEFINE(BX_HAVE_STRDUP))
144 AC_CHECK_FUNCS(strrev, AC_DEFINE(BX_HAVE_STRREV))
145 AC_CHECK_FUNCS(sleep, AC_DEFINE(BX_HAVE_SLEEP))
146 AC_CHECK_FUNCS(usleep, AC_DEFINE(BX_HAVE_USLEEP))
147 AC_CHECK_FUNCS(nanosleep, AC_DEFINE(BX_HAVE_NANOSLEEP))
148 AC_CHECK_FUNCS(abort, AC_DEFINE(BX_HAVE_ABORT))
149 AC_CHECK_FUNCS(gettimeofday, AC_DEFINE(BX_HAVE_GETTIMEOFDAY))
150 AC_CHECK_TYPE(socklen_t, AC_DEFINE(BX_HAVE_SOCKLEN_T), , [#include <sys/types.h>
151 #include <sys/socket.h>])
152 AC_CHECK_MEMBER(struct sockaddr_in.sin_len, AC_DEFINE(BX_HAVE_SOCKADDR_IN_SIN_LEN), , [#include <sys/socket.h>
153 #include <netinet/in.h> ])
154 AC_CHECK_FUNCS(mkstemp, AC_DEFINE(BX_HAVE_MKSTEMP))
155 AC_CHECK_HEADER(sys/mman.h, AC_DEFINE(BX_HAVE_SYS_MMAN_H))
156 AC_CHECK_FUNCS(timelocal, AC_DEFINE(BX_HAVE_TIMELOCAL))
157 AC_CHECK_FUNCS(gmtime, AC_DEFINE(BX_HAVE_GMTIME))
158 AC_CHECK_FUNCS(mktime, AC_DEFINE(BX_HAVE_MKTIME))
160 dnl As of autoconf 2.53, the standard largefile test fails for Linux/gcc.
161 dnl It does not put the largefiles arguments into CFLAGS, even though Linux/gcc
162 dnl does need them. Since wxWidgets had already solved this exact problem,
163 dnl Bryce asked Vadim Zeitlin of the wxWidgets project if Bochs could grab
164 dnl their largefile test, and he said it was fine. The re-implemented
165 dnl AC_SYS_LARGEFILE test can be found in aclocal.m4.
168 dnl This logic came from wxWidgets as well. Bryce added the CFLAGS and
169 dnl CXXFLAGS lines, since Bochs makefiles don't use CPPFLAGS at all.
171 dnl we need to define _FILE_OFFSET_BITS or _LARGE_FILES on the compiler command
172 dnl line because otherwise the system headers risk being included before
173 dnl config.h which defines these constants leading to inconsistent
174 dnl sizeof(off_t) in different source files of the same program and linking
176 if test "x$wx_largefile" = "xyes"; then
177 if test "x$ac_cv_sys_file_offset_bits" = "x64"; then
178 BX_LARGEFILE_FLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES"
180 BX_LARGEFILE_FLAGS="-D_LARGE_FILES"
182 CPPFLAGS="$CPPFLAGS $BX_LARGEFILE_FLAGS"
183 CFLAGS="$CFLAGS $BX_LARGEFILE_FLAGS"
184 CXXFLAGS="$CXXFLAGS $BX_LARGEFILE_FLAGS"
186 dnl ---end of largefile tests
188 dnl Add the -lm library if math functions cannot be used without it.
189 dnl This check is important on cygwin because of the bizarre way that they
190 dnl have organized functions into libraries. On cygwin, both libc.a and
191 dnl libm.a are symbolic links to a single lib libcygwin.a. This means that
192 dnl 1) linking with -lm is not necessary, and
193 dnl 2) linking with -lm is dangerous if the order of libraries is wrong
194 dnl In particular, if you compile any program with -mno-cygwin and link with
195 dnl -lm, it will crash instantly when it is run. This happens because the
196 dnl linker incorrectly links the Cygwin libm.a (==libcygwin.a), which replaces
197 dnl the ___main function instead of allowing it to be defined by
198 dnl /usr/lib/mingw/libmingw32.a as it should be.
200 dnl On MacOS X, this test will find that -lm is unnecessary and leave it out.
202 dnl Just check a few math functions. If they are all found without
203 dnl -lm, then we must not need -lm.
206 AC_CHECK_FUNCS(cos, have_cos=1)
207 AC_CHECK_FUNCS(floor, have_floor=1)
208 AC_MSG_CHECKING(if math functions link without -lm)
209 if test "$have_cos" = 1 -a "$have_floor" = 1; then
214 # use different functions to bypass configure caching
217 AC_CHECK_FUNCS(sin, have_sin=1)
218 AC_CHECK_FUNCS(ceil, have_ceil=1)
219 AC_MSG_CHECKING(if math functions link with -lm)
220 if test "$have_sin" = 1 -a "$have_ceil" = 1; then
224 # not sure we should warn the user, crash, etc.
225 # expect link failure
229 AC_MSG_CHECKING(for struct timeval)
230 AC_TRY_COMPILE([#include <sys/time.h>],
234 AC_DEFINE(BX_HAVE_STRUCT_TIMEVAL, 1)
238 AC_MSG_CHECKING(if compiler allows empty structs)
239 AC_TRY_COMPILE([], [typedef struct { } junk;],
242 AC_DEFINE(BX_NO_EMPTY_STRUCTS)
246 AC_MSG_CHECKING(if compiler allows __attribute__)
247 AC_TRY_COMPILE([], [typedef struct { } __attribute__ ((packed)) junk;],
251 AC_DEFINE(BX_NO_ATTRIBUTES)
256 AC_MSG_CHECKING(for hash_map)
257 AC_TRY_COMPILE([#include <hash_map>], [],
260 AC_DEFINE(BX_HAVE_HASH_MAP)
261 ], AC_MSG_RESULT(no))
262 AC_MSG_CHECKING(for hash_map.h)
263 AC_TRY_COMPILE([#include <hash_map.h>], [],
266 AC_DEFINE(BX_HAVE_HASH_MAP_H)
267 ], AC_MSG_RESULT(no))
268 AC_MSG_CHECKING(for set)
269 AC_TRY_COMPILE([#include <set>], [],
272 AC_DEFINE(BX_HAVE_SET)
273 ], AC_MSG_RESULT(no))
274 AC_MSG_CHECKING(for set.h)
275 AC_TRY_COMPILE([#include <set.h>], [],
278 AC_DEFINE(BX_HAVE_SET_H)
279 ], AC_MSG_RESULT(no))
282 dnl Implement a check for each gui library to see if has a chance of compiling.
283 if test "$with_all_libs" = yes; then
284 if test "$cross_configure" = 1; then
285 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.]])
287 if test "$with_beos" != yes; then
289 AC_CHECK_HEADER([app/Application.h], [], [ can_compile_beos=0 ])
290 AC_CHECK_HEADER([interface/Window.h], [], [ can_compile_beos=0 ])
291 AC_CHECK_HEADER([interface/View.h], [], [ can_compile_beos=0 ])
292 if test $can_compile_beos = 1; then
297 if test "$with_amigaos" != yes; then
298 can_compile_amigaos=1
299 AC_CHECK_HEADER([proto/intuition.h], [], [ can_compile_amigaos=0 ])
300 AC_CHECK_HEADER([intuition/intuitionbase.h], [], [ can_compile_amigaos=0 ])
301 AC_CHECK_HEADER([cybergraphx/cybergraphics.h], [], [ can_compile_amigaos=0 ])
302 AC_CHECK_HEADER([devices/trackdisk.h], [], [ can_compile_amigaos=0 ])
303 if test $can_compile_amigaos = 1; then
308 if test "$with_macos" != yes; then
310 AC_CHECK_HEADER([Quickdraw.h], [], [ can_compile_macos=0 ])
311 AC_CHECK_HEADER([Dialogs.h], [], [ can_compile_macos=0 ])
312 if test $can_compile_macos = 1; then
317 if test "$with_carbon" != yes; then
319 AC_CHECK_HEADER([Carbon.h], [], [ can_compile_carbon=0 ])
320 AC_CHECK_HEADER([ApplicationServices/ApplicationServices.h], [], [ can_compile_carbon=0 ])
321 if test $can_compile_carbon = 1; then
326 if test "$with_win32" != yes; then
328 AC_CHECK_HEADER([windows.h], [], [ can_compile_win32=0 ])
329 AC_CHECK_HEADER([commctrl.h], [], [ can_compile_win32=0 ])
330 if test $can_compile_win32 = 1; then
335 if test "$with_sdl" != yes; then
337 AC_CHECK_HEADER([SDL/SDL.h], [], [ can_compile_sdl=0 ])
338 AC_CHECK_HEADER([SDL/SDL_main.h], [], [ can_compile_sdl=0 ])
339 if test $can_compile_sdl = 1; then
344 if test "$with_svga" != yes; then
346 AC_CHECK_HEADER([vga.h], [], [ can_compile_svga=0 ])
347 AC_CHECK_HEADER([vgagl.h], [], [ can_compile_svga=0 ])
348 if test $can_compile_svga = 1; then
353 if test "$with_x11" != yes; then
355 AC_CHECK_HEADER([X11/Xlib.h], [], [ can_compile_x11=0 ])
356 AC_CHECK_HEADER([X11/Xutil.h], [], [ can_compile_x11=0 ])
357 if test $can_compile_x11 = 1; then
362 if test "$with_rfb" != yes; then
365 *-pc-windows* | *-pc-winnt* | *-pc-cygwin* | *-pc-mingw32*)
366 AC_CHECK_HEADER([winsock.h], [], [ can_compile_rfb=0 ])
367 AC_CHECK_HEADER([process.h], [], [ can_compile_rfb=0 ])
370 AC_CHECK_HEADER([sys/socket.h], [], [ can_compile_rfb=0 ])
371 AC_CHECK_HEADER([netinet/tcp.h], [], [ can_compile_rfb=0 ])
372 AC_CHECK_HEADER([pthread.h], [], [ can_compile_rfb=0 ])
375 if test $can_compile_rfb = 1; then
380 if test "$with_term" != yes; then
382 AC_CHECK_HEADER([curses.h], [], [ can_compile_term=0 ])
383 AC_CHECK_HEADER([signal.h], [], [ can_compile_term=0 ])
384 if test $can_compile_term = 1; then
389 if test "$with_nogui" != yes; then
392 fi # end of if $with_all_libs = yes
394 AC_MSG_CHECKING(for idle hack)
395 AC_ARG_ENABLE(idle-hack,
396 [ --enable-idle-hack use Roland Mainz's idle hack],
397 [if test "$enableval" = yes; then
399 AC_DEFINE(BX_USE_IDLE_HACK, 1)
402 AC_DEFINE(BX_USE_IDLE_HACK, 0)
406 AC_DEFINE(BX_USE_IDLE_HACK, 0)
409 AC_SUBST(BX_USE_IDLE_HACK)
411 AC_CHECK_HEADER(dlfcn.h, AC_DEFINE(BX_HAVE_DLFCN_H, 1))
412 AC_CHECK_HEADER(assert.h, AC_DEFINE(HAVE_ASSERT_H, 1))
414 AC_MSG_CHECKING(for plugins support)
415 AC_ARG_ENABLE(plugins,
416 [ --enable-plugins enable plugins],
417 [if test "$enableval" = yes; then
427 if test "$bx_plugins" = 1; then
429 AC_DEFINE(BX_PLUGINS, 1)
430 GUI_NON_PLUGIN_OBJS='$(OBJS_THAT_CANNOT_BE_PLUGINS)'
431 GUI_PLUGIN_OBJS='$(OBJS_THAT_CAN_BE_PLUGINS)'
432 DEFINE_PLUGIN_PATH='-DBX_PLUGIN_PATH="\"${plugdir}\""'
433 # and the $(OBJS_THAT_SUPPORT_OTHER_PLUGINS) will be built and linked
434 # by special link rules for the plugins that they support.
435 LIBS="$LIBS $LIBADD_DL"
437 PLUGIN_TARGET=bochs_plugins
438 INSTALL_PLUGINS_VAR=install_libtool_plugins
439 NONPLUGIN_GUI_LINK_OPTS=''
443 AC_DEFINE(BX_PLUGINS, 0)
444 GUI_NON_PLUGIN_OBJS='$(OBJS_THAT_CANNOT_BE_PLUGINS) $(OBJS_THAT_CAN_BE_PLUGINS) $(OBJS_THAT_SUPPORT_OTHER_PLUGINS)'
446 NONPLUGIN_GUI_LINK_OPTS='$(GUI_LINK_OPTS)'
448 AC_SUBST(DEFINE_PLUGIN_PATH)
449 AC_SUBST(NONPLUGIN_GUI_LINK_OPTS)
451 # copy gui variables into iodev variables. Later, we will add to the gui
452 # objs list, according to which display libraries are enabled.
453 IODEV_NON_PLUGIN_OBJS=$GUI_NON_PLUGIN_OBJS
454 IODEV_PLUGIN_OBJS=$GUI_PLUGIN_OBJS
456 # on MacOSX if they enabled plugins, make sure that dlopen() was found.
457 # It is provided by a library called dlcompat.
458 if test "$bx_plugins" = 1 -a "$need_dlcompat_for_plugins" = 1; then
460 AC_CHECK_LIB(dl, dlopen, [have_dlopen=1])
461 AC_MSG_CHECKING(if you have dlcompat, required for MacOSX plugins)
462 if test "$have_dlopen" = 0; then
464 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.])
470 AC_MSG_CHECKING(if compiler allows blank labels)
471 AC_TRY_COMPILE([], [ { label1: } ],
475 AC_DEFINE(BX_NO_BLANK_LABELS)
478 AC_MSG_CHECKING(if compiler allows LL for 64-bit constants)
479 AC_TRY_COMPILE([], [ { 42LL; } ],
483 AC_DEFINE(BX_64BIT_CONSTANTS_USE_LL, 0)
487 AC_MSG_CHECKING(for x86-64 support)
488 AC_ARG_ENABLE(x86-64,
489 [ --enable-x86-64 compile in support for x86-64 instructions],
490 [if test "$enableval" = yes; then
493 AC_DEFINE(BX_SUPPORT_X86_64, 1)
498 AC_DEFINE(BX_SUPPORT_X86_64, 0)
504 AC_DEFINE(BX_SUPPORT_X86_64, 0)
510 AC_MSG_CHECKING(for SMP support)
512 [ --enable-smp compile in support for SMP configurations],
513 [if test "$enableval" = yes; then
515 AC_DEFINE(BX_SUPPORT_SMP, 1)
516 AC_DEFINE(BX_USE_CPU_SMF, 0)
520 AC_DEFINE(BX_SUPPORT_SMP, 0)
525 AC_DEFINE(BX_SUPPORT_SMP, 0)
529 AC_MSG_CHECKING(for cpu level)
530 AC_ARG_ENABLE(cpu-level,
531 [ --enable-cpu-level select cpu level (3,4,5,6)],
532 [case "$enableval" in
535 AC_DEFINE(BX_CPU_LEVEL, 3)
536 AC_DEFINE(BX_CPU_LEVEL_HACKED, 3)
540 AC_DEFINE(BX_CPU_LEVEL, 4)
541 AC_DEFINE(BX_CPU_LEVEL_HACKED, 4)
545 AC_DEFINE(BX_CPU_LEVEL, 5)
546 AC_DEFINE(BX_CPU_LEVEL_HACKED, 5)
550 AC_DEFINE(BX_CPU_LEVEL, 6)
551 AC_DEFINE(BX_CPU_LEVEL_HACKED, 6)
555 echo "ERROR: you must supply a valid CPU level to --enable-cpu-level"
559 bx_cpu_level=$enableval
560 if test "$use_smp" = 1 -a "$enableval" -lt 6; then
561 echo "ERROR: with >1 processor, use --enable-cpu-level=6"
566 # for multiprocessors or x86-64, cpu level must be 6
567 if test "$use_smp" = 1 -o "$use_x86_64" = 1; then
569 AC_DEFINE(BX_CPU_LEVEL, 6)
570 AC_DEFINE(BX_CPU_LEVEL_HACKED, 6)
574 AC_DEFINE(BX_CPU_LEVEL, 5)
575 AC_DEFINE(BX_CPU_LEVEL_HACKED, 5)
582 AC_MSG_CHECKING(for APIC support)
584 [ --enable-apic enable APIC support],
585 [if test "$enableval" = yes; then
587 AC_DEFINE(BX_SUPPORT_APIC, 1)
588 IOAPIC_OBJS='ioapic.o'
591 if test "$use_smp" = 1; then
592 echo "ERROR: With SMP configuration you must use --enable-apic"
595 AC_DEFINE(BX_SUPPORT_APIC, 0)
600 if test "$use_smp" = 1 -o "$bx_cpu_level" -gt 5; then
601 # enable APIC by default, if SMP configuration or if cpulevel>5
603 AC_DEFINE(BX_SUPPORT_APIC, 1)
604 IOAPIC_OBJS='ioapic.o'
607 AC_DEFINE(BX_SUPPORT_APIC, 0)
612 AC_SUBST(IOAPIC_OBJS)
614 AC_CHECK_HEADER(zlib.h, [AC_CHECK_LIB(z, gzopen, AC_DEFINE(BX_HAVE_ZLIB,1))] )
616 AC_MSG_CHECKING(for compressed hard disk image support)
617 AC_ARG_ENABLE(compressed-hd,
618 [ --enable-compressed-hd allows compressed (zlib) hard disk image (not implemented yet)],
619 [if test "$enableval" = yes; then
621 AC_DEFINE(BX_COMPRESSED_HD_SUPPORT, 1)
625 AC_DEFINE(BX_COMPRESSED_HD_SUPPORT, 0)
629 AC_DEFINE(BX_COMPRESSED_HD_SUPPORT, 0)
632 AC_SUBST(BX_COMPRESSED_HD_SUPPORT)
634 AC_MSG_CHECKING(for NE2000 support)
635 AC_ARG_ENABLE(ne2000,
636 [ --enable-ne2000 enable limited ne2000 support],
637 [if test "$enableval" = yes; then
639 AC_DEFINE(BX_SUPPORT_NE2K, 1)
644 AC_DEFINE(BX_SUPPORT_NE2K, 0)
650 AC_DEFINE(BX_SUPPORT_NE2K, 0)
657 AC_MSG_CHECKING(for ACPI support)
659 [ --enable-acpi enable ACPI support],
660 [if test "$enableval" = yes; then
662 AC_DEFINE(BX_SUPPORT_ACPI, 1)
665 AC_DEFINE(BX_SUPPORT_ACPI, 0)
669 AC_DEFINE(BX_SUPPORT_ACPI, 0)
672 AC_SUBST(BX_SUPPORT_ACPI)
674 AC_MSG_CHECKING(for i440FX PCI support)
676 [ --enable-pci enable limited i440FX PCI support],
677 [if test "$enableval" = yes; then
679 AC_DEFINE(BX_SUPPORT_PCI, 1)
681 PCI_OBJ='pci.o pci2isa.o pci_ide.o pcivga.o acpi.o'
684 AC_DEFINE(BX_SUPPORT_PCI, 0)
690 AC_DEFINE(BX_SUPPORT_PCI, 0)
698 # PCI host device support
700 AC_MSG_CHECKING(for PCI host device mapping support)
701 AC_ARG_ENABLE(pcidev,
702 [ --enable-pcidev enable PCI host device mapping support (linux host only)],
704 if test "$enableval" = "yes"; then
706 if test "$pci" != "1"; then
707 AC_MSG_ERROR([PCI host device mapping requires PCI support])
711 AC_MSG_NOTICE([Linux detected as host for PCI host device mapping])
712 linux_version=`uname -r`
713 case "$linux_version" in
715 PCIDEV_MODULE_MAKE_ALL="all-kernel24"
716 KERNEL_MODULE_SUFFIX="o"
719 PCIDEV_MODULE_MAKE_ALL="all-kernel26"
720 KERNEL_MODULE_SUFFIX="ko"
723 AC_MSG_ERROR([Linux kernel 2.4 or 2.6 is required])
726 KERNELDIR="/lib/modules/$linux_version/build"
736 AC_SUBST(PCIDEV_MODULE_MAKE_ALL)
737 AC_SUBST(KERNEL_MODULE_SUFFIX)
740 AC_MSG_ERROR([PCI host device mapping requires Linux as host])
743 AC_DEFINE(BX_SUPPORT_PCIDEV, 1)
744 PCI_OBJ="$PCI_OBJ pcidev.o"
747 AC_DEFINE(BX_SUPPORT_PCIDEV, 0)
752 AC_DEFINE(BX_SUPPORT_PCIDEV, 0)
758 AC_MSG_CHECKING(for limited USB support)
760 [ --enable-usb enable limited USB support],
761 [if test "$enableval" = yes; then
763 AC_DEFINE(BX_SUPPORT_PCIUSB, 1)
764 PCI_OBJ="$PCI_OBJ pciusb.o"
765 USBDEV_OBJS="usb_hid.o usb_msd.o"
766 SCSI_OBJS="scsi_device.o"
769 AC_DEFINE(BX_SUPPORT_PCIUSB, 0)
773 AC_DEFINE(BX_SUPPORT_PCIUSB, 0)
777 AC_SUBST(USBDEV_OBJS)
780 AC_MSG_CHECKING(for PCI pseudo NIC support)
782 [ --enable-pnic enable PCI pseudo NIC support],
783 [if test "$enableval" = yes; then
785 AC_DEFINE(BX_SUPPORT_PCIPNIC, 1)
786 PCI_OBJ="$PCI_OBJ pcipnic.o"
790 AC_DEFINE(BX_SUPPORT_PCIPNIC, 0)
794 AC_DEFINE(BX_SUPPORT_PCIPNIC, 0)
799 if test "$networking" = yes; then
800 NETLOW_OBJS='eth.o eth_null.o eth_vnet.o'
801 AC_CHECK_HEADER(net/bpf.h, NETLOW_OBJS="$NETLOW_OBJS eth_fbsd.o")
802 AC_CHECK_HEADER(netpacket/packet.h, NETLOW_OBJS="$NETLOW_OBJS eth_linux.o")
804 *-pc-windows* | *-pc-winnt* | *-pc-cygwin* | *-pc-mingw32*)
805 NETLOW_OBJS="$NETLOW_OBJS eth_win32.o"
807 *-macosx* | *-darwin*)
808 NETLOW_OBJS="$NETLOW_OBJS eth_tuntap.o"
809 AC_DEFINE(HAVE_TUNTAP, 1)
812 AC_CHECK_HEADER(net/if.h, [
814 AC_DEFINE(BX_HAVE_NET_IF_H, 1)
817 #include <sys/types.h>
818 #include <sys/socket.h>
820 AC_CHECK_HEADER(linux/netlink.h, [
824 #include <asm/types.h>
825 #include <sys/socket.h>
828 if test "$use_ethertap" = yes; then
829 NETLOW_OBJS="$NETLOW_OBJS eth_tap.o eth_vde.o"
830 AC_DEFINE(HAVE_ETHERTAP, 1)
831 AC_DEFINE(HAVE_VDE, 1)
834 AC_CHECK_HEADER(net/if_tun.h, [
838 #include <sys/types.h>
839 #include <sys/socket.h>
842 AC_CHECK_HEADER(linux/if_tun.h, [
846 #include <asm/types.h>
847 #include <sys/socket.h>
849 if test "$use_tuntap" = yes; then
850 NETLOW_OBJS="$NETLOW_OBJS eth_tuntap.o"
851 AC_DEFINE(HAVE_TUNTAP, 1)
856 AC_DEFINE(BX_NETWORKING, 1)
858 AC_DEFINE(BX_NETWORKING, 0)
861 AC_SUBST(NETLOW_OBJS)
864 AC_MSG_CHECKING(for large pages support)
865 AC_ARG_ENABLE(large-pages,
866 [ --enable-large-pages support for large pages (2M/4M pages)],
867 [if test "$enableval" = yes; then
869 AC_DEFINE(BX_SUPPORT_LARGE_PAGES, 1)
870 support_large_pages=1
873 AC_DEFINE(BX_SUPPORT_LARGE_PAGES, 0)
874 support_large_pages=0
877 if test "$bx_cpu_level" -gt 4; then
879 AC_DEFINE(BX_SUPPORT_LARGE_PAGES, 1)
880 support_large_pages=1
883 AC_DEFINE(BX_SUPPORT_LARGE_PAGES, 0)
884 support_large_pages=0
890 AC_MSG_CHECKING(for PAE support)
892 [ --enable-pae support Physical Address Extensions],
893 [if test "$enableval" = yes; then
895 AC_DEFINE(BX_SUPPORT_PAE, 1)
899 AC_DEFINE(BX_SUPPORT_PAE, 0)
903 if test "$bx_cpu_level" -gt 5; then
905 AC_DEFINE(BX_SUPPORT_PAE, 1)
909 AC_DEFINE(BX_SUPPORT_PAE, 0)
915 AC_MSG_CHECKING(for global pages support)
916 AC_ARG_ENABLE(global-pages,
917 [ --enable-global-pages support for global pages in PDE/PTE],
918 [if test "$enableval" = yes; then
920 AC_DEFINE(BX_SUPPORT_GLOBAL_PAGES, 1)
921 support_global_pages=1
924 AC_DEFINE(BX_SUPPORT_GLOBAL_PAGES, 0)
925 support_global_pages=0
928 if test "$bx_cpu_level" -gt 5; then
931 AC_DEFINE(BX_SUPPORT_GLOBAL_PAGES, 1)
932 support_global_pages=1
935 AC_DEFINE(BX_SUPPORT_GLOBAL_PAGES, 0)
936 support_global_pages=0
941 if test "$bx_cpu_level" -lt 4 -a "$support_large_pages" = 1; then
942 AC_MSG_ERROR([for large paging support the CPU level must be >= 4])
945 if test "$bx_cpu_level" -lt 5 -a "$support_pae" = 1; then
946 AC_MSG_ERROR([for PAE support the CPU level must be >= 5])
949 if test "$bx_cpu_level" -lt 5 -a "$support_global_pages" = 1; then
950 AC_MSG_ERROR([for Global Pages support the CPU level must be >= 5])
953 AC_MSG_CHECKING(for MTRRs support)
955 [ --enable-mtrr support for MTRRs],
956 [if test "$enableval" = yes; then
958 AC_DEFINE(BX_SUPPORT_MTRR, 1)
961 AC_DEFINE(BX_SUPPORT_MTRR, 0)
964 if test "$bx_cpu_level" -gt 5; then
967 AC_DEFINE(BX_SUPPORT_MTRR, 1)
970 AC_DEFINE(BX_SUPPORT_MTRR, 0)
975 AC_MSG_CHECKING(for guest to host TLB support)
976 AC_ARG_ENABLE(guest2host-tlb,
977 [ --enable-guest2host-tlb support guest to host addr TLB for speed],
978 [if test "$enableval" = yes; then
980 speedup_guest2host_tlb=1
983 speedup_guest2host_tlb=0
987 speedup_guest2host_tlb=0
991 AC_MSG_CHECKING(for repeated IO and mem copy speedups)
992 AC_ARG_ENABLE(repeat-speedups,
993 [ --enable-repeat-speedups support repeated IO and mem copy speedups],
994 [if test "$enableval" = yes; then
1007 AC_MSG_CHECKING(for instruction trace cache support)
1008 AC_ARG_ENABLE(trace-cache,
1009 [ --enable-trace-cache support instruction trace cache],
1010 [if test "$enableval" = yes; then
1012 speedup_TraceCache=1
1015 speedup_TraceCache=0
1018 if test "$speedup_TraceCache " = 1; then
1020 speedup_TraceCache=1
1023 speedup_TraceCache=0
1028 AC_MSG_CHECKING(for instruction cache support)
1029 AC_ARG_ENABLE(icache,
1030 [ --enable-icache support instruction cache],
1031 [if test "$enableval" = yes; then
1044 AC_MSG_CHECKING(for gcc fast function calls optimization)
1045 AC_ARG_ENABLE(fast-function-calls,
1046 [ --enable-fast-function-calls support for fast function calls (gcc on x86 only)],
1047 [if test "$enableval" = yes; then
1060 AC_MSG_CHECKING(for host specific inline assembly accelerations)
1061 AC_ARG_ENABLE(host-specific-asms,
1062 [ --enable-host-specific-asms support for host specific inline assembly],
1063 [if test "$enableval" = yes; then
1065 speedup_host_specific_asms=1
1068 speedup_host_specific_asms=0
1072 speedup_host_specific_asms=0
1076 AC_MSG_CHECKING(whether to ignore bad MSR references)
1077 AC_ARG_ENABLE(ignore-bad-msr,
1078 [ --enable-ignore-bad-msr ignore bad MSR references],
1079 [if test "$enableval" = yes; then
1081 AC_DEFINE(BX_IGNORE_BAD_MSR, 1)
1084 AC_DEFINE(BX_IGNORE_BAD_MSR, 0)
1088 AC_DEFINE(BX_IGNORE_BAD_MSR, 1)
1092 AC_MSG_CHECKING(for port e9 hack)
1093 AC_ARG_ENABLE(port-e9-hack,
1094 [ --enable-port-e9-hack writes to port e9 go to console],
1095 [if test "$enableval" = yes; then
1097 AC_DEFINE(BX_PORT_E9_HACK, 1)
1100 AC_DEFINE(BX_PORT_E9_HACK, 0)
1104 AC_DEFINE(BX_PORT_E9_HACK, 1)
1108 AC_MSG_CHECKING(show IPS)
1109 AC_ARG_ENABLE(show-ips,
1110 [ --enable-show-ips show IPS in Bochs log file],
1111 [if test "$enableval" = yes; then
1113 AC_DEFINE(BX_SHOW_IPS, 1)
1116 AC_DEFINE(BX_SHOW_IPS, 0)
1120 AC_DEFINE(BX_SHOW_IPS, 0)
1124 AC_MSG_CHECKING(for use of .cpp as suffix)
1126 [ --enable-cpp use .cpp as C++ suffix],
1127 [if test "$enableval" = yes; then
1129 SUFFIX_LINE='.SUFFIXES: .cpp'
1133 SUFFIX_LINE='.SUFFIXES: .cc'
1138 SUFFIX_LINE='.SUFFIXES: .cc'
1142 AC_SUBST(SUFFIX_LINE)
1143 AC_SUBST(CPP_SUFFIX)
1145 if test "$enable_cpp" = yes; then
1146 echo "moving .cc source files to .cpp"
1147 sourcefiles=`find . -name "*.cc" -print`
1148 if test "$sourcefiles" != ""; then
1149 for ccname in $sourcefiles
1151 cppname=`echo $ccname | sed -e "s/\.cc$/.cpp/"`
1152 echo "mv $ccname $cppname"
1156 echo "no more .cc source files to rename"
1162 AC_MSG_CHECKING(for Bochs internal debugger support)
1163 AC_ARG_ENABLE(debugger,
1164 [ --enable-debugger compile in support for Bochs internal debugger],
1165 [if test "$enableval" = yes; then
1167 AC_DEFINE(BX_DEBUGGER, 1)
1168 DEBUGGER_VAR='$(DEBUGGER_LIB)'
1172 AC_DEFINE(BX_DEBUGGER, 0)
1179 AC_DEFINE(BX_DEBUGGER, 0)
1184 AC_SUBST(DEBUGGER_VAR)
1186 AC_MSG_CHECKING(for disassembler support)
1187 AC_ARG_ENABLE(disasm,
1188 [ --enable-disasm compile in support for disassembler],
1189 [if test "$enableval" = yes; then
1191 AC_DEFINE(BX_DISASM, 1)
1192 DISASM_VAR='$(DISASM_LIB)'
1195 if test "$bx_debugger" = 1; then
1196 echo "ERROR: debugger is enabled, so --enable-disasm is required"
1199 AC_DEFINE(BX_DISASM, 0)
1204 AC_DEFINE(BX_DISASM, 1)
1205 DISASM_VAR='$(DISASM_LIB)'
1207 AC_SUBST(DISASM_VAR)
1209 AC_MSG_CHECKING(for ALL optimizations enabled)
1210 AC_ARG_ENABLE(all-optimizations,
1211 [ --enable-all-optimizations compile in all possible optimizations],
1212 [if test "$enableval" = yes; then
1227 # Optimizations section. Decide what the status of various optimizations
1228 # should be based on configure choices and other factors.
1231 if test "$speedups_all" = 1; then
1232 # Configure requested to force all options enabled.
1233 speedup_guest2host_tlb=1
1236 speedup_TraceCache=1
1240 if test "$speedup_iCache" = 0 -a "$speedup_TraceCache" = 1; then
1241 AC_MSG_ERROR([iCache is required to compile with trace cache optimization])
1244 if test "$speedup_guest2host_tlb" = 1; then
1245 AC_DEFINE(BX_SupportGuest2HostTLB, 1)
1247 AC_DEFINE(BX_SupportGuest2HostTLB, 0)
1250 if test "$speedup_repeat" = 1; then
1251 AC_DEFINE(BX_SupportRepeatSpeedups, 1)
1253 AC_DEFINE(BX_SupportRepeatSpeedups, 0)
1256 if test "$speedup_iCache" = 1; then
1257 AC_DEFINE(BX_SUPPORT_ICACHE, 1)
1259 AC_DEFINE(BX_SUPPORT_ICACHE, 0)
1262 if test "$speedup_host_specific_asms" = 1; then
1263 AC_DEFINE(BX_SupportHostAsms, 1)
1265 AC_DEFINE(BX_SupportHostAsms, 0)
1268 if test "$speedup_fastcall" = 1; then
1269 AC_DEFINE(BX_FAST_FUNC_CALL, 1)
1271 AC_DEFINE(BX_FAST_FUNC_CALL, 0)
1274 if test "$speedup_TraceCache" = 1; then
1275 AC_DEFINE(BX_SUPPORT_TRACE_CACHE, 1)
1277 AC_DEFINE(BX_SUPPORT_TRACE_CACHE, 0)
1282 rl_without_curses_ok=no
1283 rl_with_curses_ok=no
1285 AC_MSG_CHECKING(whether user wants readline)
1286 AC_ARG_ENABLE(readline,
1287 [ --enable-readline use readline library, if available],
1288 [if test "$enableval" = yes; then
1302 AC_MSG_CHECKING(whether to use readline)
1303 if test "$want_readline" = yes; then
1304 if test "$bx_debugger" = 1; then
1306 AC_MSG_CHECKING(if readline works without -lcurses)
1308 LIBS="$LIBS -lreadline"
1311 #include <readline/readline.h>
1312 int main() { rl_initialize(); exit(0); }
1314 [ AC_MSG_RESULT(yes)
1315 rl_without_curses_ok=yes ],
1316 [ AC_MSG_RESULT(no) ]
1318 AC_MSG_CHECKING(if readline works with -lcurses)
1319 LIBS="$LIBS -lcurses"
1322 #include <readline/readline.h>
1323 int main() { rl_initialize(); exit(0); }
1326 rl_with_curses_ok=yes ],
1327 [ AC_MSG_RESULT(no) ]
1331 if test "$rl_without_curses_ok" = yes; then
1333 AC_DEFINE(HAVE_LIBREADLINE, 1)
1334 READLINE_LIB="-lreadline"
1336 elif test "$rl_with_curses_ok" = yes; then
1338 AC_DEFINE(HAVE_LIBREADLINE, 1)
1339 READLINE_LIB="-lreadline -lcurses"
1343 echo WARNING: The readline library was disabled because it was not found.
1351 AC_SUBST(READLINE_LIB)
1353 AC_CHECK_HEADER(readline/history.h,
1354 AC_DEFINE(HAVE_READLINE_HISTORY_H)
1357 INSTRUMENT_DIR='instrument/stubs'
1359 AC_MSG_CHECKING(for instrumentation support)
1360 AC_ARG_ENABLE(instrumentation,
1361 [ --enable-instrumentation compile in support for instrumentation],
1362 [if test "$enableval" = yes; then
1364 AC_DEFINE(BX_INSTRUMENTATION, 1)
1365 INSTRUMENT_VAR='$(INSTRUMENT_LIB)'
1366 elif test "$enableval" = no; then
1368 AC_DEFINE(BX_INSTRUMENTATION, 0)
1372 AC_DEFINE(BX_INSTRUMENTATION, 1)
1373 INSTRUMENT_DIR=$enableval
1374 INSTRUMENT_VAR='$(INSTRUMENT_LIB)'
1378 AC_DEFINE(BX_INSTRUMENTATION, 0)
1382 AC_SUBST(INSTRUMENT_DIR)
1383 AC_SUBST(INSTRUMENT_VAR)
1385 dnl // serial mode 'socket' needs wsock32.dll in non-plugin mode
1386 if test "$bx_plugins" = 0; then
1389 DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS wsock32.lib"
1391 *-cygwin* | *-mingw32*)
1392 DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS -lwsock32"
1397 AC_MSG_CHECKING(enable logging)
1398 AC_ARG_ENABLE(logging,
1399 [ --enable-logging enable logging],
1400 [if test "$enableval" = yes; then
1402 AC_DEFINE(BX_NO_LOGGING, 0)
1405 AC_DEFINE(BX_NO_LOGGING, 1)
1409 AC_DEFINE(BX_NO_LOGGING, 0)
1413 AC_MSG_CHECKING(enable assert checks)
1414 AC_ARG_ENABLE(assert-checks,
1415 [ --enable-assert-checks enable BX_ASSERT checks],
1416 [if test "$enableval" = yes; then
1418 AC_DEFINE(BX_ASSERT_ENABLE, 1)
1421 AC_DEFINE(BX_ASSERT_ENABLE, 0)
1424 if test "$bx_debugger" = 1; then
1426 AC_DEFINE(BX_ASSERT_ENABLE, 1)
1429 AC_DEFINE(BX_ASSERT_ENABLE, 0)
1434 AC_MSG_CHECKING(for raw serial support)
1435 AC_ARG_ENABLE(raw-serial,
1436 [ --enable-raw-serial use raw serial port access],
1437 [if test "$enableval" = yes; then
1439 AC_DEFINE(USE_RAW_SERIAL, 1)
1442 AC_DEFINE(USE_RAW_SERIAL, 0)
1446 AC_DEFINE(USE_RAW_SERIAL, 0)
1450 AC_MSG_CHECKING(for VESA BIOS extensions)
1452 [ --enable-vbe use VESA BIOS extensions],
1453 [if test "$enableval" = yes; then
1455 AC_DEFINE(BX_SUPPORT_VBE, 1)
1456 if test "$pci" = 1; then
1457 AC_DEFINE(BX_SUPPORT_PCIVGA, 1)
1461 AC_DEFINE(BX_SUPPORT_VBE, 0)
1465 AC_DEFINE(BX_SUPPORT_VBE, 1)
1466 if test "$pci" = 1; then
1467 AC_DEFINE(BX_SUPPORT_PCIVGA, 1)
1472 AC_MSG_CHECKING(for CLGD54XX emulation)
1473 AC_ARG_ENABLE(clgd54xx,
1474 [ --enable-clgd54xx enable CLGD54XX emulation],
1475 [if test "$enableval" = yes; then
1477 AC_DEFINE(BX_SUPPORT_CLGD54XX, 1)
1480 AC_DEFINE(BX_SUPPORT_CLGD54XX, 0)
1484 AC_DEFINE(BX_SUPPORT_CLGD54XX, 0)
1489 AC_MSG_CHECKING(for FPU emulation)
1492 [ --enable-fpu compile in FPU emulation],
1493 [if test "$enableval" = yes; then
1495 AC_DEFINE(BX_SUPPORT_FPU, 1)
1496 FPU_VAR='$(FPU_LIB)'
1497 elif test "$enableval" = no; then
1499 AC_DEFINE(BX_SUPPORT_FPU, 0)
1503 echo "ERROR: --enable-fpu does not accept a path"
1509 AC_DEFINE(BX_SUPPORT_FPU, 1)
1510 FPU_VAR='$(FPU_LIB)'
1515 AC_MSG_CHECKING(for VME support)
1517 [ --enable-vme virtual 8086 mode extensions],
1518 [if test "$enableval" = yes; then
1520 AC_DEFINE(BX_SUPPORT_VME, 1)
1521 elif test "$enableval" = no; then
1523 AC_DEFINE(BX_SUPPORT_VME, 0)
1527 if test "$bx_cpu_level" -ge 5; then
1529 AC_DEFINE(BX_SUPPORT_VME, 1)
1532 AC_DEFINE(BX_SUPPORT_VME, 0)
1538 AC_MSG_CHECKING(for MMX support)
1540 [ --enable-mmx MMX support],
1541 [if test "$enableval" = yes; then
1543 AC_DEFINE(BX_SUPPORT_MMX, 1)
1544 elif test "$enableval" = no; then
1546 AC_DEFINE(BX_SUPPORT_MMX, 0)
1551 if test "$bx_cpu_level" -ge 5; then
1553 AC_DEFINE(BX_SUPPORT_MMX, 1)
1556 AC_DEFINE(BX_SUPPORT_MMX, 0)
1561 AC_MSG_CHECKING(for 3DNow! support)
1562 AC_ARG_ENABLE(3dnow,
1563 [ --enable-3dnow 3DNow! support (incomplete)],
1564 [if test "$enableval" = yes; then
1566 AC_DEFINE(BX_SUPPORT_3DNOW, 1)
1567 elif test "$enableval" = no; then
1569 AC_DEFINE(BX_SUPPORT_3DNOW, 0)
1574 AC_DEFINE(BX_SUPPORT_3DNOW, 0)
1579 AC_MSG_CHECKING(for SSE support)
1581 [ --enable-sse SSE support (--enable-sse=[no|1|2|3|4])],
1582 [case "$enableval" in
1604 echo "ERROR: --enable-sse=$enableval not understood. Use --enable-sse=[no|1|2|3|4]"
1610 if test "$use_x86_64" = 1; then
1619 if test "$support_sse" -gt 0 -a "$bx_cpu_level" -lt 6; then
1620 AC_MSG_ERROR([for SSE support the CPU level must be set to 6])
1623 if test "$support_sse" -lt 2 -a "$use_x86_64" = 1; then
1624 AC_MSG_ERROR([x86-64 needs SSE2 support])
1627 if test "$support_sse" = 4; then
1628 AC_DEFINE(BX_SUPPORT_SSE, 4)
1629 elif test "$support_sse" = 3; then
1630 AC_DEFINE(BX_SUPPORT_SSE, 3)
1631 elif test "$support_sse" = 2; then
1632 AC_DEFINE(BX_SUPPORT_SSE, 2)
1633 elif test "$support_sse" = 1; then
1634 AC_DEFINE(BX_SUPPORT_SSE, 1)
1636 AC_DEFINE(BX_SUPPORT_SSE, 0)
1639 support_sse_extensions=0
1640 AC_MSG_CHECKING(for SSE extensions support)
1641 AC_ARG_ENABLE(sse-extension,
1642 [ --enable-sse-extension support for SSE extensions],
1643 [if test "$enableval" = yes; then
1645 AC_DEFINE(BX_SUPPORT_SSE_EXTENSION, 1)
1646 support_sse_extensions=1
1647 elif test "$enableval" = no; then
1649 AC_DEFINE(BX_SUPPORT_SSE_EXTENSION, 0)
1654 AC_DEFINE(BX_SUPPORT_SSE_EXTENSION, 0)
1658 AC_MSG_CHECKING(for DAZ support)
1660 [ --enable-daz denormals-are-zeroes support],
1661 [if test "$enableval" = yes; then
1663 AC_DEFINE(BX_SUPPORT_DAZ, 1)
1664 elif test "$enableval" = no; then
1666 AC_DEFINE(BX_SUPPORT_DAZ, 0)
1670 if test "$support_sse" -ge 2; then
1672 AC_DEFINE(BX_SUPPORT_DAZ, 1)
1675 AC_DEFINE(BX_SUPPORT_DAZ, 0)
1681 AC_MSG_CHECKING(for XSAVE/XRSTOR support)
1682 AC_ARG_ENABLE(xsave,
1683 [ --enable-xsave support for XSAVE/XRSTOR extensions],
1684 [if test "$enableval" = yes; then
1686 AC_DEFINE(BX_SUPPORT_XSAVE, 1)
1688 elif test "$enableval" = no; then
1690 AC_DEFINE(BX_SUPPORT_XSAVE, 0)
1695 AC_DEFINE(BX_SUPPORT_XSAVE, 0)
1699 if test "$support_sse" -lt 1 -a "$use_xsave" = 1; then
1700 AC_MSG_ERROR([XSAVE requires SSE support!])
1704 AC_MSG_CHECKING(for AES instructions support)
1706 [ --enable-aes support for AES instructions],
1707 [if test "$enableval" = yes; then
1709 AC_DEFINE(BX_SUPPORT_AES, 1)
1711 elif test "$enableval" = no; then
1713 AC_DEFINE(BX_SUPPORT_AES, 0)
1718 AC_DEFINE(BX_SUPPORT_AES, 0)
1722 if test "$support_sse" -lt 1 -a "$use_aes" = 1; then
1723 AC_MSG_ERROR([AES requires SSE support!])
1726 AC_MSG_CHECKING(for alignment check support)
1727 AC_ARG_ENABLE(alignment-check,
1728 [ --enable-alignment-check alignment check (#AC) support],
1729 [if test "$enableval" = yes; then
1731 AC_DEFINE(BX_SUPPORT_ALIGNMENT_CHECK, 1)
1732 elif test "$enableval" = no; then
1734 AC_DEFINE(BX_SUPPORT_ALIGNMENT_CHECK, 0)
1738 if test "$bx_cpu_level" -gt 3; then
1740 AC_DEFINE(BX_SUPPORT_ALIGNMENT_CHECK, 1)
1743 AC_DEFINE(BX_SUPPORT_ALIGNMENT_CHECK, 0)
1748 AC_MSG_CHECKING(for misaligned SSE support)
1749 AC_ARG_ENABLE(misaligned-sse,
1750 [ --enable-misaligned-sse misaligned SSE support],
1751 [if test "$enableval" = yes; then
1753 AC_DEFINE(BX_SUPPORT_MISALIGNED_SSE, 1)
1754 elif test "$enableval" = no; then
1756 AC_DEFINE(BX_SUPPORT_MISALIGNED_SSE, 0)
1761 AC_DEFINE(BX_SUPPORT_MISALIGNED_SSE, 0)
1765 AC_MSG_CHECKING(for SEP support)
1767 [ --enable-sep SYSENTER/SYSEXIT support],
1768 [if test "$enableval" = yes; then
1770 AC_DEFINE(BX_SUPPORT_SEP, 1)
1771 elif test "$enableval" = no; then
1773 AC_DEFINE(BX_SUPPORT_SEP, 0)
1777 if test "$bx_cpu_level" -ge 6 -a "$support_mmx" = 1; then
1779 AC_DEFINE(BX_SUPPORT_SEP, 1)
1782 AC_DEFINE(BX_SUPPORT_SEP, 0)
1787 AC_MSG_CHECKING(for POPCNT instruction support)
1788 AC_ARG_ENABLE(popcnt,
1789 [ --enable-popcnt support for POPCNT instruction],
1790 [if test "$enableval" = yes; then
1792 AC_DEFINE(BX_SUPPORT_POPCNT, 1)
1793 elif test "$enableval" = no; then
1795 AC_DEFINE(BX_SUPPORT_POPCNT, 0)
1799 if test "$support_sse" -ge 4 -a "$support_sse_extensions" = 1; then
1801 AC_DEFINE(BX_SUPPORT_POPCNT, 1)
1804 AC_DEFINE(BX_SUPPORT_POPCNT, 0)
1809 AC_MSG_CHECKING(for MOVBE instruction support)
1810 AC_ARG_ENABLE(movbe,
1811 [ --enable-movbe support for MOVBE Intel Atom(R) instruction],
1812 [if test "$enableval" = yes; then
1814 AC_DEFINE(BX_SUPPORT_MOVBE, 1)
1815 elif test "$enableval" = no; then
1817 AC_DEFINE(BX_SUPPORT_MOVBE, 0)
1822 AC_DEFINE(BX_SUPPORT_MOVBE, 0)
1826 AC_MSG_CHECKING(for MONITOR/MWAIT instructions support (experimental))
1827 AC_ARG_ENABLE(monitor_mwait,
1828 [ --enable-monitor-mwait support for MONITOR/MWAIT instructions (experimental)],
1829 [if test "$enableval" = yes; then
1831 AC_DEFINE(BX_SUPPORT_MONITOR_MWAIT, 1)
1832 elif test "$enableval" = no; then
1834 AC_DEFINE(BX_SUPPORT_MONITOR_MWAIT, 0)
1839 AC_DEFINE(BX_SUPPORT_MONITOR_MWAIT, 0)
1843 AC_MSG_CHECKING(for x86 debugger support)
1844 AC_ARG_ENABLE(x86-debugger,
1845 [ --enable-x86-debugger x86 debugger support],
1846 [if test "$enableval" = yes; then
1848 AC_DEFINE(BX_X86_DEBUGGER, 1)
1849 elif test "$enableval" = no; then
1851 AC_DEFINE(BX_X86_DEBUGGER, 0)
1856 AC_DEFINE(BX_X86_DEBUGGER, 0)
1860 AC_CHECK_HEADER(IOKit/storage/IOCDMedia.h,
1861 can_use_osx_cdrom=yes
1864 AC_MSG_CHECKING(for CDROM support)
1865 AC_ARG_ENABLE(cdrom,
1866 [ --enable-cdrom CDROM support],
1867 [if test "$enableval" = no; then
1875 if test "$bx_cdrom" = 1; then
1877 CDROM_OBJS='cdrom.o'
1878 if test "$with_amigaos" = yes; then
1879 # use the amiga cdrom file instead.
1880 CDROM_OBJS="cdrom_amigaos.o"
1881 elif test "$can_use_osx_cdrom" = yes; then
1883 AC_MSG_RESULT(Using OSX IOKit CD Interface)
1884 CDROM_OBJS="cdrom.o"
1885 EXTRA_LINK_OPTS="${EXTRA_LINK_OPTS} -framework IOKit -framework CoreFoundation "'$(GUI_LINK_OPTS)'
1889 # use the beos cdrom file instead
1890 CDROM_OBJS="$CDROM_OBJS cdrom_beos.o"
1892 AC_DEFINE(BX_SUPPORT_CDROM, 1)
1896 AC_DEFINE(BX_SUPPORT_CDROM, 0)
1899 AC_SUBST(CDROM_OBJS)
1903 AC_CHECK_HEADER([alsa/asoundlib.h], [bx_have_alsa=1])
1905 AC_MSG_CHECKING(for Sound Blaster 16 support)
1911 [ --enable-sb16=xxx Sound Blaster 16 Support (xxx=dummy|win|linux|freebsd|osx)],
1912 [if test "$enableval" = no; then
1914 AC_DEFINE(BX_SUPPORT_SB16, 0)
1916 case "$enableval" in
1919 AC_DEFINE(BX_SOUND_OUTPUT_C, bx_sound_output_c)
1920 AC_MSG_RESULT(dummy)
1923 SOUNDLOW_OBJS='soundlnx.o'
1924 AC_DEFINE(BX_SOUND_OUTPUT_C, bx_sound_linux_c)
1925 if test "$bx_have_alsa" = 1; then
1926 AC_DEFINE(BX_HAVE_ALSASOUND, 1)
1927 if test "$bx_plugins" = 1; then
1928 SOUND_LINK_OPTS="$SOUND_LINK_OPTS -lasound"
1930 DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS -lasound"
1933 AC_MSG_RESULT(linux)
1936 SOUNDLOW_OBJS='soundwin.o'
1937 AC_DEFINE(BX_SOUND_OUTPUT_C, bx_sound_windows_c)
1941 DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS winmm.lib"
1944 DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS -lwinmm"
1949 SOUNDLOW_OBJS='soundosx.o'
1950 AC_DEFINE(BX_SOUND_OUTPUT_C, bx_sound_osx_c)
1952 DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS -framework AudioUnit -framework AudioToolbox"
1956 *-linux* | *-freebsd*)
1957 SOUNDLOW_OBJS='soundlnx.o'
1958 AC_DEFINE(BX_SOUND_OUTPUT_C, bx_sound_linux_c)
1959 if test "$bx_have_alsa" = 1; then
1960 AC_DEFINE(BX_HAVE_ALSASOUND, 1)
1961 if test "$bx_plugins" = 1; then
1962 SOUND_LINK_OPTS="$SOUND_LINK_OPTS -lasound"
1964 DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS -lasound"
1967 AC_MSG_RESULT(linux)
1970 SOUNDLOW_OBJS='soundwin.o'
1971 AC_DEFINE(BX_SOUND_OUTPUT_C, bx_sound_windows_c)
1973 DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS winmm.lib"
1975 *-cygwin* | *-mingw32*)
1976 SOUNDLOW_OBJS='soundwin.o'
1977 AC_DEFINE(BX_SOUND_OUTPUT_C, bx_sound_windows_c)
1979 DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS -lwinmm"
1981 *-macosx* | *-macos*)
1982 SOUNDLOW_OBJS='soundosx.o'
1983 AC_DEFINE(BX_SOUND_OUTPUT_C, bx_sound_osx_c)
1985 DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS -framework AudioUnit -framework AudioToolbox"
1989 AC_DEFINE(BX_SOUND_OUTPUT_C, bx_sound_output_c)
1990 AC_MSG_RESULT(dummy)
1996 echo \!\!\!Error\!\!\!
1997 echo "You must pass one of dummy, linux, win, freebsd, osx to --enable-sb16"
2001 AC_DEFINE(BX_SUPPORT_SB16, 1)
2002 GAME_OBJS='gameport.o'
2008 AC_DEFINE(BX_SUPPORT_SB16, 0)
2012 AC_SUBST(SOUNDLOW_OBJS)
2013 AC_SUBST(SOUND_LINK_OPTS)
2016 AC_MSG_CHECKING(for standard PC gameport support)
2017 AC_ARG_ENABLE(gameport,
2018 [ --enable-gameport enable standard PC gameport support],
2019 [if test "$enableval" = yes; then
2021 AC_DEFINE(BX_SUPPORT_GAMEPORT, 1)
2022 if test "$gameport_present" = 0; then
2023 GAME_OBJS='gameport.o'
2025 *-cygwin* | *-mingw32*)
2026 DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS -lwinmm"
2033 AC_DEFINE(BX_SUPPORT_GAMEPORT, 0)
2036 if test "$gameport_present" = 1; then
2037 AC_DEFINE(BX_SUPPORT_GAMEPORT, 1)
2040 AC_DEFINE(BX_SUPPORT_GAMEPORT, 0)
2047 AC_MSG_CHECKING(for gdb stub enable)
2048 AC_ARG_ENABLE(gdb-stub,
2049 [ --enable-gdb-stub enable gdb stub support],
2050 [if test "$enableval" = yes; then
2052 AC_DEFINE(BX_GDBSTUB, 1)
2053 GDBSTUB_VAR='$(GDBSTUB_OBJS)'
2054 if test "$bx_debugger" = 1; then
2055 AC_MSG_ERROR([[--enable-debugger and --enable-gdb-stub are mutually exclusive]])
2059 AC_DEFINE(BX_GDBSTUB, 0)
2064 AC_DEFINE(BX_GDBSTUB, 0)
2068 AC_SUBST(GDBSTUB_VAR)
2071 AC_MSG_CHECKING(for I/O Interface to the debugger)
2073 AC_ARG_ENABLE(iodebug,
2074 [ --enable-iodebug enable I/O interface to debugger],
2075 [if test "$enableval" = yes; then
2077 AC_DEFINE(BX_SUPPORT_IODEBUG, 1)
2078 IODEBUG_OBJS='iodebug.o'
2081 AC_DEFINE(BX_SUPPORT_IODEBUG, 0)
2085 if test "" = 1; then
2086 # enable by default if debugger is on
2088 AC_DEFINE(BX_SUPPORT_IODEBUG, 1)
2089 IODEBUG_OBJS='iodebug.o'
2095 AC_SUBST(IODEBUG_OBJS)
2098 AC_PATH_PROG(DOCBOOK2HTML, docbook2html, not_found)
2099 AC_MSG_CHECKING(whether to build docbook documentation)
2101 AC_ARG_ENABLE(docbook,
2102 [ --enable-docbook build the Docbook documentation],
2104 if test "$enableval" = yes; then build_docbook=1; fi
2107 dnl Not specified. If they have docbook2html, then yes.
2108 if test "$DOCBOOK2HTML" != not_found; then build_docbook=1; fi
2112 if test $build_docbook = 1; then
2114 BUILD_DOCBOOK_VAR=build_docbook
2115 INSTALL_DOCBOOK_VAR=install_docbook
2116 if test "$DOCBOOK2HTML" = not_found; then
2117 echo "ERROR: docbook2html must be installed to build the documentation"
2123 AC_SUBST(BUILD_DOCBOOK_VAR)
2124 AC_SUBST(INSTALL_DOCBOOK_VAR)
2125 AC_SUBST(DOCBOOK2HTML)
2127 PRIMARY_TARGET='bochs'
2128 PLUGIN_LIBNAME_TRANSFORMATION='%.o=libbx_%.la'
2130 AC_DEFINE(BX_PROVIDE_DEVICE_MODELS, 1)
2131 IODEV_LIB_VAR='iodev/libiodev.a'
2132 AC_DEFINE(BX_PROVIDE_CPU_MEMORY, 1)
2133 NONINLINE_VAR='$(NONINLINE_OBJS)'
2135 AC_SUBST(IODEV_LIB_VAR)
2136 AC_SUBST(EXTRA_BX_OBJS)
2137 AC_SUBST(NONINLINE_VAR)
2138 AC_SUBST(INLINE_VAR)
2139 AC_SUBST(EXTERNAL_DEPENDENCY)
2140 AC_SUBST(EXT_DEBUG_OBJS)
2145 [ --with-x11 use X11 GUI],
2149 [ --with-beos use BeOS GUI],
2153 [ --with-win32 use Win32 GUI],
2157 [ --with-macos use Macintosh/CodeWarrior environment],
2161 [ --with-carbon compile for MacOS X with Carbon GUI],
2165 [ --with-nogui no native GUI, just use blank stubs],
2169 [ --with-term textmode terminal environment],
2173 [ --with-rfb use RFB protocol, works with VNC viewer],
2176 AC_ARG_WITH(amigaos,
2177 [ --with-amigaos use AmigaOS (or MorphOS) GUI],
2181 [ --with-sdl use SDL libraries],
2185 [ --with-svga use SVGALib libraries],
2189 [ --with-wx use wxWidgets libraries],
2192 AC_ARG_WITH(all-libs,
2193 [ --with-all-libs compile all guis that Bochs supports],
2196 dnl // DASH is option prefix for your platform
2197 dnl // SLASH is directory for your platform
2198 dnl // CXXFP is C++ File Prefix; the flag that tells the compiler
2199 dnl // this is a C++ source file
2200 dnl // CFP is C File Prefix; the flag that tells the compiler
2201 dnl // this is a C source file
2202 dnl // OFP is Object File Prefix; the flag that tells the compiler
2203 dnl // generate an object file with this name
2211 # first define link variables without libtool
2212 LINK="\$(CXX) -o \$@ \$(CXXFLAGS) \$(LDFLAGS)"
2213 LINK_CONSOLE="\$(CXX) -o \$@ \$(CXXFLAGS_CONSOLE) \$(LDFLAGS)"
2214 # unless NO_LT is set, add libtool to the front of the link command
2215 if test "$NO_LT" != 1; then
2216 LINK="\$(LIBTOOL) --mode=link $LINK"
2217 LINK_CONSOLE="\$(LIBTOOL) --mode=link $LINK_CONSOLE"
2220 COMMAND_SEPARATOR="&& \\"
2221 CD_UP_ONE="echo done"
2222 CD_UP_TWO="echo done"
2223 CD_UP_THREE="echo done"
2225 INSTALL_TARGET=install_unix
2226 INSTALL_LIST_FOR_PLATFORM=
2228 # check for existence of and usable version of wxWidgets. This comes
2229 # early so that it could affect which one gets chosen.
2230 if test x$WX_CONFIG = x; then
2231 AC_CHECK_PROG(WX_CONFIG, [ wx-config --version ], wx-config, not_found)
2233 AC_MSG_CHECKING(for wxWidgets configuration script)
2234 AC_MSG_RESULT($WX_CONFIG)
2239 AC_MSG_CHECKING(for wxWidgets library version)
2240 if test x$WX_CONFIG != xnot_found; then
2241 WX_VERSION=`$WX_CONFIG --version`
2242 WX_BASENAME=`$WX_CONFIG --basename`
2244 # test that version >= 2.3.2. Anybody have a better way to do this? Yuck.
2245 case x$WX_VERSION in
2246 x2.[012]*) ;; # less than version 2.3.x
2247 x2.3.[01]) ;; # less than version 2.3.2
2248 x2.3.[2-4]*) ok_wx_version=1 ;; # 2.3.2 or greater
2249 x2.[4-5]*) ok_wx_version=1 ;; # version 2.4 / 2.5
2250 x2.[6-9]*) # version 2.6 or greater
2253 case x$WX_BASENAME in
2254 xwx_gtk2|xwx_gtk2u) wx_needs_gtk2=1 ;;
2258 x[3-9]*) ok_wx_version=1 ;; # version 3 or greater
2263 AC_MSG_RESULT($WX_VERSION)
2264 if test "$cross_configure" = 0; then
2265 if test "$ok_wx_version" = 1; then
2266 # detected a usable version
2267 if test "$with_all_libs" = yes; then
2271 if test "$with_wx" = yes; then
2272 AC_MSG_WARN([Bochs for wxWidgets cannot be compiled here, disabling it])
2278 AC_MSG_CHECKING(for default gui on this platform)
2279 AC_MSG_RESULT($DEFAULT_GUI)
2283 # the $with_* variable tells the gui library to use, but does NOT necessarily
2284 # indicate the platform. Settings that depend on the platform should be
2288 if test "$with_x11" = yes; then
2289 display_libs="$display_libs X11"
2290 if test "$no_x" = yes; then
2291 echo ERROR: X windows gui was selected, but X windows libraries were not found.
2294 AC_DEFINE(BX_WITH_X11, 1)
2295 SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_X11)"
2296 GUI_CFLAGS="$GUI_CFLAGS \$(X_CFLAGS)"
2297 GUI_CXXFLAGS="$GUI_CXXFLAGS \$(X_CFLAGS)"
2298 GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_X)"
2300 AC_MSG_CHECKING(whether user wants XPM support)
2302 [ --enable-xpm enable the check for XPM support],
2303 [if test "$enableval" = yes; then
2316 if test $check_xpm = 1; then
2317 AC_CHECK_HEADER(X11/xpm.h, [
2318 AC_DEFINE(BX_HAVE_XPM_H)
2325 if test "$with_beos" = yes; then
2326 display_libs="$display_libs beos"
2327 AC_DEFINE(BX_WITH_BEOS, 1)
2328 SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_BEOS)"
2329 GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_BEOS)"
2332 if test "$with_sdl" = yes; then
2333 display_libs="$display_libs sdl"
2334 AC_DEFINE(BX_WITH_SDL, 1)
2335 SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_SDL)"
2336 # GUI_*FLAGS are added to the compilation of every bochs file, not just
2337 # the files in gui/*.cc.
2338 SDL_CFLAGS=`sdl-config --cflags`
2339 GUI_CFLAGS="$GUI_CFLAGS $SDL_CFLAGS"
2340 GUI_CXXFLAGS="$GUI_CXXFLAGS $SDL_CFLAGS"
2341 GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_SDL)"
2342 if test "$with_win32" != yes -a "$with_wx" != yes; then
2346 EXTRA_BX_OBJS="$EXTRA_BX_OBJS win32res.o"
2348 *-cygwin* | *-mingw32*)
2349 RC_CMD="windres -o "
2350 EXTRA_BX_OBJS="$EXTRA_BX_OBJS win32res.o"
2356 if test "$with_svga" = yes; then
2357 display_libs="$display_libs svga"
2358 AC_DEFINE(BX_WITH_SVGA, 1)
2359 SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_SVGA)"
2360 # GUI_*FLAGS are added to the compilation of every bochs file, not just
2361 # the files in gui/*.cc.
2362 GUI_CFLAGS="$GUI_CFLAGS"
2363 GUI_CXXFLAGS="$GUI_CXXFLAGS"
2364 GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_SVGA)"
2367 if test "$with_rfb" = yes; then
2368 display_libs="$display_libs rfb"
2369 AC_DEFINE(BX_WITH_RFB, 1)
2370 SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_RFB)"
2371 GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_RFB)"
2374 if test "$with_amigaos" = yes; then
2375 display_libs="$display_libs amigaos"
2376 AC_DEFINE(BX_WITH_AMIGAOS, 1)
2377 SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_AMIGAOS)"
2378 GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_AMIGAOS)"
2381 if test "$with_win32" = yes; then
2382 display_libs="$display_libs win32"
2383 AC_DEFINE(BX_WITH_WIN32, 1)
2384 SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_WIN32)"
2387 if test "$with_wx" != yes; then
2389 EXTRA_BX_OBJS="$EXTRA_BX_OBJS win32res.o"
2391 GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_WIN32_VCPP)"
2393 *-cygwin* | *-mingw32*)
2394 if test "$with_wx" != yes; then
2395 RC_CMD="windres -o "
2396 EXTRA_BX_OBJS="$EXTRA_BX_OBJS win32res.o"
2398 GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_WIN32)"
2400 *) echo Unsupported compile setup: GUI library is win32, but target is neither windows nor cygwin.
2405 if test "$with_macos" = yes; then
2406 display_libs="$display_libs macos"
2407 AC_DEFINE(BX_WITH_MACOS, 1)
2408 SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_MACOS)"
2409 GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_MACOS)"
2412 if test "$with_carbon" = yes; then
2413 display_libs="$display_libs carbon"
2414 AC_DEFINE(BX_WITH_CARBON, 1)
2415 SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_CARBON)"
2416 GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_CARBON)"
2417 if test "$bx_plugins" = 1; then
2418 PRIMARY_TARGET=bochs.app/.build_plugins # only for carbon application
2420 PRIMARY_TARGET=bochs.app/.build # only for carbon application
2422 INSTALL_TARGET='install_macosx'
2425 if test "$with_term" = yes; then
2426 display_libs="$display_libs term"
2427 AC_DEFINE(BX_WITH_TERM, 1)
2428 SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_TERM)"
2429 GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_TERM)"
2433 if test "$with_wx" = yes; then
2434 display_libs="$display_libs wxWidgets"
2435 if test "$cross_configure" = 1; then
2436 true # do not insist, if configuring for another machine
2438 if test x$ok_wx_version != x1; then
2439 echo ERROR: A usable version of wxWidgets was not found.
2440 echo Upgrade the library or choose another gui.
2444 AC_DEFINE(BX_WITH_WX, 1)
2445 SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_WX)"
2446 SPECIFIC_GUI_SUPPORT_OBJS="$SPECIFIC_GUI_SUPPORT_OBJS \$(GUI_OBJS_WX_SUPPORT)"
2447 WX_CFLAGS="`$WX_CONFIG --cflags`"
2448 WX_CXXFLAGS="`$WX_CONFIG --cxxflags`"
2449 if test "$wx_multi_lib" = 1; then
2450 GUI_LINK_OPTS_WX="`$WX_CONFIG --libs core,base`"
2452 GUI_LINK_OPTS_WX="`$WX_CONFIG --libs`"
2454 if test "$wx_needs_gtk2" = 1; then
2455 PKG_CHECK_MODULES([GTK], [gtk+-2.0], [
2456 WX_CFLAGS="$WX_CFLAGS $GTK_CFLAGS"
2457 WX_CXXFLAGS="$WX_CXXFLAGS $GTK_CFLAGS"
2460 # if gtk-config exists, then add it to the cflags.
2461 gtkconf=`gtk-config --cflags`
2462 if test $? = 0; then
2463 # gtk-config was found and returned 0, so it must return valid output
2464 WX_CFLAGS="$WX_CFLAGS $gtkconf"
2465 WX_CXXFLAGS="$WX_CXXFLAGS $gtkconf"
2468 # GUI_C*FLAGS are added to the compilation of every bochs file, not just
2469 # the files in gui/*.cc. They are not used when building other things
2471 GUI_CFLAGS="$GUI_CFLAGS $WX_CFLAGS"
2472 GUI_CXXFLAGS="$GUI_CXXFLAGS $WX_CXXFLAGS"
2473 GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_WX)"
2474 # using debugger with readline is failing due to thread/signal handler
2477 *-pc-windows* | *-cygwin* | *-mingw32*)
2478 EXTRA_BX_OBJS="$EXTRA_BX_OBJS wxbochs_resources.o"
2479 GUI_LINK_OPTS_WX="$GUI_LINK_OPTS_WX --subsystem,windows -mwindows"
2484 if test "$with_nogui" = yes; then
2485 display_libs="$display_libs nogui"
2486 AC_DEFINE(BX_WITH_NOGUI, 1)
2487 SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_NOGUI)"
2490 AC_MSG_CHECKING(for display libraries)
2491 AC_MSG_RESULT($display_libs)
2493 if test "$display_libs" = ""; then
2494 echo "No display libraries were selected. Use --with-* options to enable"
2495 echo "individual display libraries, or --with-all-libs to detect the ones"
2496 echo "that Bochs supports."
2500 dnl To use wxWidgets you must select it as both the configuration interface
2501 dnl and the display library. In the simplest case where the user has
2502 dnl only configured with --with-wx, set both defaults to wxWidgets.
2503 dnl Without this setting, the config interface would default to the text
2504 dnl mode config interface, and then the wxWidgets display library would not
2506 if test "$display_libs" = " wxWidgets"; then
2507 AC_MSG_CHECKING(for default configuration interface)
2508 AC_MSG_RESULT(wxWidgets)
2509 AC_MSG_CHECKING(for default display library)
2510 AC_MSG_RESULT(wxWidgets)
2511 AC_DEFINE(BX_DEFAULT_CONFIG_INTERFACE, "wx")
2512 AC_DEFINE(BX_DEFAULT_DISPLAY_LIBRARY, "wx")
2513 AC_DEFINE(BX_USE_TEXTCONFIG, 0)
2515 AC_DEFINE(BX_USE_TEXTCONFIG, 1)
2518 if test "$bx_plugins" = 1; then
2519 # every item in this list will be compiled as a plugin. Do not include
2520 # support objs; they will be mentioned in plugin-specific makefile rules.
2521 GUI_PLUGIN_OBJS="$GUI_PLUGIN_OBJS $SPECIFIC_GUI_OBJS"
2523 # include support objs
2524 GUI_NON_PLUGIN_OBJS="$GUI_NON_PLUGIN_OBJS $SPECIFIC_GUI_OBJS $SPECIFIC_GUI_SUPPORT_OBJS"
2527 AC_SUBST(GUI_CFLAGS)
2528 AC_SUBST(GUI_CXXFLAGS)
2531 AC_SUBST(WX_CXXFLAGS)
2533 AC_CHECK_PROGS(WGET, wget curl fetch, not_found)
2534 if test "$WGET" = not_found; then
2535 AC_MSG_WARN([cannot find wget (or equivalent) command])
2537 # everybody has to re-invent the wheel. differently.
2538 test "${WGET}" = "curl" && WGET="curl -O"
2540 # modify settings based on target platform
2543 AC_DEFINE(BX_HAVE_STRDUP, 0)
2546 AC_DEFINE(BX_HAVE_STRDUP, 0)
2547 AC_DEFINE(BX_PLUGINS, 0)
2548 AC_DEFINE(BX_HAVE_DLFCN_H, 0)
2549 AC_DEFINE(BX_HAVE_SOCKLEN_T, 0)
2550 AC_DEFINE(BX_HAVE_SELECT, 0)
2551 AC_DEFINE(BX_HAVE_GETTIMEOFDAY, 0)
2552 AC_DEFINE(BX_NO_ATTRIBUTES, 1)
2553 AC_DEFINE(HAVE_TUNTAP, 0)
2554 AC_DEFINE(HAVE_ETHERTAP, 0)
2555 AC_DEFINE(BX_HAVE_HASH_MAP, 0)
2558 INSTALL_TARGET='install_win32'
2561 #C_OPT="/Zi" # for debugging
2562 C_OPT="/Ox" # optimize for speed
2563 CFLAGS="/nologo /G6 /MT /W3 /GX- /DNDEBUG /DWIN32 /D_WINDOWS $C_OPT"
2571 MAKELIB="lib /nologo /subsystem:console /verbose /out:\$@"
2574 #L_OPT="/debug" # for debugging
2575 L_OPT="" # no debug info
2576 LINK="link $L_OPT /nologo /subsystem:console /incremental:no /out:\$@ "
2579 PRIMARY_TARGET="bochs.exe"
2580 BXIMAGE_LINK_OPTS="user32.lib"
2581 # also compile niclist if networking is on
2582 if test "$networking" = yes; then
2583 PRIMARY_TARGET="$PRIMARY_TARGET niclist.exe"
2585 COMMAND_SEPARATOR=""
2587 CD_UP_TWO="cd ..\.."
2588 CD_UP_THREE="cd ..\..\.."
2589 have_gettimeofday=0 # even though it may exist in build environment
2590 AC_DEFINE(BX_64BIT_CONSTANTS_USE_LL, 0)
2591 AC_DEFINE(inline, __inline)
2592 AC_DEFINE(BX_NO_EMPTY_STRUCTS, 1)
2593 AC_DEFINE(BX_NO_ATTRIBUTES, 1)
2594 AC_DEFINE(BX_HAVE_HASH_MAP, 0)
2595 AC_DEFINE(BX_HAVE_HASH_MAP_H, 0)
2596 AC_DEFINE(BX_HAVE_STRTOULL, 0)
2597 AC_DEFINE(BX_HAVE_STRTOUQ, 0)
2598 AC_DEFINE(HAVE_LIBREADLINE, 0)
2599 AC_DEFINE(BX_HAVE_GETTIMEOFDAY, 0)
2600 AC_DEFINE(BX_HAVE_DLFCN_H, 0)
2601 AC_DEFINE(BX_HAVE_MKSTEMP, 0)
2602 AC_DEFINE(BX_HAVE_SYS_MMAN_H, 0)
2603 AC_DEFINE(BX_HAVE_USLEEP, 0)
2604 AC_DEFINE(HAVE_ETHERTAP, 0)
2605 AC_DEFINE(BX_HAVE_SELECT, 1)
2606 AC_DEFINE(BX_HAVE_SOCKLEN_T, 0)
2610 PRIMARY_TARGET="bochs.exe"
2611 BXIMAGE_LINK_OPTS="-luser32"
2612 if test "$networking" = yes; then
2613 PRIMARY_TARGET="$PRIMARY_TARGET niclist.exe"
2615 AC_DEFINE(BX_HAVE_SELECT, 1)
2618 BXIMAGE_LINK_OPTS="-luser32"
2619 if test "$networking" = yes; then
2620 PRIMARY_TARGET="$PRIMARY_TARGET niclist"
2622 AC_DEFINE(BX_HAVE_SELECT, 1)
2625 PRIMARY_TARGET=.bochs_beos_target
2630 EXPORT_DYNAMIC="-export-dynamic"
2632 *-pc-windows* | *-pc-winnt* | *-cygwin* | *-mingw*)
2633 if test "$bx_plugins" = 1; then
2634 AC_CHECK_LIB(mingwex, opendir, LIBS="$LIBS -lmingwex")
2635 # set variables for building DLL plugins
2636 PRIMARY_TARGET=".win32_dll_plugin_target"
2637 PLUGIN_LIBNAME_TRANSFORMATION='%.o=bx_%.dll'
2638 INSTALL_PLUGINS_VAR=install_dll_plugins
2640 if test "$with_win32" != yes; then
2641 LIBS="$LIBS -lcomctl32"
2644 DIALOG_OBJS="win32dialog.o win32_enh_dbg.o"
2648 AC_SUBST(DIALOG_OBJS)
2649 AC_SUBST(EXPORT_DYNAMIC)
2651 if test "$use_curses" = yes -a "$cross_configure" = 0; then
2652 AC_CHECK_LIB(curses, mvaddch, GUI_LINK_OPTS_TERM='-lcurses')
2653 AC_CHECK_LIB(ncurses, mvaddch, GUI_LINK_OPTS_TERM='-lncurses')
2654 AC_CHECK_LIB(termlib, mvaddch, GUI_LINK_OPTS_TERM='-ltermlib')
2655 AC_CHECK_LIB(pdcurses, mvaddch, GUI_LINK_OPTS_TERM='-lpdcurses')
2656 if test "$GUI_LINK_OPTS_TERM" = ""; then
2657 echo Curses library not found: tried curses, ncurses, termlib and pdcurses.
2662 if test "$with_term" = yes; then
2664 LIBS="$LIBS $GUI_LINK_OPTS_TERM"
2665 AC_CHECK_FUNCS(color_set, AC_DEFINE(BX_HAVE_COLOR_SET, 1))
2666 AC_CHECK_FUNCS(mvhline, AC_DEFINE(BX_HAVE_MVHLINE, 1))
2667 AC_CHECK_FUNCS(mvvline, AC_DEFINE(BX_HAVE_MVVLINE, 1))
2671 if test "$with_rfb" = yes; then
2672 # we need the socket function
2675 # is this okay without a check ?
2676 RFB_LIBS="$RFB_LIBS wsock32.lib"
2679 *-pc-winnt* | *-pc-cygwin* | *-pc-mingw32*)
2680 # is this okay without a check ?
2681 RFB_LIBS="$RFB_LIBS -lwsock32"
2685 AC_CHECK_FUNCS(socket, have_socket=yes)
2686 if test "$have_socket" != yes; then
2687 AC_CHECK_LIB(socket, socket,
2689 RFB_LIBS="$RFB_LIBS -lsocket"
2695 if test "$have_socket" != yes; then
2696 echo 'ERROR: socket function required for RFB compile'
2701 # The ACX_PTHREAD function was written by
2702 # Steven G. Johnson <stevenj@alum.mit.edu> and
2703 # Alejandro Forero Cuervo <bachue@bachue.com>
2704 # I found it in the ac-archive project on Source Forge.
2706 AC_DEFUN([ACX_PTHREAD], [
2707 AC_REQUIRE([AC_CANONICAL_HOST])
2710 # First, check if the POSIX threads header, pthread.h, is available.
2711 # If it isn't, don't bother looking for the threads libraries.
2712 AC_CHECK_HEADER(pthread.h, , acx_pthread_ok=noheader)
2714 # We must check for the threads library under a number of different
2715 # names; the ordering is very important because some systems
2716 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
2717 # libraries is broken (non-POSIX).
2719 # First of all, check if the user has set any of the PTHREAD_LIBS,
2720 # etcetera environment variables, and if threads linking works using
2722 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
2723 save_CFLAGS="$CFLAGS"
2724 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
2725 CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
2727 LIBS="$PTHREAD_LIBS $LIBS"
2728 AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
2729 AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
2730 AC_MSG_RESULT($acx_pthread_ok)
2731 if test x"$acx_pthread_ok" = xno; then
2736 CFLAGS="$save_CFLAGS"
2739 # Create a list of thread flags to try. Items starting with a "-" are
2740 # C compiler flags, and other items are library names, except for "none"
2741 # which indicates that we try without any flags at all.
2743 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
2745 # The ordering *is* (sometimes) important. Some notes on the
2746 # individual items follow:
2748 # pthreads: AIX (must check this before -lpthread)
2749 # none: in case threads are in libc; should be tried before -Kthread and
2750 # other compiler flags to prevent continual compiler warnings
2751 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
2752 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
2753 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
2754 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
2755 # -pthreads: Solaris/gcc
2756 # -mthreads: Mingw32/gcc, Lynx/gcc
2757 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
2758 # doesn't hurt to check since this sometimes defines pthreads too;
2759 # also defines -D_REENTRANT)
2760 # pthread: Linux, etcetera
2761 # --thread-safe: KAI C++
2763 case "${host_cpu}-${host_os}" in
2766 # On Solaris (at least, for some versions), libc contains stubbed
2767 # (non-functional) versions of the pthreads routines, so link-based
2768 # tests will erroneously succeed. (We need to link with -pthread or
2769 # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
2770 # a function called by this macro, so we could check for that, but
2771 # who knows whether they'll stub that too in a future libc.) So,
2772 # we'll just look for -pthreads and -lpthread first:
2774 acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
2778 if test x"$acx_pthread_ok" = xno; then
2779 for flag in $acx_pthread_flags; do
2783 AC_MSG_CHECKING([whether pthreads work without any flags])
2787 AC_MSG_CHECKING([whether pthreads work with $flag])
2788 PTHREAD_CFLAGS="$flag"
2792 AC_MSG_CHECKING([for the pthreads library -l$flag])
2793 PTHREAD_LIBS="-l$flag"
2798 save_CFLAGS="$CFLAGS"
2799 LIBS="$PTHREAD_LIBS $LIBS"
2800 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
2802 # Check for various functions. We must include pthread.h,
2803 # since some functions may be macros. (On the Sequent, we
2804 # need a special flag -Kthread to make this header compile.)
2805 # We check for pthread_join because it is in -lpthread on IRIX
2806 # while pthread_create is in libc. We check for pthread_attr_init
2807 # due to DEC craziness with -lpthreads. We check for
2808 # pthread_cleanup_push because it is one of the few pthread
2809 # functions on Solaris that doesn't have a non-functional libc stub.
2810 # We try pthread_create on general principles.
2811 AC_TRY_LINK([#include <pthread.h>],
2812 [pthread_t th; pthread_join(th, 0);
2813 pthread_attr_init(0); pthread_cleanup_push(0, 0);
2814 pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
2815 [acx_pthread_ok=yes])
2818 CFLAGS="$save_CFLAGS"
2820 AC_MSG_RESULT($acx_pthread_ok)
2821 if test "x$acx_pthread_ok" = xyes; then
2830 # Various other checks:
2831 if test "x$acx_pthread_ok" = xyes; then
2833 LIBS="$PTHREAD_LIBS $LIBS"
2834 save_CFLAGS="$CFLAGS"
2835 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
2837 # Detect AIX lossage: threads are created detached by default
2838 # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
2839 AC_MSG_CHECKING([for joinable pthread attribute])
2840 AC_TRY_LINK([#include <pthread.h>],
2841 [int attr=PTHREAD_CREATE_JOINABLE;],
2842 ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
2843 if test x"$ok" = xunknown; then
2844 AC_TRY_LINK([#include <pthread.h>],
2845 [int attr=PTHREAD_CREATE_UNDETACHED;],
2846 ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
2848 if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
2849 AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
2850 [Define to the necessary symbol if this constant
2851 uses a non-standard name on your system.])
2853 AC_MSG_RESULT(${ok})
2854 if test x"$ok" = xunknown; then
2855 AC_MSG_WARN([we do not know how to create joinable pthreads])
2858 AC_MSG_CHECKING([if more special flags are required for pthreads])
2860 case "${host_cpu}-${host_os}" in
2861 *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";;
2862 *solaris* | alpha*-osf*) flag="-D_REENTRANT";;
2864 AC_MSG_RESULT(${flag})
2865 if test "x$flag" != xno; then
2866 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
2870 CFLAGS="$save_CFLAGS"
2872 # More AIX lossage: must compile with cc_r
2873 AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
2878 AC_SUBST(PTHREAD_LIBS)
2879 AC_SUBST(PTHREAD_CFLAGS)
2880 AC_SUBST(PTHREAD_CC)
2882 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
2883 if test x"$acx_pthread_ok" = xyes; then
2884 ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
2896 #echo Using PTHREAD_LIBS=$PTHREAD_LIBS
2897 #echo Using PTHREAD_CFLAGS=$PTHREAD_CFLAGS
2898 #echo Using PTHREAD_CC=$PTHREAD_CC
2902 # since RFB (usually) needs pthread library, check that it was found.
2903 # But on win32 platforms, the pthread library is not needed.
2904 if test "$with_rfb" = yes -a "$cross_configure" = 0; then
2905 if test "$pthread_ok" = yes; then
2906 RFB_LIBS="$RFB_LIBS $PTHREAD_LIBS"
2907 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
2908 CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
2912 *-pc-windows* | *-pc-winnt* | *-cygwin* | *-mingw*)
2913 # pthread not needed for win32 platform
2916 echo ERROR: --with-rfb requires the pthread library, which could not be found.; exit 1
2921 dnl // DEPRECATED configure options - force users to remove them
2923 AC_MSG_CHECKING(for external debugger interface (deprecated))
2924 AC_ARG_ENABLE(external-debugger,
2925 [ --enable-external-debugger enables external debugger interface (deprecated)],
2926 [AC_MSG_RESULT($enableval)
2927 AC_MSG_ERROR([DEPRECATED - Peter Tattam's external debugger interface is not supported anymore])
2933 AC_MSG_CHECKING(for magic breakpoints (deprecated))
2934 AC_ARG_ENABLE(magic-breakpoints,
2935 [ --enable-magic-breakpoints enables magic breakpoints (deprecated)],
2936 [AC_MSG_RESULT($enableval)
2937 AC_MSG_ERROR([DEPRECATED - magic breakpoints are always enabled with Bochs internal debugger])
2943 AC_MSG_CHECKING(for save/restore (deprecated))
2944 AC_ARG_ENABLE(save-restore,
2945 [ --enable-save-restore enables save/restore (deprecated)],
2946 [AC_MSG_RESULT($enableval)
2947 AC_MSG_ERROR([DEPRECATED - save/restore feature is always enabled])
2953 # Create some subdirectories for when you run configure from some other
2955 if test ! -d instrument; then mkdir instrument; fi
2956 if test ! -d build; then mkdir build; fi
2957 if test ! -d build/linux; then mkdir build/linux; fi
2958 if test ! -d build/win32; then mkdir build/win32; fi
2959 if test ! -d build/win32/nsis; then mkdir build/win32/nsis; fi
2961 AC_SUBST(INSTALL_TARGET)
2962 AC_SUBST(INSTALL_LIST_FOR_PLATFORM)
2965 AC_SUBST(DEVICE_LINK_OPTS)
2966 AC_SUBST(GUI_LINK_OPTS)
2967 AC_SUBST(GUI_LINK_OPTS_TERM)
2968 AC_SUBST(GUI_LINK_OPTS_WX)
2969 AC_SUBST(BXIMAGE_LINK_OPTS)
2978 AC_SUBST(LINK_CONSOLE)
2980 AC_SUBST(PRIMARY_TARGET)
2981 AC_SUBST(PLUGIN_LIBNAME_TRANSFORMATION)
2982 AC_SUBST(COMMAND_SEPARATOR)
2985 AC_SUBST(CD_UP_THREE)
2987 AC_SUBST(VER_STRING)
2988 AC_SUBST(WIN_VER_STRING)
2989 AC_SUBST(REL_STRING)
2990 AC_SUBST(EXTRA_LINK_OPTS)
2991 AC_SUBST(GUI_NON_PLUGIN_OBJS)
2992 AC_SUBST(GUI_PLUGIN_OBJS)
2993 AC_SUBST(IODEV_NON_PLUGIN_OBJS)
2994 AC_SUBST(IODEV_PLUGIN_OBJS)
2995 AC_SUBST(PLUGIN_VAR)
2996 AC_SUBST(PLUGIN_TARGET)
2997 AC_SUBST(INSTALL_PLUGINS_VAR)
2999 AC_PATH_PROG(GZIP, gzip)
3000 AC_PATH_PROG(TAR, tar)
3002 AC_OUTPUT(Makefile iodev/Makefile bx_debug/Makefile bios/Makefile \
3003 cpu/Makefile memory/Makefile gui/Makefile \
3004 disasm/Makefile ${INSTRUMENT_DIR}/Makefile misc/Makefile \
3005 fpu/Makefile doc/docbook/Makefile \
3006 build/linux/bochs-dlx \
3007 bxversion.h bxversion.rc build/macosx/Info.plist \
3008 build/win32/nsis/Makefile build/win32/nsis/bochs.nsi \
3009 host/linux/pcidev/Makefile)