1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/modules/freetype2/configure Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,135 @@ 1.4 +#!/bin/sh 1.5 +# 1.6 +# Copyright 2002-2006, 2008-2010, 2013 by 1.7 +# David Turner, Robert Wilhelm, and Werner Lemberg. 1.8 +# 1.9 +# This file is part of the FreeType project, and may only be used, modified, 1.10 +# and distributed under the terms of the FreeType project license, 1.11 +# LICENSE.TXT. By continuing to use, modify, or distribute this file you 1.12 +# indicate that you have read the license and understand and accept it 1.13 +# fully. 1.14 +# 1.15 +# 1.16 +# Call the `configure' script located in `builds/unix'. 1.17 +# 1.18 + 1.19 +rm -f config.mk builds/unix/unix-def.mk builds/unix/unix-cc.mk 1.20 + 1.21 +# respect GNUMAKE environment variable for backwards compatibility 1.22 +if test "x$GNUMAKE" = x; then 1.23 + if test "x$MAKE" = x; then 1.24 + if test "x`make -v 2>/dev/null | egrep 'GNU|makepp'`" = x; then 1.25 + MAKE=gmake 1.26 + else 1.27 + MAKE=make 1.28 + fi 1.29 + fi 1.30 +else 1.31 + MAKE=$GNUMAKE 1.32 +fi 1.33 + 1.34 +if test "x`$MAKE -v 2>/dev/null | egrep 'GNU|makepp'`" = x; then 1.35 + echo "GNU make (>= 3.80) or makepp (>= 1.19) is required to build FreeType2." >&2 1.36 + echo "Please try" >&2 1.37 + echo >&2 1.38 + echo " MAKE=<GNU make command name> $0" >&2 1.39 + echo >&2 1.40 + echo "or" >&2 1.41 + echo >&2 1.42 + echo " MAKE=\"makepp --norc-substitution\" $0" >&2 1.43 + exit 1 1.44 +fi 1.45 + 1.46 +# Get `dirname' functionality. This is taken and adapted from autoconf's 1.47 +# m4sh.m4 (_AS_EXPR_PREPARE, AS_DIRNAME_EXPR, and AS_DIRNAME_SED). 1.48 + 1.49 +if expr a : '\(a\)' >/dev/null 2>&1; then 1.50 + ft_expr=expr 1.51 +else 1.52 + ft_expr=false 1.53 +fi 1.54 + 1.55 +ft2_dir=`(dirname "$0") 2>/dev/null || 1.56 + $ft_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 1.57 + X"$0" : 'X\(//\)[^/]' \| \ 1.58 + X"$0" : 'X\(//\)$' \| \ 1.59 + X"$0" : 'X\(/\)' \| \ 1.60 + . : '\(.\)' 2>/dev/null || 1.61 + echo X"$0" | 1.62 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 1.63 + s//\1/ 1.64 + q 1.65 + } 1.66 + /^X\(\/\/\)[^/].*/{ 1.67 + s//\1/ 1.68 + q 1.69 + } 1.70 + /^X\(\/\/\)$/{ 1.71 + s//\1/ 1.72 + q 1.73 + } 1.74 + /^X\(\/\).*/{ 1.75 + s//\1/ 1.76 + q 1.77 + } 1.78 + s/.*/./; q'` 1.79 + 1.80 +abs_curr_dir=`pwd` 1.81 +abs_ft2_dir=`cd "$ft2_dir" && pwd` 1.82 + 1.83 +# `--srcdir=' option can override abs_ft2_dir 1.84 + 1.85 +if test $# -gt 0; then 1.86 + for x in "$@"; do 1.87 + case x"$x" in 1.88 + x--srcdir=*) 1.89 + abs_ft2_dir=`echo $x | sed 's/^--srcdir=//'` ;; 1.90 + esac 1.91 + done 1.92 +fi 1.93 + 1.94 +# build a dummy Makefile if we are not building in the source tree; 1.95 +# we use inodes to avoid issues with symbolic links 1.96 +inode_src=`ls -id $abs_ft2_dir | awk '{print $1}'` 1.97 +inode_dst=`ls -id $abs_curr_dir | awk '{print $1}'` 1.98 + 1.99 +if test $inode_src -ne $inode_dst; then 1.100 + if test ! -d reference; then 1.101 + mkdir reference 1.102 + fi 1.103 + if test ! -r $abs_curr_dir/modules.cfg; then 1.104 + echo "Copying \`modules.cfg'" 1.105 + cp $abs_ft2_dir/modules.cfg $abs_curr_dir 1.106 + fi 1.107 + echo "Generating \`Makefile'" 1.108 + echo "TOP_DIR := $abs_ft2_dir" > Makefile 1.109 + echo "OBJ_DIR := $abs_curr_dir" >> Makefile 1.110 + echo "OBJ_BUILD := \$(OBJ_DIR)" >> Makefile 1.111 + echo "DOC_DIR := \$(OBJ_DIR)/reference" >> Makefile 1.112 + echo "FT_LIBTOOL_DIR := \$(OBJ_DIR)" >> Makefile 1.113 + echo "ifndef FT2DEMOS" >> Makefile 1.114 + echo " include \$(TOP_DIR)/Makefile" >> Makefile 1.115 + echo "else" >> Makefile 1.116 + echo " TOP_DIR_2 := \$(TOP_DIR)/../ft2demos" >> Makefile 1.117 + echo " PROJECT := freetype" >> Makefile 1.118 + echo " CONFIG_MK := \$(OBJ_DIR)/config.mk" >> Makefile 1.119 + echo " include \$(TOP_DIR_2)/Makefile" >> Makefile 1.120 + echo "endif" >> Makefile 1.121 +fi 1.122 + 1.123 +# call make 1.124 + 1.125 +CFG= 1.126 +# work around zsh bug which doesn't like `${1+"$@"}' 1.127 +case $# in 1.128 +0) ;; 1.129 +*) for x in "$@"; do 1.130 + case x"$x" in 1.131 + x--srcdir=* ) CFG="$CFG '$x'/builds/unix" ;; 1.132 + *) CFG="$CFG '$x'" ;; 1.133 + esac 1.134 + done ;; 1.135 +esac 1.136 +CFG=$CFG $MAKE setup unix 1.137 + 1.138 +# eof