From: Lyndon Nerenberg Date: Mon, 16 Jun 2014 23:03:25 +0000 (-0700) Subject: Ensure getline() is in scope on FreeBSD. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/3b0ac34dc7856c6b6eab5e56bc9780c9c1f4030f?ds=inline;hp=-c Ensure getline() is in scope on FreeBSD. On FreeBSD, to make the getline() prototype visible, you must '#define _WITH_GETLINE' before including . --- 3b0ac34dc7856c6b6eab5e56bc9780c9c1f4030f diff --git a/configure.ac b/configure.ac index a4caa82f..4fc486e9 100644 --- a/configure.ac +++ b/configure.ac @@ -153,6 +153,12 @@ if test -n "$auto_cflags"; then test "$nmh_cv_has_wextra" = "yes" && CFLAGS="${CFLAGS:+$CFLAGS }-Wextra" fi +dnl FreeBSD needs a bit of magic to bring getline() into scope. +dnl We do this here rather than in (say) h/mh.h because this macro must +dnl be defined before is pulled in. +AS_IF([test `uname` = FreeBSD], + [CPPFLAGS="$CPPFLAGS -D_WITH_GETLINE"]) + dnl -------------- dnl CUSTOMIZE LINK dnl --------------