|
|
|
@ -42,14 +42,11 @@ dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
|
case "$target" in
|
|
|
|
|
*cygwin* | *mingw32* | *mingw32msvc* )
|
|
|
|
|
CFLAGS="$CFLAGS"
|
|
|
|
|
LIBS="$LIBS -liberty -lwsock32"
|
|
|
|
|
MATHLIB=""
|
|
|
|
|
SYS_GL_LIBS="-lopengl32 -lglu32"
|
|
|
|
|
LIBS="$LIBS -liberty -lwsock32 -lm"
|
|
|
|
|
;;
|
|
|
|
|
*solaris* )
|
|
|
|
|
CFLAGS="$CFLAGS"
|
|
|
|
|
LIBS="$LIBS -lsocket -lnsl -lm"
|
|
|
|
|
MATHLIB="-lm"
|
|
|
|
|
AC_PATH_X
|
|
|
|
|
AC_PATH_XTRA
|
|
|
|
|
if test x$have_x = xyes; then
|
|
|
|
@ -60,49 +57,16 @@ case "$target" in
|
|
|
|
|
fi
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
MATHLIB="-lm"
|
|
|
|
|
AC_PATH_X
|
|
|
|
|
AC_PATH_XTRA
|
|
|
|
|
if test x$have_x = xyes; then
|
|
|
|
|
CFLAGS="$CFLAGS $X_CFLAGS"
|
|
|
|
|
SYS_GL_LIBS="$X_LIBS -lGL -lGLU"
|
|
|
|
|
else
|
|
|
|
|
SYS_GL_LIBS="-lGL -lGLU"
|
|
|
|
|
fi
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
CFLAGS="$CFLAGS -Wall"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AC_SUBST(MATHLIB)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl Check for OpenGL ***********************+
|
|
|
|
|
dnl AC_MSG_CHECKING(for OpenGL support)
|
|
|
|
|
dnl have_opengl=no
|
|
|
|
|
dnl AC_TRY_COMPILE([
|
|
|
|
|
dnl #if defined(__APPLE__) && defined(__MACH__)
|
|
|
|
|
dnl #include <OpenGL/gl.h>
|
|
|
|
|
dnl #include <OpenGL/glu.h>
|
|
|
|
|
dnl #else
|
|
|
|
|
dnl #include <GL/gl.h>
|
|
|
|
|
dnl #include <GL/glu.h>
|
|
|
|
|
dnl #endif
|
|
|
|
|
dnl ],[
|
|
|
|
|
dnl ],[
|
|
|
|
|
dnl have_opengl=yes
|
|
|
|
|
dnl ])
|
|
|
|
|
dnl AC_MSG_RESULT($have_opengl)
|
|
|
|
|
dnl if test x$have_opengl = xyes; then
|
|
|
|
|
dnl CFLAGS="$CFLAGS"
|
|
|
|
|
dnl LIBS="$LIBS $SYS_GL_LIBS"
|
|
|
|
|
dnl AC_DEFINE(HAVE_OPENGL, [1], [OpenGL Headers found])
|
|
|
|
|
dnl else
|
|
|
|
|
dnl AC_MSG_WARN(Unable to find OpenGL headers and libraries)
|
|
|
|
|
dnl fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl SDL_mixer **********************************
|
|
|
|
|
AC_ARG_WITH(sdlmixer-prefix, [ --with-sdlmixer-prefix=PFX prefix where SDL_mixer library is installed], sdlmixer_prefix="$withval", sdlmixer_prefix="")
|
|
|
|
@ -126,6 +90,74 @@ fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl Checks for library functions.
|
|
|
|
|
dnl Check for rintf and functions like that
|
|
|
|
|
AC_MSG_CHECKING(for rintf)
|
|
|
|
|
have_rintf=no
|
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
|
],[
|
|
|
|
|
int i; float f; i = rintf (f);
|
|
|
|
|
],[
|
|
|
|
|
have_rintf=yes
|
|
|
|
|
])
|
|
|
|
|
AC_MSG_RESULT($have_rintf)
|
|
|
|
|
if test x$have_rintf = xyes; then
|
|
|
|
|
AC_CHECK_LIB(m, rintf, have_rintf=yes, have_rintf=no , )
|
|
|
|
|
if test x$have_rintf = xyes; then
|
|
|
|
|
AC_DEFINE(HAVE_RINTF, [1], [if rintf is working here])
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl Check for rintf and functions like that
|
|
|
|
|
AC_MSG_CHECKING(for rint)
|
|
|
|
|
have_rint=no
|
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
|
],[
|
|
|
|
|
int i; double f; i = rint (f);
|
|
|
|
|
],[
|
|
|
|
|
have_rint=yes
|
|
|
|
|
])
|
|
|
|
|
AC_MSG_RESULT($have_rint)
|
|
|
|
|
if test x$have_rint = xyes; then
|
|
|
|
|
AC_CHECK_LIB(m, rint, have_rint=yes, have_rint=no , )
|
|
|
|
|
if test x$have_rint = xyes; then
|
|
|
|
|
AC_DEFINE(HAVE_RINT, [1], [if rint is working here])
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
dnl Check for floorf and functions like that
|
|
|
|
|
AC_MSG_CHECKING(for floorf)
|
|
|
|
|
have_floorf=no
|
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
|
],[
|
|
|
|
|
int i; float f; i = floorf (f);
|
|
|
|
|
],[
|
|
|
|
|
have_floorf=yes
|
|
|
|
|
])
|
|
|
|
|
AC_MSG_RESULT($have_floorf)
|
|
|
|
|
if test x$have_floorf = xyes; then
|
|
|
|
|
AC_CHECK_LIB(m, floorf, have_floorf=yes, have_floorf=no , )
|
|
|
|
|
if test x$have_floorf = xyes; then
|
|
|
|
|
AC_DEFINE(HAVE_FLOORF, [1], [if floorf is working here])
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
dnl Check for floorf and functions like that
|
|
|
|
|
AC_MSG_CHECKING(for floor)
|
|
|
|
|
have_floor=no
|
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
|
],[
|
|
|
|
|
int i; double f; i = floor (f);
|
|
|
|
|
],[
|
|
|
|
|
have_floor=yes
|
|
|
|
|
])
|
|
|
|
|
AC_MSG_RESULT($have_floor)
|
|
|
|
|
if test x$have_floor = xyes; then
|
|
|
|
|
AC_CHECK_LIB(m, floor, have_floor=yes, have_floor=no , )
|
|
|
|
|
if test x$have_floor = xyes; then
|
|
|
|
|
AC_DEFINE(HAVE_FLOOR, [1], [if floor is working here])
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl Checks for Additional stuffs.
|
|
|
|
|