--- /dev/null
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id B1FB4431FAF\r
+ for <notmuch@notmuchmail.org>; Sun, 4 Nov 2012 13:31:09 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id i6-M9UeVubuo for <notmuch@notmuchmail.org>;\r
+ Sun, 4 Nov 2012 13:31:08 -0800 (PST)\r
+Received: from mail-la0-f53.google.com (mail-la0-f53.google.com\r
+ [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 30E51431FAE\r
+ for <notmuch@notmuchmail.org>; Sun, 4 Nov 2012 13:31:08 -0800 (PST)\r
+Received: by mail-la0-f53.google.com with SMTP id l5so4032774lah.26\r
+ for <notmuch@notmuchmail.org>; Sun, 04 Nov 2012 13:31:06 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=google.com; s=20120113;\r
+ h=from:to:cc:subject:in-reply-to:references:user-agent:date\r
+ :message-id:mime-version:content-type:x-gm-message-state;\r
+ bh=bbpMIAwdgMs9SVkAwcb7H64G9NBC6+fAu+LsrFEvk80=;\r
+ b=bKs1V/duePndDdrOYG/o0umd5YaE2HKPM3d2qddaJrf8lXK2HsYnVT5yqvhAM5C20O\r
+ tx/bdTCw1ZdIg1mt2AHOetgEnHTZkLSmLTP4FO86/9bDyqQlyPCqT3rN+DesSLWXexDE\r
+ 8TrCtPZcGlayUsxfp4OYnkM45o4+ulzzjMSHdlgRTx8WEveNm5DgIbcbjV11byH4dgLt\r
+ f502PJQ2M5c+HB9q6Q9GbSDsl29ed307fvOaxQI5DxHTN/KjOFDBGzRgyLzDzEax8CAm\r
+ eq8CRz4VLI7b2mQegfVRCU8k8UNS+tjnFDu1PcPdlt6TAXHXKkWNXpflGeXAeYS42hKE\r
+ HYcA==\r
+Received: by 10.112.102.132 with SMTP id fo4mr3142469lbb.111.1352064666604;\r
+ Sun, 04 Nov 2012 13:31:06 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.\r
+ [80.223.81.27])\r
+ by mx.google.com with ESMTPS id y10sm5099287lbg.4.2012.11.04.13.31.03\r
+ (version=SSLv3 cipher=OTHER); Sun, 04 Nov 2012 13:31:04 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Blake Jones <blakej@foo.net>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 05/10] install: check for non-SysV version (Solaris\r
+ support)\r
+In-Reply-To: <1351998962-25135-6-git-send-email-blakej@foo.net>\r
+References: <1351998962-25135-1-git-send-email-blakej@foo.net>\r
+ <1351998962-25135-6-git-send-email-blakej@foo.net>\r
+User-Agent: Notmuch/0.14+81~g1924356 (http://notmuchmail.org) Emacs/23.4.1\r
+ (i686-pc-linux-gnu)\r
+Date: Sun, 04 Nov 2012 23:31:02 +0200\r
+Message-ID: <87d2ztf42x.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Gm-Message-State:\r
+ ALoCoQlZMSfsSygBXJD1WiS5WDvBs8B/a4euhl4DJCnWrCgih12F7fobliZH66EnaDDdQGWKryVL\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 04 Nov 2012 21:31:09 -0000\r
+\r
+On Sun, 04 Nov 2012, Blake Jones <blakej@foo.net> wrote:\r
+> Solaris ships a program called "install" in /usr/sbin, which performs a\r
+> task that's fairly similar to the GNU and BSD "install" programs but\r
+> which uses very different command line arguments. In particular, if it\r
+> is invoked without "-c", "-f", or "-n", it will search the target\r
+> directory for a file with the same name as the one being installed, and\r
+> it will only install the file if it finds a matching name. More\r
+> excitingly, if it doesn't find a match, it will look in /bin, /usr/bin,\r
+> /etc, /lib, and /usr/lib and try to do the same there.\r
+>\r
+> The standard workaround for this is to use GNU install.\r
+> It is available via the standard Solaris packaging system (in\r
+> "file/gnu-coreutils"), and installs itself as /usr/bin/ginstall.\r
+>\r
+> This patch adds a check to "configure" to see if "install" behaves in a\r
+> way that's compatible with GNU and BSD install, and if not, it uses a\r
+> program called "ginstall" instead. It also modifies "configure" to set\r
+> the $(INSTALL) variable, and changes various Makefiles to use it.\r
+> ---\r
+> Makefile.local | 2 +-\r
+> completion/Makefile.local | 4 ++--\r
+> configure | 19 +++++++++++++++++++\r
+> emacs/Makefile.local | 6 +++---\r
+> lib/Makefile.local | 4 ++--\r
+> man/Makefile.local | 6 +++---\r
+> vim/Makefile | 6 ++----\r
+> 7 files changed, 32 insertions(+), 15 deletions(-)\r
+>\r
+> diff --git a/Makefile.local b/Makefile.local\r
+> index 2b91946..7ccb1cd 100644\r
+> --- a/Makefile.local\r
+> +++ b/Makefile.local\r
+> @@ -286,7 +286,7 @@ notmuch-shared: $(notmuch_client_modules) lib/$(LINKER_NAME)\r
+> .PHONY: install\r
+> install: all install-man\r
+> mkdir -p "$(DESTDIR)$(prefix)/bin/"\r
+> - install notmuch-shared "$(DESTDIR)$(prefix)/bin/notmuch"\r
+> + $(INSTALL) notmuch-shared "$(DESTDIR)$(prefix)/bin/notmuch"\r
+> ifeq ($(MAKECMDGOALS), install)\r
+> @echo ""\r
+> @echo "Notmuch is now installed to $(DESTDIR)$(prefix)"\r
+> diff --git a/completion/Makefile.local b/completion/Makefile.local\r
+> index dfc1271..a648a78 100644\r
+> --- a/completion/Makefile.local\r
+> +++ b/completion/Makefile.local\r
+> @@ -14,9 +14,9 @@ install-$(dir):\r
+> @echo $@\r
+> ifeq ($(WITH_BASH),1)\r
+> mkdir -p "$(DESTDIR)$(bash_completion_dir)"\r
+> - install -m0644 $(bash_script) "$(DESTDIR)$(bash_completion_dir)/notmuch"\r
+> + $(INSTALL) -m0644 $(bash_script) "$(DESTDIR)$(bash_completion_dir)/notmuch"\r
+> endif\r
+> ifeq ($(WITH_ZSH),1)\r
+> mkdir -p "$(DESTDIR)$(zsh_completion_dir)"\r
+> - install -m0644 $(zsh_script) "$(DESTDIR)$(zsh_completion_dir)/_notmuch"\r
+> + $(INSTALL) -m0644 $(zsh_script) "$(DESTDIR)$(zsh_completion_dir)/_notmuch"\r
+> endif\r
+> diff --git a/configure b/configure\r
+> index 5c5139f..dae837e 100755\r
+> --- a/configure\r
+> +++ b/configure\r
+> @@ -591,6 +591,21 @@ for flag in -Wmissing-declarations; do\r
+> done\r
+> printf "\n\t${WARN_CFLAGS}\n"\r
+> \r
+> +INSTALL="install"\r
+> +printf "Checking for working \"install\" program... "\r
+> +mkdir _tmp_\r
+\r
+This doesn't feel like a hot idea. Don't tell me you'd need to create a\r
+compatibility script for using mktemp --tmpdir too...\r
+\r
+Or how about just always using ginstall on Solaris?\r
+\r
+BR,\r
+Jani.\r
+\r
+> +cd _tmp_\r
+> +echo 1 > 1\r
+> +mkdir dest\r
+> +if install 1 dest > /dev/null 2>&1 ; then\r
+> + printf "\"install\" works fine.\n"\r
+> +else\r
+> + INSTALL="ginstall"\r
+> + printf "using \"ginstall\".\n"\r
+> +fi\r
+> +cd ..\r
+> +rm -rf _tmp_\r
+> +\r
+> rm -f minimal minimal.c\r
+> \r
+> cat <<EOF\r
+> @@ -777,4 +792,8 @@ CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\\r
+> -DSTD_ASCTIME=\$(STD_ASCTIME)\r
+> CONFIGURE_LDFLAGS = \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(XAPIAN_LDFLAGS) \\\r
+> \$(LIBNSL_LDFLAGS)\r
+> +\r
+> +# Which "install" program to use\r
+> +INSTALL = ${INSTALL}\r
+> +\r
+> EOF\r
+> diff --git a/emacs/Makefile.local b/emacs/Makefile.local\r
+> index fb82247..ee778cb 100644\r
+> --- a/emacs/Makefile.local\r
+> +++ b/emacs/Makefile.local\r
+> @@ -36,11 +36,11 @@ endif\r
+> .PHONY: install-emacs\r
+> install-emacs:\r
+> mkdir -p "$(DESTDIR)$(emacslispdir)"\r
+> - install -m0644 $(emacs_sources) "$(DESTDIR)$(emacslispdir)"\r
+> + $(INSTALL) -m0644 $(emacs_sources) "$(DESTDIR)$(emacslispdir)"\r
+> ifeq ($(HAVE_EMACS),1)\r
+> - install -m0644 $(emacs_bytecode) "$(DESTDIR)$(emacslispdir)"\r
+> + $(INSTALL) -m0644 $(emacs_bytecode) "$(DESTDIR)$(emacslispdir)"\r
+> endif\r
+> mkdir -p "$(DESTDIR)$(emacsetcdir)"\r
+> - install -m0644 $(emacs_images) "$(DESTDIR)$(emacsetcdir)"\r
+> + $(INSTALL) -m0644 $(emacs_images) "$(DESTDIR)$(emacsetcdir)"\r
+> \r
+> CLEAN := $(CLEAN) $(emacs_bytecode)\r
+> diff --git a/lib/Makefile.local b/lib/Makefile.local\r
+> index 7785944..0c6b258 100644\r
+> --- a/lib/Makefile.local\r
+> +++ b/lib/Makefile.local\r
+> @@ -89,11 +89,11 @@ install: install-$(dir)\r
+> \r
+> install-$(dir): $(dir)/$(LIBNAME)\r
+> mkdir -p "$(DESTDIR)$(libdir)/"\r
+> - install -m0644 "$(lib)/$(LIBNAME)" "$(DESTDIR)$(libdir)/"\r
+> + $(INSTALL) -m0644 "$(lib)/$(LIBNAME)" "$(DESTDIR)$(libdir)/"\r
+> ln -sf $(LIBNAME) "$(DESTDIR)$(libdir)/$(SONAME)"\r
+> ln -sf $(LIBNAME) "$(DESTDIR)$(libdir)/$(LINKER_NAME)"\r
+> mkdir -p "$(DESTDIR)$(includedir)"\r
+> - install -m0644 "$(srcdir)/$(lib)/notmuch.h" "$(DESTDIR)$(includedir)/"\r
+> + $(INSTALL) -m0644 "$(srcdir)/$(lib)/notmuch.h" "$(DESTDIR)$(includedir)/"\r
+> $(LIBRARY_INSTALL_POST_COMMAND)\r
+> \r
+> SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)\r
+> diff --git a/man/Makefile.local b/man/Makefile.local\r
+> index 72e2a18..07dcf4c 100644\r
+> --- a/man/Makefile.local\r
+> +++ b/man/Makefile.local\r
+> @@ -38,9 +38,9 @@ install-man: $(COMPRESSED_MAN)\r
+> mkdir -p "$(DESTDIR)$(mandir)/man1"\r
+> mkdir -p "$(DESTDIR)$(mandir)/man5"\r
+> mkdir -p "$(DESTDIR)$(mandir)/man7"\r
+> - install -m0644 $(MAN1_GZ) $(DESTDIR)/$(mandir)/man1\r
+> - install -m0644 $(MAN5_GZ) $(DESTDIR)/$(mandir)/man5\r
+> - install -m0644 $(MAN7_GZ) $(DESTDIR)/$(mandir)/man7\r
+> + $(INSTALL) -m0644 $(MAN1_GZ) $(DESTDIR)/$(mandir)/man1\r
+> + $(INSTALL) -m0644 $(MAN5_GZ) $(DESTDIR)/$(mandir)/man5\r
+> + $(INSTALL) -m0644 $(MAN7_GZ) $(DESTDIR)/$(mandir)/man7\r
+> cd $(DESTDIR)/$(mandir)/man1 && ln -sf notmuch.1.gz notmuch-setup.1.gz\r
+> \r
+> update-man-versions: $(MAN_SOURCE)\r
+> diff --git a/vim/Makefile b/vim/Makefile\r
+> index f17bebf..7ceba7a 100644\r
+> --- a/vim/Makefile\r
+> +++ b/vim/Makefile\r
+> @@ -5,8 +5,6 @@ files = plugin/notmuch.vim \\r
+> prefix = $(HOME)/.vim\r
+> destdir = $(prefix)/plugin\r
+> \r
+> -INSTALL = install -D -m644\r
+> -\r
+> all: help\r
+> \r
+> help:\r
+> @@ -17,7 +15,7 @@ help:\r
+> @echo " make symlink - create symlinks in ~/.vim (useful for development)"\r
+> \r
+> install:\r
+> - @for x in $(files); do $(INSTALL) $(CURDIR)/$$x $(prefix)/$$x; done\r
+> + @for x in $(files); do $(INSTALL) -D -m644 $(CURDIR)/$$x $(prefix)/$$x; done\r
+> \r
+> -link symlink: INSTALL = ln -fs\r
+> link symlink: install\r
+> + @for x in $(files); do ln -fs $(CURDIR)/$$x $(prefix)/$$x; done\r
+> -- \r
+> 1.7.9.2\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r