X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=configure;h=86ba2f7c66ead7c11c8738aaa3c40f8a1009249b;hp=f4475814196d0cccc73c34734cbcc4ea43ef6423;hb=57540a1952460fe88817ad53dc32274543cf0514;hpb=3921d2345a33311d6b87d42fe24eb67a2c56b8ff diff --git a/configure b/configure index f4475814..86ba2f7c 100755 --- a/configure +++ b/configure @@ -43,8 +43,8 @@ fi # Set several defaults (optionally specified by the user in # environment variables) -CC=${CC:-gcc} -CXX=${CXX:-g++} +CC=${CC:-cc} +CXX=${CXX:-c++} CFLAGS=${CFLAGS:--O2} CPPFLAGS=${CPPFLAGS:-} CXXFLAGS=${CXXFLAGS:-\$(CFLAGS)} @@ -340,6 +340,15 @@ else errors=$((errors + 1)) fi +if ! pkg-config --exists zlib; then + ${CC} ${zlib_cflags} -o compat/gen_zlib_pc \ + "$srcdir"/compat/gen_zlib_pc.c ${zlib_ldflags} > /dev/null 2>&1 && + compat/gen_zlib_pc > compat/zlib.pc && + PKG_CONFIG_PATH="$PKG_CONFIG_PATH":compat && + export PKG_CONFIG_PATH + rm -f compat/gen_zlib_pc +fi + printf "Checking for zlib (>= 1.2.5.2)... " have_zlib=0 if pkg-config --atleast-version=1.2.5.2 zlib; then @@ -408,6 +417,15 @@ else have_emacs=0 fi +printf "Checking if doxygen is available... " +if command -v doxygen > /dev/null 2>&1; then + printf "Yes.\n" + have_doxygen=1 +else + printf "No (so will not install api docs)\n" + have_doxygen=0 +fi + printf "Checking if sphinx is available and supports nroff output... " if hash sphinx-build > /dev/null 2>&1 && python -m sphinx.writers.manpage > /dev/null 2>&1 ; then printf "Yes.\n" @@ -820,6 +838,9 @@ HAVE_SPHINX=${have_sphinx} # Whether there's a rst2man binary available for building documentation HAVE_RST2MAN=${have_rst2man} +# Whether there's a doxygen binary available for building api documentation +HAVE_DOXYGEN=${have_doxygen} + # The directory to which desktop files should be installed desktop_dir = \$(prefix)/share/applications @@ -829,7 +850,7 @@ bash_completion_dir = ${BASHCOMPLETIONDIR:=\$(sysconfdir)/bash_completion.d} # The directory to which zsh completions files should be installed zsh_completion_dir = ${ZSHCOMLETIONDIR:=\$(prefix)/share/zsh/functions/Completion/Unix} -# Whether the getline function is available (if not, then notmuch will +# Whether the canonicalize_file_name function is available (if not, then notmuch will # build its own version) HAVE_CANONICALIZE_FILE_NAME = ${have_canonicalize_file_name} @@ -908,6 +929,7 @@ WITH_ZSH = ${WITH_ZSH} # Combined flags for compiling and linking against all of the above CONFIGURE_CFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\ + -DHAVE_CANONICALIZE_FILE_NAME=\$(HAVE_CANONICALIZE_FILE_NAME) \\ \$(ZLIB_CFLAGS) \\ \$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\ \$(VALGRIND_CFLAGS) \\ @@ -920,6 +942,7 @@ CONFIGURE_CFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\ -DUTIL_BYTE_ORDER=\$(UTIL_BYTE_ORDER) CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\ + -DHAVE_CANONICALIZE_FILE_NAME=\$(HAVE_CANONICALIZE_FILE_NAME) \\ \$(ZLIB_CFLAGS) \\ \$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\ \$(VALGRIND_CFLAGS) \$(XAPIAN_CXXFLAGS) \\ @@ -933,3 +956,16 @@ CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\ CONFIGURE_LDFLAGS = \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(ZLIB_LDFLAGS) \$(XAPIAN_LDFLAGS) EOF + +# construct the sh.config +cat > sh.config <