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

Ralf Habacker ralf.habacker at freenet.de
Wed Dec 20 07:56:06 CET 2006


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:

/* NOTE: only add something here if it is really needed by all of kdelibs.
   Otherwise please prefer adding to the relevant config-foo.h.cmake file,
   to minimize recompilations and increase modularity. */

This is the reason why i moved this definition to config-kstars.h

In kstars/kstars.h I found that it includes at first

#include <config.h>

which looks to me, that kstars.h would be the main include file included 
by any other to have properly set HAVE_ defines:

f:/daten/kdeedu/kstars/kstars/addcatdialog.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/detaildialog.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/devicemanager.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/finddialog.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/focusdialog.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/fovdialog.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/imagesequence.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/imageviewer.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/indidevice.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/indidriver.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/indimenu.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/indiproperty.cpp: #include "kstars.h"
f:/daten/kdeedu/kstars/kstars/indistd.cpp: #include "kstars.h"
f:/daten/kdeedu/kstars/kstars/ksnewstuff.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/kspopupmenu.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/kstars.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/kstarsactions.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/kstarsdcop.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/kstarsinit.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/kswizard.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/locationdialog.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/main.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/opsadvanced.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/opscatalog.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/opscolors.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/opssolarsystem.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/simclock.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/asteroidscomponent.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/cometscomponent.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/constellationboundarycomponent.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/constellationlinescomponent.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/constellationnamescomponent.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/coordinategridcomponent.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/customcatalogcomponent.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/deepskycomponent.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/eclipticcomponent.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/horizoncomponent.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/jupitermoonscomponent.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/linelistcomponent.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/milkywaycomponent.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/skycomponent.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/skycomposite.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/skymapcomposite.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/solarsystemcomposite.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/solarsystemlistcomponent.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/solarsystemsinglecomponent.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skycomponents/starcomponent.cpp:#include 
"kstars.h"
f:/daten/kdeedu/kstars/kstars/skymap.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/skymapdraw.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/skymapevents.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/telescopeprop.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/telescopewizardprocess.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/tools/altvstime.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/tools/jmoontool.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/tools/lcgenerator.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/tools/modcalcazel.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/tools/modcalcdaylength.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/tools/modcalcequinox.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/tools/modcalcgeodcoord.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/tools/modcalcplanets.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/tools/modcalcsidtime.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/tools/modcalcvlsr.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/tools/observinglist.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/tools/obslistwizard.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/tools/planetviewer.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/tools/scriptbuilder.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/tools/wutdialog.cpp:#include "kstars.h"
f:/daten/kdeedu/kstars/kstars/widgets/mapcanvas.cpp:#include "../kstars.h"

but unfortunally the recent problem shows that this is not the case at 
all. Some files includes config.h and not kstars.h:

f:/daten/kdeedu/kstars/kstars/indi/lx200basic.cpp:#include "config.h"
f:/daten/kdeedu/kstars/kstars/indi/webcam/port.cpp://#include "config.h"

They will get the definitions in config.h but not the one from 
config-kstars.h

and some includes both like shown below includes both config files but 
not kstars.h

f:/daten/kdeedu/kstars/kstars/indi/lx200generic.cpp:#include "config.h"
f:/daten/kdeedu/kstars/kstars/indi/lx200generic.cpp:#include 
"config-kstars.h"

Wouldn't be the best solution to include  kstars/config-kstars.h in main 
config.h and to include kstars.h in the four files above mentioned  or 
to ad d kstars/config-kstars.h to kstars.h directly ?

At the end of kdelibs config.h.cmake file I found included

#include "kdecore/kdefakes.h"

which let me assume that including config-kstars.h in config.h would be 
the best solution. Alex, what's your preference ?

Ralf



More information about the Kstars-devel mailing list