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.
--- /dev/null
+notmuch/config
+
+This directory consists of small programs used by the notmuch
+configure script to test for the availability of certain system
+features, (library functions, etc.).
--- /dev/null
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <sys/types.h>
+
+int main()
+{
+ ssize_t count = 0;
+ size_t n = 0;
+ char **lineptr = NULL;
+ FILE *stream = NULL;
+
+ count = getline(lineptr, &n, stream);
+}
fi
printf "Checking for getline... "
-if ! gcc -o getlinetest getlinetest.c > /dev/null 2>&1
+if gcc -o config/have_getline config/have_getline.c > /dev/null 2>&1
then
- printf "No.\n"
- have_getline=0
-else
printf "Yes.\n"
have_getline=1
+else
+ printf "No (will use our own instead).\n"
+ have_getline=0
fi
-rm -f getlinetest
+rm -f config/have_getline
cat <<EOF
+++ /dev/null
-#define _GNU_SOURCE
-#include <stdio.h>
-#include <sys/types.h>
-
-int main()
-{
- ssize_t count = 0;
- size_t n = 0;
- char **lineptr = NULL;
- FILE *stream = NULL;
-
- count = getline(lineptr, &n, stream);
-}