Wireshark-dev: Re: [Wireshark-dev] OS X build can't find gcrypt.h

From: Stephen Fisher <stephentfisher@xxxxxxxxx>
Date: Thu, 6 Jul 2006 14:08:48 -0700
On Fri, Jun 23, 2006 at 08:36:11PM -0700, Stephen Fisher wrote:

> I am trying to build SVN 18568 on my MacOS X machine and it is failing 
> at packet-ipsec.c, where it can't find gcrypt.h:

I resolved my problem of not finding gcrypt.h on OS X builds:

I added $(LIBGCRYPT_FLAGS) to the INCLUDES variable in 
epan/dissectors/Makefile.am:

-INCLUDES = -I$(srcdir)/../.. -I$(srcdir)/..
+INCLUDES = -I$(srcdir)/../.. -I$(srcdir)/.. $(LIBGCRYPT_FLAGS)
 
I tested this on FreeBSD and OS X:

   FreeBSD 6.1 libgcrypt from ports		/usr/local/include/gcrypt.h
   MacOS X 10.4 libgcrypt from DarwinPorts	/opt/local/include/gcrypt.h

The buildbot doesn't have libgcrypt installed, which is why this isn't 
being caught there.  Maybe it would be helpful to install libgcrypt in 
a "usual" OS X location (/opt for DarwinPorts or /sw for Fink).

The reason other include directories in /opt are found is because the 
aclocal macros from those packages (such as glib) add their include 
directory to the CFLAGS (such as /opt/local/include/glib-2.0/).  The 
libgcrypt macros do not do this.  Instead, libgcrypt's info manual says 
to add $(LIBGCRYPT_FLAGS) to AM_CPPFLAGS in Makefile.am.  I added it to 
the old, deprecated version of AM_CPPFLAGS - INCLUDES - that is used in 
epan/dissectors/Makefile.am.


Thanks,

  Steve