85 "--sharedstatedir="*) SHAREDSTATEDIR=${ARG#--sharedstatedir=} ;; |
92 "--sharedstatedir="*) SHAREDSTATEDIR=${ARG#--sharedstatedir=} ;; |
86 "--localstatedir="*) LOCALSTATEDIR=${ARG#--localstatedir=} ;; |
93 "--localstatedir="*) LOCALSTATEDIR=${ARG#--localstatedir=} ;; |
87 "--includedir="*) INCLUDEDIR=${ARG#--includedir=} ;; |
94 "--includedir="*) INCLUDEDIR=${ARG#--includedir=} ;; |
88 "--infodir="*) INFODIR=${ARG#--infodir=} ;; |
95 "--infodir="*) INFODIR=${ARG#--infodir=} ;; |
89 "--mandir"*) MANDIR=${ARG#--mandir} ;; |
96 "--mandir"*) MANDIR=${ARG#--mandir} ;; |
90 "--help"*) printhelp; rm -Rf "$TEMP_DIR"; exit 1 ;; |
97 "--help"*) printhelp; abort_configure ;; |
91 "--debug") BUILD_TYPE="debug" ;; |
98 "--debug") BUILD_TYPE="debug" ;; |
92 "--release") BUILD_TYPE="release" ;; |
99 "--release") BUILD_TYPE="release" ;; |
93 "--toolkit="*) OPT_TOOLKIT=${ARG#--toolkit=} ;; |
100 "--toolkit="*) OPT_TOOLKIT=${ARG#--toolkit=} ;; |
94 "--enable-db") FEATURE_DB=on ;; |
101 "--enable-db") FEATURE_DB=on ;; |
95 "--disable-db") unset FEATURE_DB ;; |
102 "--disable-db") unset FEATURE_DB ;; |
96 "--enable-gui") FEATURE_GUI=on ;; |
103 "--enable-gui") FEATURE_GUI=on ;; |
97 "--disable-gui") unset FEATURE_GUI ;; |
104 "--disable-gui") unset FEATURE_GUI ;; |
98 "-"*) echo "unknown option: $ARG"; rm -Rf "$TEMP_DIR"; exit 1 ;; |
105 "-"*) echo "unknown option: $ARG"; abort_configure ;; |
99 esac |
106 esac |
100 done |
107 done |
101 |
108 |
|
109 |
102 # set dir variables |
110 # set dir variables |
103 if [ -z "$BINDIR" ]; then |
111 BINDIR=${BINDIR:-"$EPREFIX/bin"} |
104 BINDIR=$EPREFIX/bin |
112 SBINDIR=${SBINDIR:-"$EPREFIX/sbin"} |
105 fi |
113 LIBDIR=${LIBDIR:-"$EPREFIX/lib"} |
106 if [ -z "$SBINDIR" ]; then |
114 LIBEXECDIR=${LIBEXECDIR:-"$EPREFIX/libexec"} |
107 SBINDIR=$EPREFIX/sbin |
115 DATADIR=${DATADIR:-"$PREFIX/share"} |
108 fi |
116 SYSCONFDIR=${SYSCONFDIR:-"$PREFIX/etc"} |
109 if [ -z "$LIBDIR" ]; then |
117 SHAREDSTATEDIR=${SHAREDSTATEDIR:-"$PREFIX/com"} |
110 LIBDIR=$EPREFIX/lib |
118 LOCALSTATEDIR=${LOCALSTATEDIR:-"$PREFIX/var"} |
111 fi |
119 INCLUDEDIR=${INCLUDEDIR:-"$PREFIX/include"} |
112 if [ -z "$LIBEXEC" ]; then |
120 INFODIR=${INFODIR:-"$PREFIX/info"} |
113 LIBEXECDIR=$EPREFIX/libexec |
121 MANDIR=${MANDIR:-"$PREFIX/man"} |
114 fi |
122 |
115 if [ -z "$DATADIR" ]; then |
123 # Test for availability of pkg-config |
116 DATADIR=$PREFIX/share |
124 PKG_CONFIG=$(command -v pkg-config) |
117 fi |
125 PKG_CONFIG=${PKG_CONFIG:-"false"} |
118 if [ -z "$SYSCONFDIR" ]; then |
|
119 SYSCONFDIR=$PREFIX/etc |
|
120 fi |
|
121 if [ -z "$SHAREDSTATEDIR" ]; then |
|
122 SHAREDSTATEDIR=$PREFIX/com |
|
123 fi |
|
124 if [ -z "$LOCALSTATEDIR" ]; then |
|
125 LOCALSTATEDIR=$PREFIX/var |
|
126 fi |
|
127 if [ -z "$INCLUDEDIR" ]; then |
|
128 INCLUDEDIR=$PREFIX/include |
|
129 fi |
|
130 if [ -z "$INFODIR" ]; then |
|
131 INFODIR=$PREFIX/info |
|
132 fi |
|
133 if [ -z "$MANDIR" ]; then |
|
134 MANDIR=$PREFIX/man |
|
135 fi |
|
136 |
|
137 which pkg-config > /dev/null |
|
138 if [ $? -eq 0 ]; then |
|
139 PKG_CONFIG=pkg-config |
|
140 else |
|
141 PKG_CONFIG=false |
|
142 fi |
|
143 |
126 |
144 # Simple uname based platform detection |
127 # Simple uname based platform detection |
145 # $PLATFORM is used for platform dependent dependency selection |
128 # $PLATFORM is used for platform dependent dependency selection |
|
129 OS=$(uname -s) |
|
130 OS_VERSION=$(uname -r) |
146 printf "detect platform... " |
131 printf "detect platform... " |
147 if [ "$OS" = "SunOS" ]; then |
132 if [ "$OS" = "SunOS" ]; then |
148 PLATFORM="solaris sunos unix svr4" |
133 PLATFORM="solaris sunos unix svr4" |
149 fi |
134 fi |
150 if [ "$OS" = "Linux" ]; then |
135 if [ "$OS" = "Linux" ]; then |
213 SHAREDSTATEDIR=$SHAREDSTATEDIR |
174 SHAREDSTATEDIR=$SHAREDSTATEDIR |
214 LOCALSTATEDIR=$LOCALSTATEDIR |
175 LOCALSTATEDIR=$LOCALSTATEDIR |
215 INCLUDEDIR=$INCLUDEDIR |
176 INCLUDEDIR=$INCLUDEDIR |
216 INFODIR=$INFODIR |
177 INFODIR=$INFODIR |
217 MANDIR=$MANDIR |
178 MANDIR=$MANDIR |
218 |
|
219 __EOF__ |
179 __EOF__ |
220 |
180 cat > "$TEMP_DIR/config.mk" << __EOF__ |
221 echo > "$TEMP_DIR/make.mk" |
181 # |
222 |
182 # config.mk generated by configure |
223 ENV_CFLAGS=$CFLAGS |
183 # |
224 ENV_LDFLAGS=$LDFLAGS |
184 __EOF__ |
225 ENV_CXXFLAGS=$CXXFLAGS |
185 sort -u "$TEMP_DIR/vars.mk" >> "$TEMP_DIR/config.mk" |
226 |
186 |
227 # Toolchain detection |
187 |
|
188 # toolchain detection |
228 # this will insert make vars to config.mk |
189 # this will insert make vars to config.mk |
229 . make/toolchain.sh |
190 . make/toolchain.sh |
230 |
191 if [ -n "$TOOLCHAIN_ERROR" ]; then |
231 # add user specified flags to config.mk |
192 echo "Toolchain error: $TOOLCHAIN_ERROR" |
232 echo "# project specific flags" >> "$TEMP_DIR/config.mk" |
193 echo "Abort." |
233 if [ -n "${ENV_CFLAGS}" ]; then |
194 abort_configure |
234 echo "CFLAGS += $ENV_CFLAGS" >> "$TEMP_DIR/config.mk" |
|
235 fi |
|
236 if [ -n "${ENV_CXXFLAGS}" ]; then |
|
237 echo "CXXFLAGS += $ENV_CXXFLAGS" >> "$TEMP_DIR/config.mk" |
|
238 fi |
|
239 if [ -n "${ENV_LDFLAGS}" ]; then |
|
240 echo "LDFLAGS += $ENV_LDFLAGS" >> "$TEMP_DIR/config.mk" |
|
241 fi |
195 fi |
242 |
196 |
243 # |
197 # |
244 # DEPENDENCIES |
198 # DEPENDENCIES |
245 # |
199 # |
|
200 |
|
201 # create buffer for make variables required by dependencies |
|
202 echo > "$TEMP_DIR/make.mk" |
246 |
203 |
247 dependency_qt4() |
204 dependency_qt4() |
248 { |
205 { |
249 printf "checking for qt4... " |
206 printf "checking for qt4... " |
250 # dependency qt4 |
207 # dependency qt4 |
251 while true |
208 while true |
252 do |
209 do |
253 which qmake-qt4 > /dev/null |
210 if ! which qmake-qt4 > /dev/null ; then |
254 if [ $? -ne 0 ]; then |
211 break |
255 break |
|
256 fi |
212 fi |
257 echo yes |
213 echo yes |
258 return 0 |
214 return 0 |
259 done |
215 done |
260 |
216 |
466 cat >> "$TEMP_DIR/make.mk" << __EOF__ |
415 cat >> "$TEMP_DIR/make.mk" << __EOF__ |
467 MVAR = 123 |
416 MVAR = 123 |
468 MVAR += 123 |
417 MVAR += 123 |
469 |
418 |
470 __EOF__ |
419 __EOF__ |
471 |
|
472 break |
420 break |
473 done |
421 done |
474 |
|
475 break |
422 break |
476 done |
423 done |
477 |
424 |
478 # add general dependency flags to config.mk |
425 # add unnamed dependency flags to config.mk |
479 echo >> "$TEMP_DIR/config.mk" |
426 echo >> "$TEMP_DIR/config.mk" |
480 if [ -n "${TEMP_CFLAGS}" ]; then |
427 if [ -n "${TEMP_CFLAGS}" ]; then |
481 echo "CFLAGS += $TEMP_CFLAGS" >> $TEMP_DIR/config.mk |
428 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
482 fi |
|
483 if [ -n "${TEMP_CXXFLAGS}" ]; then |
|
484 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> $TEMP_DIR/config.mk |
|
485 fi |
429 fi |
486 if [ -n "${TEMP_LDFLAGS}" ]; then |
430 if [ -n "${TEMP_LDFLAGS}" ]; then |
487 echo "LDFLAGS += $TEMP_LDFLAGS" >> $TEMP_DIR/config.mk |
431 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
488 fi |
432 fi |
489 |
433 |
490 # |
434 # |
491 # OPTION VALUES |
435 # OPTION VALUES |
492 # |
436 # |
493 checkopt_toolkit_gtk3() |
437 checkopt_toolkit_gtk3() |
494 { |
438 { |
495 VERR=0 |
439 VERR=0 |
496 dependency_gtk3 |
440 if ! dependency_gtk3 ; then |
497 if [ $? -ne 0 ]; then |
|
498 VERR=1 |
441 VERR=1 |
499 fi |
442 fi |
500 if [ $VERR -ne 0 ]; then |
443 if [ $VERR -ne 0 ]; then |
501 return 1 |
444 return 1 |
502 fi |
445 fi |
508 return 0 |
451 return 0 |
509 } |
452 } |
510 checkopt_toolkit_cli() |
453 checkopt_toolkit_cli() |
511 { |
454 { |
512 VERR=0 |
455 VERR=0 |
513 dependency_curl |
456 if ! dependency_curl ; then |
514 if [ $? -ne 0 ]; then |
|
515 VERR=1 |
457 VERR=1 |
516 fi |
458 fi |
517 dependency_test |
459 if ! dependency_test ; then |
518 if [ $? -ne 0 ]; then |
|
519 VERR=1 |
460 VERR=1 |
520 fi |
461 fi |
521 if [ $VERR -ne 0 ]; then |
462 if [ $VERR -ne 0 ]; then |
522 return 1 |
463 return 1 |
523 fi |
464 fi |
524 return 0 |
465 return 0 |
525 } |
466 } |
526 checkopt_toolkit_gtk2() |
467 checkopt_toolkit_gtk2() |
527 { |
468 { |
528 VERR=0 |
469 VERR=0 |
529 dependency_gtk2 |
470 if ! dependency_gtk2 ; then |
530 if [ $? -ne 0 ]; then |
|
531 VERR=1 |
471 VERR=1 |
532 fi |
472 fi |
533 if [ $VERR -ne 0 ]; then |
473 if [ $VERR -ne 0 ]; then |
534 return 1 |
474 return 1 |
535 fi |
475 fi |
536 return 0 |
476 return 0 |
537 } |
477 } |
538 checkopt_toolkit_wpf() |
478 checkopt_toolkit_wpf() |
539 { |
479 { |
540 VERR=0 |
480 VERR=0 |
541 dependency_test |
481 if ! dependency_test ; then |
542 if [ $? -ne 0 ]; then |
|
543 VERR=1 |
482 VERR=1 |
544 fi |
483 fi |
545 if [ $VERR -ne 0 ]; then |
484 if [ $VERR -ne 0 ]; then |
546 return 1 |
485 return 1 |
547 fi |
486 fi |
549 } |
488 } |
550 |
489 |
551 # |
490 # |
552 # TARGETS |
491 # TARGETS |
553 # |
492 # |
554 TEMP_CFLAGS= |
|
555 TEMP_CXXFLAGS= |
|
556 TEMP_LDFLAGS= |
|
557 |
493 |
558 # Target: dav |
494 # Target: dav |
559 TEMP_CFLAGS= |
495 TEMP_CFLAGS= |
560 TEMP_LDFLAGS= |
496 TEMP_LDFLAGS= |
561 TEMP_CXXFLAGS= |
497 |
562 |
498 if ! dependency_curl; then |
563 dependency_curl |
|
564 if [ $? -ne 0 ]; then |
|
565 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED curl " |
499 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED curl " |
566 ERROR=1 |
500 ERROR=1 |
567 fi |
501 fi |
568 dependency_libxml2 |
502 if ! dependency_libxml2; then |
569 if [ $? -ne 0 ]; then |
|
570 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libxml2 " |
503 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libxml2 " |
571 ERROR=1 |
504 ERROR=1 |
572 fi |
505 fi |
573 dependency_test |
506 if ! dependency_test; then |
574 if [ $? -ne 0 ]; then |
|
575 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED test " |
507 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED test " |
576 ERROR=1 |
508 ERROR=1 |
577 fi |
509 fi |
578 |
510 |
579 # Features |
511 # Features |
580 if [ -n "$FEATURE_DB" ]; then |
512 if [ -n "$FEATURE_DB" ]; then |
581 # check dependency |
513 # check dependency |
582 dependency_sqlite |
514 if ! dependency_sqlite ; then |
583 if [ $? -ne 0 ]; then |
|
584 # "auto" features can fail and are just disabled in this case |
515 # "auto" features can fail and are just disabled in this case |
585 if [ "$FEATURE_DB" != "auto" ]; then |
516 if [ "$FEATURE_DB" = "auto" ]; then |
|
517 unset FEATURE_DB |
|
518 else |
586 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sqlite " |
519 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sqlite " |
587 ERROR=1 |
520 ERROR=1 |
588 else |
|
589 unset FEATURE_DB |
|
590 fi |
521 fi |
591 fi |
522 fi |
592 fi |
523 fi |
593 if [ -n "$FEATURE_GUI" ]; then |
524 if [ -n "$FEATURE_GUI" ]; then |
594 # check dependency |
525 # check dependency |
595 dependency_gtk3 |
526 if ! dependency_gtk3 ; then |
596 if [ $? -ne 0 ]; then |
|
597 # "auto" features can fail and are just disabled in this case |
527 # "auto" features can fail and are just disabled in this case |
598 if [ "$FEATURE_GUI" != "auto" ]; then |
528 if [ "$FEATURE_GUI" = "auto" ]; then |
|
529 unset FEATURE_GUI |
|
530 else |
599 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED gtk3 " |
531 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED gtk3 " |
600 ERROR=1 |
532 ERROR=1 |
601 else |
|
602 unset FEATURE_GUI |
|
603 fi |
533 fi |
604 fi |
534 fi |
605 fi |
535 fi |
606 |
536 |
607 # Option: --toolkit |
537 # Option: --toolkit |
608 if [ -z $OPT_TOOLKIT ]; then |
538 if [ -z $OPT_TOOLKIT ]; then |
609 SAVED_ERROR="$ERROR" |
539 SAVED_ERROR="$ERROR" |
610 SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED" |
540 SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED" |
611 ERROR=0 |
541 ERROR=1 |
612 while true |
542 while true |
613 do |
543 do |
614 if isplatform "windows"; then |
544 if isplatform "windows"; then |
615 checkopt_toolkit_wpf |
545 if checkopt_toolkit_wpf ; then |
616 if [ $? -eq 0 ]; then |
|
617 echo " toolkit: wpf" >> "$TEMP_DIR/options" |
546 echo " toolkit: wpf" >> "$TEMP_DIR/options" |
618 ERROR=0 |
547 ERROR=0 |
619 break |
548 break |
620 fi |
549 fi |
621 fi |
550 fi |
622 checkopt_toolkit_gtk3 |
551 if checkopt_toolkit_gtk3 ; then |
623 if [ $? -eq 0 ]; then |
|
624 echo " toolkit: gtk3" >> "$TEMP_DIR/options" |
552 echo " toolkit: gtk3" >> "$TEMP_DIR/options" |
625 ERROR=0 |
553 ERROR=0 |
626 break |
554 break |
627 fi |
555 fi |
628 checkopt_toolkit_gtk2 |
556 if checkopt_toolkit_gtk2 ; then |
629 if [ $? -eq 0 ]; then |
|
630 echo " toolkit: gtk2" >> "$TEMP_DIR/options" |
557 echo " toolkit: gtk2" >> "$TEMP_DIR/options" |
631 ERROR=0 |
558 ERROR=0 |
632 break |
559 break |
633 fi |
560 fi |
634 break |
561 break |
641 else |
568 else |
642 if false; then |
569 if false; then |
643 false |
570 false |
644 elif [ "$OPT_TOOLKIT" = "gtk3" ]; then |
571 elif [ "$OPT_TOOLKIT" = "gtk3" ]; then |
645 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
572 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
646 checkopt_toolkit_gtk3 |
573 if ! checkopt_toolkit_gtk3 ; then |
647 if [ $? -ne 0 ]; then |
|
648 ERROR=1 |
574 ERROR=1 |
649 fi |
575 fi |
650 elif [ "$OPT_TOOLKIT" = "cli" ]; then |
576 elif [ "$OPT_TOOLKIT" = "cli" ]; then |
651 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
577 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
652 checkopt_toolkit_cli |
578 if ! checkopt_toolkit_cli ; then |
653 if [ $? -ne 0 ]; then |
|
654 ERROR=1 |
579 ERROR=1 |
655 fi |
580 fi |
656 elif [ "$OPT_TOOLKIT" = "gtk2" ]; then |
581 elif [ "$OPT_TOOLKIT" = "gtk2" ]; then |
657 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
582 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
658 checkopt_toolkit_gtk2 |
583 if ! checkopt_toolkit_gtk2 ; then |
659 if [ $? -ne 0 ]; then |
|
660 ERROR=1 |
584 ERROR=1 |
661 fi |
585 fi |
662 elif [ "$OPT_TOOLKIT" = "wpf" ]; then |
586 elif [ "$OPT_TOOLKIT" = "wpf" ]; then |
663 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
587 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
664 checkopt_toolkit_wpf |
588 if ! checkopt_toolkit_wpf ; then |
665 if [ $? -ne 0 ]; then |
|
666 ERROR=1 |
589 ERROR=1 |
667 fi |
590 fi |
668 fi |
591 fi |
669 fi |
592 fi |
670 |
593 |
671 echo >> "$TEMP_DIR/config.mk" |
594 echo >> "$TEMP_DIR/config.mk" |
672 if [ -n "${TEMP_CFLAGS}" ]; then |
595 if [ -n "${TEMP_CFLAGS}" ]; then |
673 echo "DAV_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
596 echo "DAV_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
674 fi |
597 fi |
675 if [ -n "${TEMP_CXXFLAGS}" ]; then |
|
676 echo "DAV_CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/config.mk" |
|
677 fi |
|
678 if [ "$BUILD_TYPE" = "debug" ]; then |
598 if [ "$BUILD_TYPE" = "debug" ]; then |
679 echo 'DAV_CFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
599 echo 'DAV_CFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
680 echo 'DAV_CXXFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
|
681 fi |
600 fi |
682 if [ "$BUILD_TYPE" = "release" ]; then |
601 if [ "$BUILD_TYPE" = "release" ]; then |
683 echo 'DAV_CFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
602 echo 'DAV_CFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
684 echo 'DAV_CXXFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
|
685 fi |
603 fi |
686 if [ -n "${TEMP_LDFLAGS}" ]; then |
604 if [ -n "${TEMP_LDFLAGS}" ]; then |
687 echo "DAV_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
605 echo "DAV_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
688 fi |
606 fi |
689 |
607 |
690 # Target |
608 # Target |
691 TEMP_CFLAGS= |
609 TEMP_CFLAGS= |
692 TEMP_LDFLAGS= |
610 TEMP_LDFLAGS= |
693 TEMP_CXXFLAGS= |
611 |
694 |
612 if ! dependency_deptest; then |
695 dependency_deptest |
|
696 if [ $? -ne 0 ]; then |
|
697 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED deptest " |
613 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED deptest " |
698 ERROR=1 |
614 ERROR=1 |
699 fi |
615 fi |
700 |
616 |
701 # Features |
617 # Features |
703 |
619 |
704 echo >> "$TEMP_DIR/config.mk" |
620 echo >> "$TEMP_DIR/config.mk" |
705 if [ -n "${TEMP_CFLAGS}" ]; then |
621 if [ -n "${TEMP_CFLAGS}" ]; then |
706 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
622 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
707 fi |
623 fi |
708 if [ -n "${TEMP_CXXFLAGS}" ]; then |
|
709 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/config.mk" |
|
710 fi |
|
711 if [ "$BUILD_TYPE" = "debug" ]; then |
624 if [ "$BUILD_TYPE" = "debug" ]; then |
712 echo 'CFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
625 echo 'CFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
713 echo 'CXXFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
|
714 fi |
626 fi |
715 if [ "$BUILD_TYPE" = "release" ]; then |
627 if [ "$BUILD_TYPE" = "release" ]; then |
716 echo 'CFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
628 echo 'CFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
717 echo 'CXXFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
|
718 fi |
629 fi |
719 if [ -n "${TEMP_LDFLAGS}" ]; then |
630 if [ -n "${TEMP_LDFLAGS}" ]; then |
720 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
631 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
721 fi |
632 fi |
722 |
633 |
723 if [ $ERROR -ne 0 ]; then |
634 if [ $ERROR -ne 0 ]; then |
724 echo |
635 echo |
725 echo "Error: Unresolved dependencies" |
636 echo "Error: Unresolved dependencies" |
726 echo "$DEPENDENCIES_FAILED" |
637 echo "$DEPENDENCIES_FAILED" |
727 rm -Rf "$TEMP_DIR" |
638 abort_configure |
728 exit 1 |
|
729 fi |
639 fi |
730 |
640 |
731 echo "configure finished" |
641 echo "configure finished" |
732 echo |
642 echo |
733 echo "Build Config:" |
643 echo "Build Config:" |