From 04afd2846dd563296c40667557ef4ac0d47aeb0c Mon Sep 17 00:00:00 2001 From: Michael Rash Date: Sat, 20 Aug 2011 22:02:21 -0400 Subject: [PATCH] On FreeBSD, made gpgme header path inclusion optional If gpgme is installed on FreeBSD systems it appears that -I/usr/local/include/gpgme must be added to the include path, but this change only adds the path if gpgme is installed and going to be used. --- configure.ac | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index caf76e7a..06b5d1de 100644 --- a/configure.ac +++ b/configure.ac @@ -165,12 +165,6 @@ case "$host" in # gcc: now: linker input file unused because linking not done use_ro_relocations=no use_immediate_binding=no - if [ test "x$CPPFLAGS" = "x" ] ; then - CPPFLAGS="-I/usr/local/include -I/usr/local/include/gpgme" - fi - if [ test "x$LDFLAGS" = "x" ] ; then - LDFLAGS="-L/usr/local/lib" - fi ;; esac @@ -480,6 +474,21 @@ AS_IF([test "x$GPG_EXE" != x], ], [ gpg_exe="(not found)"] ) +if [test "$have_gpgme" = "yes" ]; then +case "$host" in +*-*-linux*) + ;; +*-*-freebsd*) + if [ test "x$CPPFLAGS" = "x" ] ; then + CPPFLAGS="-I/usr/local/include -I/usr/local/include/gpgme" + fi + if [ test "x$LDFLAGS" = "x" ] ; then + LDFLAGS="-L/usr/local/lib" + fi + ;; +esac +fi + dnl Check for libpcap, gdbm (or ndbm) if we are building the server component dnl AS_IF([test "$want_server" = yes], [