Use cdk5-config to determine appropriate flags for cdk. If that fails, try libcdkw in preference to libcdk. 2011-06-16 Martin von Gagern https://bugs.gentoo.org/371941 Index: licq-1.3.9/plugins/console/configure.ac =================================================================== --- licq-1.3.9.orig/plugins/console/configure.ac +++ licq-1.3.9/plugins/console/configure.ac @@ -66,13 +66,26 @@ to compile this plugin. Sorry. ])) dnl check for cdk -AC_CHECK_LIB(cdk, initCDKScreen,, +AC_CHECK_TOOL(CDK5_CONFIG, cdk5-config, none) +AS_IF([test "x$CDK5_CONFIG" = xnone],[ +AC_SEARCH_LIBS(initCDKScreen, [cdkw cdk],, AC_MSG_ERROR([ I can't find the cdk library. This is needed if you want to compile this plugin. Sorry. Try to get it from here: http://freshmeat.net/projects/libcdk/ ])) +],[ +AC_MSG_CHECKING([cdk5 libs]) +CDK5_LIBS="`$CDK5_CONFIG --libs`" +AC_MSG_RESULT([$CDK5_LIBS]) +LIBS="$CDK5_LIBS LIBS" +AC_MSG_CHECKING([cdk5 cpp flags]) +dnl cdk5-config returns its -I flags for --cflags, and has no --cppflags +CDK5_CFLAGS="`$CDK5_CONFIG --cflags`" +AC_MSG_RESULT([$CDK5_CFLAGS]) +CPPFLAGS="$CDK5_CFLAGS $CPPFLAGS" +]) AC_OUTPUT( src/Makefile \