Commit graph

128 commits

Author SHA1 Message Date
Tomi Ollila
1ef9f769d7 configure: store $IFS to $DEFAULT_IFS readonly variable
In the future, IFS value needs to be changed in a few places
in configure -- and then restored. Store the original value
to $DEFAULT_IFS for easy restoration.
2012-03-20 08:10:57 -03:00
Justus Winter
1984a26646 Do not try to parse the options for --build and --host arguments
Formerly the code assumed the arguments to be triples and threw an
error if this was not the case. But those arguments are only there for
compatibility with autotools and are not used within the build system,
so just dropping the code parsing these values makes the build system
more robust.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-03-20 08:10:57 -03:00
Justus Winter
524f01a7b5 Add GNU as a valid platform
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-03-20 08:10:57 -03:00
Thomas Jost
f34613ea83 build: Require gmime >= 2.6.7
gmime-2.6 had a bug [1] which made it impossible to tell why a signature
verification failed when the signer key was unavailable (empty "sigstatus" field
in the JSON output). Since 00b5623d the corresponding test is marked as broken
when using gmime-2.6 (2.4 is fine).

This bug has been fixed in gmime 2.6.5, which is now the minimal gmime-2.6
version required for building notmuch (gmime-2.4 is still available). As a
consequence the version check in test/crypto can be removed.

[Added by db]

Although less unambigously a bug, Gmime 2.6 prior to 2.6.7 also was
more strict about parsing, and rejected messages with initial "From "
headers.  This restriction is relaxed in [2].  For reasons explained in [3],
we want to keep this more relaxed parsing for now.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=668085

[2] http://git.gnome.org/browse/gmime/commit/?id=d311f576baf750476e06e9a1367a2dc1793ea7eb

[3] id:"1331385931-1610-1-git-send-email-david@tethera.net"
2012-03-11 22:13:48 -03:00
Jameson Graef Rollins
4d136995ce Fix configure script to properly detect gmime-2.6 if available.
Previously, the configure script would appear to detect gmime-2.6 if
present.  However, the binaries would end up being compiled against
gmime-2.4.  The addition of a break fixes things so that now gmime-2.6
will be used if available, falling back to gmime-2.4.
2012-03-10 21:39:13 -04:00
Pieter Praet
b44b344595 configure: update explicit check for glib : >= 2.22
As of commit b3caef1f, we're using g_array_unref() in 'lib/query.cc',
which was only introduced in glib 2.22, so update the dependency.

Thanks to datapipe@gmail.com for reporting this [1].

Also see commit b88e6abc.

[1] id:"alpine.DEB.2.02.1201132130220.21970@ltspubuntu4.int.smq.datapipe.net"
2012-02-03 21:10:55 -04:00
Amadeusz Żołnowski
e6d85fb97d Separate Emacs misc. files dir. from Emacs code dir.
New option --emacsetcdir was added, but it's set default to the same
value as --emacslispdir for backward compatibility.
2011-10-28 14:07:44 -03:00
Pieter Praet
730acd4764 fix sum moar typos [build scripts, Makefiles]
Various typo fixes in comments within the Makefile and other build scripts.

Signed-off-by: Pieter Praet <pieter@praet.org>

Edited-by: Carl Worth <cworth@cworth.org> Restricted to just build files.
2011-06-23 15:44:59 -07:00
Carl Worth
574f408816 configure: Fix detection of libdir in ldconfig configuration
Ever since commit b4b5e9ce4d the
detection of libdir in the ldconfig configuration has been broken,
resulting in RPATH being set when not needed and not wanted.

The cause was a change from an IFS setting of:

	IFS="$(printf '\n\t')"

to a new setting of:

	IFS="$(printf '\n')"

That looks desirable since we want to split the output of ldconfig
based on newlines, (and not split on any filename that might have an
embedded tab in it). The subtle bug in the above is that the shell
trims any trailing newlines when performing command substitution so
the final statement above was equivalent to:

	IFS=''

which prevented any splitting of the ldconfig output at all.

Fix this by avoiding command substitution and just using a literal
newline in the source file for setting this variable.
2011-06-01 13:02:58 -07:00
Carl Worth
2d6718b837 build: Save configure options and re-use them for automatic runs of configure
This supports the case of a user running "configure --prefix=/foo" then later
updating the soruce (including the configure script) and re-running make.

