6 |
|
AC_CONFIG_HEADER(config.h) |
7 |
|
|
8 |
|
dnl Options. |
9 |
< |
WANT_DGA=yes |
9 |
> |
WANT_XF86_DGA=yes |
10 |
> |
WANT_FBDEV_DGA=yes |
11 |
|
WANT_UI=yes |
12 |
< |
AC_ARG_ENABLE(dga, [ --enable-dga use the DGA extension (default)], [WANT_DGA=$enableval], []) |
12 |
> |
AC_ARG_ENABLE(xf86-dga, [ --enable-xf86-dga use the XFree86 DGA extension (default)], [WANT_XF86_DGA=$enableval], []) |
13 |
> |
AC_ARG_ENABLE(fbdev-dga, [ --enable-fbdev-dga use direct frame buffer access via /dev/fb (default)], [WANT_FBDEV_DGA=$enableval], []) |
14 |
|
AC_ARG_ENABLE(ui, [ --enable-ui use GTK user interface (default)], [WANT_UI=$enableval], []) |
15 |
|
|
16 |
|
dnl Checks for programs. |
37 |
|
dnl Check even the libc_r (FreeBSD) |
38 |
|
AC_CHECK_LIB(c_r, pthread_create, HAVE_PTHREADS=yes, HAVE_PTHREADS=no) |
39 |
|
if [[ "x$HAVE_PTHREADS" = "xno" ]]; then |
40 |
< |
AC_MSG_ERROR([You need libpthreads to run Basilisk II.]) |
40 |
> |
dnl Or maybe the user has PTL (NetBSD) |
41 |
> |
AC_CHECK_LIB(PTL, pthread_create, HAVE_PTHREADS=yes, HAVE_PTHREADS=no) |
42 |
> |
if [[ "x$HAVE_PTHREADS" = "xno" ]]; then |
43 |
> |
AC_MSG_ERROR([You need pthreads to run Basilisk II.]) |
44 |
> |
else |
45 |
> |
LIBS="$LIBS -lPTL" |
46 |
> |
fi |
47 |
|
else |
48 |
|
LIBS="$LIBS -lc_r" |
49 |
|
fi |
53 |
|
AC_CHECK_FUNCS(pthread_cancel) |
54 |
|
|
55 |
|
dnl We use DGA if possible. |
56 |
< |
if [[ "x$WANT_DGA" = "xyes" ]]; then |
56 |
> |
if [[ "x$WANT_XF86_DGA" = "xyes" ]]; then |
57 |
|
AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension, HAVE_DGA=yes, HAVE_DGA=no) |
58 |
|
if [[ "x$HAVE_DGA" = "xno" ]]; then |
59 |
< |
AC_MSG_WARN([Could not find DGA extension, ignoring --enable-dga.]) |
59 |
> |
AC_MSG_WARN([Could not find XFree86 DGA extension, ignoring --enable-xf86-dga.]) |
60 |
> |
DEFINES="$DEFINES -DENABLE_XF86_DGA=0" |
61 |
|
else |
62 |
< |
DEFINES="$DEFINES -DENABLE_DGA=1" |
62 |
> |
DEFINES="$DEFINES -DENABLE_XF86_DGA=1" |
63 |
|
LIBS="$LIBS -lXxf86dga" |
64 |
+ |
if [[ "x$WANT_FBDEV_DGA" = "xyes" ]]; then |
65 |
+ |
AC_MSG_WARN([Cannot have both --enable-xf86-dga and --enable-fbdev-dga, ignoring --enable-fbdev-dga.]) |
66 |
+ |
WANT_FBDEV_DGA=no |
67 |
+ |
fi |
68 |
|
fi |
69 |
+ |
else |
70 |
+ |
DEFINES="$DEFINES -DENABLE_XF86_DGA=0" |
71 |
+ |
fi |
72 |
+ |
if [[ "x$WANT_FBDEV_DGA" = "xyes" ]]; then |
73 |
+ |
DEFINES="$DEFINES -DENABLE_FBDEV_DGA=1" |
74 |
+ |
else |
75 |
+ |
DEFINES="$DEFINES -DENABLE_FBDEV_DGA=0" |
76 |
|
fi |
77 |
|
|
78 |
|
dnl We use GTK+ if possible. |
179 |
|
LIBS="$LIBS -lm" |
180 |
|
;; |
181 |
|
esac |
182 |
< |
if [[ "x$WANT_UI" = "xyes" ]]; then |
183 |
< |
SYSSRCS="$SYSSRCS prefs_editor_gtk.cpp" |
184 |
< |
else |
185 |
< |
SYSSRCS="$SYSSRCS ../dummy/prefs_editor_dummy.cpp" |
186 |
< |
fi |
182 |
> |
fi |
183 |
> |
if [[ "x$WANT_UI" = "xyes" ]]; then |
184 |
> |
SYSSRCS="$SYSSRCS prefs_editor_gtk.cpp" |
185 |
> |
else |
186 |
> |
SYSSRCS="$SYSSRCS ../dummy/prefs_editor_dummy.cpp" |
187 |
|
fi |
188 |
|
if [[ "x$SEMSRCS" != "x" ]]; then |
189 |
|
SYSSRCS="$SYSSRCS $SEMSRCS" |
233 |
|
DEFINES="$DEFINES -DREGPARAM=\"__attribute__((regparm(3)))\"" |
234 |
|
if [[ "x$HAVE_GAS" = "xyes" ]]; then |
235 |
|
DEFINES="$DEFINES -DX86_ASSEMBLY" |
236 |
< |
CPUSRCS="$CPUSRCS cpufast.s" |
236 |
> |
CPUSRCS="$CPUSRCS cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s" |
237 |
|
else |
238 |
< |
CPUSRCS="$CPUSRCS cpuemu.cpp" |
238 |
> |
CPUSRCS="$CPUSRCS cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp" |
239 |
|
fi |
240 |
|
else |
241 |
< |
CPUSRCS="$CPUSRCS cpuemu.cpp" |
241 |
> |
CPUSRCS="$CPUSRCS cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp" |
242 |
|
fi |
243 |
|
|
244 |
|
dnl Generate Makefile. |