I assume you're building via a custom Makefile and not Autools (configure)? If so, why not generate a dummy config.h in your makefile? I agree with IOhannes: this is standard operating procedure for auto tools projects and, in fact, I use the config.h pattern in other, non configure projects myself.

On Oct 9, 2024, at 7:21 PM, pd-dev-request@lists.iem.at wrote:


Message: 4
Date: Wed, 9 Oct 2024 08:44:33 -0500
From: Miller Puckette <mpuckette@cloud.ucsd.edu>
Subject: [PD-dev] #include "config.h" in m_private_utils.h needed?
To: pd-dev <pd-dev@lists.iem.at>
Message-ID: <dbbf85f8-a1d7-4937-83fb-7a6176b9be31@cloud.ucsd.edu>
Content-Type: text/plain; charset=UTF-8; format=flowed

I heard from an ESPD tester that compiling ESPD sometimes fails because 
(for some reason) HAVE_CONFIG_H is defined by the complicated ESP 
compile chain but there's no "config.h" in the Pd sources so this fails:

#ifdef HAVE_CONFIG_H
/* autotools might put all the HAVE_... defines into "config.h" */
# include "config.h"
#endif

It seems a bit fragile anyway... is there a way to make the test more 
stringent?  Perhaps require that some other symbol be defined by hand 
before pulling in "config.h", and/or having some way to specify what 
directory to look for config.h in?

In the meantime I already have to patch the Pd sources slightly to get 
ESPD to compile so I can work around this if I have to.

thanks

Miller

--------
Dan Wilcox
danomatika.com
robotcowboy.com