]> diplodocus.org Git - nmh/commitdiff
For FreeBSD builds, also search the ports tree for includes and libs.
authorLyndon Nerenberg <lyndon@orthanc.ca>
Mon, 29 Sep 2014 22:52:18 +0000 (15:52 -0700)
committerLyndon Nerenberg <lyndon@orthanc.ca>
Mon, 29 Sep 2014 22:52:18 +0000 (15:52 -0700)
configure.ac

index 7441dd02f4cf61c019625beb335b8dbede93cbe1..0e7d604f65f87c959908b2cdb971baee1b07b263 100644 (file)
@@ -152,8 +152,15 @@ 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 <stdio.h> is pulled in.
 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 <stdio.h> is pulled in.
+dnl
+dnl And while we're here, add the ports tree to the cpp and ld search
+dnl paths.
 AS_IF([test `uname` = FreeBSD],
 AS_IF([test `uname` = FreeBSD],
-       [CPPFLAGS="${CPPFLAGS:+$CPPFLAGS }-D_WITH_GETLINE"])
+       [CPPFLAGS="${CPPFLAGS:+$CPPFLAGS }-D_WITH_GETLINE"
+        nmh_cv_freebsd_portsdir=`echo '.include <bsd.port.mk>' | make -f /dev/stdin -V PREFIX`
+        CPPFLAGS="${CPPFLAGS:+$CPPFLAGS }-I$nmh_cv_freebsd_portsdir/include"
+        LDFLAGS="${LDFLAGS:+$LDFLAGS }-L$nmh_cv_freebsd_portsdir/lib"
+])
 
 dnl --------------
 dnl CUSTOMIZE LINK
 
 dnl --------------
 dnl CUSTOMIZE LINK