]> git.lyx.org Git - features.git/commitdiff
Make KDE configuration more robust (John)
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 3 Nov 2000 16:47:27 +0000 (16:47 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 3 Nov 2000 16:47:27 +0000 (16:47 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1196 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
config/kde.m4

index f39885db718efd7076f538f90547c1933aee2b2a..76a64e26c01a52279018bc9c84b064fe02fd6afb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-11-03  John Levon  <moz@compsoc.man.ac.uk>
+
+       * config/kde.m4: make config more robust when KDEDIR is set
+       
 2000-11-03  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
        * src/frontends/xforms/Toolbar_pimpl.C: do not crash if mathed has
index 1d4744782ffb0098731d0337979a98009eac0bb8..0fb3714504a9c2c8ddad1940036071a364529ccd 100644 (file)
@@ -243,7 +243,7 @@ if AC_TRY_EVAL(ac_link) && test -s conftest; then
   AC_MSG_RESULT(yes)
 else
   AC_MSG_ERROR([your system fails at linking a small KDE application!
-Check, if your compiler is installed correctly and if you have used the
+Check if your compiler is installed correctly and if you have used the
 same compiler to compile Qt and kdelibs as you did use now])
 fi
 
@@ -547,7 +547,7 @@ AC_CACHE_VAL(ac_cv_have_qt,
 [#try to guess Qt locations
 
 qt_incdirs="$ac_qt_includes /usr/lib/qt/include /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt $x_includes $QTINC"
-test -n "$QTDIR" && qt_incdirs="$QTDIR/include $QTDIR $qt_incdirs"
+test -n "$QTDIR" && qt_incdirs="$QTDIR/include/qt $QTDIR/include $QTDIR $qt_incdirs"
 AC_FIND_FILE(qmovie.h, $qt_incdirs, qt_incdir)
 ac_qt_includes="$qt_incdir"
 
@@ -688,6 +688,10 @@ AC_REQUIRE([KDE_MISC_TESTS])
 AC_REQUIRE([AC_PATH_QT])dnl
 AC_MSG_CHECKING([for KDE])
 
+AC_ARG_WITH(kde-dir,
+    [  --with-kde-dir          where the KDE root is ],
+    [ export KDEDIR="$withval" ])
 if test "${prefix}" != NONE; then
   kde_includes=${prefix}/include
   ac_kde_includes=$prefix/include
@@ -706,24 +710,20 @@ else
   kde_includes=""
 fi
 
-AC_ARG_WITH(kde-dir,
-    [  --with-kde-dir          where the KDE root is ],
-    [
-       ac_kde_includes="$withval"/include
-       ac_kde_libraries="$withval"/lib
-    ])
+if test ! -z "$KDEDIR"; then
+  ac_kde_includes="$KDEDIR/include"
+  kde_includes="$KDEDIR/include"
+  ac_kde_libraries="$KDEDIR/lib"
+  kde_libraries="$KDEDIR/lib"
+fi
+
 AC_ARG_WITH(kde-includes,
-    [  --with-kde-includes     where the KDE includes are. ],
-    [
-       ac_kde_includes="$withval"
-    ])
+    [  --with-kde-includes     where the KDE includes are installed. ],
+    [ ac_kde_includes="$withval" ])
  
 AC_ARG_WITH(kde-libraries,
-    [  --with-kde-libraries    where the KDE library is installed.],
-    [
-       ac_kde_libraries="$withval"
-    ])
+    [  --with-kde-libraries    where the KDE libraries are installed.],
+    [ ac_kde_libraries="$withval" ])
  
 AC_CACHE_VAL(ac_cv_have_kde,
 [#try to guess kde locations
@@ -731,7 +731,7 @@ AC_CACHE_VAL(ac_cv_have_kde,
 if test -z "$1"; then
 
 kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/kde/include /usr/include/kde /usr/include /opt/kde/include $x_includes $qt_includes"
-test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR $kde_incdirs"
+test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include/kde $KDEDIR/include $KDEDIR $kde_incdirs"
 kde_incdirs="$ac_kde_includes $kde_incdirs"
 AC_FIND_FILE(ksock.h, $kde_incdirs, kde_incdir)
 ac_kde_includes="$kde_incdir"