configure

changeset 796
fec90b848f4b
parent 788
b34ff44e6433
child 815
b0c4750cecd8
--- a/configure	Fri Jan 05 00:12:11 2024 +0100
+++ b/configure	Fri Jan 05 20:35:13 2024 +0100
@@ -256,24 +256,34 @@
     return 0
 }
 
+print_check_msg()
+{
+    if [ -z "$1" ]; then
+        shift
+        printf "$@"
+    fi
+}
+
 dependency_error_coverage()
 {
-    printf "checking for coverage... "
+    print_check_msg "$dep_checked_coverage" "checking for coverage... "
     # dependency coverage
     while true
     do
         TEMP_CFLAGS="$TEMP_CFLAGS \${COVERAGE_CFLAGS}"
         TEMP_LDFLAGS="$TEMP_LDFLAGS \${COVERAGE_LDFLAGS}"
-        echo yes
+        print_check_msg "$dep_checked_coverage" "yes\n"
+        dep_checked_coverage=1
         return 1
     done
 
-    echo no
+    print_check_msg "$dep_checked_coverage" "no\n"
+    dep_checked_coverage=1
     return 0
 }
 dependency_error_pandoc()
 {
-    printf "checking for pandoc... "
+    print_check_msg "$dep_checked_pandoc" "checking for pandoc... "
     # dependency pandoc
     while true
     do
@@ -282,16 +292,18 @@
         else
             break
         fi
-        echo yes
+        print_check_msg "$dep_checked_pandoc" "yes\n"
+        dep_checked_pandoc=1
         return 1
     done
 
-    echo no
+    print_check_msg "$dep_checked_pandoc" "no\n"
+    dep_checked_pandoc=1
     return 0
 }
 dependency_error_c()
 {
-    printf "checking for c... "
+    print_check_msg "$dep_checked_c" "checking for c... "
     # dependency c platform="mingw"
     while true
     do
@@ -309,7 +321,8 @@
 SHLIB_EXT=.dll
 
 __EOF__
-        echo yes
+        print_check_msg "$dep_checked_c" "yes\n"
+        dep_checked_c=1
         return 1
     done
 
@@ -330,7 +343,8 @@
 SHLIB_EXT=.dylib
 
 __EOF__
-        echo yes
+        print_check_msg "$dep_checked_c" "yes\n"
+        dep_checked_c=1
         return 1
     done
 
@@ -351,16 +365,18 @@
 SHLIB_EXT=.so
 
 __EOF__
-        echo yes
+        print_check_msg "$dep_checked_c" "yes\n"
+        dep_checked_c=1
         return 1
     done
 
-    echo no
+    print_check_msg "$dep_checked_c" "no\n"
+    dep_checked_c=1
     return 0
 }
 dependency_error_file_tools()
 {
-    printf "checking for file-tools... "
+    print_check_msg "$dep_checked_file_tools" "checking for file-tools... "
     # dependency file-tools
     while true
     do
@@ -374,16 +390,18 @@
 SYMLINK=/bin/ln -s
 
 __EOF__
-        echo yes
+        print_check_msg "$dep_checked_file_tools" "yes\n"
+        dep_checked_file_tools=1
         return 1
     done
 
-    echo no
+    print_check_msg "$dep_checked_file_tools" "no\n"
+    dep_checked_file_tools=1
     return 0
 }
 dependency_error_doxygen()
 {
-    printf "checking for doxygen... "
+    print_check_msg "$dep_checked_doxygen" "checking for doxygen... "
     # dependency doxygen
     while true
     do
@@ -392,17 +410,16 @@
         else
             break
         fi
-        echo yes
+        print_check_msg "$dep_checked_doxygen" "yes\n"
+        dep_checked_doxygen=1
         return 1
     done
 
-    echo no
+    print_check_msg "$dep_checked_doxygen" "no\n"
+    dep_checked_doxygen=1
     return 0
 }
 
-
-
-
 # start collecting dependency information
 echo > "$TEMP_DIR/flags.mk"
 
@@ -684,3 +701,4 @@
 rm -Rf "$TEMP_DIR"
 
 
+

mercurial