Le dim 10/11/2002 à 23:18, Dimitrie O. Paun a écrit : > 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?
I don't think including foreign headers is the way to go. Better pressure packagers to have CUPS-devel installed when they compile. For self-compilation, if CUPS is not installed at compile-time, it won't be there at runtime (except if installed since then, or if CUPS-devel is not installed). Foreign headers mean you must track new versions, etc. It doesn't seem to be the right thing to do. Vincent