Index: mscore/poppler/goo/gtypes.h
===================================================================
--- mscore/poppler/goo/gtypes.h	(リビジョン 3999)
+++ mscore/poppler/goo/gtypes.h	(作業コピー)
@@ -24,6 +24,8 @@
 #ifndef GTYPES_H
 #define GTYPES_H
 
+#include <sys/types.h>
+
 /*
  * These have stupid names to avoid conflicts with some (but not all)
  * C++ compilers which define them.
Index: mscore/mscore/capella.cpp
===================================================================
--- mscore/mscore/capella.cpp	(リビジョン 3999)
+++ mscore/mscore/capella.cpp	(作業コピー)
@@ -44,6 +44,9 @@
 #include "layoutbreak.h"
 #include "dynamics.h"
 #include "barline.h"
+#ifndef __GLIBC__
+#define log2(x) (log((x))/log(2.0))
+#endif /* __GLIBC__ */
 
 //---------------------------------------------------------
 //   errmsg
Index: mscore/mscore/measure.cpp
===================================================================
--- mscore/mscore/measure.cpp	(リビジョン 3999)
+++ mscore/mscore/measure.cpp	(作業コピー)
@@ -79,6 +79,9 @@
 #include "fret.h"
 #include "stafftype.h"
 #include "tablature.h"
+#ifndef __GLIBC__
+#define log2(x) (log((x))/log(2.0))
+#endif /* __GLIBC__ */
 
 //---------------------------------------------------------
 //   MStaff
Index: mscore/mscore/CMakeLists.txt
===================================================================
--- mscore/mscore/CMakeLists.txt	(リビジョン 3999)
+++ mscore/mscore/CMakeLists.txt	(作業コピー)
@@ -67,7 +67,7 @@
       script.h articulation.h metaedit.h magbox.h voiceselector.h
       text.h sccursor.h dynamics.h undo.h textproperties.h
       slurproperties.h selectdialog.h synthcontrol.h drumroll.h pianoroll.h
-      piano.h ruler.h
+      piano.h ruler.h select.h
       pianoview.h drumview.h splitstaff.h scoretab.h keyedit.h keycanvas.h harmonyedit.h
       harmonycanvas.h updatechecker.h fret.h fretcanvas.h editstafftype.h
       prefsdialog.h layoutbreak.h hairpin.h bend.h bendcanvas.h tremolobar.h tremolobarcanvas.h
@@ -301,7 +301,7 @@
       ${QTSINGLEAPPLICATION_LIBRARIES}
       fluid
       z
-      dl
+      ${CMAKE_DL_LIBS}
       )
 
    if (NOT APPLE)
@@ -385,7 +385,9 @@
       ${ui_headers}
       genft.cpp
       )
-   target_link_libraries(genft al ${QT_LIBRARIES} -lfreetype )
+   find_package(Freetype REQUIRED)
+   include_directories(${FREETYPE_INCLUDE_DIRS})
+   target_link_libraries(genft al ${QT_LIBRARIES} ${FREETYPE_LIBRARY})
    set_target_properties(genft
       PROPERTIES COMPILE_FLAGS "-I/usr/include/freetype2"
       )
Index: mscore/CMakeLists.txt
===================================================================
--- mscore/CMakeLists.txt	(リビジョン 3999)
+++ mscore/CMakeLists.txt	(作業コピー)
@@ -164,11 +164,11 @@
 ## alsa >= 1.0.0
 ##
 
-if (APPLE OR MINGW)
+if (APPLE OR MINGW OR NOT Linux)
 	message("Disabling ALSA support due to OS X or MINGW build.")
       set (USE_ALSA 0)
       set (HAS_MIDI 1)
-else (APPLE OR MINGW)
+else (APPLE OR MINGW OR NOT Linux)
       PKGCONFIG (alsa 1.0.0 ALSA_INCDIR ALSA_LIBDIR ALSA_LIB ALSA_CPP )
       if (NOT ALSA_INCDIR)
             message(FATAL_ERROR "Fatal error: ALSA >= 1.0.0 required")
@@ -177,7 +177,7 @@
             set (USE_ALSA 1)
             set (HAS_MIDI 1)
       endif (NOT ALSA_INCDIR)
-endif (APPLE OR MINGW)
+endif (APPLE OR MINGW OR NOT Linux)
 
 
 ##
@@ -447,13 +447,13 @@
 
 add_custom_target(lupdate
    COMMAND ${PROJECT_SOURCE_DIR}/gen-qt-projectfile ${PROJECT_SOURCE_DIR} > mscore.pro
-   COMMAND lupdate -noobsolete ${PROJECT_BINARY_DIR}/mscore.pro
+   COMMAND ${QT_LUPDATE_EXECUTABLE} -noobsolete ${PROJECT_BINARY_DIR}/mscore.pro
    WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
    )
 
 add_custom_target(lrelease
    COMMAND ${PROJECT_SOURCE_DIR}/gen-qt-projectfile ${PROJECT_SOURCE_DIR} > mscore.pro
-   COMMAND lrelease ${PROJECT_SOURCE_DIR}/share/locale/*.ts
+   COMMAND ${QT_LRELEASE_EXECUTABLE} ${PROJECT_SOURCE_DIR}/share/locale/*.ts
    WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
    )
 
Index: mscore/awl/denomspinbox.cpp
===================================================================
--- mscore/awl/denomspinbox.cpp	(リビジョン 3999)
+++ mscore/awl/denomspinbox.cpp	(作業コピー)
@@ -19,6 +19,9 @@
 //=============================================================================
 
 #include "denomspinbox.h"
+#ifndef __GLIBC__
+#define log2(x) (log((x))/log(2.0))
+#endif /* __GLIBC__ */
 
 namespace Awl {
 
Index: mscore/aeolus/aeolus/global.h
===================================================================
--- mscore/aeolus/aeolus/global.h	(リビジョン 3999)
+++ mscore/aeolus/aeolus/global.h	(作業コピー)
@@ -22,13 +22,20 @@
 #define __GLOBAL_H
 
 
+#if defined(__APPLE__) || defined(Q_OS_BSD4)
+#include <machine/endian.h>
 #ifdef __APPLE__
-#include <machine/endian.h>
 #define __LITTLE_ENDIAN	__DARWIN_LITTLE_ENDIAN
 #define __BIG_ENDIAN	__DARWIN_BIG_ENDIAN
 #define __PDP_ENDIAN	__DARWIN_PDP_ENDIAN
 #define	__BYTE_ORDER	__DARWIN_BYTE_ORDER
 #else
+#define __LITTLE_ENDIAN	_LITTLE_ENDIAN
+#define __BIG_ENDIAN	_BIG_ENDIAN
+#define __PDP_ENDIAN	_PDP_ENDIAN
+#define __BYTE_ORDER	_BYTE_ORDER
+#endif /* __APPLE__ */
+#else
 #ifdef __MINGW32__
 #define __BYTE_ORDER __LITTLE_ENDIAN
 #else
