test/configure2

changeset 168
4cd9757c1ad9
parent 167
fa31a6d0ec56
child 169
a85cb6c4275d
equal deleted inserted replaced
167:fa31a6d0ec56 168:4cd9757c1ad9
231 "--disable-gui") unset FEATURE_GUI ;; 231 "--disable-gui") unset FEATURE_GUI ;;
232 "-"*) echo "unknown option: $ARG"; abort_configure ;; 232 "-"*) echo "unknown option: $ARG"; abort_configure ;;
233 esac 233 esac
234 done 234 done
235 235
236 # toolchain detection utilities
237 . make/toolchain.sh
238
239 # check languages
240 lang_c=
241 lang_cpp=
242 if detect_c_compiler ; then
243 lang_c=1
244 fi
245
236 246
237 247
238 # set defaults for dir variables 248 # set defaults for dir variables
239 : ${exec_prefix:="$prefix"} 249 : ${exec_prefix:="$prefix"}
240 : ${bindir:='${exec_prefix}/bin'} 250 : ${bindir:='${exec_prefix}/bin'}
268 : ${includedir:='${prefix}/include'} 278 : ${includedir:='${prefix}/include'}
269 : ${infodir:='${datarootdir}/info'} 279 : ${infodir:='${datarootdir}/info'}
270 : ${mandir:='${datarootdir}/man'} 280 : ${mandir:='${datarootdir}/man'}
271 : ${localedir:='${datarootdir}/locale'} 281 : ${localedir:='${datarootdir}/locale'}
272 282
283
273 # check if a config.site exists and load it 284 # check if a config.site exists and load it
274 if [ -n "$CONFIG_SITE" ]; then 285 if [ -n "$CONFIG_SITE" ]; then
275 # CONFIG_SITE may contain space separated file names 286 # CONFIG_SITE may contain space separated file names
276 for cs in $CONFIG_SITE; do 287 for cs in $CONFIG_SITE; do
277 printf "loading defaults from $cs... " 288 printf "loading defaults from $cs... "
288 echo ok 299 echo ok
289 else 300 else
290 # try to detect the correct libdir on our own, except it was changed by the user 301 # try to detect the correct libdir on our own, except it was changed by the user
291 if test "$libdir" = '${exec_prefix}/lib'; then 302 if test "$libdir" = '${exec_prefix}/lib'; then
292 if [ "$OS" = "SunOS" ]; then 303 if [ "$OS" = "SunOS" ]; then
293 test -d "${exec_prefix}/lib/64" && libdir='${exec_prefix}/lib/64' 304 test -d "${exec_prefix}/lib/64" && test "$TOOLCHAIN_WSIZE" = "64" && libdir='${exec_prefix}/lib/64'
294 else 305 else
295 # check if the standard libdir even exists 306 # check if the standard libdir even exists
296 if test -d "${exec_prefix}/lib" ; then 307 if test -d "${exec_prefix}/lib" ; then
297 : 308 :
298 else 309 else
299 # if it does not, maybe a lib32 exists 310 # if it does not, maybe a lib32 exists
300 test -d "${exec_prefix}/lib32" && libdir='${exec_prefix}/lib32' 311 test -d "${exec_prefix}/lib32" && libdir='${exec_prefix}/lib32'
301 fi 312 fi
302 # now check if there is a special 64bit libdir that we should use 313 if [ "$TOOLCHAIN_WSIZE" = "64" ]; then
303 for i in x86_64 ppc64 s390x aarch64 aarch64_be arm64 ; do 314 # now check if there is a special 64bit libdir that we should use
304 if [ $ARCH = $i ]; then 315 for i in x86_64 ppc64 s390x aarch64 aarch64_be arm64 ; do
305 test -d "${exec_prefix}/lib64" && libdir='${exec_prefix}/lib64' 316 if [ $ARCH = $i ]; then
306 break 317 test -d "${exec_prefix}/lib64" && libdir='${exec_prefix}/lib64'
307 fi 318 break
308 done 319 fi
320 done
321 fi
309 fi 322 fi
310 fi 323 fi
311 fi 324 fi
312 325
313 326
321 libdatadir=$libdatadir 334 libdatadir=$libdatadir
322 SRCDIR=$SRCDIR 335 SRCDIR=$SRCDIR
323 TOOLKIT_HOME=$TOOLKIT_HOME 336 TOOLKIT_HOME=$TOOLKIT_HOME
324 __EOF__ 337 __EOF__
325 338
326 # toolchain detection utilities
327 . make/toolchain.sh
328 339
329 # 340 #
330 # DEPENDENCIES 341 # DEPENDENCIES
331 # 342 #
332 343
333 # check languages 344
334 lang_c=
335 lang_cpp=
336 if detect_c_compiler ; then
337 lang_c=1
338 fi
339 345
340 # create buffer for make variables required by dependencies 346 # create buffer for make variables required by dependencies
341 echo > "$TEMP_DIR/make.mk" 347 echo > "$TEMP_DIR/make.mk"
342 348
343 test_pkg_config() 349 test_pkg_config()

mercurial