104 "--localedir"*) localedir=${ARG#--localedir} ;; |
107 "--localedir"*) localedir=${ARG#--localedir} ;; |
105 "--help"*) printhelp; abort_configure ;; |
108 "--help"*) printhelp; abort_configure ;; |
106 "--debug") BUILD_TYPE="debug" ;; |
109 "--debug") BUILD_TYPE="debug" ;; |
107 "--release") BUILD_TYPE="release" ;; |
110 "--release") BUILD_TYPE="release" ;; |
108 "--with-docs="*) OPT_WITH_DOCS=${ARG#--with-docs=} ;; |
111 "--with-docs="*) OPT_WITH_DOCS=${ARG#--with-docs=} ;; |
|
112 "--enable-coverage") FEATURE_COVERAGE=on ;; |
|
113 "--disable-coverage") unset FEATURE_COVERAGE ;; |
109 "-"*) echo "unknown option: $ARG"; abort_configure ;; |
114 "-"*) echo "unknown option: $ARG"; abort_configure ;; |
110 esac |
115 esac |
111 done |
116 done |
112 |
117 |
113 |
118 |
249 if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then : |
254 if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then : |
250 else return 1 ; fi |
255 else return 1 ; fi |
251 return 0 |
256 return 0 |
252 } |
257 } |
253 |
258 |
|
259 dependency_error_coverage() |
|
260 { |
|
261 printf "checking for coverage... " |
|
262 # dependency coverage |
|
263 while true |
|
264 do |
|
265 TEMP_CFLAGS="$TEMP_CFLAGS --coverage" |
|
266 TEMP_LDFLAGS="$TEMP_LDFLAGS --coverage" |
|
267 echo yes |
|
268 return 1 |
|
269 done |
|
270 |
|
271 echo no |
|
272 return 0 |
|
273 } |
254 dependency_error_pandoc() |
274 dependency_error_pandoc() |
255 { |
275 { |
256 printf "checking for pandoc... " |
276 printf "checking for pandoc... " |
257 # dependency pandoc |
277 # dependency pandoc |
258 while true |
278 while true |
509 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED file_tools " |
529 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED file_tools " |
510 ERROR=1 |
530 ERROR=1 |
511 fi |
531 fi |
512 |
532 |
513 # Features |
533 # Features |
|
534 if [ -n "$FEATURE_COVERAGE" ]; then |
|
535 # check dependency |
|
536 if dependency_error_coverage ; then |
|
537 # "auto" features can fail and are just disabled in this case |
|
538 if [ "$FEATURE_COVERAGE" = "auto" ]; then |
|
539 DISABLE_FEATURE_COVERAGE=1 |
|
540 else |
|
541 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED coverage " |
|
542 ERROR=1 |
|
543 fi |
|
544 fi |
|
545 if [ -n "$DISABLE_FEATURE_COVERAGE" ]; then |
|
546 unset FEATURE_COVERAGE |
|
547 fi |
|
548 fi |
514 |
549 |
515 # Option: --with-docs |
550 # Option: --with-docs |
516 if [ -z "$OPT_WITH_DOCS" ]; then |
551 if [ -z "$OPT_WITH_DOCS" ]; then |
517 echo "auto-detecting option 'with-docs'" |
552 echo "auto-detecting option 'with-docs'" |
518 SAVED_ERROR="$ERROR" |
553 SAVED_ERROR="$ERROR" |
627 echo "Build Config:" |
662 echo "Build Config:" |
628 echo " PREFIX: $prefix" |
663 echo " PREFIX: $prefix" |
629 echo " TOOLCHAIN: $TOOLCHAIN_NAME" |
664 echo " TOOLCHAIN: $TOOLCHAIN_NAME" |
630 echo "Options:" |
665 echo "Options:" |
631 cat "$TEMP_DIR/options" |
666 cat "$TEMP_DIR/options" |
|
667 echo "Features:" |
|
668 if [ -n "$FEATURE_COVERAGE" ]; then |
|
669 echo " coverage: on" |
|
670 else |
|
671 echo " coverage: off" |
|
672 fi |
632 echo |
673 echo |
633 |
674 |
634 # generate the config.mk file |
675 # generate the config.mk file |
635 cat > "$TEMP_DIR/config.mk" << __EOF__ |
676 cat > "$TEMP_DIR/config.mk" << __EOF__ |
636 # |
677 # |