This commit is contained in:
2008-06-22 08:37:03 +00:00
parent 3bdaa3229d
commit 8e3a0e2c84
13 changed files with 68 additions and 89 deletions

View File

@ -59,8 +59,6 @@ fi
# Do we need libm for math functions?
AC_MSG_CHECKING([for libm math function in std libs])
OCFL="$CFLAGS"
CFLAGS="-Werror $CFLAGS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <math.h>
@ -69,11 +67,10 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
pow(x, x);
return 0;
]])],[needlibm=no],[needlibm=yes])
CFLAGS="$OCFL"
if test "$needlibm" = "yes"; then
AC_MSG_RESULT([no])
AC_CHECK_LIB([m], [pow],
LIBS="$LIBS -lm",
LIBM="-lm",
AC_MSG_ERROR([libm is needed and is not available]))
else
AC_MSG_RESULT([yes])
@ -283,6 +280,7 @@ AC_SUBST(JAR, $JAR_PATH)
AC_SUBST(BUILD_JNI, $BUILD_JNI)
AC_SUBST(CJFLAGS, $CJFLAGS)
AC_SUBST(BUILD_CJ, $BUILD_CJ)
AC_SUBST(LIBM, $LIBM)
AC_CONFIG_FILES([
makefile