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 |
| 8 | # Jamfile |
| 9 | # install |
David Turner | dc47784 | 2002-01-08 18:34:11 +0000 | [diff] [blame] | 10 | # |
David Turner | d15bc0d | 2002-04-12 09:31:48 +0000 | [diff] [blame] | 11 | |
Werner Lemberg | f83ded0 | 2002-05-05 10:57:06 +0000 | [diff] [blame] | 12 | if test "x$GNUMAKE" = x; then |
David Turner | d15bc0d | 2002-04-12 09:31:48 +0000 | [diff] [blame] | 13 | GNUMAKE=make |
| 14 | fi |
| 15 | |
Werner Lemberg | f83ded0 | 2002-05-05 10:57:06 +0000 | [diff] [blame] | 16 | if test -z "`$GNUMAKE -v 2>/dev/null | grep GNU`"; then |
David Turner | d15bc0d | 2002-04-12 09:31:48 +0000 | [diff] [blame] | 17 | echo "Sorry, GNU make is required to build FreeType2." >&2 |
| 18 | echo "Please try \`GNUMAKE=<GNU make command name> $0'." >&2 |
| 19 | exit 1 |
| 20 | fi |
| 21 | |
Werner Lemberg | f83ded0 | 2002-05-05 10:57:06 +0000 | [diff] [blame] | 22 | # Uh, oh. This is taken from autoconf. They know what they are doing... |
| 23 | |
| 24 | if expr a : '\(a\)' >/dev/null 2>&1; then |
| 25 | ft_expr=expr |
| 26 | else |
| 27 | ft_expr=false |
| 28 | fi |
| 29 | |
| 30 | ft2_dir=`(dirname "$0") 2>/dev/null || |
| 31 | $ft_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
| 32 | X"$0" : 'X\(//\)[^/]' \| \ |
| 33 | X"$0" : 'X\(//\)$' \| \ |
| 34 | X"$0" : 'X\(/\)' \| \ |
| 35 | . : '\(.\)' 2>/dev/null || |
| 36 | echo X"$0" | |
| 37 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } |
| 38 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } |
| 39 | /^X\(\/\/\)$/{ s//\1/; q; } |
| 40 | /^X\(\/\).*/{ s//\1/; q; } |
| 41 | s/.*/./; q'` |
| 42 | |
| 43 | abs_curr_dir=`pwd` |
| 44 | abs_ft2_dir=`cd "$ft2_dir" && pwd` |
| 45 | |
| 46 | # build a dummy Makefile if we are not building in the source tree |
| 47 | |
| 48 | if test "$abs_curr_dir" != "$abs_ft2_dir"; then |
Werner Lemberg | 6aa35cd | 2003-07-09 15:20:32 +0000 | [diff] [blame^] | 49 | mkdir reference |
| 50 | echo "TOP_DIR=$abs_ft2_dir" > Makefile |
| 51 | echo "OBJ_DIR=$abs_curr_dir" >> Makefile |
| 52 | echo "OBJ_BUILD=$abs_curr_dir" >> Makefile |
| 53 | echo "DOC_DIR=$abs_curr_dir/reference" >> Makefile |
| 54 | echo "LIBTOOL=$abs_curr_dir/libtool" >> Makefile |
| 55 | echo "include $abs_ft2_dir/Makefile" >> Makefile |
Werner Lemberg | f83ded0 | 2002-05-05 10:57:06 +0000 | [diff] [blame] | 56 | fi |
| 57 | |
| 58 | # call make |
| 59 | |
David Turner | d15bc0d | 2002-04-12 09:31:48 +0000 | [diff] [blame] | 60 | CFG="$@" $GNUMAKE setup unix |
Werner Lemberg | f83ded0 | 2002-05-05 10:57:06 +0000 | [diff] [blame] | 61 | |
| 62 | # eof |