test/configure

changeset 168
4cd9757c1ad9
parent 167
fa31a6d0ec56
child 169
a85cb6c4275d
equal deleted inserted replaced
167:fa31a6d0ec56 168:4cd9757c1ad9
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
278 exec_prefix=$exec_prefix 294 exec_prefix=$exec_prefix
279 libdir=$libdir 295 libdir=$libdir
280 HOST=$HOST 296 HOST=$HOST
281 __EOF__ 297 __EOF__
282 298
283 # toolchain detection utilities
284 . make/toolchain.sh
285 299
286 # 300 #
287 # DEPENDENCIES 301 # DEPENDENCIES
288 # 302 #
289 303
290 # check languages 304
291 lang_c=
292 lang_cpp=
293 if detect_cpp_compiler ; then
294 lang_cpp=1
295 fi
296 if detect_c_compiler ; then
297 lang_c=1
298 fi
299 305
300 # create buffer for make variables required by dependencies 306 # create buffer for make variables required by dependencies
301 echo > "$TEMP_DIR/make.mk" 307 echo > "$TEMP_DIR/make.mk"
302 308
303 test_pkg_config() 309 test_pkg_config()

mercurial