- changing the default include path from "include/freetype" to "include/freetype2" - adding template for the "freetype-config" script that is installed in the "bin" directory. It is used to retrieve information about the current installation path, C flags & linker flags
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 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
diff --git a/builds/unix/configure b/builds/unix/configure
index 1b7fafe..7e7a01e 100644
--- a/builds/unix/configure
+++ b/builds/unix/configure
@@ -2302,7 +2302,7 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in ftconfig.h:ftconfig.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in freetype-config ftconfig.h:ftconfig.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -2404,7 +2404,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in"}
+CONFIG_FILES=\${CONFIG_FILES-"unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in freetype-config"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
diff --git a/builds/unix/configure.in b/builds/unix/configure.in
index 33b2f08..e77df6c 100644
--- a/builds/unix/configure.in
+++ b/builds/unix/configure.in
@@ -82,6 +82,6 @@ AM_PROG_LIBTOOL
dnl create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk'
dnl and 'builds/unix/unix-cc.mk' that will be used by the build system
dnl
-AC_OUTPUT(unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in)
+AC_OUTPUT(unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in freetype-config)
dnl end of configure.in
diff --git a/builds/unix/freetype-config.in b/builds/unix/freetype-config.in
new file mode 100644
index 0000000..0b2f0bd
--- /dev/null
+++ b/builds/unix/freetype-config.in
@@ -0,0 +1,81 @@
+#!/bin/sh
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec_prefix_set=no
+
+usage()
+{
+ cat <<EOF
+Usage: freetype-config [OPTIONS] [LIBRARIES]
+Options:
+ [--prefix[=DIR]]
+ [--exec-prefix[=DIR]]
+ [--version]
+ [--libs]
+ [--cflags]
+EOF
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1 1>&2
+fi
+
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix=*)
+ prefix=$optarg
+ if test $exec_prefix_set = no ; then
+ exec_prefix=$optarg
+ fi
+ ;;
+ --prefix)
+ echo_prefix=yes
+ ;;
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ exec_prefix_set=yes
+ ;;
+ --exec-prefix)
+ echo_exec_prefix=yes
+ ;;
+ --version)
+ echo @VERSION@
+ exit 0
+ ;;
+ --cflags)
+ echo_cflags=yes
+ ;;
+ --libs)
+ echo_libs=yes
+ ;;
+ *)
+ usage 1 1>&2
+ ;;
+ esac
+ shift
+done
+
+if test "$echo_prefix" = "yes"; then
+ echo $prefix
+fi
+if test "$echo_exec_prefix" = "yes"; then
+ echo $exec_prefix
+fi
+if test "$echo_cflags" = "yes"; then
+ cflags="-I@includedir@/freetype2"
+ echo $cflags $includes
+fi
+if test "$echo_libs" = "yes"; then
+ libs="-lfreetype"
+ echo -L@libdir@ $libs
+fi
+
+
diff --git a/builds/unix/install.mk b/builds/unix/install.mk
index 24037a3..fc8b399 100644
--- a/builds/unix/install.mk
+++ b/builds/unix/install.mk
@@ -15,34 +15,39 @@
# Unix installation and deinstallation targets.
install: $(PROJECT_LIBRARY)
- $(MKINSTALLDIRS) $(libdir) \
- $(includedir)/freetype/config \
- $(includedir)/freetype/internal \
- $(includedir)/freetype/cache
+ $(MKINSTALLDIRS) $(libdir) \
+ $(includedir)/freetype2/freetype/config \
+ $(includedir)/freetype2/freetype/internal \
+ $(includedir)/freetype2/freetype/cache \
+ $(bindir)
$(LIBTOOL) --mode=install $(INSTALL) $(PROJECT_LIBRARY) $(libdir)
- -for P in $(PUBLIC_H) ; do \
- $(INSTALL_DATA) $$P $(includedir)/freetype ; \
+ -for P in $(PUBLIC_H) ; do \
+ $(INSTALL_DATA) $$P $(includedir)/freetype2/freetype ; \
done
- -for P in $(BASE_H) ; do \
- $(INSTALL_DATA) $$P $(includedir)/freetype/internal ; \
+ -for P in $(BASE_H) ; do \
+ $(INSTALL_DATA) $$P $(includedir)/freetype2/freetype/internal ; \
done
- -for P in $(CONFIG_H) ; do \
- $(INSTALL_DATA) $$P $(includedir)/freetype/config ; \
+ -for P in $(CONFIG_H) ; do \
+ $(INSTALL_DATA) $$P $(includedir)/freetype2/freetype/config ; \
done
- -for P in $(CACHE_H) ; do \
- $(INSTALL_DATA) $$P $(includedir)/freetype/cache ; \
+ -for P in $(CACHE_H) ; do \
+ $(INSTALL_DATA) $$P $(includedir)/freetype2/freetype/cache ; \
done
+ $(INSTALL) -m a+x $(BUILD)/freetype-config $(bindir)/freetype-config
+
uninstall:
-$(LIBTOOL) --mode=uninstall $(RM) $(libdir)/lib$(PROJECT).$A
- -$(DELETE) $(includedir)/freetype/cache/*
- -$(DELDIR) $(includedir)/freetype/cache
- -$(DELETE) $(includedir)/freetype/config/*
- -$(DELDIR) $(includedir)/freetype/config
- -$(DELETE) $(includedir)/freetype/internal/*
- -$(DELDIR) $(includedir)/freetype/internal
- -$(DELETE) $(includedir)/freetype/*
- -$(DELDIR) $(includedir)/freetype
+ -$(DELETE) $(includedir)/freetype2/freetype/cache/*
+ -$(DELDIR) $(includedir)/freetype2/freetype/cache
+ -$(DELETE) $(includedir)/freetype2/freetype/config/*
+ -$(DELDIR) $(includedir)/freetype2/freetype/config
+ -$(DELETE) $(includedir)/freetype2/freetype/internal/*
+ -$(DELDIR) $(includedir)/freetype2/freetype/internal
+ -$(DELETE) $(includedir)/freetype2/freetype/*
+ -$(DELDIR) $(includedir)/freetype2/freetype
+ -$(DELDIR) $(includedir)/freetype2
+ -$(DELETE) $(bindir)/freetype-config
# Unix cleaning and distclean rules.
diff --git a/builds/unix/unix-def.in b/builds/unix/unix-def.in
index 12a1736..18a0320 100644
--- a/builds/unix/unix-def.in
+++ b/builds/unix/unix-def.in
@@ -33,12 +33,13 @@ INSTALL := @INSTALL@
INSTALL_DATA := @INSTALL_DATA@
MKINSTALLDIRS := $(BUILD)/mkinstalldirs
-DISTCLEAN += $(BUILD)/config.cache \
- $(BUILD)/config.log \
- $(BUILD)/config.status \
- $(BUILD)/unix-def.mk \
- $(BUILD)/unix-cc.mk \
- $(BUILD)/ftconfig.h \
+DISTCLEAN += $(BUILD)/config.cache \
+ $(BUILD)/config.log \
+ $(BUILD)/config.status \
+ $(BUILD)/unix-def.mk \
+ $(BUILD)/unix-cc.mk \
+ $(BUILD)/ftconfig.h \
+ $(BUILD)/freetype-config \
$(LIBTOOL)