This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user