David Turner | dc47784 | 2002-01-08 18:34:11 +0000 | [diff] [blame] | 1 | #!/bin/sh |
David Turner | dc47784 | 2002-01-08 18:34:11 +0000 | [diff] [blame] | 2 | # |
Werner Lemberg | 3975e2e | 2002-01-09 21:01:18 +0000 | [diff] [blame] | 3 | # Call the 'configure' script located in 'builds/unix'. |
| 4 | # |
| 5 | # This should re-generate the following files: |
| 6 | # |
| 7 | # config.mk |
Werner Lemberg | 3975e2e | 2002-01-09 21:01:18 +0000 | [diff] [blame] | 8 | # install |
David Turner | dc47784 | 2002-01-08 18:34:11 +0000 | [diff] [blame] | 9 | # |
David Turner | d15bc0d | 2002-04-12 09:31:48 +0000 | [diff] [blame] | 10 | |
Werner Lemberg | f83ded0 | 2002-05-05 10:57:06 +0000 | [diff] [blame] | 11 | if test "x$GNUMAKE" = x; then |
David Turner | d15bc0d | 2002-04-12 09:31:48 +0000 | [diff] [blame] | 12 | GNUMAKE=make |
| 13 | fi |
| 14 | |
Werner Lemberg | f83ded0 | 2002-05-05 10:57:06 +0000 | [diff] [blame] | 15 | if test -z "`$GNUMAKE -v 2>/dev/null | grep GNU`"; then |
Werner Lemberg | 26eccb4 | 2004-04-13 08:35:05 +0000 | [diff] [blame] | 16 | if test -z "`$GNUMAKE -v 2>/dev/null | grep makepp`"; then |
| 17 | echo "GNU make (>= 3.79.1) or makepp (>= 1.19) is required to build FreeType2." >&2 |
| 18 | echo "Please try" >&2 |
| 19 | echo " \`GNUMAKE=<GNU make command name> $0'." >&2 |
| 20 | echo "or >&2" |
| 21 | echo " \`GNUMAKE=\"makepp --norc-substitution\" $0'." >&2 |
| 22 | exit 1 |
| 23 | fi |
David Turner | d15bc0d | 2002-04-12 09:31:48 +0000 | [diff] [blame] | 24 | fi |
| 25 | |
Werner Lemberg | f83ded0 | 2002-05-05 10:57:06 +0000 | [diff] [blame] | 26 | # Uh, oh. This is taken from autoconf. They know what they are doing... |
| 27 | |
| 28 | if expr a : '\(a\)' >/dev/null 2>&1; then |
| 29 | ft_expr=expr |
| 30 | else |
| 31 | ft_expr=false |
| 32 | fi |
| 33 | |
| 34 | ft2_dir=`(dirname "$0") 2>/dev/null || |
| 35 | $ft_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
| 36 | X"$0" : 'X\(//\)[^/]' \| \ |
| 37 | X"$0" : 'X\(//\)$' \| \ |
| 38 | X"$0" : 'X\(/\)' \| \ |
| 39 | . : '\(.\)' 2>/dev/null || |
| 40 | echo X"$0" | |
| 41 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } |
| 42 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } |
| 43 | /^X\(\/\/\)$/{ s//\1/; q; } |
| 44 | /^X\(\/\).*/{ s//\1/; q; } |
| 45 | s/.*/./; q'` |
| 46 | |
| 47 | abs_curr_dir=`pwd` |
| 48 | abs_ft2_dir=`cd "$ft2_dir" && pwd` |
| 49 | |
| 50 | # build a dummy Makefile if we are not building in the source tree |
| 51 | |
| 52 | if test "$abs_curr_dir" != "$abs_ft2_dir"; then |
Werner Lemberg | 6aa35cd | 2003-07-09 15:20:32 +0000 | [diff] [blame] | 53 | mkdir reference |
Werner Lemberg | a33bd86 | 2005-02-13 05:46:50 +0000 | [diff] [blame] | 54 | echo "TOP_DIR := $abs_ft2_dir" > Makefile |
| 55 | echo "OBJ_DIR := $abs_curr_dir" >> Makefile |
| 56 | echo "OBJ_BUILD := \$(OBJ_DIR)" >> Makefile |
| 57 | echo "DOC_DIR := \$(OBJ_DIR)/reference" >> Makefile |
| 58 | echo "LIBTOOL := \$(OBJ_DIR)/libtool" >> Makefile |
| 59 | echo "ifndef FT2DEMOS" >> Makefile |
| 60 | echo " include \$(TOP_DIR)/Makefile" >> Makefile |
| 61 | echo "else" >> Makefile |
| 62 | echo " TOP_DIR_2 := \$(TOP_DIR)/../ft2demos" >> Makefile |
| 63 | echo " PROJECT := freetype" >> Makefile |
| 64 | echo " CONFIG_MK := \$(OBJ_DIR)/config.mk" >> Makefile |
| 65 | echo " include \$(TOP_DIR_2)/Makefile" >> Makefile |
| 66 | echo "endif" >> Makefile |
Werner Lemberg | f83ded0 | 2002-05-05 10:57:06 +0000 | [diff] [blame] | 67 | fi |
| 68 | |
| 69 | # call make |
| 70 | |
David Turner | d15bc0d | 2002-04-12 09:31:48 +0000 | [diff] [blame] | 71 | CFG="$@" $GNUMAKE setup unix |
Werner Lemberg | f83ded0 | 2002-05-05 10:57:06 +0000 | [diff] [blame] | 72 | |
| 73 | # eof |