X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=config%2Fconfigure;h=86ecd761a3057c94e51e99c2c2ccb25e6734efc4;hb=9277b335d0be832b19f95f5f77f0c3bd29362a5b;hp=a2afb83778825e55eb42e7ce53dabc054f77b16a;hpb=7e0fcaa5b28eb1aa022a59e5056679e7854070b9;p=bup.git diff --git a/config/configure b/config/configure index a2afb83..86ecd76 100755 --- a/config/configure +++ b/config/configure @@ -37,7 +37,7 @@ if ! AC_PROG_CC; then exit 1 fi -MAKE="$(bup_find_prog make $MAKE)" +MAKE="$(bup_find_prog make "$MAKE")" if test -z "$MAKE"; then MAKE="$(bup_find_prog gmake "$GMAKE")" fi @@ -56,6 +56,8 @@ if [ -z "$MAKE_VERSION" ]; then fi expr "$MAKE_VERSION" '>=' '3.81' || AC_FAIL "ERROR: $MAKE must be >= version 3.81" +AC_SUB bup_make "$MAKE" + bup_python="$PYTHON" test -z "$bup_python" && bup_python="$(bup_find_prog python2.7 '')" test -z "$bup_python" && bup_python="$(bup_find_prog python2.6 '')" @@ -64,10 +66,9 @@ test -z "$bup_python" && bup_python="$(bup_find_prog python '')" if test -z "$bup_python"; then AC_FAIL "ERROR: unable to find python" else - echo "#!/bin/sh" > ../cmd/python-cmd.sh - printf "exec %q \"\$@\"" "$bup_python" >> ../cmd/python-cmd.sh - chmod u+x ../cmd/python-cmd.sh - cd ../cmd && ln -sf python-cmd.sh bup-python + AC_SUB bup_python "$bup_python" + AC_SUB bup_python_majver \ + "$("$bup_python" -c 'import sys; print(sys.version_info[0])')" fi if test -z "$(bup_find_prog git '')"; then @@ -96,6 +97,25 @@ AC_CHECK_FUNCS utimes AC_CHECK_FUNCS lutimes +builtin_mul_overflow_code=" +#include +int main(int argc, char **argv) +{ + size_t n = 0, size = 0, total; + __builtin_mul_overflow(n, size, &total); + return 0; +} +" + +TLOGN "checking for __builtin_mul_overflow" +if bup_try_c_code "$builtin_mul_overflow_code"; then + AC_DEFINE BUP_HAVE_BUILTIN_MUL_OVERFLOW 1 + TLOG ' (found)' +else + TLOG ' (not found)' +fi + + AC_CHECK_FUNCS mincore mincore_incore_code=" @@ -146,6 +166,13 @@ if test "$ac_defined_HAVE_MINCORE"; then fi fi +TLOGN "checking for readline" +if pkg-config readline; then + AC_DEFINE BUP_HAVE_READLINE 1 + TLOG ' (yes)' +else + TLOG ' (no)' +fi AC_CHECK_FIELD stat st_atim sys/types.h sys/stat.h unistd.h AC_CHECK_FIELD stat st_mtim sys/types.h sys/stat.h unistd.h @@ -158,3 +185,7 @@ AC_CHECK_FIELD stat st_ctimensec sys/types.h sys/stat.h unistd.h AC_CHECK_FIELD tm tm_gmtoff time.h AC_OUTPUT config.vars + +mkdir -p config.var +echo -n "$MAKE" > config.var/bup-make +echo -n "$bup_python" > config.var/bup-python