Open montefra opened 8 years ago
@montefra I don't see how you can avoid running configure, since it figures out platform-dependent configuration. For example, Mac OSX does not use malloc.h to declare the malloc calls (they are in stdlib.h, I think), whereas Linux does. So configure determines that and arranges to include malloc.h under Linux but not OSX. How would you handling this sort of difference without running configure and putting the results somewhere?
What do you need for Windows? I'm not sure what you are asking ...
@montefra I don't see how you can avoid running configure, since it figures out platform-dependent configuration. For example, Mac OSX does not use malloc.h to declare the malloc calls (they are in stdlib.h, I think), whereas Linux does. So configure determines that and arranges to include malloc.h under Linux but not OSX. How would you handling this sort of difference without running configure and putting the results somewhere?
I see.
A curiosity then: why the Makefile run the c compilier with -DHAVE_CONFIG_H
? If you have to run configure and have #include "conf.h"
, what is the motivation to have an #ifdef HAVE_CONFIG_H
?
What do you need for Windows? I'm not sure what you are asking ...
It's mostly a note for myself. If I have questions about it I'll let you know.
Thank you for the info
@montefra The -DHAVE_CONFIG_H is there because there are two ways to pass the config parameters to the C compiler: you can pass them in a config.h file or you can pass them on the command line directly. Would it help if we used the command-line technique? You would still have to run config (or generate the platform-dependent info in some way), but we could dispense with creating the config.h file. If you want to use that method, I can look into changing the xpa build in the next few days.
@ericmandel : no need to modify xpa. Now I know and I'm happy.
Would it help if we used the command-line technique?
I'm not sure. I think it's easier run configure and pass -DHAVE_CONFIG_H
than passing a bunch of arguments. Plus the current system is working (mostly) and I would not touch it if not necessary.
Thanks again for the clarification
@ericmandel: I have a couple of questions about xpa and the compilation and a meme to myself:
why the xpa
make
uses the-DHAVE_CONFIG_H
? Is it mandatory? I did try to remove it from pyds9/setup_packages.py but I get a lot of warnings aboutstrncpy
and others, notes about includingstring.h
and an error inIf there is a way of avoiding
-DHAVE_CONFIG_H
, I might be able to build libxpa and xpans without needing to run./configure
andmake distclean
, which I might prefer. Right now I runconfigure
just to create theconf.h
file, as all the compilation options are in thesetup_package.py
. Any suggestion?_find_shlib
and never reverted back to the original version. I also need to make Windows proofed the getting of xpans and ds9, using the original implementation. Thexpa.py
andpyds9.py
files from commit a1fb0258926483d6b9d9bd4ca343e1ba0d161f41 should be good enough for it.I hope that I managed to do it before going on vacation next week.