]> git.notmuchmail.org Git - notmuch/commitdiff
Move "config" test programs to "compat".
authorCarl Worth <cworth@cworth.org>
Tue, 6 Apr 2010 18:12:10 +0000 (11:12 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 6 Apr 2010 21:36:31 +0000 (14:36 -0700)
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).

compat/README [new file with mode: 0644]
compat/have_getline.c [new file with mode: 0644]
config/README [deleted file]
config/have_getline.c [deleted file]
configure

diff --git a/compat/README b/compat/README
new file mode 100644 (file)
index 0000000..cd32c56
--- /dev/null
@@ -0,0 +1,16 @@
+notmuch/comapt
+
+This directory consists of two things:
+
+1. Small programs used by the notmuch configure script to test for the
+   availability of certain system features, (library functions, etc.).
+
+   For example: have_getline.c
+
+2. Compatibility implementations of those system features for systems
+   that don't provide their own versions.
+
+   For example: getline.c
+
+   The compilation of these files is made conditional on the output of
+   the test programs from [1].
diff --git a/compat/have_getline.c b/compat/have_getline.c
new file mode 100644 (file)
index 0000000..a8bcd17
--- /dev/null
@@ -0,0 +1,13 @@
+#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);
+}
diff --git a/config/README b/config/README
deleted file mode 100644 (file)
index eabfe28..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-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.).
diff --git a/config/have_getline.c b/config/have_getline.c
deleted file mode 100644 (file)
index a8bcd17..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#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);
-}
index ba2057643edea9a37823c9c9ffe3671bd5ad9380..648d8771b9198ca02f2fb995c66a461ba336aeff 100755 (executable)
--- a/configure
+++ b/configure
@@ -250,7 +250,7 @@ EOF
 fi
 
 printf "Checking for getline... "
-if ${CC} -o config/have_getline config/have_getline.c > /dev/null 2>&1
+if ${CC} -o compat/have_getline compat/have_getline.c > /dev/null 2>&1
 then
     printf "Yes.\n"
     have_getline=1
@@ -258,7 +258,7 @@ else
     printf "No (will use our own instead).\n"
     have_getline=0
 fi
-rm -f config/have_getline
+rm -f compat/have_getline
 
 cat <<EOF