X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=configure;h=d2898803650543829de833017596056616aedc71;hb=f76d8f82dd004cf14426a91e8a80dcd2a4b97317;hp=56f550b055c5854d2588c8a36e84ddc2eb6e935c;hpb=2eb558fd9b369458c23b57b44281758bd17a5580;p=notmuch diff --git a/configure b/configure index 56f550b0..d2898803 100755 --- a/configure +++ b/configure @@ -114,6 +114,8 @@ Other environment variables can be used to control configure itself, XAPIAN_CONFIG The program to use to determine flags for compiling and linking against the Xapian library. [$XAPIAN_CONFIG] + PYTHON Name of python command to use in + configure and the test suite. Additionally, various options can be specified on the configure command line. @@ -322,6 +324,35 @@ EOF exit 1 fi +printf "Reading libnotmuch version from source... " +cat > _libversion.c < +#include "lib/notmuch.h" +int main(void) { + printf("libnotmuch_version_major=%d\n", + LIBNOTMUCH_MAJOR_VERSION); + printf("libnotmuch_version_minor=%d\n", + LIBNOTMUCH_MINOR_VERSION); + printf("libnotmuch_version_release=%d\n", + LIBNOTMUCH_MICRO_VERSION); + return 0; +} +EOF +if ${CC} ${CFLAGS} _libversion.c -o _libversion > /dev/null 2>&1 && \ + ./_libversion > _libversion.sh && . ./_libversion.sh +then + printf "OK.\n" +else + cat < /dev/null 2>&1; then have_pkg_config=1 else @@ -807,7 +838,7 @@ for flag in -Wmissing-declarations; do done printf "\n\t${WARN_CFLAGS}\n" -rm -f minimal minimal.c +rm -f minimal minimal.c _libversion.c _libversion _libversion.sh # construct the Makefile.config cat > Makefile.config <