cp "$srcdir"/"$dir"/Makefile "$dir"
done
- # Easiest way to get the test suite to work is to just copy the
- # whole thing into the build directory.
- cp -a "$srcdir"/test/* test
-
# Emacs only likes to generate compiled files next to the .el files
# by default so copy these as well (which is not ideal).
cp -a "$srcdir"/emacs/*.el emacs
printf "int main(void){return 0;}\n" > minimal.c
printf "Sanity checking C compilation environment... "
-if ${CC} ${CFLAGS} ${CPPFLAGS} minimal.c ${LDFLAGS} -o minimal > /dev/null 2>&1
+test_cmdline="${CC} ${CFLAGS} ${CPPFLAGS} minimal.c ${LDFLAGS} -o minimal"
+if ${test_cmdline} > /dev/null 2>&1
then
printf "OK.\n"
else
printf "Fail.\n"
errors=$((errors + 1))
+ printf Executed:; printf ' %s' ${test_cmdline}; echo
+ ${test_cmdline}
fi
printf "Sanity checking C++ compilation environment... "
-if ${CXX} ${CXXFLAGS_for_sh} ${CPPFLAGS} minimal.c ${LDFLAGS} -o minimal > /dev/null 2>&1
+test_cmdline="${CXX} ${CXXFLAGS_for_sh} ${CPPFLAGS} minimal.c ${LDFLAGS} -o minimal"
+if ${test_cmdline} > /dev/null 2>&1
then
printf "OK.\n"
else
printf "Fail.\n"
errors=$((errors + 1))
+ printf Executed:; printf ' %s' ${test_cmdline}; echo
+ ${test_cmdline}
fi
+unset test_cmdline
if [ $errors -gt 0 ]; then
cat <<EOF
GMIME_MINVER=2.6.7
printf "Checking for GMime development files... "
-if pkg-config --exists "gmime-2.6 >= $GMIME_MINVER"; then
- printf "Yes.\n"
+if pkg-config --exists "gmime-3.0"; then
+ printf "Yes (3.0).\n"
+ have_gmime=1
+ gmime_cflags=$(pkg-config --cflags gmime-3.0)
+ gmime_ldflags=$(pkg-config --libs gmime-3.0)
+ gmime_major=3
+elif pkg-config --exists "gmime-2.6 >= $GMIME_MINVER"; then
+ printf "Yes (2.6).\n"
have_gmime=1
gmime_cflags=$(pkg-config --cflags gmime-2.6)
gmime_ldflags=$(pkg-config --libs gmime-2.6)
+ gmime_major=2
else
have_gmime=0
printf "No.\n"
fi
fi
+printf "Checking for cppcheck... "
+if command -v cppcheck > /dev/null; then
+ have_cppcheck=1
+ printf "Yes.\n"
+else
+ have_cppcheck=0
+ printf "No.\n"
+fi
+
libdir_in_ldconfig=0
printf "Checking which platform we are on... "
# build its own version)
HAVE_CANONICALIZE_FILE_NAME = ${have_canonicalize_file_name}
+# Whether the cppcheck static checker is available
+HAVE_CPPCHECK = ${have_cppcheck}
+
# Whether the getline function is available (if not, then notmuch will
# build its own version)
HAVE_GETLINE = ${have_getline}
# building/testing ruby bindings.
NOTMUCH_HAVE_RUBY_DEV=${have_ruby_dev}
+# Major version of gmime
+NOTMUCH_GMIME_MAJOR=${gmime_major}
+
# Platform we are run on
PLATFORM=${platform}
EOF