In this case, the make invocation will re-run configure. Before this change,
this run of configure would lose the user's carefully chosen prefix. This
is now fixed so that configrue is re-run with the user's options.
2011-03-10 11:30:06 -08:00
Carl Worth
3e4a9d60a9 build: Add support for non-source-directory builds.
Such as:

     mkdir build
     cd build
     ../configure
     make

This is implemented by having the configure script set a srcdir
variable in Makefile.config, and then sprinkling $(srcdir) into
various make rules. We also use vpath directives to convince GNU make
to find the source files from the original source directory.
2011-03-09 15:10:03 -08:00
Michal Sojka
b4b5e9ce4d configure: Drop global setting of IFS (without space in it).
This was originally intended to help support filenames with spaces in
them, but this actually breaks things when someone sets a command with
a space in it, (such as CC="ccache cc").

Instead, we now only set a custom IFS when acting on the
newline-separated list of files from /sbin/ldconfig.
2011-01-26 23:29:03 +10:00
Cédric Cabessa
26b4cc4aad configure: add options to disable emacs/zsh/bash and choose install dir.
add --bashcompletiondir and --zshcompletiondir (like --emacslispdir) to choose
installation dir for bash/zsh completion files

Make some features optional:
  --without-emacs / --with-emacs=no do not install lisp file
  --without-bash-completion / --with-bash-completion=no  do not install bash
files
  --without-zsh-completion / --with-zsh-completion=no do not install zsh files
By default, everything is enabled. You can reenable something with
  --with-feature=yes
2011-01-26 22:30:32 +10:00
Carl Worth
b88e6abccd configure: Add explicit check for glib >= 2.14
For cases where GMime is present, but happy with glib 2.12, for example.
2010-11-16 09:00:34 -08:00
Carl Worth
8df28ec509 configure: Use pkg-config --exists rather than --modversion
With --modversion we were asking for output that we were just throwing
away anyway. The --exists option does just what we want, (no output
and communivating only via return value).

Also, --exists allows for testing versions of the package as well.
2010-11-16 08:51:50 -08:00
Carl Worth
6b9a717c26 configure: Add a check for the -Wl,--as-needed flag.
This fits with our general build philosophy of checking at configure
time for desired support, (rather than putting platform-specific
conditionals into our Makefiles).
2010-10-30 13:20:33 -07:00
Carl Worth
e94db26c5c fixup 2010-10-30 13:16:50 -07:00
Carl Worth
660510ee4c configure: Remove a debugging print message.
This was never intended to be committed.
2010-10-30 13:15:00 -07:00
Carl Worth
8753b9defa configure: Test for flag to set rpath
This is better than the previous approach which had a hardcoded Linux-specific
value in the Makefile.
2010-10-30 13:15:00 -07:00
Carl Worth
b802c18d3b configure: Test for each compiler warning before enabling it.
This should allow the build to be much more automatically portable
to compilers with different sets of warning options.
2010-10-30 13:11:56 -07:00
Carl Worth
6e3007bec0 configure: Set XAPIAN_CONFIG to only "xapian-config" by default.
Previously, we preferred a value of "xapian-config-1.1" first. This
was convenient for compiling against Xapian 1.1 while Xapian 1.2 was
unreleased. But now that Xapian 1.2 is realease, and since it ships a
xapian-config, the xapian-config-1.1 value can mask the newer library.

Instead of trying to track the latest xapian-config-1.x in our
configure script let's simply expect the user to set
XAPIAN_CONFIG=xapian-config-1.x in order to compile against an
unreleased Xapian.
2010-10-29 14:49:20 -07:00
Felipe Contreras
9d9668e3e7 configure: optimize uname finding a bit
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2010-10-29 14:33:14 -07:00
Carl Worth
d64d0cc8d9 make install: Run ldconfig or install a DT_RUNPATH in binary as appropriate.
Various users were confused as to why they couldn't run notmuch
immediately after "make install", (with linker errors saying that
libnotmuch.so could not be found). The errors came from two different
causes:

1. The user had installed to a system library directory, but had not
   yet run ldconfig.

2. The user had installed to some non-system directory, and had not
   set the LD_LIBRARY_PATH variable.

With this change we fix both problems (on Linux) without the user
having to do anything additional. We first use ldconfig to find the
system library directories. If the user is installing to one of these,
then we run ldconfig as part of "make install".

