Separate ARCH-dependent stuff by files to allow multiarch versions co-exists
Posted: 2016-01-06T04:48:44-07:00
Hello.
Recently by request https://bugzilla.redhat.com/show_bug.cgi?id=1293081 I solve problem of multiarch IM installation on system.
Basically it is not so hard. There 3 files magick/magick-config.h, magick/magick-baseconfig.h, magick/version.h which I just conditionally include (http://pkgs.fedoraproject.org/cgit/rpms ... be612ddd30) on next manner:
And also patch: http://pkgs.fedoraproject.org/cgit/rpms ... be612ddd30 to rely on system pkgconfig path.
I think it will be good idea incorporate such changes to main code. And possibly refactor and put all arch-dependent header stuff on one per arch file. What you think?
Recently by request https://bugzilla.redhat.com/show_bug.cgi?id=1293081 I solve problem of multiarch IM installation on system.
Basically it is not so hard. There 3 files magick/magick-config.h, magick/magick-baseconfig.h, magick/version.h which I just conditionally include (http://pkgs.fedoraproject.org/cgit/rpms ... be612ddd30) on next manner:
Code: Select all
#include <bits/wordsize.h>
#if __WORDSIZE == 32
# include "magick-config-32.h"
#elif __WORDSIZE == 64
# include "magick-config-64.h"
#else
# error "unexpected value for __WORDSIZE macro"
#endif
I think it will be good idea incorporate such changes to main code. And possibly refactor and put all arch-dependent header stuff on one per arch file. What you think?