3 # Copyright 2002, 2003, 2004, 2005, 2006 by
4 # David Turner, Robert Wilhelm, and Werner Lemberg.
6 # This file is part of the FreeType project, and may only be used, modified,
7 # and distributed under the terms of the FreeType project license,
8 # LICENSE.TXT. By continuing to use, modify, or distribute this file you
9 # indicate that you have read the license and understand and accept it
13 # Call the `configure' script located in `builds/unix'.
16 rm -f config.mk builds
/unix
/unix-def.mk builds
/unix
/unix-cc.mk
18 if test "x$GNUMAKE" = x
; then
22 if test -z "`$GNUMAKE -v 2>/dev/null | grep GNU`"; then
23 if test -z "`$GNUMAKE -v 2>/dev/null | grep makepp`"; then
24 echo "GNU make (>= 3.79.1) or makepp (>= 1.19) is required to build FreeType2." >&2
26 echo " \`GNUMAKE=<GNU make command name> $0'." >&2
28 echo " \`GNUMAKE=\"makepp --norc-substitution\" $0'." >&2
33 # Get `dirname' functionality. This is taken and adapted from autoconf's
34 # m4sh.m4 (_AS_EXPR_PREPARE, AS_DIRNAME_EXPR, and AS_DIRNAME_SED).
36 if expr a
: '\(a\)' >/dev
/null
2>&1; then
42 ft2_dir
=`(dirname "$0") 2>/dev/null ||
43 $ft_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
44 X"$0" : 'X\(//\)[^/]' \| \
45 X"$0" : 'X\(//\)$' \| \
47 . : '\(.\)' 2>/dev/null ||
49 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68 abs_ft2_dir
=`cd "$ft2_dir" && pwd`
70 # build a dummy Makefile if we are not building in the source tree
72 if test "$abs_curr_dir" != "$abs_ft2_dir"; then
74 echo "Copying \`modules.cfg'"
75 cp $abs_ft2_dir/modules.cfg
$abs_curr_dir
76 echo "Generating \`Makefile'"
77 echo "TOP_DIR := $abs_ft2_dir" > Makefile
78 echo "OBJ_DIR := $abs_curr_dir" >> Makefile
79 echo "OBJ_BUILD := \$(OBJ_DIR)" >> Makefile
80 echo "DOC_DIR := \$(OBJ_DIR)/reference" >> Makefile
81 echo "LIBTOOL := \$(OBJ_DIR)/libtool" >> Makefile
82 echo "ifndef FT2DEMOS" >> Makefile
83 echo " include \$(TOP_DIR)/Makefile" >> Makefile
84 echo "else" >> Makefile
85 echo " TOP_DIR_2 := \$(TOP_DIR)/../ft2demos" >> Makefile
86 echo " PROJECT := freetype" >> Makefile
87 echo " CONFIG_MK := \$(OBJ_DIR)/config.mk" >> Makefile
88 echo " include \$(TOP_DIR_2)/Makefile" >> Makefile
89 echo "endif" >> Makefile
95 for x
in ${1+"$@"}; do
98 CFG
=$CFG $GNUMAKE setup unix