* ./configure.ac.in: fiddled with linking flags for the KDE plugin.
authorSam Hocevar <sam@videolan.org>
Sun, 9 Feb 2003 12:23:28 +0000 (12:23 +0000)
committerSam Hocevar <sam@videolan.org>
Sun, 9 Feb 2003 12:23:28 +0000 (12:23 +0000)
configure.ac.in

index 6537887..4b204d5 100644 (file)
@@ -2411,7 +2411,21 @@ AC_ARG_ENABLE(kde,
   [if test "x${enable_kde}" = "xyes"; then
      PLUGINS="${PLUGINS} kde"
      ALIASES="${ALIASES} kvlc"
-     LDFLAGS_kde="${LDFLAGS_kde} -L${KDEDIR}/lib -lkfile"
+     LDFLAGS_kde="${LDFLAGS_kde} -L${KDEDIR}/lib"
+     dnl Check for -lkfile (only in KDE 2) or -lkdeui -lkio (KDE 3)
+     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
+     AC_CHECK_LIB(kfile,main,[
+       LDFLAGS_kde="${LDFLAGS_kde} -lkfile"
+     ])
+     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
+     AC_CHECK_LIB(kdeui,main,[
+       LDFLAGS_kde="${LDFLAGS_kde} -lkdeui"
+     ])
+     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
+     AC_CHECK_LIB(kio,main,[
+       LDFLAGS_kde="${LDFLAGS_kde} -lkio"
+     ])
+     LDFLAGS="${LDFLAGS_save}"
      CPPFLAGS_kde="${CPPFLAGS_kde} -I/usr/include/kde -I/usr/include/qt"
      CPPFLAGS_kde="${CPPFLAGS_kde} -I${KDEDIR}/include -I${QTDIR}/include"
      if test -x ${QTDIR}/bin/moc