| 192 "--disable-pg") unset FEATURE_PG ;; |
192 "--disable-pg") unset FEATURE_PG ;; |
| 193 "-"*) echo "unknown option: $ARG"; abort_configure ;; |
193 "-"*) echo "unknown option: $ARG"; abort_configure ;; |
| 194 esac |
194 esac |
| 195 done |
195 done |
| 196 |
196 |
| |
197 # toolchain detection utilities |
| |
198 . make/toolchain.sh |
| |
199 |
| |
200 # check languages |
| |
201 lang_c= |
| |
202 lang_cpp= |
| |
203 if detect_cpp_compiler ; then |
| |
204 lang_cpp=1 |
| |
205 fi |
| |
206 if detect_c_compiler ; then |
| |
207 lang_c=1 |
| |
208 fi |
| |
209 |
| 197 |
210 |
| 198 |
211 |
| 199 # set defaults for dir variables |
212 # set defaults for dir variables |
| 200 : ${exec_prefix:="$prefix"} |
213 : ${exec_prefix:="$prefix"} |
| 201 : ${bindir:='${exec_prefix}/bin'} |
214 : ${bindir:='${exec_prefix}/bin'} |
| 229 : ${includedir:='${prefix}/include'} |
242 : ${includedir:='${prefix}/include'} |
| 230 : ${infodir:='${datarootdir}/info'} |
243 : ${infodir:='${datarootdir}/info'} |
| 231 : ${mandir:='${datarootdir}/man'} |
244 : ${mandir:='${datarootdir}/man'} |
| 232 : ${localedir:='${datarootdir}/locale'} |
245 : ${localedir:='${datarootdir}/locale'} |
| 233 |
246 |
| |
247 |
| 234 # check if a config.site exists and load it |
248 # check if a config.site exists and load it |
| 235 if [ -n "$CONFIG_SITE" ]; then |
249 if [ -n "$CONFIG_SITE" ]; then |
| 236 # CONFIG_SITE may contain space separated file names |
250 # CONFIG_SITE may contain space separated file names |
| 237 for cs in $CONFIG_SITE; do |
251 for cs in $CONFIG_SITE; do |
| 238 printf "loading defaults from $cs... " |
252 printf "loading defaults from $cs... " |
| 249 echo ok |
263 echo ok |
| 250 else |
264 else |
| 251 # try to detect the correct libdir on our own, except it was changed by the user |
265 # try to detect the correct libdir on our own, except it was changed by the user |
| 252 if test "$libdir" = '${exec_prefix}/lib'; then |
266 if test "$libdir" = '${exec_prefix}/lib'; then |
| 253 if [ "$OS" = "SunOS" ]; then |
267 if [ "$OS" = "SunOS" ]; then |
| 254 test -d "${exec_prefix}/lib/64" && libdir='${exec_prefix}/lib/64' |
268 test -d "${exec_prefix}/lib/64" && test "$TOOLCHAIN_WSIZE" = "64" && libdir='${exec_prefix}/lib/64' |
| 255 else |
269 else |
| 256 # check if the standard libdir even exists |
270 # check if the standard libdir even exists |
| 257 if test -d "${exec_prefix}/lib" ; then |
271 if test -d "${exec_prefix}/lib" ; then |
| 258 : |
272 : |
| 259 else |
273 else |
| 260 # if it does not, maybe a lib32 exists |
274 # if it does not, maybe a lib32 exists |
| 261 test -d "${exec_prefix}/lib32" && libdir='${exec_prefix}/lib32' |
275 test -d "${exec_prefix}/lib32" && libdir='${exec_prefix}/lib32' |
| 262 fi |
276 fi |
| 263 # now check if there is a special 64bit libdir that we should use |
277 if [ "$TOOLCHAIN_WSIZE" = "64" ]; then |
| 264 for i in x86_64 ppc64 s390x aarch64 aarch64_be arm64 ; do |
278 # now check if there is a special 64bit libdir that we should use |
| 265 if [ $ARCH = $i ]; then |
279 for i in x86_64 ppc64 s390x aarch64 aarch64_be arm64 ; do |
| 266 test -d "${exec_prefix}/lib64" && libdir='${exec_prefix}/lib64' |
280 if [ $ARCH = $i ]; then |
| 267 break |
281 test -d "${exec_prefix}/lib64" && libdir='${exec_prefix}/lib64' |
| 268 fi |
282 break |
| 269 done |
283 fi |
| |
284 done |
| |
285 fi |
| 270 fi |
286 fi |
| 271 fi |
287 fi |
| 272 fi |
288 fi |
| 273 |
289 |
| 274 |
290 |