Removing compiler warnings about unused portions of code. Now unix.in uses absolute paths also to overcome problems with libtool. To do that in a consistent way I had to modify the rules how to handle $OBJ_DIR (and consequently $LIB_DIR): You should set $OBJ_DIR explicitly on the command line (or environment).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
diff --git a/builds/unix/unix.in b/builds/unix/unix.in
index d5a0269..370cd1c 100644
--- a/builds/unix/unix.in
+++ b/builds/unix/unix.in
@@ -16,6 +16,7 @@
ifndef TOP
TOP := .
endif
+TOP := $(shell cd $(TOP); pwd)
DELETE := @RMF@
DELDIR := @RMDIR@
@@ -57,15 +58,16 @@ version_info := @version_info@
# The directory where all object files are placed.
#
-# Note that this is not $(TOP)/obj!
# This lets you build the library in your own directory with something like
#
# set TOP=.../path/to/freetype2/top/dir...
-# mkdir obj
+# set OBJ_DIR=.../path/to/obj/dir
# make -f $TOP/Makefile setup [options]
# make -f $TOP/Makefile
#
-OBJ_DIR := obj
+ifndef OBJ_DIR
+ OBJ_DIR := $(shell cd $(TOP)/obj; pwd)
+endif
# The directory where all library files are placed.
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index e9b87fa..6823cb1 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -659,7 +659,11 @@
FT_Error load_truetype_glyph( TT_Loader* loader,
FT_UInt glyph_index )
{
+
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
FT_Stream stream = loader->stream;
+#endif
+
FT_Error error;
TT_Face face = (TT_Face)loader->face;
FT_ULong offset;
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index 2ba715d..b477366 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -61,12 +61,15 @@
#define FT_COMPONENT trace_ttobjs
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+
/*************************************************************************/
/* */
/* GLYPH ZONE FUNCTIONS */
/* */
/*************************************************************************/
+
/*************************************************************************/
/* */
/* <Function> */
@@ -141,6 +144,8 @@
return error;
}
+#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+
/*************************************************************************/
/* */
diff --git a/src/truetype/ttobjs.h b/src/truetype/ttobjs.h
index 3e55de3..bb00d08 100644
--- a/src/truetype/ttobjs.h
+++ b/src/truetype/ttobjs.h
@@ -107,6 +107,8 @@
} TT_GraphicsState;
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+
LOCAL_DEF void TT_Done_GlyphZone( TT_GlyphZone* zone );
LOCAL_DEF FT_Error TT_New_GlyphZone( FT_Memory memory,
@@ -114,6 +116,8 @@
FT_Short maxContours,
TT_GlyphZone* zone );
+#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+
/*************************************************************************/
/* */