]> arthur.barton.de Git - bup.git/blobdiff - config/configure
Update base_version to 0.34~ for 0.34 development
[bup.git] / config / configure
index 85495ae2507ae2b0bdd70e8ec90e33e0f1449f8c..657155a0fa1f011a4cd078d25f011db0b79d180e 100755 (executable)
@@ -35,6 +35,27 @@ bup_try_c_code()
     return $rc
 }
 
+bup_config_cflags=()
+
+bup-add-cflag-if-supported()
+{
+    local opt="$1"
+    if test -z "$opt"; then
+        AC_FAIL 'No option to check'
+    fi
+    TLOGN "checking for $AC_CC $opt support"
+    if bup_try_c_code \
+           "int main(int argc, char**argv) { return 0; }" \
+           "$opt";
+    then
+        bup_config_cflags+="$opt"
+        TLOG ' (found)'
+    else
+        TLOG ' (not found)'
+    fi
+}
+
+
 TARGET=bup
 
 argv=()
@@ -63,6 +84,8 @@ if ! AC_PROG_CC; then
     exit 1
 fi
 
+bup-add-cflag-if-supported -Wno-unused-command-line-argument
+
 for make_candidate in make gmake; do
     found_make="$(bup_find_prog "$make_candidate" "$MAKE")"
     if test "$found_make" \
@@ -96,14 +119,12 @@ if test "$BUP_PYTHON_CONFIG"; then
                          "$BUP_PYTHON_CONFIG")
     fi
 else
-    for py_maj_ver in 9 8 7 6; do
-        bup_python_config="$(bup_find_prog "python3.$py_maj_ver-config" '')"
+    for py_min_ver in 10 9 8 7 6; do
+        bup_python_config="$(bup_find_prog "python3.$py_min_ver-config" '')"
         test -z "$bup_python_config" || break
     done
     test -z "$bup_python_config" \
         && bup_python_config="$(bup_find_prog python3-config '')"
-    test -z "$bup_python_config" \
-        && bup_python_config="$(bup_find_prog python2.7-config '')"
     if test -z "$bup_python_config"; then
         AC_FAIL "ERROR: unable to find a suitable python-config"
     fi
@@ -331,6 +352,8 @@ AC_SUB bup_have_libacl "$bup_have_libacl"
 AC_CC="$orig_ac_cc"
 LIBS="$orig_libs"
 
+AC_SUB bup_config_cflags "$bup_config_cflags"
+
 AC_OUTPUT config.vars
 
 set -euo pipefail