automake tools are working again..

origin
steffen 10 years ago
parent 665c98b759
commit 4e6ea958b9

@ -4,5 +4,5 @@ aclocal
autoheader autoheader
autoconf autoconf
automake --add-missing automake --add-missing
./configure

@ -15,12 +15,12 @@ AC_PROG_CC
AM_PROG_CC_STDC AM_PROG_CC_STDC
AC_HEADER_STDC AC_HEADER_STDC
AC_C_INLINE AC_C_INLINE
AC_FUNC_VPRINTF AC_FUNC_VPRINTF
AC_CHECK_FUNCS(vsnprintf) AC_CHECK_FUNCS(vsnprintf)
dnl Checks for programs. dnl Checks for programs.
dnl Checks for libraries. dnl Checks for libraries.
dnl Check for SDL dnl Check for SDL
AM_PATH_SDL(1.1.0, AM_PATH_SDL(1.1.0,
@ -28,13 +28,12 @@ dnl Check for SDL
AC_MSG_ERROR(SDL not found. Make sure sdl-config is in your PATH, or specify with --with-sdl-prefix) AC_MSG_ERROR(SDL not found. Make sure sdl-config is in your PATH, or specify with --with-sdl-prefix)
) )
CFLAGS="$SDL_CFLAGS $CFLAGS" CFLAGS="$SDL_CFLAGS $CFLAGS -I../include"
SDL_LIBS="$SDL_LIBS -lpng -ljpeg" SDL_LIBS="$SDL_LIBS -lpng -ljpeg"
LIBS="$SDL_LIBS $LIBS" LIBS="$SDL_LIBS $LIBS"
dnl Checks for header files. dnl Checks for header files.
dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for typedefs, structures, and compiler characteristics.
case "$target" in case "$target" in
*cygwin* | *mingw32* | *mingw32msvc* ) *cygwin* | *mingw32* | *mingw32msvc* )
@ -63,26 +62,7 @@ case "$target" in
;; ;;
esac esac
AC_CHECK_LIB([m],[cos])
dnl Debug ************************************
AC_ARG_ENABLE(debug, [ --disable-debug Disable Debuging ])
if test x$enable_debug = xno ; then
CFLAGS="$CFLAGS"
else
CFLAGS="$CFLAGS -ggdb -O0"
LDFLAGS="$LDFLAGS -ggdb"
AC_MSG_WARN(Enable Debuging)
fi
dnl All Warning are Errors ************************
AC_ARG_ENABLE(werror, [ --disable-werror Disable Warning as Error Treatment ])
if test x$enable_werror = xno ; then
CFLAGS="$CFLAGS -Wall"
AC_MSG_WARN(Disable Warning as Error Treatment)
else
CFLAGS="$CFLAGS -Wall -Werror"
fi
dnl SDL_image library ***************************** dnl SDL_image library *****************************
AC_CHECK_LIB(SDL_image, IMG_LoadPNG_RW, , AC_MSG_ERROR([ AC_CHECK_LIB(SDL_image, IMG_LoadPNG_RW, , AC_MSG_ERROR([
@ -115,8 +95,6 @@ else
fi fi
fi fi
dnl Checks for library functions. dnl Checks for library functions.
dnl Check for rintf and functions like that dnl Check for rintf and functions like that
AC_MSG_CHECKING(for rintf) AC_MSG_CHECKING(for rintf)
@ -124,20 +102,13 @@ have_rintf=no
AC_TRY_COMPILE([ AC_TRY_COMPILE([
#include <math.h> #include <math.h>
],[ ],[
int i; float f; i = rintf (f); int i; float f = 0.0; i = rintf (f); i++;
],[ ],[
have_rintf=yes have_rintf=yes
]) ])
AC_MSG_RESULT($have_rintf) AC_MSG_RESULT($have_rintf)
if test x$have_rintf = xno; then
dnl AC_CHECK_LIB([m],[cos])
AC_CHECK_LIB(m, rintf, have_rintf=yes, have_rintf=no , )
fi
if test x$have_rintf = xyes; then if test x$have_rintf = xyes; then
AC_DEFINE(HAVE_RINTF, [1], [if rintf is working here]) AC_DEFINE(HAVE_RINTF, [1], [if rintf is working here])
else
AC_MSG_WARN([*** something wrong with libm????? ])
fi fi
@ -148,14 +119,11 @@ have_rint=no
AC_TRY_COMPILE([ AC_TRY_COMPILE([
#include <math.h> #include <math.h>
],[ ],[
int i; double f; i = rint (f); int i; double f = 0.0; i = rint (f); i++;
],[ ],[
have_rint=yes have_rint=yes
]) ])
AC_MSG_RESULT($have_rint) AC_MSG_RESULT($have_rint)
if test x$have_rint = xno; then
AC_CHECK_LIB(m, rint, have_rint=yes, have_rint=no , )
fi
if test x$have_rint = xyes; then if test x$have_rint = xyes; then
AC_DEFINE(HAVE_RINT, [1], [if rint is working here]) AC_DEFINE(HAVE_RINT, [1], [if rint is working here])
@ -169,14 +137,11 @@ have_powf=no
AC_TRY_COMPILE([ AC_TRY_COMPILE([
#include <math.h> #include <math.h>
],[ ],[
float i; float f = 2; float j = 2; i = powf (f,j); float i; float f = 2.0; float j = 2.0; i = powf (f,j); i = i + 1.0;
],[ ],[
have_powf=yes have_powf=yes
]) ])
AC_MSG_RESULT($have_powf) AC_MSG_RESULT($have_powf)
if test x$have_powf = xno; then
AC_CHECK_LIB(m, powf, have_powf=yes, have_powf=no , )
fi
if test x$have_powf = xyes; then if test x$have_powf = xyes; then
AC_DEFINE(HAVE_POWF, [1], [if powf is working here]) AC_DEFINE(HAVE_POWF, [1], [if powf is working here])
@ -188,14 +153,11 @@ have_sqrtf=no
AC_TRY_COMPILE([ AC_TRY_COMPILE([
#include <math.h> #include <math.h>
],[ ],[
float i; float f = 2; i = sqrtf (f); float i; float f = 2.0; i = sqrtf (f); i = i + 1.0;
],[ ],[
have_sqrtf=yes have_sqrtf=yes
]) ])
AC_MSG_RESULT($have_sqrtf) AC_MSG_RESULT($have_sqrtf)
if test x$have_sqrtf = xno; then
AC_CHECK_LIB(m, sqrtf, have_sqrtf=yes, have_sqrtf=no , )
fi
if test x$have_sqrtf = xyes; then if test x$have_sqrtf = xyes; then
AC_DEFINE(HAVE_SQRTF, [1], [if sqrtf is working here]) AC_DEFINE(HAVE_SQRTF, [1], [if sqrtf is working here])
@ -208,21 +170,37 @@ have_floorf=no
AC_TRY_COMPILE([ AC_TRY_COMPILE([
#include <math.h> #include <math.h>
],[ ],[
int i; float f; i = floorf (f); int i = 0; float f = 1.0; i = i + floorf (f);
],[ ],[
have_floorf=yes have_floorf=yes
]) ])
AC_MSG_RESULT($have_floorf) AC_MSG_RESULT($have_floorf)
if test x$have_floorf = xno; then
AC_CHECK_LIB(m, floorf, have_floorf=yes, have_floorf=no , )
fi
if test x$have_floorf = xyes; then if test x$have_floorf = xyes; then
AC_DEFINE(HAVE_FLOORF, [1], [if floorf is working here]) AC_DEFINE(HAVE_FLOORF, [1], [if floorf is working here])
fi fi
dnl Checks for Additional stuffs. dnl Checks for Additional stuffs.
dnl Debug ************************************
AC_ARG_ENABLE(debug, [ --disable-debug Disable Debuging ])
if test x$enable_debug = xno ; then
CFLAGS="$CFLAGS"
else
CFLAGS="$CFLAGS -ggdb -O0"
LDFLAGS="$LDFLAGS -ggdb"
AC_MSG_WARN(Enable Debuging)
fi
dnl All Warning are Errors ************************
AC_ARG_ENABLE(werror, [ --disable-werror Disable Warning as Error Treatment ])
if test x$enable_werror = xno ; then
CFLAGS="$CFLAGS -Wall"
AC_MSG_WARN(Disable Warning as Error Treatment)
else
CFLAGS="$CFLAGS -Wall -Werror"
fi
dnl Set PACKAGE SOURCE DIR in config.h. dnl Set PACKAGE SOURCE DIR in config.h.

Loading…
Cancel
Save