1198380dfa2a7f342d4e3cebd5ea8a8c8e87b52f
[reactos.git] / lib / freetype / configure
1 #!/bin/sh
2 #
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
10 #
11
12 if test "x$GNUMAKE" = x; then
13   GNUMAKE=make
14 fi
15
16 if test -z "`$GNUMAKE -v 2>/dev/null | grep GNU`"; then
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
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
49   echo "OBJ_DIR=$abs_curr_dir"          > Makefile
50   echo "TOP_DIR=$abs_ft2_dir"          >> Makefile
51   echo "OBJ_BUILD=$abs_curr_dir"       >> Makefile
52   echo "LIBTOOL=$abs_curr_dir/libtool" >> Makefile
53   echo "include $abs_ft2_dir/Makefile" >> Makefile
54 fi
55
56 # call make
57
58 CFG="$@" $GNUMAKE setup unix
59
60 # eof