config.lib
changeset 10335 d5a435c1e98d
parent 9278 9d3a631e14c1
child 10388 e21a5b763f76
equal deleted inserted replaced
10334:3702a2908e09 10335:d5a435c1e98d
   417 		exit 1
   417 		exit 1
   418 	fi
   418 	fi
   419 
   419 
   420 	detect_awk
   420 	detect_awk
   421 
   421 
       
   422 	detect_os
       
   423 
   422 	check_build
   424 	check_build
   423 	check_host
   425 	check_host
   424 
       
   425 	detect_os
       
   426 
   426 
   427 # We might enable universal builds always on OSX targets.. but currently we don't
   427 # We might enable universal builds always on OSX targets.. but currently we don't
   428 #	if [ "$enable_universal" = "1" ]  && [ "$os" != "OSX" ]; then
   428 #	if [ "$enable_universal" = "1" ]  && [ "$os" != "OSX" ]; then
   429 	if [ "$enable_universal" = "1" ]; then
   429 	if [ "$enable_universal" = "1" ]; then
   430 		enable_universal="0"
   430 		enable_universal="0"
  1345 		log 1 "checking $1... $machine"
  1345 		log 1 "checking $1... $machine"
  1346 	fi
  1346 	fi
  1347 }
  1347 }
  1348 
  1348 
  1349 check_build() {
  1349 check_build() {
  1350 	check_compiler "build system type" "cc_build" "$build" "$cc_build" "$CC" "gcc" "cc" "0" "-dumpmachine"
  1350 	if [ "$os" = "FREEBSD" ]; then
       
  1351 		# FreeBSD's C compiler does not support dump machine.
       
  1352 		# However, removing C support is not possible because PSP must be linked with the C compiler.
       
  1353 		check_compiler "build system type" "cc_build" "$build" "$cc_build" "$CXX" "g++" "c++" "0" "-dumpmachine"
       
  1354 	else
       
  1355 		check_compiler "build system type" "cc_build" "$build" "$cc_build" "$CC" "gcc" "cc" "0" "-dumpmachine"
       
  1356 	fi
  1351 }
  1357 }
  1352 
  1358 
  1353 check_host() {
  1359 check_host() {
  1354 	# By default the host is the build
  1360 	# By default the host is the build
  1355 	if [ -z "$host" ]; then host="$build"; fi
  1361 	if [ -z "$host" ]; then host="$build"; fi
  1356 	check_compiler "host system type" "cc_host" "$host" "$cc_host" "$CC" "gcc" "cc" "0" "-dumpmachine"
  1362 
       
  1363 	if [ "$os" = "FREEBSD" ]; then
       
  1364 		# FreeBSD's C compiler does not support dump machine.
       
  1365 		# However, removing C support is not possible because PSP must be linked with the C compiler.
       
  1366 		check_compiler "host system type" "cc_host" "$host" "$cc_host" "$CXX" "g++" "c++" "0" "-dumpmachine"
       
  1367 	else
       
  1368 		check_compiler "host system type" "cc_host" "$host" "$cc_host" "$CC" "gcc" "cc" "0" "-dumpmachine"
       
  1369 	fi
  1357 }
  1370 }
  1358 
  1371 
  1359 check_cxx_build() {
  1372 check_cxx_build() {
  1360 	check_compiler "build c++" "cxx_build" "$build" "$cxx_build" "$CXX" "g++" "c++" 1 "-dumpmachine"
  1373 	check_compiler "build c++" "cxx_build" "$build" "$cxx_build" "$CXX" "g++" "c++" 1 "-dumpmachine"
  1361 }
  1374 }