For case (2) we use the -rpath and --enable-new-dtags linker options
to install a DT_RUNPATH entry in the binary. This entry tells the
dynamic linker where to find libnotmuch. Without the
--enable-new-dtags option only a DT_RPATH option would be installed,
(which has the drawback of not allowing any override with the
LD_LIBRARY_PATH variable).

Distributions (such as Debian and Fedora) don't want to see binaries
packaged with a DT_RPATH or DT_RUNPATH entry. This should be avoided
automatically as long as the packages install to standard locations,
(such as /usr/lib).
2010-06-04 16:52:56 -07:00
Carl Worth
b3076ed269 configure: Remove space from IFS (using tab as necessary)
The idea here is to more easily support filenames with spaces in them
in various loops. We're about to add a loop over the paths configured
by the dynamic linker. Hopefully, they wouldn't contain spaces, but
one never knows so we might as well be prepared.
2010-06-04 16:51:32 -07:00
Tomas Carnecky
a54cecfc8e Add support for the Solaris platform
Like on Mac OS X, the linker doesn't automatically resolve dependencies.

Signed-off-by: Tomas Carnecky <tom@dbservice.com>
2010-06-03 18:17:03 -07:00
Tomas Carnecky
80d5d162be configure: Respect LDFLAGS from the environment.
The configure usage string documents that it respects LDFLAGS, but
currently it doesn't do anything with the configure-time LDFLAGS
value.

Signed-off-by: Tomas Carnecky <tom@dbservice.com>
[Tomas and Nelson sent almost identical patches which I've merged
together here.]
2010-06-03 18:16:11 -07:00
Cédric Cabessa
42bda003a0 configure: add ignored options for compatibility.
gentoo's ebuild script expects 2 more options for configure:
  --host (same format as --build)
  --datadir
2010-04-26 07:18:21 -07:00
Carl Worth
2186cac8e7 configure: Print version of Xapian found during configure check.
This might be handy to know, (since there are important performance
considerations that depend on the Xapian version).
2010-04-21 14:18:56 -07:00
Carl Worth
cbcc3454ae configure: Generalize the GMime configure checks.
This way when GMime 2.8 comes out we can simply add it to the list
rather than adding an additional block of conditional code for it.
Also GMime 2.6 is now preferred over GMime 2.4.
2010-04-21 14:17:14 -07:00
Adrien Bustany
65b634145a configure: Add support for GMime 2.6
Notmuch compiles just fine with GMime 2.6, so accept it in the configure
script.
2010-04-21 14:17:14 -07:00
Gregor Hoffleit
18433e4aff configure: Fix syntax error (spaces in assignment).
Before and after the assignment operator, no spaces are allowed.
I don't know if there are any /bin/sh which allow spaces, but at least
in bash, csh and zsh, the former code was no valid assigment.
2010-04-15 19:45:11 -07:00
Carl Worth
3d7af74ce5 Makefile: Fix final linking of notmuch binary for OS X.
Apparently the OS X linker can't resolve symbols when linking a
program (notmuch) against a library (libnotmuch) when the library
depends on another library (libgmime) that the program doesn't depend
on directly.

For this case, we need to link the program directly against both
libraries, but we don't want to do this on Linux, where the linker can
do this on its own and the explicit, unneeded link would cause
problems.
2010-04-14 16:29:50 -07:00
Aaron Ecay
8c8079a8b1 Add infrastructure for building shared library on OS X.
This patch adds a configure check for OS X (actually Darwin),
and sets up the Makefiles to build a proper shared library on
that platform.

Signed-off-by: Aaron Ecay <aaronecay@gmail.com>
2010-04-14 16:10:27 -07:00
Dirk Hohndel
d09154465a Add simplistic reimplementation of strcasestr to compat library
While all systems that I have access to support strcasestr, it is
in fact not part of POSIX. So here's a fallback reimplementation
based on POSIX functions.

Signed-off-by: Dirk Hohndel <hohndel@infradead.org>

