From b62db0d2e9f8311c74d2de7439ea5ea07bfe8272 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Thu, 25 Aug 2011 10:44:26 +0200 Subject: Document autoconf host_os tests --- hurd/porting/guidelines.mdwn | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'hurd/porting/guidelines.mdwn') diff --git a/hurd/porting/guidelines.mdwn b/hurd/porting/guidelines.mdwn index 8f21a64f..0a9c133a 100644 --- a/hurd/porting/guidelines.mdwn +++ b/hurd/porting/guidelines.mdwn @@ -23,6 +23,29 @@ You may ask on the [[mailing lists/bug-hurd]] mailing list for details or questions about fixing bugs. +## Fixing configure.ac/in + +The GNU/Hurd (and GNU/kFreeBSD) toolchain is extremely close to the GNU/Linux toolchain. +configure.ac thus very often just needs to be fixed by using the same cases as Linux, that is, turn + + switch "$host_os" in + case linux*) + +into + + switch "$host_os" in + case linux*|k*bsd-gnu|gnu*) + +for a host_os case statement, or + + switch "$host" in + case *-linux*) + +into + + switch "$host" in + case *-linux*|*-k*bsd-gnu|*-gnu*) + ## Undefined `bits/confname.h` macros (`PIPE_BUF`, ...) If macro `XXX` is undefined, but macro `_SC_XXX` or `_PC_XXX` is defined in `bits/confname.h`, you probably need to use `sysconf`, `pathconf` or `fpathconf` to obtain it dynamicaly. -- cgit v1.2.3