Re: Architecture specific header files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dne 25.6.2013 22:37, Björn Persson napsal(a):
Petr Pisar wrote:
On 2013-06-25, Vít Ondruch <vondruch@xxxxxxxxxx> wrote:
Is there some common practice, where to place architecture specific
header files? From output of the following command, I can't see any
such place.

I dont't think so. SDL moves architecture specific header file into
a private directory:

# Rename SDL_config.h to SDL_config-<arch>.h to avoid file conflicts
on # multilib systems and install SDL_config.h wrapper
mv %{buildroot}/%{_includedir}/SDL/SDL_config.h
%{buildroot}/%{_includedir}/SDL/SDL_config-%{_arch}.h
install -m644 %{SOURCE1} %{buildroot}/%{_includedir}/SDL/SDL_config.h

And installs a wrapper (SOURCE1) to replace the original location. The
wrapper is just a bunch of #if branches:

#if defined(__i386__)
#include "SDL_config-i386.h"
#elif defined(__ia64__)
#include "SDL_config-ia64.h"
[...]
#endif
As another example, Glib puts an architecture-specific header under
libdir and expects you to use pkg-config to make the compiler find it:


Using external tools for configuration, that is what I want to avoid. Of course for Ruby, I could use mkmf, which will create suitable Makefile for me, or pkgconfig. But why should I create complex makefile or configuration script for such simple program I posted in my initial email.


Vít
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux