On Wed, Oct 08, 2008 at 11:25:05AM +0200, Jean-Marc Lasgouttes wrote: > Enrico Forestieri <[EMAIL PROTECTED]> writes: > > On Tue, Oct 07, 2008 at 09:47:34AM +0200, Jean-Marc Lasgouttes wrote: > >> > but I have a problem on Cygwin. With this patch, X_DISPLAY_MISSING > >> > is not defined in config.h and this is used in a couple of places > >> > in the > >> > code for distinguishing between Qt4/X11 and Qt4/Win Cygwin builds. > >> > >> I guess we can rely on Q_CYGWIN_WIN instead, but is it really defined > >> in this case? > > > > It is only defined in src/support and src/frontends/qt4. > > > > Instead, what about the attached patch? It works for me > > and only a single definition of X_DISPLAY_MISSING appears > > in config.h. > > Do you always need to use --without-x on cygwin, or does pkg-config do > everything for you (besides this extra X_DISPLAY_MISSING)? > > I know you explained everything already, but I forgot :)
Configuration works independently from --without-x (i.e., using or not this switch doesn't matter). On cygwin, Qt can be built either using X11 as a graphics backend or without it. Only in some special cases a distinction needs to be made, and --without-x seems to be the appropriate configure switch for making this distinction in sources outside of src/support and src/frontends/qt4. An alternative would be including -DQ_CYGWIN_WIN to CPPFLAGS when invoking configure, but this is uglier than using --without-x. However, I still don't understand what is the problem that your patch addresses. -- Enrico