source: psi/vendor/affinix/current/configure@ 44

Last change on this file since 44 was 2, checked in by dmik, 19 years ago

Imported original Psi 0.10 sources from Affinix

File size: 26.5 KB
RevLine 
[2]1#!/bin/sh
2#
3# Generated by qconf 1.2-CVS ( http://delta.affinix.com/qconf/ )
4#
5
6show_usage() {
7cat <<EOT
8Usage: $0 [OPTION]...
9
10This script creates necessary configuration files to build/install.
11
12Main options:
13 --prefix=[path] Base path for build/install. Default: /usr/local
14 --bindir=[path] Directory for binaries. Default: PREFIX/bin
15 --datadir=[path] Directory for data. Default: PREFIX/share
16 --qtdir=[path] Directory where Qt is installed.
17 --debug Enable debug output.
18 --help This help text.
19
20Dependency options:
21 --with-qca-inc=[path] Path to QCA include files
22 --with-qca-lib=[path] Path to QCA library files
23 --with-zlib-inc=[path] Path to zlib include files
24 --with-zlib-lib=[path] Path to zlib library files
25 --disable-growl Disable use of Growl
26 --with-growl=[path] Path to the Growl framework
27 --disable-xss Disable use of the XScreenSaver extension
28 --disable-dnotify Disable use of Linux Directory Notification
29 --disable-ghbnr Disable use of gethostbyname_r()
30
31EOT
32}
33
34# which/make detection adapted from Qt
35which_command() {
36 OLD_HOME=$HOME
37 HOME=/dev/null
38 export HOME
39
40 WHICH=`which which 2>/dev/null`
41 if echo $WHICH | grep 'shell built-in command' >/dev/null 2>&1; then
42 WHICH=which
43 elif [ -z "$WHICH" ]; then
44 if which which >/dev/null 2>&1; then
45 WHICH=which
46 else
47 for a in /usr/ucb /usr/bin /bin /usr/local/bin; do
48 if [ -x $a/which ]; then
49 WHICH=$a/which
50 break;
51 fi
52 done
53 fi
54 fi
55
56 if [ -z "$WHICH" ]; then
57 OLD_IFS=$IFS
58 IFS=:
59 for a in $PATH; do
60 if [ -x $a/$1 ]; then
61 echo "$a/$1"
62 IFS=$OLD_IFS
63 export IFS
64 HOME=$OLD_HOME
65 export HOME
66 return 0
67 fi
68 done
69 IFS=$OLD_IFS
70 export IFS
71 else
72 a=`"$WHICH" "$1" 2>/dev/null`
73 if [ ! -z "$a" -a -x "$a" ]; then
74 echo "$a"
75 HOME=$OLD_HOME
76 export HOME
77 return 0
78 fi
79 fi
80 HOME=$OLD_HOME
81 export HOME
82 return 1
83}
84WHICH=which_command
85
86# find a make command
87if [ -z "$MAKE" ]; then
88 MAKE=
89 for mk in gmake make; do
90 if $WHICH $mk >/dev/null 2>&1; then
91 MAKE=`$WHICH $mk`
92 break
93 fi
94 done
95 if [ -z "$MAKE" ]; then
96 echo "You don't seem to have 'make' or 'gmake' in your PATH."
97 echo "Cannot proceed."
98 exit 1
99 fi
100fi
101
102show_qt_info() {
103 printf "Be sure you have a proper Qt 4.0 build environment set up. This means not\n"
104 printf "just Qt, but also a C++ compiler, a make tool, and any other packages\n"
105 printf "necessary for compiling C++ programs.\n"
106 printf "\n"
107 printf "If you are certain everything is installed, then it could be that Qt 4 is not\n"
108 printf "being recognized or that a different version of Qt is being detected by\n"
109 printf "mistake (for example, this could happen if \$QTDIR is pointing to a Qt 3\n"
110 printf "installation). At least one of the following conditions must be satisfied:\n"
111 printf "\n"
112 printf " 1) --qtdir is set to the location of Qt\n"
113 printf " 2) \$QTDIR is set to the location of Qt\n"
114 printf " 3) QtCore is in the pkg-config database\n"
115 printf " 4) qmake is in the \$PATH\n"
116 printf "\n"
117 printf "This script will use the first one it finds to be true, checked in the above\n"
118 printf "order. #3 and #4 are the recommended options. #1 and #2 are mainly for\n"
119 printf "overriding the system configuration.\n"
120 printf "\n"
121}
122
123while [ $# -gt 0 ]; do
124 case "$1" in
125 --prefix=*)
126 PREFIX="${1#--prefix=}"
127 shift
128 ;;
129
130 --bindir=*)
131 BINDIR="${1#--bindir=}"
132 shift
133 ;;
134
135 --datadir=*)
136 DATADIR="${1#--datadir=}"
137 shift
138 ;;
139
140 --qtdir=*)
141 EX_QTDIR="${1#--qtdir=}"
142 shift
143 ;;
144
145 --with-qca-inc=*)
146 QC_WITH_QCA_INC="${1#--with-qca-inc=}"
147 shift
148 ;;
149
150 --with-qca-lib=*)
151 QC_WITH_QCA_LIB="${1#--with-qca-lib=}"
152 shift
153 ;;
154
155 --with-zlib-inc=*)
156 QC_WITH_ZLIB_INC="${1#--with-zlib-inc=}"
157 shift
158 ;;
159
160 --with-zlib-lib=*)
161 QC_WITH_ZLIB_LIB="${1#--with-zlib-lib=}"
162 shift
163 ;;
164
165 --disable-growl)
166 QC_DISABLE_growl="Y"
167 shift
168 ;;
169
170 --with-growl=*)
171 QC_WITH_GROWL="${1#--with-growl=}"
172 shift
173 ;;
174
175 --disable-xss)
176 QC_DISABLE_xss="Y"
177 shift
178 ;;
179
180 --disable-dnotify)
181 QC_DISABLE_dnotify="Y"
182 shift
183 ;;
184
185 --disable-ghbnr)
186 QC_DISABLE_ghbnr="Y"
187 shift
188 ;;
189
190 --debug)
191 QC_DEBUG="Y"
192 shift
193 ;;
194 --help) show_usage; exit ;;
195 *) show_usage; exit ;;
196 esac
197done
198
199PREFIX=${PREFIX:-/usr/local}
200BINDIR=${BINDIR:-$PREFIX/bin}
201DATADIR=${DATADIR:-$PREFIX/share}
202
203echo "Configuring Psi ..."
204
205if [ "$QC_DEBUG" = "Y" ]; then