* configure.ac: Define BUILD_LIBM to -lm on most platforms
and empty on haiku.
* grub-core/Makefile.am (gentrigtables): Use $(BUILD_LIBM) rather than
-lm.
+2013-10-18 Vladimir Serbinenko <phcoder@gmail.com>
+
+ Don't add -lm on haiku.
+
+ * configure.ac: Define BUILD_LIBM to -lm on most platforms
+ and empty on haiku.
+ * grub-core/Makefile.am (gentrigtables): Use $(BUILD_LIBM) rather than
+ -lm.
+
2013-10-18 Vladimir Serbinenko <phcoder@gmail.com>
* configure.ac: Use -melf_*_haiku as target on haiku.
test -z "$BUILD_CC" && AC_MSG_ERROR([none of gcc, egcs and cc is found. set BUILD_CC manually.])
BUILD_CPP="$BUILD_CC -E"
+case "$build_os" in
+ haiku*) BUILD_LIBM= ;;
+ *) BUILD_LIBM=-lm ;;
+esac
# For gnulib.
gl_INIT
AC_SUBST(HOST_CPPFLAGS)
AC_SUBST(HOST_CCASFLAGS)
+AC_SUBST(BUILD_LIBM)
+
# Set them to their new values for the tests below.
CC="$TARGET_CC"
if test "x$TARGET_APPLE_CC" = x1 ; then
# gentrigtables
gentrigtables: gentrigtables.c
- $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -lm
+ $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< $(BUILD_LIBM)
CLEANFILES += gentrigtables
# trigtables.c