| 105 "--mandir"*) mandir=${ARG#--mandir} ;; |
103 "--mandir"*) mandir=${ARG#--mandir} ;; |
| 106 "--localedir"*) localedir=${ARG#--localedir} ;; |
104 "--localedir"*) localedir=${ARG#--localedir} ;; |
| 107 "--help"*) printhelp; abort_configure ;; |
105 "--help"*) printhelp; abort_configure ;; |
| 108 "--debug") BUILD_TYPE="debug" ;; |
106 "--debug") BUILD_TYPE="debug" ;; |
| 109 "--release") BUILD_TYPE="release" ;; |
107 "--release") BUILD_TYPE="release" ;; |
| 110 "--with-tests="*) OPT_WITH_TESTS=${ARG#--with-tests=} ;; |
|
| 111 "--with-docs="*) OPT_WITH_DOCS=${ARG#--with-docs=} ;; |
108 "--with-docs="*) OPT_WITH_DOCS=${ARG#--with-docs=} ;; |
| 112 "-"*) echo "unknown option: $ARG"; abort_configure ;; |
109 "-"*) echo "unknown option: $ARG"; abort_configure ;; |
| 113 esac |
110 esac |
| 114 done |
111 done |
| 115 |
112 |
| 468 fi |
427 fi |
| 469 |
428 |
| 470 # |
429 # |
| 471 # OPTION VALUES |
430 # OPTION VALUES |
| 472 # |
431 # |
| 473 checkopt_with_tests_yes() |
|
| 474 { |
|
| 475 VERR=0 |
|
| 476 if dependency_error_cpp ; then |
|
| 477 VERR=1 |
|
| 478 fi |
|
| 479 if dependency_error_cmake ; then |
|
| 480 VERR=1 |
|
| 481 fi |
|
| 482 if [ $VERR -ne 0 ]; then |
|
| 483 return 1 |
|
| 484 fi |
|
| 485 cat >> "$TEMP_DIR/make.mk" << __EOF__ |
|
| 486 WITH_TESTS=yes |
|
| 487 |
|
| 488 __EOF__ |
|
| 489 return 0 |
|
| 490 } |
|
| 491 checkopt_with_tests_no() |
|
| 492 { |
|
| 493 VERR=0 |
|
| 494 if [ $VERR -ne 0 ]; then |
|
| 495 return 1 |
|
| 496 fi |
|
| 497 return 0 |
|
| 498 } |
|
| 499 checkopt_with_docs_all() |
432 checkopt_with_docs_all() |
| 500 { |
433 { |
| 501 VERR=0 |
434 VERR=0 |
| 502 if dependency_error_pandoc ; then |
435 if dependency_error_pandoc ; then |
| 503 VERR=1 |
436 VERR=1 |
| 577 ERROR=1 |
510 ERROR=1 |
| 578 fi |
511 fi |
| 579 |
512 |
| 580 # Features |
513 # Features |
| 581 |
514 |
| 582 # Option: --with-tests |
|
| 583 if [ -z "$OPT_WITH_TESTS" ]; then |
|
| 584 echo "auto-detecting option 'with-tests'" |
|
| 585 SAVED_ERROR="$ERROR" |
|
| 586 SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED" |
|
| 587 ERROR=1 |
|
| 588 while true |
|
| 589 do |
|
| 590 if checkopt_with_tests_yes ; then |
|
| 591 echo " with-tests: yes" >> "$TEMP_DIR/options" |
|
| 592 ERROR=0 |
|
| 593 break |
|
| 594 fi |
|
| 595 if checkopt_with_tests_no ; then |
|
| 596 echo " with-tests: no" >> "$TEMP_DIR/options" |
|
| 597 ERROR=0 |
|
| 598 break |
|
| 599 fi |
|
| 600 break |
|
| 601 done |
|
| 602 if [ $ERROR -ne 0 ]; then |
|
| 603 SAVED_ERROR=1 |
|
| 604 SAVED_DEPENDENCIES_FAILED="option 'with-tests' $SAVED_DEPENDENCIES_FAILED" |
|
| 605 fi |
|
| 606 ERROR="$SAVED_ERROR" |
|
| 607 DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED" |
|
| 608 else |
|
| 609 echo "checking option with-tests = $OPT_WITH_TESTS" |
|
| 610 if false; then |
|
| 611 false |
|
| 612 elif [ "$OPT_WITH_TESTS" = "yes" ]; then |
|
| 613 echo " with-tests: $OPT_WITH_TESTS" >> $TEMP_DIR/options |
|
| 614 if checkopt_with_tests_yes ; then |
|
| 615 : |
|
| 616 else |
|
| 617 ERROR=1 |
|
| 618 DEPENDENCIES_FAILED="option 'with-tests' $DEPENDENCIES_FAILED" |
|
| 619 fi |
|
| 620 elif [ "$OPT_WITH_TESTS" = "no" ]; then |
|
| 621 echo " with-tests: $OPT_WITH_TESTS" >> $TEMP_DIR/options |
|
| 622 if checkopt_with_tests_no ; then |
|
| 623 : |
|
| 624 else |
|
| 625 ERROR=1 |
|
| 626 DEPENDENCIES_FAILED="option 'with-tests' $DEPENDENCIES_FAILED" |
|
| 627 fi |
|
| 628 fi |
|
| 629 fi |
|
| 630 # Option: --with-docs |
515 # Option: --with-docs |
| 631 if [ -z "$OPT_WITH_DOCS" ]; then |
516 if [ -z "$OPT_WITH_DOCS" ]; then |
| 632 echo "auto-detecting option 'with-docs'" |
517 echo "auto-detecting option 'with-docs'" |
| 633 SAVED_ERROR="$ERROR" |
518 SAVED_ERROR="$ERROR" |
| 634 SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED" |
519 SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED" |