Tested-by: Tomas Carnecky <tom@dbservice.com> (on OpenSolaris snv_134)
2010-04-14 11:34:12 -07:00
Mike Kelly
37b8f5a8f2 Fix the default value for --includedir. 2010-04-07 16:00:48 -07:00
Carl Worth
a7a961c510 Makefile: Install emacs code to site-lisp, not site-lisp/notmuch
And just make the Debian packaging request site-lisp/notmuch like it
wants. Otherwise, the installed files won't appear on the load-path
so won't be found by emacs.
2010-04-07 10:09:35 -07:00
Carl Worth
dfbec15b23 Install emacs lisp files into a notmuch sub-directory of site-lisp.
Now that we have multiple emacs-lisp source files, it's just more
polite this way.
2010-04-06 18:30:43 -07:00
Carl Worth
a597c8b6ca configure: Ignore more options that debhelper expects.
These include:

	--infodir=DIR
	--localstatedir=DIR
	--libexecdir=DIR
	--disable-maintainer-mode
	--disable-dependency-tracking
2010-04-06 14:42:09 -07:00
Carl Worth
ea43d06300 configure: Add a --sysconfdir option.
Which means that the bash completion script will now install
to ${prefix}/etc by default (unless configured with --syconfdir=/etc)
which is probably the right thing to do.
2010-04-06 14:42:09 -07:00
Carl Worth
1d1ad74db9 configure: Add support for a --mandir option
Again, nothing tricky here.
2010-04-06 14:42:09 -07:00
Carl Worth
14e98e454e configure: Add support for a --includedir option
Very similar to the existing --libdir option.
2010-04-06 14:42:09 -07:00
Carl Worth
c857b970e5 configure: Avoid printing '.' at the end of error message.
Since we're emitting the user's input back, let's leave it pristine
and not confuse the issue by adding a final period.
2010-04-06 14:42:09 -07:00
Carl Worth
a3c9dfe4fa configure: Add stub support for --build=<cpu>-<vendor>-<host> option.
I'm not sure that this option would actually be useful for anything,
but debhelper at least expects our configure script to support it. So
we'll accept it and ignore it.
2010-04-06 14:42:09 -07:00
Carl Worth
d8192a4d7f Move "config" test programs to "compat".
It makes sense to me to have the little tests for functionality right
next to the comptability implementations of that same functionality.

But also, this means I can now tab-complete ./configure from the three
initial characters (rather than the seven required previously).
2010-04-06 14:36:31 -07:00
Carl Worth
a5ed8c68f6 Makefile: Eliminate the "make install-emacs" target.
Instead, simply byte-compile the emacs source files as part of "make"
and install them as part of "make install". The byte compilation is
made conditional on the configure script finding the emacs binary.
That way, "make; make install" will still work for someone that doesn't
have emacs installed, (which was the only reason we had made a separate
"make install-emacs" target in the first place).
2010-04-06 14:36:31 -07:00
Carl Worth
f89b3d16db Makefiles: Eliminate the useless quiet_* functions.
With the original quiet function, there's an actual purpose (hiding
excessively long compiler command lines so that warnings and errors
from the compiler can be seen).

But with things like quiet_symlink there's nothing quieter. In fact
"SYMLINK" is longer than "ln -sf". So all this is doing is hiding the
actual command from the user for no real benefit.

The only actual reason we implemented the quiet_* functions was to be
able to neatly right-align the command name and left-align the arguments.

