X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=configure;h=2e01034bbd73816f484d4ecb6f028b839ee4e7db;hp=9f910b122c2b2da9c98f15c3baa0a07c88877381;hb=b96ccdf336243ccf5dd44bd26febf8c12fe17ad2;hpb=78800929641fb79e758baa60d02216ed2ea941d0 diff --git a/configure b/configure index 9f910b12..2e01034b 100755 --- a/configure +++ b/configure @@ -70,6 +70,14 @@ if [ "$srcdir" != "." ]; then mkdir bindings/ruby cp -a "$srcdir"/bindings/ruby/*.[ch] bindings/ruby cp -a "$srcdir"/bindings/ruby/extconf.rb bindings/ruby + + # Use the same hack to replicate python-cffi source for + # out-of-tree builds (again, not ideal). + mkdir bindings/python-cffi + cp -a "$srcdir"/bindings/python-cffi/tests \ + "$srcdir"/bindings/python-cffi/notmuch2 \ + "$srcdir"/bindings/python-cffi/setup.py \ + bindings/python-cffi/ fi # Set several defaults (optionally specified by the user in @@ -705,25 +713,26 @@ fi have_python3=0 if [ $have_python -eq 1 ]; then - printf "Checking for python3..." - if "$python" -c 'import sys; assert sys.version_info >= (3,0)' > /dev/null 2>&1; then + printf "Checking for python3 (>= 3.5)..." + if "$python" -c 'import sys, sysconfig; assert sys.version_info >= (3,5)'; >/dev/null 2>&1; then printf "Yes.\n" have_python3=1 else - printf "No.\n" + printf "No (will not install CFFI-based python bindings).\n" fi fi have_python3_cffi=0 have_python3_pytest=0 if [ $have_python3 -eq 1 ]; then - printf "Checking for python3 cffi... " - if "$python" -c 'import cffi' >/dev/null 2>&1; then + printf "Checking for python3 cffi and setuptools... " + if "$python" -c 'import cffi,setuptools; cffi.FFI().verify()' >/dev/null 2>&1; then printf "Yes.\n" have_python3_cffi=1 else - printf "No.\n" + printf "No (will not install CFFI-based python bindings).\n" fi + rm -rf __pycache__ # cffi.FFI().verify() uses this space printf "Checking for python3 pytest (>= 3.0)... " conf=$(mktemp) @@ -732,7 +741,7 @@ if [ $have_python3 -eq 1 ]; then printf "Yes.\n" have_python3_pytest=1 else - printf "No.\n" + printf "No (will not test CFFI-based python bindings).\n" fi rm -f $conf fi @@ -1036,6 +1045,22 @@ else fi rm -f compat/have_timegm +cat < _time_t.c +#include +#include +static_assert(sizeof(time_t) >= 8, "sizeof(time_t) < 8"); +EOF + +printf "Checking for 64 bit time_t... " +if ${CC} -c _time_t.c -o /dev/null +then + printf "Yes.\n" + have_64bit_time_t=1 +else + printf "No.\n" + have_64bit_time_t=0 +fi + printf "Checking for dirent.d_type... " if ${CC} -o compat/have_d_type "$srcdir"/compat/have_d_type.c > /dev/null 2>&1 then @@ -1119,7 +1144,7 @@ for flag in -Wmissing-declarations; do done printf "\n\t%s\n" "${WARN_CFLAGS}" -rm -f minimal minimal.c _libversion.c _libversion _libversion.sh _check_session_keys.c _check_session_keys _check_x509_validity.c _check_x509_validity +rm -f minimal minimal.c _time_t.c _libversion.c _libversion _libversion.sh _check_session_keys.c _check_session_keys _check_x509_validity.c _check_x509_validity # construct the Makefile.config cat > Makefile.config <