[Kstars-devel] KDE/kdeedu/kstars/kstars/indi

Alexander Neundorf neundorf at kde.org
Wed Dec 20 18:14:42 CET 2006


On Wednesday 20 December 2006 07:56, you wrote:
> Ralf Habacker schrieb:
> > Alexander Neundorf schrieb:
> >> On Wednesday 20 December 2006 00:04, you wrote:
> >>> Hi Ralf,
> >>>
> >>> I am still getting compile errors in indi related to termios.h.  For
> >>> example, I'm getting errors in celestronprotocol.c, which are resolved
> >>> if I remove the "#ifdef HAVE_TERMIOS_H" wrapper around "#include
> >>> <termios.h>".  Other files in the indi directory have the same problem.
> >>>
> >>> So it seems that somehow HAVE_TERMIOS_H is still not being defined
> >>> properly.  This is with revision 615036, including Alexander's latest
> >>> move of the configure checks.  I also used a completely new build dir.
> >>
> >> After the commit from Ralf this now comes from config-kstars.h, which
> >> doesn't seem to be included anywhere except lx200generic.cpp.
> >> Please add #ifndef HAVE_CONFIG_H
> >> #include "config-kstars.h"
> >> #endif
> >> everywhere where you find this problem.
> >
> > I have moved HAVE_TERMIOS_H from config.h to config-kstars.h because
> > this define is only used by kstars. If config.h a better place for this ?
>
> In kdelibs/config.h.cmake I found the following hint:
...
> which let me assume that including config-kstars.h in config.h would be
> the best solution. Alex, what's your preference ?

IMO the best solution is what you did, i.e. move it to config-kstars.h and 
then make sure that this header is included whereever required.
I also moved the configure check to kstars/CMakeLists.txt as you have probably 
noticed. So this stuff is now where it belongs.

Pros:
-no need to recompile the complete module if a new check for one of the apps 
is needed
-it should be easier to make separate application releases
-it is less confusing, i.e. the checks are there where they belong, and you 
don't have to wonder whether you need to check for termios.h if you want to 
release e.g. kalzium separately.

To make it short: local is better than global.

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net


More information about the Kstars-devel mailing list