configure

changeset 796
fec90b848f4b
parent 788
b34ff44e6433
child 815
b0c4750cecd8
equal deleted inserted replaced
795:00ba1bfa4ab4 796:fec90b848f4b
254 if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then : 254 if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then :
255 else return 1 ; fi 255 else return 1 ; fi
256 return 0 256 return 0
257 } 257 }
258 258
259 print_check_msg()
260 {
261 if [ -z "$1" ]; then
262 shift
263 printf "$@"
264 fi
265 }
266
259 dependency_error_coverage() 267 dependency_error_coverage()
260 { 268 {
261 printf "checking for coverage... " 269 print_check_msg "$dep_checked_coverage" "checking for coverage... "
262 # dependency coverage 270 # dependency coverage
263 while true 271 while true
264 do 272 do
265 TEMP_CFLAGS="$TEMP_CFLAGS \${COVERAGE_CFLAGS}" 273 TEMP_CFLAGS="$TEMP_CFLAGS \${COVERAGE_CFLAGS}"
266 TEMP_LDFLAGS="$TEMP_LDFLAGS \${COVERAGE_LDFLAGS}" 274 TEMP_LDFLAGS="$TEMP_LDFLAGS \${COVERAGE_LDFLAGS}"
267 echo yes 275 print_check_msg "$dep_checked_coverage" "yes\n"
268 return 1 276 dep_checked_coverage=1
269 done 277 return 1
270 278 done
271 echo no 279
280 print_check_msg "$dep_checked_coverage" "no\n"
281 dep_checked_coverage=1
272 return 0 282 return 0
273 } 283 }
274 dependency_error_pandoc() 284 dependency_error_pandoc()
275 { 285 {
276 printf "checking for pandoc... " 286 print_check_msg "$dep_checked_pandoc" "checking for pandoc... "
277 # dependency pandoc 287 # dependency pandoc
278 while true 288 while true
279 do 289 do
280 if test -n "$PANDOC" > /dev/null ; then 290 if test -n "$PANDOC" > /dev/null ; then
281 : 291 :
282 else 292 else
283 break 293 break
284 fi 294 fi
285 echo yes 295 print_check_msg "$dep_checked_pandoc" "yes\n"
286 return 1 296 dep_checked_pandoc=1
287 done 297 return 1
288 298 done
289 echo no 299
300 print_check_msg "$dep_checked_pandoc" "no\n"
301 dep_checked_pandoc=1
290 return 0 302 return 0
291 } 303 }
292 dependency_error_c() 304 dependency_error_c()
293 { 305 {
294 printf "checking for c... " 306 print_check_msg "$dep_checked_c" "checking for c... "
295 # dependency c platform="mingw" 307 # dependency c platform="mingw"
296 while true 308 while true
297 do 309 do
298 if notisplatform "mingw"; then 310 if notisplatform "mingw"; then
299 break 311 break
307 ARFLAGS=r 319 ARFLAGS=r
308 STLIB_EXT=.lib 320 STLIB_EXT=.lib
309 SHLIB_EXT=.dll 321 SHLIB_EXT=.dll
310 322
311 __EOF__ 323 __EOF__
312 echo yes 324 print_check_msg "$dep_checked_c" "yes\n"
325 dep_checked_c=1
313 return 1 326 return 1
314 done 327 done
315 328
316 # dependency c platform="macos" 329 # dependency c platform="macos"
317 while true 330 while true
328 ARFLAGS=r 341 ARFLAGS=r
329 STLIB_EXT=.a 342 STLIB_EXT=.a
330 SHLIB_EXT=.dylib 343 SHLIB_EXT=.dylib
331 344
332 __EOF__ 345 __EOF__
333 echo yes 346 print_check_msg "$dep_checked_c" "yes\n"
347 dep_checked_c=1
334 return 1 348 return 1
335 done 349 done
336 350
337 # dependency c platform="unix" 351 # dependency c platform="unix"
338 while true 352 while true
349 ARFLAGS=r 363 ARFLAGS=r
350 STLIB_EXT=.a 364 STLIB_EXT=.a
351 SHLIB_EXT=.so 365 SHLIB_EXT=.so
352 366
353 __EOF__ 367 __EOF__
354 echo yes 368 print_check_msg "$dep_checked_c" "yes\n"
355 return 1 369 dep_checked_c=1
356 done 370 return 1
357 371 done
358 echo no 372
373 print_check_msg "$dep_checked_c" "no\n"
374 dep_checked_c=1
359 return 0 375 return 0
360 } 376 }
361 dependency_error_file_tools() 377 dependency_error_file_tools()
362 { 378 {
363 printf "checking for file-tools... " 379 print_check_msg "$dep_checked_file_tools" "checking for file-tools... "
364 # dependency file-tools 380 # dependency file-tools
365 while true 381 while true
366 do 382 do
367 cat >> $TEMP_DIR/make.mk << __EOF__ 383 cat >> $TEMP_DIR/make.mk << __EOF__
368 # Dependency: file-tools 384 # Dependency: file-tools
372 COPYFILE=/bin/cp -f 388 COPYFILE=/bin/cp -f
373 COPYALL=/bin/cp -f -R 389 COPYALL=/bin/cp -f -R
374 SYMLINK=/bin/ln -s 390 SYMLINK=/bin/ln -s
375 391
376 __EOF__ 392 __EOF__
377 echo yes 393 print_check_msg "$dep_checked_file_tools" "yes\n"
378 return 1 394 dep_checked_file_tools=1
379 done 395 return 1
380 396 done
381 echo no 397
398 print_check_msg "$dep_checked_file_tools" "no\n"
399 dep_checked_file_tools=1
382 return 0 400 return 0
383 } 401 }
384 dependency_error_doxygen() 402 dependency_error_doxygen()
385 { 403 {
386 printf "checking for doxygen... " 404 print_check_msg "$dep_checked_doxygen" "checking for doxygen... "
387 # dependency doxygen 405 # dependency doxygen
388 while true 406 while true
389 do 407 do
390 if test -n "$DOXYGEN" > /dev/null ; then 408 if test -n "$DOXYGEN" > /dev/null ; then
391 : 409 :
392 else 410 else
393 break 411 break
394 fi 412 fi
395 echo yes 413 print_check_msg "$dep_checked_doxygen" "yes\n"
396 return 1 414 dep_checked_doxygen=1
397 done 415 return 1
398 416 done
399 echo no 417
400 return 0 418 print_check_msg "$dep_checked_doxygen" "no\n"
401 } 419 dep_checked_doxygen=1
402 420 return 0
403 421 }
404
405 422
406 # start collecting dependency information 423 # start collecting dependency information
407 echo > "$TEMP_DIR/flags.mk" 424 echo > "$TEMP_DIR/flags.mk"
408 425
409 DEPENDENCIES_FAILED= 426 DEPENDENCIES_FAILED=
682 write_toolchain_defaults "$TEMP_DIR/toolchain.mk" 699 write_toolchain_defaults "$TEMP_DIR/toolchain.mk"
683 cat "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk 700 cat "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk
684 rm -Rf "$TEMP_DIR" 701 rm -Rf "$TEMP_DIR"
685 702
686 703
704

mercurial