From e09db96ffa4f01ed6688a7d5cf0f15b47bd0acc4 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sat, 7 Jun 2008 16:18:54 -0300 Subject: [PATCH] Add HAVE_FPU_CONTROL_H, so compile does not fail on FreeBSD. --- config.hh.in | 3 +++ configure.in | 2 +- lily/main.cc | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config.hh.in b/config.hh.in index d7aca8f1f2..034e123d78 100644 --- a/config.hh.in +++ b/config.hh.in @@ -83,6 +83,9 @@ /* define if you have sys/stat.h */ #define HAVE_SYS_STAT_H 0 +/* define if you have fpu_control.h */ +#define HAVE_FPU_CONTROL_H 0 + /* define if you have sys/stat.h */ #define STAT_MACROS_BROKEN 0 diff --git a/configure.in b/configure.in index 38a7957081..8a193d0c6a 100644 --- a/configure.in +++ b/configure.in @@ -133,7 +133,7 @@ STEPMAKE_PATH_PROG(GHOSTSCRIPT, gs, OPTIONAL, 8.15) STEPMAKE_PATH_PROG(FONTFORGE, fontforge, REQUIRED, 20050624) -AC_CHECK_HEADERS([assert.h grp.h libio.h pwd.h sys/stat.h wchar.h]) +AC_CHECK_HEADERS([assert.h grp.h libio.h pwd.h sys/stat.h wchar.h fpu_control.h]) AC_LANG_PUSH(C++) AC_CHECK_HEADERS([sstream boost/lambda/lambda.hpp]) AC_LANG_POP(C++) diff --git a/lily/main.cc b/lily/main.cc index 6cb7f5e253..54e0aaa5be 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -172,7 +172,7 @@ char const *LILYPOND_DATADIR = PACKAGE_DATADIR "/" TOPLEVEL_VERSION; unpredictable places. To get around this, we tell the x87 FPU to use only double precision. Note that this is not needed for x86_64 because that uses the SSE unit by default instead of the x87 FPU. */ -#if defined(__x86__) || defined(__i386__) +#if (defined(__x86__) || defined(__i386__)) && defined(HAVE_FPU_CONTROL_H) #include static void configure_fpu() { -- 2.39.5