On November 10, 2002 02:40 pm, Marcus Meissner wrote:
Do not link against -lcups directly, but dynamically load it if present. (just like freetype etc.)
[...]
+#ifdef HAVE_CUPS
/* dynamically load CUPS if not yet loaded */
if (!cupshandle) {
cupshandle = wine_dlopen(CUPS_SONAME, RTLD_NOW, NULL, 0);
if (!cupshandle) cupshandle = (void*)-1;
}
+#endif
Well, if we do this dynamically, why have this HAVE_CUPS check which is a compile time check? IMO we should just include a copy of the CUPS headers that we need, and drop the compile time check altogether. In fact, this check is misleading, as it suggests that we've verified some sort of compatibility with CUPS which we haven't. We _assume_ that a certain API is available at runtime, so why pretend we use something that's on the machine we compile on?