1 |
|
dnl Process this file with autoconf to produce a configure script. |
2 |
|
dnl Written in 2002 by Christian Bauer |
3 |
|
|
4 |
< |
AC_INIT([SheepShaver], 2.2, [Christian.Bauer@uni-mainz.de], SheepShaver) |
4 |
> |
AC_INIT([SheepShaver], 2.3, [Christian.Bauer@uni-mainz.de], SheepShaver) |
5 |
|
AC_CONFIG_SRCDIR(main_windows.cpp) |
6 |
|
AC_CONFIG_AUX_DIR(../Unix) |
7 |
|
AC_PREREQ(2.52) |
13 |
|
|
14 |
|
dnl Options. |
15 |
|
AC_ARG_ENABLE(jit, [ --enable-jit enable JIT compiler [default=yes]], [WANT_JIT=$enableval], [WANT_JIT=yes]) |
16 |
+ |
AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [default=yes]], [WANT_GTK=$withval], [WANT_GTK=yes]) |
17 |
|
|
18 |
|
dnl Checks for programs. |
19 |
|
AC_PROG_CC |
25 |
|
AC_PATH_PROG(PERL, [perl]) |
26 |
|
AC_CHECK_TOOL(WINDRES, windres) |
27 |
|
|
28 |
+ |
dnl We use GTK+ if possible. |
29 |
+ |
if [[ "x$WANT_GTK" = "xyes" ]]; then |
30 |
+ |
AM_PATH_GTK_2_0(1.3.15, [], [ |
31 |
+ |
AC_MSG_WARN([Could not find GTK+ 2.0, disabling user interface.]) |
32 |
+ |
WANT_GTK=no |
33 |
+ |
]) |
34 |
+ |
fi |
35 |
+ |
AC_SUBST(WANT_GTK) |
36 |
+ |
|
37 |
|
dnl We use 64-bit file size support if possible. |
38 |
|
AC_SYS_LARGEFILE |
39 |
|
|
56 |
|
AC_TYPE_SIZE_T |
57 |
|
|
58 |
|
dnl Checks for library functions. |
59 |
< |
AC_CHECK_FUNCS(exp2f log2f exp2 log2 trunc) |
59 |
> |
AC_CHECK_FUNCS(strdup strerror) |
60 |
> |
AC_CHECK_FUNCS(exp2f log2f exp2 log2) |
61 |
> |
AC_CHECK_FUNCS(floorf roundf ceilf truncf) |
62 |
> |
AC_CHECK_FUNCS(floor round ceil trunc) |
63 |
|
|
64 |
|
dnl Define a macro that translates a yesno-variable into a C macro definition |
65 |
|
dnl to be put into the config.h file |
174 |
|
#endif |
175 |
|
], [AC_MSG_RESULT(yes); HAVE_GCC30=yes], AC_MSG_RESULT(no)) |
176 |
|
|
177 |
+ |
dnl Add -fno-strict-aliasing for slirp sources |
178 |
+ |
if [[ "x$HAVE_GCC30" = "xyes" ]]; then |
179 |
+ |
SAVED_CFLAGS="$CFLAGS" |
180 |
+ |
CFLAGS="$CFLAGS -fno-strict-aliasing" |
181 |
+ |
AC_CACHE_CHECK([whether the compiler supports -fno-strict-aliasing], |
182 |
+ |
ac_cv_gcc_no_strict_aliasing, [ |
183 |
+ |
AC_TRY_COMPILE([],[], |
184 |
+ |
[ac_cv_gcc_no_strict_aliasing=yes; AC_SUBST(SLIRP_CFLAGS, "-fno-strict-aliasing")], |
185 |
+ |
[ac_cv_gcc_no_strict_aliasing=no]) |
186 |
+ |
]) |
187 |
+ |
CFLAGS="$SAVED_CFLAGS" |
188 |
+ |
fi |
189 |
+ |
|
190 |
|
dnl CPU emulator sources |
191 |
|
CPUSRCS="\ |
192 |
|
../kpx_cpu/src/mathlib/ieeefp.cpp \ |
228 |
|
|
229 |
|
dnl We really want SDL for now |
230 |
|
AC_CHECK_TOOL(sdl_config, sdl-config, [AC_MSG_ERROR([Sorry, you currently need SDL for this port])]) |
231 |
< |
sdl_cflags=`$sdl_config --cflags` |
232 |
< |
sdl_libs=`$sdl_config --libs` |
233 |
< |
CFLAGS="$CFLAGS $sdl_cflags" |
234 |
< |
CXXFLAGS="$CXXFLAGS $sdl_cflags" |
209 |
< |
LIBS="$LIBS $sdl_libs" |
231 |
> |
SDL_CFLAGS=`$sdl_config --cflags` |
232 |
> |
AC_SUBST(SDL_CFLAGS) |
233 |
> |
SDL_LIBS=`$sdl_config --libs` |
234 |
> |
AC_SUBST(SDL_LIBS) |
235 |
|
AC_DEFINE(USE_SDL, 1, [Define to enble SDL support]) |
236 |
|
AC_DEFINE(USE_SDL_VIDEO, 1, [Define to enable SDL video graphics support]) |
237 |
|
AC_DEFINE(USE_SDL_AUDIO, 1, [Define to enable SDL audio support]) |
255 |
|
echo SheepShaver configuration summary: |
256 |
|
echo |
257 |
|
echo Enable JIT compiler .............. : $WANT_JIT |
258 |
+ |
echo GTK user interface ............... : $WANT_GTK |
259 |
|
echo |
260 |
|
echo "Configuration done. Now type \"make\"." |