> Attached you can find a quick patch that I used to make it work (more
> or less).

Oops, here's the patch.

Another issue: I think `base' and `test' must be reversed, at least in
`runme.sh': `base' is the old, previous version and `test' the current
one...

And I forgot to mention that later on FreeType's
`builds/unix/configure.ac' script must be extended with checks for
`-ldl'.  For `-lpng', etc. there are already tests available.


    Werner
diff --git a/tests/make_png/Makefile b/tests/make_png/Makefile
index b742dbff7..b82b6aeb3 100644
--- a/tests/make_png/Makefile
+++ b/tests/make_png/Makefile
@@ -1,22 +1,30 @@
 # Define required macros here
 
-SHELL = /bin/sh
+all: sprite
+
+# Load the upper level configuration makefile snippet to get the lib
+# directory and other configuration stuff.
+#
+# Note that `unix-def.mk' is generated by the `configure' script; to make
+# the code below work it is expected that you called `make install' in the
+# upper level.
+TOP_DIR := ../..
+BUILD_DIR := $(TOP_DIR)/builds/unix
+include $(TOP_DIR)/builds/unix/unix-def.mk
 
 SRC_SPRITE = make_sprite.c bitmap.c murmur3.c
 
-SRC_LIB = ./base/lib/libfreetype.a
+SRC_LIB = $(libdir)/libfreetype.a
 OBJS = $(src:.c=.o)
 
 CFLAGS = -Wall -g
 CC = gcc
-INCLUDE = -I ./base/include/freetype2/
+INCLUDE = -I$(includedir)/freetype2
 LIBS = -lpng -lharfbuzz -lbz2 -ldl
 
 DPI = 72
 
-all: sprite
-
-sprite:$(SRC_SPRITE)
+sprite: $(SRC_SPRITE)
 	$(CC) $(CFLAGS) $(INCLUDE) -DDPI=$(DPI) -o $@  $(SRC_SPRITE) $(SRC_LIB) $(OBJS) $(LIBS)
 
 .PHONY: clean
diff --git a/tests/make_png/runme.sh b/tests/make_png/runme.sh
index 9761ad7a2..41f4ca116 100644
--- a/tests/make_png/runme.sh
+++ b/tests/make_png/runme.sh
@@ -4,27 +4,38 @@ BASE_DIR=$PWD
 cd $TEST_DIR/include/freetype/config/
 sed -i 's/\/\* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING \*\//#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING /g' ftoption.h
 
+echo
+echo
+echo "*** building test FreeType in $TEST_DIR *** "
 cd $TEST_DIR
 ./autogen.sh
-./configure --prefix=$BASE_DIR/test/
+./configure --prefix=$BASE_DIR/test/ --disable-static
 make 
 make install 
 
+echo
+echo
+echo "*** building base FreeType in $BASE_DIR *** "
 cd $BASE_DIR/../..
 ./autogen.sh
 ./configure --prefix=$BASE_DIR/base/
 make 
 make install
 
+echo
+echo
+echo "*** building \`sprite' test program *** "
 cd $BASE_DIR
 make
 
-BASE_LIB=./base/lib/libfreetype.so
-TEST_LIB=./test/lib/libfreetype.so
+BASE_LIB=./base/lib64/libfreetype.so
+TEST_LIB=./test/lib64/libfreetype.so
 
 FONT_FILE=$2
 PT_SIZE=$3
 RENDER_MODE=$4
 
+echo
+echo
+echo "*** executing ./sprite $BASE_LIB $TEST_LIB $FONT_FILE $PT_SIZE $RENDER_MODE ***"
 ./sprite $BASE_LIB $TEST_LIB $FONT_FILE $PT_SIZE $RENDER_MODE
-
_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to