update for HEAD-2003050101
[reactos.git] / lib / freetype / builds / unix / freetype-config.in
1 #! /bin/sh
2
3 prefix=@prefix@
4 exec_prefix=@exec_prefix@
5
6 usage()
7 {
8   cat <<EOF
9 Usage: freetype-config [OPTIONS] [LIBRARIES]
10 Options:
11  [--prefix[=DIR]]
12  [--exec-prefix[=DIR]]
13  [--version]
14  [--libs]
15  [--libtool]
16  [--cflags]
17 EOF
18   exit $1
19 }
20
21 if test $# -eq 0 ; then
22   usage 1 1>&2
23 fi
24
25 while test $# -gt 0 ; do
26   case "$1" in
27   -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
28   *) optarg= ;;
29   esac
30
31   case $1 in
32   --prefix=*)
33     prefix=$optarg
34     local_prefix=yes
35     ;;
36   --prefix)
37     echo_prefix=yes
38     ;;
39   --exec-prefix=*)
40     exec_prefix=$optarg
41     exec_prefix_set=yes
42     local_prefix=yes
43     ;;
44   --exec-prefix)
45     echo_exec_prefix=yes
46     ;;
47   --version)
48     echo @ft_version@
49     exit 0
50     ;;
51   --cflags)
52     echo_cflags=yes
53     ;;
54   --libs)
55     echo_libs=yes
56     ;;
57   --libtool)
58     echo_libtool=yes
59     ;;
60   *)
61     usage 1 1>&2
62     ;;
63   esac
64   shift
65 done
66
67 if test "$local_prefix" = "yes" ; then
68     if test "$exec_prefix_set" != "yes" ; then
69       exec_prefix=$prefix
70     fi
71 fi
72
73 if test "$echo_prefix" = "yes" ; then
74  echo $prefix
75 fi
76
77 if test "$echo_exec_prefix" = "yes" ; then
78  echo $exec_prefix
79 fi
80
81 if test "$echo_cflags" = "yes" ; then
82  cflags="-I@includedir@/freetype2"
83  if test "@includedir@" != "/usr/include" ; then
84   echo -I@includedir@ $cflags
85  else
86   echo $cflags
87  fi
88 fi
89
90 if test "$echo_libs" = "yes" ; then
91  libs="-lfreetype @LIBZ@"
92  if test "@libdir@" != "/usr/lib" ; then
93   echo -L@libdir@ $libs
94  else
95   echo $libs
96  fi
97 fi
98
99 if test "$echo_libtool" = "yes" ; then
100  convlib="libfreetype.la"
101  echo @libdir@/$convlib
102 fi
103
104 # EOF