]> git.notmuchmail.org Git - notmuch/blobdiff - configure
configure: Assimilate new getlinetest into recent configure conventions.
[notmuch] / configure
index 1b5f7e04eee3f584ac4c8a56d1c58d03dc221d06..bb1f0dbc22b4519521ee47f7aef41dc2e6b0e532 100755 (executable)
--- a/configure
+++ b/configure
@@ -126,12 +126,14 @@ EOF
     exit 1
 fi
 
     exit 1
 fi
 
+printf "Checking for getline... "
 if ! gcc -o getlinetest getlinetest.c > /dev/null 2>&1
 then
 if ! gcc -o getlinetest getlinetest.c > /dev/null 2>&1
 then
-    echo "Checking for getline... No."
-    getline=-Dgetline=_notmuch_getline
+    printf "No.\n"
+    have_getline=0
 else
 else
-    echo "Checking for getline... Yes."
+    printf "Yes.\n"
+    have_getline=1
 fi
 rm -f getlinetest
 
 fi
 rm -f getlinetest
 
@@ -148,5 +150,6 @@ EOF
 # construct the Makefile.config
 cat > Makefile.config <<EOF
 prefix = /usr/local
 # construct the Makefile.config
 cat > Makefile.config <<EOF
 prefix = /usr/local
-override CFLAGS += -DHAVE_VALGRIND=${have_valgrind} ${valgrind_flags} ${getline}
+HAVE_GETLINE = ${have_getline}
+override CFLAGS += -DHAVE_VALGRIND=${have_valgrind} ${valgrind_flags} -DHAVE_GETLINE=\$(HAVE_GETLINE)
 EOF
 EOF