Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
I try to compile ImageMagick with an Android/arm64 toolchain from Crystax NDK, that has no <sys/timeb.h>. Now I found MAGICKCORE_HAVE_SYS_TIMEB_H, which should enable me to say this header is not available – I guess.
Greping over the source shows 3 places where MAGICKCORE_HAVE_SYS_TIMEB_H is used:
./MagickWand/studio.h-# include <sys/types.h>
./MagickWand/studio.h-# include <sys/stat.h>
./MagickWand/studio.h:# if defined(MAGICKCORE_HAVE_SYS_TIMEB_H)
./MagickWand/studio.h-# include <sys/timeb.h>
./MagickWand/studio.h-# endif
--
./MagickCore/studio.h-# include <sys/types.h>
./MagickCore/studio.h-# include <sys/stat.h>
./MagickCore/studio.h:# if defined(MAGICKCORE_HAVE_SYS_TIMEB_H)
./MagickCore/studio.h-# include <sys/timeb.h>
./MagickCore/studio.h-# endif
--
./MagickCore/magick-baseconfig.h-
./MagickCore/magick-baseconfig.h-/* Define to 1 if you have the <sys/timeb.h> header file. */
./MagickCore/magick-baseconfig.h:#ifndef MAGICKCORE_HAVE_SYS_TIMEB_H
./MagickCore/magick-baseconfig.h:#define MAGICKCORE_HAVE_SYS_TIMEB_H 1
./MagickCore/magick-baseconfig.h-#endif
./MagickCore/magick-baseconfig.h-
Is it true that defining MAGICKCORE_HAVE_SYS_TIMEB_H=0 should disable including <sys/timeb.h>? If so, I think we have the problem that it is still defined because defined(MAGICKCORE_HAVE_SYS_TIMEB_H) is true.
The automake / autoconf toolchain sets the value for MAGICKCORE_HAVE_SYS_TIMEB_H. It is likely finding it in your local environment rather than in the Android environment suggesting either you have not properly set up the cross-compile configuration or automake / autoconf has a bug when cross-compiling. We have cross-compiled in the past without any problems, we're not sure why its failing for you.
Thanks for pushing me in the right direction! I was using the x86 toolchain for configuration, which is android-16, which has a <sys/timeb.h>. With the correct toolchain, HAVE_SYS_TIMEB_H is not defined.