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. -- Enrico
Index: configure.ac =================================================================== --- configure.ac (revision 26799) +++ configure.ac (working copy) @@ -163,18 +163,10 @@ AC_CHECK_HEADERS(zlib.h, [AC_CHECK_LIB(z, gzopen, [LIBS="$LIBS -lz"], LYX_LIB_ERROR(libz,zlib))], [LYX_LIB_ERROR(zlib.h,zlib)]) - -### Check for X libraries -AC_PATH_XTRA -case $have_x in - yes) LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" - CPPFLAGS="$CPPFLAGS $X_CFLAGS";; - no) LYX_ERROR(dnl -[Cannot find X window libraries and/or headers. Check your installation. - If you use a Linux system, check that you have installed - the development tools.]);; - disable) ;; -esac +### check whether the user explicitly disabled X. +if test "x$with_x" = xno; then +AC_DEFINE_UNQUOTED([X_DISPLAY_MISSING],1,[Define to 1 if the X Window System is missing or not being used.]) +fi ### check which frontend we want to use Index: config/qt4.m4 =================================================================== --- config/qt4.m4 (revision 26799) +++ config/qt4.m4 (working copy) @@ -182,6 +182,16 @@ AC_DEFUN([QT4_DO_PKG_CONFIG], AC_DEFUN([QT4_DO_MANUAL_CONFIG], [ + dnl Check for X libraries + AC_PATH_X + AC_PATH_XTRA + case $have_x in + yes) LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" + CPPFLAGS="$CPPFLAGS $X_CFLAGS";; + no) LYX_ERROR([Cannot find X window libraries and/or headers.]);; + disable) ;; + esac + dnl flags for compilation QT4_INCLUDES= QT4_LDFLAGS=