---------------> superseded by AC_CREATE_TARGET_H <---------------------
http://ac-archive.sf.net/guidod/ac_create_target_h.html USE IT!!
create the header-file and let it contain '#defines'
for the target platform. This macro is used for libraries
that have platform-specific quirks. Instead of inventing a
target-specific target.h.in files, just let it create a
header file from the definitions of AC_CANONICAL_SYSTEM
and put only 'ifdef's in the installed header-files.
if the PREFIX is absent, [TARGET] is used.
if the HEADER-FILE is absent, [target.h] is used.
the prefix can be the packagename. (`tr a-z- A-Z_`)
the defines look like...
#ifndef TARGET_CPU_M68K
#define TARGET_CPU_M68K "m68k"
#endif
#ifndef TARGET_OS_LINUX
#define TARGET_OS_LINUX "linux-gnu"
#endif
#ifndef TARGET_OS_TYPE /* the string itself */
#define TARGET_OS_TYPE "linux-gnu"
#endif
detail: in the case of hppa1.1, the three idents "hppa1_1" "hppa1"
and "hppa" are derived, for an m68k it just two, "m68k" and "m"
the NEED_TARGET_OS_H variant is almost the same function, but everything
is lowercased instead of uppercased, and there is a "__" in front of
each prefix, so it looks like...
#ifndef __target_os_linux
#define __target_os_linux "linux-gnulibc2"
#endif
#ifndef __target_os__ /* the string itself */
#define __target_os__ "linux-gnulibc2"
#endif
#ifndef __target_cpu_i586
#define __target_cpu_i586 "i586"
#endif
#ifndef __target_arch_i386
#define __target_arch_i386 "i386"
#endif
#ifndef __target_arch__ /* cpu family arch */
#define __target_arch__ "i386"
#endif
other differences: the default string-define is "__" insteadof "_TYPE"
and the default filename is "target-os.h" instead of just "target.h"
personally I prefer the second variant (which had been the first in
the devprocess of this file but I assume people will often fallback
to the primary variant presented herein).
@version: $Id: ac_need_target_h.m4,v 1.2 2001/08/25 15:31 ac-archive-0.5.39 $