diff --git a/config/ChangeLog b/config/ChangeLog index 8b23923fc2..43afc18486 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,9 @@ +2003-07-03 Jean-Marc Lasgouttes + + * configure.in: + * configure.ac: only add X libraries to LIBS if --disable-x has + not been passed to configure (useful for Qt/Mac) + 2003-07-18 Lars Gullik Bjønnes * lyxinclude.m4: add gcc 3.4 diff --git a/config/configure.ac b/config/configure.ac index f2c33e9e4b..e56e31be83 100644 --- a/config/configure.ac +++ b/config/configure.ac @@ -141,10 +141,16 @@ fi CHECK_WITH_CYGWIN ### Check for X libraries -# The real thing. AC_PATH_XTRA -LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" -CPPFLAGS="$CPPFLAGS $X_CFLAGS" +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 which frontend we want to use @@ -194,14 +200,6 @@ dnl ;; LYX_ERROR(Unknown frontend $lyx_use_frontend);; esac -### Check for xforms and xpm (only if X has been found). -if test "$have_x" = no ; then -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.]) -fi - ### Setup GNU gettext dnl GNU gettext is written in C AC_LANG_PUSH(C) diff --git a/config/configure.in b/config/configure.in index 0a47825476..bf2e3aeb14 100644 --- a/config/configure.in +++ b/config/configure.in @@ -142,10 +142,16 @@ fi CHECK_WITH_CYGWIN ### Check for X libraries -# The real thing. AC_PATH_XTRA -LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" -CPPFLAGS="$CPPFLAGS $X_CFLAGS" +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 which frontend we want to use @@ -197,14 +203,6 @@ dnl FRONTEND_LIBS="@XPM_LIB@ @XFORMS_LIB@ ${GNOME_FRONTEND_LIBS}";; LYX_ERROR(Unknown frontend $lyx_use_frontend);; esac -### Check for xforms and xpm (only if X has been found). -if test "$have_x" = no ; then -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.]) -fi - ### Setup GNU gettext dnl GNU gettext is written in C AC_LANG_C