]> git.notmuchmail.org Git - notmuch/blobdiff - configure
configure: Move getlinetest.c down into config/have_getline.c.
[notmuch] / configure
index 6b571977917f5d7fb9d557915a00a97380c09bfa..ef90a8ba27c40822ed406ab8005bae19ca64c518 100755 (executable)
--- a/configure
+++ b/configure
@@ -126,6 +126,17 @@ EOF
     exit 1
 fi
 
+printf "Checking for getline... "
+if gcc -o config/have_getline config/have_getline.c > /dev/null 2>&1
+then
+    printf "Yes.\n"
+    have_getline=1
+else
+    printf "No (will use our own instead).\n"
+    have_getline=0
+fi
+rm -f config/have_getline
+
 cat <<EOF
 
 All required packages were found. You may now run the following
@@ -139,5 +150,6 @@ EOF
 # construct the Makefile.config
 cat > Makefile.config <<EOF
 prefix = /usr/local
-override CFLAGS += -DHAVE_VALGRIND=${have_valgrind} ${valgrind_flags}
+HAVE_GETLINE = ${have_getline}
+override CFLAGS += -DHAVE_VALGRIND=${have_valgrind} ${valgrind_flags} -DHAVE_GETLINE=\$(HAVE_GETLINE)
 EOF