13 |
|
|
14 |
|
dnl Checks for programs. |
15 |
|
AC_PROG_CC |
16 |
– |
AC_PROG_CXX |
16 |
|
AC_PROG_CPP |
17 |
+ |
AC_PROG_CXX |
18 |
|
AC_PROG_MAKE_SET |
19 |
|
AC_PROG_INSTALL |
20 |
|
|
77 |
|
if [[ "x$ac_cv_func_sem_init" = "xno" ]]; then |
78 |
|
AC_CHECK_LIB(posix4, sem_init, HAVE_LIBPOSIX4=yes, HAVE_LIBPOSIX4=no) |
79 |
|
if [[ "x$HAVE_LIBPOSIX4" = "xno" ]]; then |
80 |
< |
dnl Checks for the existance of semget |
81 |
< |
AC_CHECK_FUNCS(semget) |
82 |
< |
if [[ "x$ac_cv_func_semget" = "xno" ]]; then |
83 |
< |
AC_MSG_ERROR([You need POSIX.4 semaphores to run Basilisk II.]) |
84 |
< |
else |
85 |
< |
SEMSRCS="posix_sem.cpp" |
86 |
< |
fi |
80 |
> |
dnl Emulate semaphores with pthread mutexes |
81 |
> |
SEMSRCS="posix_sem.cpp" |
82 |
|
else |
83 |
|
LIBS="$LIBS -lposix4" |
84 |
|
fi |
183 |
|
#endif |
184 |
|
], [AC_MSG_RESULT(yes); HAVE_I386=yes], AC_MSG_RESULT(no)) |
185 |
|
|
186 |
< |
dnl Check for GAS |
186 |
> |
dnl Check for GAS. |
187 |
|
HAVE_GAS=no |
188 |
|
AC_MSG_CHECKING(for GAS .p2align feature) |
189 |
|
cat >conftest.S << EOF |
193 |
|
if $CC conftest.S -c -o conftest.o >/dev/null 2>&1 ; then HAVE_GAS=yes; fi |
194 |
|
AC_MSG_RESULT($HAVE_GAS) |
195 |
|
|
196 |
< |
dnl Check for GCC 2.7 or higher |
196 |
> |
dnl Check for GCC 2.7 or higher. |
197 |
|
HAVE_GCC27=no |
198 |
|
AC_MSG_CHECKING(for GCC 2.7 or higher) |
199 |
|
AC_EGREP_CPP(yes, |
202 |
|
#endif |
203 |
|
], [AC_MSG_RESULT(yes); HAVE_GCC27=yes], AC_MSG_RESULT(no)) |
204 |
|
|
205 |
< |
dnl Set "-fomit-frame-pointer" on GCC |
205 |
> |
dnl Set "-fomit-frame-pointer" on GCC. |
206 |
|
if [[ "x$HAVE_GCC27" = "xyes" ]]; then |
207 |
|
CFLAGS="$CFLAGS -fomit-frame-pointer" |
208 |
|
CXXFLAGS="$CXXFLAGS -fomit-frame-pointer" |
209 |
|
fi |
210 |
|
|
211 |
< |
dnl Select appropriate CPU source and REGPARAM define |
211 |
> |
dnl Select appropriate CPU source and REGPARAM define. |
212 |
|
if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]]; then |
213 |
|
DEFINES="$DEFINES -DREGPARAM=\"__attribute__((regparm(3)))\"" |
214 |
|
if [[ "x$HAVE_GAS" = "xyes" ]]; then |
221 |
|
CPUSRCS="$CPUSRCS cpuemu.cpp" |
222 |
|
fi |
223 |
|
|
224 |
< |
dnl Generate Makefile |
224 |
> |
dnl Generate Makefile. |
225 |
|
AC_SUBST(DEFINES) |
226 |
|
AC_SUBST(STATICLIBS) |
227 |
|
AC_SUBST(SYSSRCS) |