161 OS=`uname -s` |
161 OS=`uname -s` |
162 OS_VERSION=`uname -r` |
162 OS_VERSION=`uname -r` |
163 printf "detect platform... " |
163 printf "detect platform... " |
164 if [ "$OS" = "SunOS" ]; then |
164 if [ "$OS" = "SunOS" ]; then |
165 PLATFORM="solaris sunos unix svr4" |
165 PLATFORM="solaris sunos unix svr4" |
166 fi |
166 elif [ "$OS" = "Linux" ]; then |
167 if [ "$OS" = "Linux" ]; then |
|
168 PLATFORM="linux unix" |
167 PLATFORM="linux unix" |
169 fi |
168 elif [ "$OS" = "FreeBSD" ]; then |
170 if [ "$OS" = "FreeBSD" ]; then |
|
171 PLATFORM="freebsd bsd unix" |
169 PLATFORM="freebsd bsd unix" |
172 fi |
170 elif [ "$OS" = "OpenBSD" ]; then |
173 if [ "$OS" = "Darwin" ]; then |
171 PLATFORM="openbsd bsd unix" |
|
172 elif [ "$OS" = "NetBSD" ]; then |
|
173 PLATFORM="netbsd bsd unix" |
|
174 elif [ "$OS" = "Darwin" ]; then |
174 PLATFORM="macos osx bsd unix" |
175 PLATFORM="macos osx bsd unix" |
175 fi |
176 elif echo "$OS" | grep -i "MINGW" > /dev/null; then |
176 if echo "$OS" | grep -i "MINGW" > /dev/null; then |
|
177 PLATFORM="windows mingw" |
177 PLATFORM="windows mingw" |
178 fi |
178 fi |
179 : ${PLATFORM:="unix"} |
179 : ${PLATFORM:="unix"} |
180 |
180 |
181 PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -` |
181 PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -` |
265 } |
285 } |
266 |
286 |
267 dependency_error_coverage() |
287 dependency_error_coverage() |
268 { |
288 { |
269 print_check_msg "$dep_checked_coverage" "checking for coverage... " |
289 print_check_msg "$dep_checked_coverage" "checking for coverage... " |
270 # dependency coverage |
290 # dependency coverage toolchain="gnuc" |
271 while true |
291 while true |
272 do |
292 do |
|
293 if notistoolchain "gnuc"; then |
|
294 break |
|
295 fi |
273 TEMP_CFLAGS="$TEMP_CFLAGS \${COVERAGE_CFLAGS}" |
296 TEMP_CFLAGS="$TEMP_CFLAGS \${COVERAGE_CFLAGS}" |
274 TEMP_LDFLAGS="$TEMP_LDFLAGS \${COVERAGE_LDFLAGS}" |
297 TEMP_LDFLAGS="$TEMP_LDFLAGS \${COVERAGE_LDFLAGS}" |
275 print_check_msg "$dep_checked_coverage" "yes\n" |
298 print_check_msg "$dep_checked_coverage" "yes\n" |
276 dep_checked_coverage=1 |
299 dep_checked_coverage=1 |
277 return 1 |
300 return 1 |
451 break |
474 break |
452 done |
475 done |
453 |
476 |
454 # add general dependency flags to flags.mk |
477 # add general dependency flags to flags.mk |
455 echo "# general flags" >> "$TEMP_DIR/flags.mk" |
478 echo "# general flags" >> "$TEMP_DIR/flags.mk" |
456 if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then |
479 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
457 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
480 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
458 fi |
481 fi |
459 if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then |
482 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then |
460 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
483 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
461 fi |
484 fi |
462 if [ -n "${TEMP_LDFLAGS}" ]; then |
485 if [ -n "${TEMP_LDFLAGS}" ]; then |
463 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
486 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
464 fi |
487 fi |
637 DEPENDENCIES_FAILED="option 'with-docs' $DEPENDENCIES_FAILED" |
660 DEPENDENCIES_FAILED="option 'with-docs' $DEPENDENCIES_FAILED" |
638 fi |
661 fi |
639 fi |
662 fi |
640 fi |
663 fi |
641 |
664 |
642 if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then |
665 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
643 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
666 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
644 fi |
667 fi |
645 if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then |
668 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then |
646 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
669 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
647 fi |
670 fi |
648 if [ "$BUILD_TYPE" = "debug" ]; then |
671 if [ "$BUILD_TYPE" = "debug" ]; then |
649 if [ -n "$lang_c" ]; then |
672 if [ -n "$lang_c" ]; then |
650 echo 'CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" |
673 echo 'CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" |