[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: using a KDE app as a subdir of a non-KDE app
From:       Josef Spillner <josef () ggzgamingzone ! org>
Date:       2003-02-17 23:52:09
[Download RAW message or body]

On Monday 17 February 2003 23:56, Mickael Marchand wrote:
> now my problem is :
> how do I include the kde app/configure.in.in in the autoconf stuff ?
> is it enough to have SUBDIRS=src in kde-app/Makefile.am ?
> there is an acinclude.m4 in kde-app/, should I just forget about it ?

You can either have a chain of configuration processes (in your case, one for 
top-level and one for kde-app), or a single one for both of them.
If you ever configured something like the Courier mail server, you'd get to 
know that a single process is much faster :)

% cd courier-0.40.2
% find . -name configure.in | wc -l
     47

Only in rare cases such as inclusion of foreign software, such a chain is used 
(see kdepim/libical for an example).

> I'd like to keep the admin dir in kde app because some day I will have some
> stuff to detect if KDE is present and if not it would just skip the
> compilation of the KDE app.

I would move the kde-specific files to the top-level, and create a 
configure.in which performs a check like this:

AC_ARG_ENABLE(kdeapp, [--disable-kdeapp Dont' build KDE app],, 
enable_kde_app=yes)

SUBDIRS="c++-lib c-app"

check_for_kde

if test "$enable_kde_app" = yes && test "kde_is_present" = yes; then
	do_more_kde_checks
	SUBDIRS="$SUBDIRS kde-app"
fi

AC_SUBST(SUBDIRS)

The check_for_kde macro should use KDE_USE_QT and friends, but simply return 
instead of failing when KDE is not found (modify acinclude.m4.in to kill all 
the AC_MSG_ERROR macros).
If KDE is found, kde_is_present should be set to yes.

The do_more_kde_checks could include AC_PATH_KDE etc.
(See KDE_DO_IT_ALL to get an idea of what is needed.)

The --disable-kdeapp switch is for people who could install the KDE client but 
don't want it for whatever reason.

Which project are you talking about btw? Maintaining a separate 
acinclude.m4.in for 3rd party projects is a lot of work. What I'd like to see 
is a split in kde-common/admin/acinclude.m4.in: One file suitable for 3rd 
party projects including features such as conditional compilation, and the 
other one containing all the macros nobody even knows about anymore...

The size can easily be shrinked from the current 140k to about 50-60k.

Josef

-- 
Play for fun, win for freedom.
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic