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 \ Index: licq-1.3.9/acinclude.m4.in =================================================================== --- licq-1.3.9.orig/acinclude.m4.in +++ licq-1.3.9/acinclude.m4.in @@ -113,7 +113,7 @@ AC_DEFUN([AC_CHECK_SOCKS5], dnl Check if struct tm contains long int tm_gmtoff AC_DEFUN([LICQ_CHECK_GMTOFF], -[AC_CACHE_CHECK(for tm_gmtoff, licq_tm_gmtoff, +[AC_CACHE_CHECK(for tm_gmtoff, licq_cv_member_tm_gmtoff, [ AC_TRY_COMPILE([ #include ], [ @@ -121,31 +121,31 @@ long int foo; struct tm bar; foo = bar.tm_gmtoff; ], [ - licq_tm_gmtoff=yes + licq_cv_member_tm_gmtoff=yes ], [ - licq_tm_gmtoff=no + licq_cv_member_tm_gmtoff=no ]) ]) -if test $licq_tm_gmtoff = yes; then +if test $licq_cv_member_tm_gmtoff = yes; then AC_DEFINE(USE_GMTOFF, 1, [Define if struct tm has gmtoff]) fi ]) dnl Check if long timezone is somewhere defined (i.e. AIX) AC_DEFUN([LICQ_CHECK_TIMEZONE], - [AC_CACHE_CHECK(for extern long timezone, licq_extern_timezone, + [AC_CACHE_CHECK(for extern long timezone, licq_cv_var_timezone, [ AC_TRY_LINK([ #include ], [ long foo; foo = timezone; ], [ - licq_extern_timezone=yes + licq_cv_var_timezone=yes ], [ - licq_extern_timezone=no + licq_cv_var_timezone=no ]) ]) -if test $licq_extern_timezone = yes; then +if test $licq_cv_var_timezone = yes; then AC_DEFINE(USE_TIMEZONE, 1, [Define if global variable timezone exists]) fi ])