mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 04:18:08 +01:00
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.
This commit is contained in:
parent
1466e249e7
commit
e93520f109
4 changed files with 23 additions and 18 deletions
5
config/README
Normal file
5
config/README
Normal file
|
@ -0,0 +1,5 @@
|
|||
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.).
|
13
config/have_getline.c
Normal file
13
config/have_getline.c
Normal file
|
@ -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);
|
||||
}
|
10
configure
vendored
10
configure
vendored
|
@ -127,15 +127,15 @@ EOF
|
|||
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
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
Loading…
Reference in a new issue