From: Jeffrey C. Ollie Date: Mon, 23 Nov 2009 18:14:15 +0000 (-0600) Subject: Add test to configure script to detect getline X-Git-Tag: 0.1~261 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3054bc462c8f31965f342808fce48c72f2858cfc;p=notmuch.git 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 --- diff --git a/configure b/configure index 6b571977..1b5f7e04 100755 --- a/configure +++ b/configure @@ -126,6 +126,15 @@ EOF exit 1 fi +if ! gcc -o getlinetest getlinetest.c > /dev/null 2>&1 +then + echo "Checking for getline... No." + getline=-Dgetline=_notmuch_getline +else + echo "Checking for getline... Yes." +fi +rm -f getlinetest + cat < Makefile.config < +#include + +int main() +{ + ssize_t count = 0; + size_t n = 0; + char **lineptr = NULL; + FILE *stream = NULL; + + count = getline(lineptr, &n, stream); +}