a few kdebase cmake checks [PATCH]

Joseph Kerian jkerian at gmail.com
Wed Aug 2 18:43:15 BST 2006


Hello,
I need a bit of commentary on this kdebase patch as it is
a) decidedly out of my domain in svn
b) doing a few things which might be considered "naughty"

Background:
FreeBSD uses a slightly different set of names and structures for
utmp.h, used by kdm's backend. This is checked for by using the mutual
exclusion of FreeBSD's UTMP and the getutent function. (at least it
was under autotools)

Changes:
adding the function check and cmakedefine for strnlen (trivial)
adding the function check for getutent
adding cmakedefine for BSD_UTMP and defining if getutent is undefined
#define'ing ut_user to ut_name (new name to BSD name) under BSD_UTMP

Questions:
Does something like DOESNOTMATCH exist? I couldn't find documentation
of valid comparison operators in cmake's if statements.

The original configure.in.in lines were a bit more complicated, and
defined HAVE_UTMPX connected to this. Note that I'm not entirely sure
what this logic does, so I'm not really sure how to replicate it.
===================
AC_CHECK_FUNCS([getttyent])
case $host_os in
   linux*) ac_cv_func_getutxent=no;;
   darwin*) ac_cv_func_getutxent=no;;
   kfreebsd*-gnu) ac_cv_func_getutxent=no;;
   *) AC_CHECK_FUNC([getutxent]);;
esac
if test $ac_cv_func_getutxent = yes; then
   AC_DEFINE(HAVE_UTMPX, 1, [Define if the system uses extended utmp])
else
   AC_CHECK_FUNC([getutent], ,
      [AC_DEFINE(BSD_UTMP, 1, [Define if the system has no getutent])])
fi
============================

If the patch does not attach properly, it is located for the next few
weeks at: http://nene.serveftp.org/~kdetest/kdebase.patch

--Joe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdebase.patch
Type: application/octet-stream
Size: 2968 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060802/0fc20670/attachment.obj>


More information about the kde-core-devel mailing list