Let's give up on that, and just left-align everything, simplifying the
Makefiles considerably. Now, the only instances of a captialized command
name in the output is if there's some actually shortening of the command
itself.
2010-04-06 14:36:31 -07:00
Carl Worth
c20be126e5 Makefiles: Align the columns of output.
Much better.
2010-04-01 00:07:08 -07:00
Carl Worth
33d5cc415e Makefiles: Make the install rules quiet like the compilation rules.
The output from make is looking better all the time, (though the
columns still aren't lined up).
2010-03-31 23:54:21 -07:00
Carl Worth
649b1609a1 Makefile.config: Avoid pre-expanding the ${prefix} variable.
One of the supproted mechanisms we offer for configuration is
manually editing the Makefile.config file after it is generated
by the configure script. In this case it would be nice to be able
to change prefix only once, so allow that.
2010-03-31 22:54:15 -07:00
Carl Worth
ab95219a2f Move some variable assignments from Makefile.local to Makefile.config
There's not any special configure logic for determining these variable
values, but if we did add some in the future, then these will now be
in the right place for that.

Additionally, this now makes Makefile.local the single place for the
user to look for manually tweaking a variable assignment, (say, for a
compiler that can't accept a particular warning argument).

With this change, there should rarely be any need for a user to poke
into any Makefile.local file.
2010-03-31 22:54:08 -07:00
Carl Worth
bf159bd829 configure: Fix installation of library to work with alternate --prefix
If an explicit --libdir is passed, then that is used directly. Otherwise
libdir is chosen as the value of $PREFIX/lib, (whether or not prefix was
passed explicitly or set by default).
2010-03-31 18:17:51 -07:00
Carl Worth
2057688645 configure: Fix typo in help message.
Documentation is installed to PREFIX/man not PREFIX/share.
2010-03-31 18:17:29 -07:00
Ingmar Vanhassel
acaff279e2 Add a --libdir option to ./configure
This allows packagers to specify to which directory libraries should be
installed.

Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
2010-03-31 18:07:58 -07:00
Jeffrey C. Ollie
1bf121924d Add install target for notmuch.desktop file.
Add an install target that uses desktop-file-install to install the
desktop file in the appropriate location.  The location of the install
can be modified by changing the desktop_dir variable.

Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
2010-01-24 07:29:54 +13:00
Carl Worth
3f406fdefc configure: Look for both Xapian 1.1 and 1.0 and allow user override.
The in-development version of Xapian provides a config program named
xapian-config-1.1 while the released version provides a program named
xapian-config instead. By default, we now try each of these in turn,
and we also allow the user to set a XAPIAN_CONFIG environment variable
to explicitly specify a particular program.
2010-01-06 10:31:09 -08:00
Carl Worth
e50461eb84 configure: Implement a --help option to document --prefix.
Also document that values for CC, CFLAGS, etc. can be specified
via environment variables.
2009-12-04 16:05:12 -08:00
Carl Worth
943f415f81 configure: Support the capturing of CFLAGS and CXXFLAGS at configure time.
These variables can now be set via configure time via environment
variables like so:

	CFLAGS=-g ./configure

and subsequent builds will remember these values. The values can
still be overridden at compile time by passing make variables:

      make CFLAGS=-O2

The CXXFLAGS variable is optional. If unset at either configure
time or at compile time, it will inherit its value from the
CFLAGS variable. (Though if explicitly set at configure time
it must be explicitly overriden at compile time---just overriding
CFLAGS will not override CXXFLAGS as well.)
2009-12-04 15:20:12 -08:00
Carl Worth
c7f971e8c0 Fix quiet compilation to print the user's CFLAGS, CXXFLAGS, LDFLAGS.
The only reason I ever call "make V=1" myself, (other than when
debugging the compiler command-line for some reason), is to ensure
whether my CFLAGS, (like "-g -O0" or "-O2"), are actually making it to
the command-line.

But these are hard to find in the V=1 output, and really, we should
just print these even in the quiet case. So do that.
2009-12-04 15:08:37 -08:00
Carl Worth
5022424cf3 Fix option parsing for the case of a value with '='.
To support this we need to match the longest-possible suffix and then
strip the shortest-possible prefix.
2009-12-04 14:52:10 -08:00
Jameson Graef Rollins
2c2b31d536 Fix configure script to handle --prefix=
Reviewed-by: Carl Worth <cworth@cworth.org>:

This is really the fundamental thing that people expect a configure
script to do, so it's important to support it.
2009-12-04 14:48:38 -08:00
Carl Worth
b86e30be06 configure: Tweak the working of the example commands slightly.
Basically just getting better parallelism between the descriptions of
the Defora and Debian commands. (And fixing a nearby typo.)
2009-12-03 16:53:55 -08:00
Jeffrey C. Ollie
8696882443 Add some text to configure on how to install dependencies with yum.
Add some text on how to install dependencies with yum for Fedora or
other systems that use yum for package management.  Since the named of
the required packages on Fedora are slightly different from Debian
this will help get new users of notmuch that use Fedora going quicker.

Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
2009-12-03 16:48:42 -08:00
Carl Worth
ea2d9a2cbf configure: Allow user to specify compiler to be used.
The environment variables CC and CXX can be set at configure time to
specify what compiler to use. This compiler will be used for any
configure-time compilation, and will also be recorded in
Makefile.config to be used during the actual build.

The compiler to be used can still be overridden at build time by using
a make variable such as:

	make CC=gcc
2009-12-01 18:33:23 -08:00
Carl Worth
4faf809578 configure: Generate more friendly Makefile.config with separated CFLAGS
Each dependency now gets its own variable in the resulting
Makefile.config to make it much easier to debug where the various
flags came from in the case of any problems.
2009-12-01 18:25:17 -08:00
Carl Worth
c621465dd7 configure: Clarify pkg-config warning now that Makefile does not invoke pkg-config.
It's probably a bit more work to use this configure script without
pkg-config, but it's at least possible, (and we could make it even
easier if this becomes an important use case).
2009-12-01 18:13:43 -08:00
Carl Worth
a4d3f07e51 configure: Generate some documentation into Makefile.config.
It's just not nice to auto-generate a file without helping out the
poor user who gets stuck trying to figure out what went wrong.
2009-12-01 18:09:47 -08:00
Carl Worth
222ee87dfe configure: Resolve all pkg-config flags at configure time.
Previously, we were resolving these within the Makefile. This had
the problem that if pkg-config was not present, the Makefile would
still invoke it resulting in ugly errors before the configure script
was even run, (which would finally present a kind error message about
pkg-config not being present).
2009-12-01 18:03:31 -08:00
Carl Worth
e93520f109 configure: Move getlinetest.c down into config/have_getline.c.
This keeps configure-related clutter out of the main directory, and
also gives a more direct correlation between the name of the test and
the feature being tested for.
2009-12-01 16:56:39 -08:00
Carl Worth
650f6ac573 configure: Assimilate new getlinetest into recent configure conventions.
We're now using printf to print what we're checking before we check. We're
also making variables such as HAVE_GETLINE available to both make and to
the C pre-processor.

With this, the local getline implementation is now only compiled if not
available on the system.
2009-12-01 16:33:25 -08:00
Jeffrey C. Ollie
3054bc462c Add test to configure script to detect getline
Add a simple test to the configure script to detect getline.  It's not
important that the test run, just that it compiles and links without
any errors.

Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
2009-12-01 16:33:25 -08:00
Carl Worth
1682633f65 configure: Fix valgrind check to take effect, and to work.
We were missing an "override" directive in the assignment of CFLAGS
within Makefile.config so it was actually having no effect. Then, we
were also failing to get the proper include path for valgrind.h so
it wouldn't have worked even it were having effect. Fix both problems.
2009-12-01 16:33:25 -08:00
Carl Worth
6320695223 configure: Use printf to achieve result of "echo -n".
We had avoided using "echo -n" originally for portability concerns,
and instead just printed the same string in both conditions, (and
also printed the string late if any check took long). The word is
that printf is quite portable, so we use that instead.
2009-12-01 11:39:30 -08:00
Carl Worth
7c2c26bc4e Makefile: Add new "install-bash" target for bash completion support
It was problematic to have this in "make install" since it would
unconditionally try to install to /etc, (even if a non-privileged user
was attempting an install to a prefix in the user's home directory,
for example).
2009-12-01 10:14:00 -08:00
Carl Worth
72edf82cd0 configure: Fix pkg-config warning to not refer to non-existent variables.
We used to have NOTMUCH_CFLAGS and NOTMUCH_LDFLAGS in the Makefile, but
we don't anymore, so don't refer to them.
2009-12-01 10:07:14 -08:00
Carl Worth
d4a765b63e configure: Clean up the introductory message a bit.
Eliminate a typo or two, and mention that the user can edit
Makefile.config if necessary.
2009-12-01 08:40:45 -08:00
Alec Berryman
ea124966e7 Send mail to notmuch list, not Carl 2009-11-27 22:50:23 -08:00
Chris Wilson
986f6c9824 notmuch-new: Only install SIGALRM if not running under gdb
I felt sorry for Carl trying to step through an exception from xapian
and suffering from the SIGALARMs..

We can detect if the user launched notmuch under a debugger by either
checking our cmdline for the presence of the gdb string or querying if
valgrind is controlling our process. For the latter we need to add a
compile time check for the valgrind development library, and so add the
initial support to build Makefile.config from configure.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Carl Worth <cworth@cworth.org>
[ickle: And do not install the timer when under the debugger]
2009-11-22 05:36:36 +01:00
Carl Worth
ddb4713b4b Add a simple configure script.
This is *not* based on autoconf. In fact, this doesn't actually
configure anything, (one can compile notmuch directly with just
"make" without running configure if the dependencies are all
satisfied).

The only thing that this configure script does is to check for the
presence of the various dependencies and provide some guidance to
the user if they are not all available.
2009-11-02 09:11:37 -08:00