From MAILER-DAEMON Mon Apr 10 06:04:13 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cxWBB-0006At-QD
	for mharc-autoconf@gnu.org; Mon, 10 Apr 2017 06:04:13 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45047)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rgerhards@gmail.com>) id 1cxWB9-00069M-9a
	for autoconf@gnu.org; Mon, 10 Apr 2017 06:04:12 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rgerhards@gmail.com>) id 1cxWB3-0002r3-F5
	for autoconf@gnu.org; Mon, 10 Apr 2017 06:04:11 -0400
Received: from mail-lf0-x22b.google.com ([2a00:1450:4010:c07::22b]:36774)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <rgerhards@gmail.com>) id 1cxWB3-0002qm-8G
	for autoconf@gnu.org; Mon, 10 Apr 2017 06:04:05 -0400
Received: by mail-lf0-x22b.google.com with SMTP id s141so32244146lfe.3
	for <autoconf@gnu.org>; Mon, 10 Apr 2017 03:04:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:from:date:message-id:subject:to;
	bh=31cjxjIx0TwwpL36LGIhIzWFne1EQm8eEfMDusTfNKQ=;
	b=mqEo5MblDmgKqMfvby39hcPZY0jy42B6JCdK+qJCUq8kbnhdmo8o2sJY3j5y65cpr9
	D0b3+MfXe++s2BRmNAa7arHRA4GEtlSRCYCIvYEaDCzggTpD+HEjeNj6jXThU8q21fhY
	BM6IW3ubWiH8G7n85p1B4hLwVZfQSmjByzeZMEPNhmLh/yZEAePA2yCK+CeirGvmRpUb
	yRxp9Y+e8cW1mveL6CWoF0LE+zZaZ1pg9vU7VfGumQ6kFkQSYvAvH2IphtMgWF5ZgmK5
	Mg04sRSPUdZGZ/vPh0iruJX9jviobOlbwbbNGKAEtESWMGUD80sIw5dx+9I60iUoDsJK
	IY1g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
	bh=31cjxjIx0TwwpL36LGIhIzWFne1EQm8eEfMDusTfNKQ=;
	b=kPbVo7XF2dOlv2tTdcxGEtGNKNJp7GtaYGGCbAXxJlWGUbG7XzVbXW5mAMLhGx4qv9
	X5aaDMXey8YIXqbqlVvYwh66EhJqpqgTCuPQM1OEdF881EHAUNfgxELNQQJKo3Bu7xIT
	OhV227MefDSRDHUixxgV1m4L2OgEyGsbTbaqL91M/uVM9boDihim5LfNckQK4EAJlSxz
	KlDLgMz3uuoBvCYrezYXPcaP1qMUQHHQyRs3QyjgPzIHyqyn9b0eP28fL9zSTbJMuz1c
	2zFgWBjCq/hB8TpVz6J4OfyIUoEnrwezI1CJAZIBMgikLP11rJVEvUNST2w4Bxr8EhZB
	nY7g==
X-Gm-Message-State: AFeK/H0Z4h0ueoEYpTfGCoFFJ/xFVcyI8cWxb6bqs+cMtlVranNrYpL0Emrbuw1CgeYEsMtHsvrPdxtF55uF6A==
X-Received: by 10.46.88.29 with SMTP id m29mr14049111ljb.92.1491818642150;
	Mon, 10 Apr 2017 03:04:02 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.46.21.67 with HTTP; Mon, 10 Apr 2017 03:04:01 -0700 (PDT)
From: Rainer Gerhards <rgerhards@gmail.com>
Date: Mon, 10 Apr 2017 12:04:01 +0200
Message-ID: <CAP-up9Ced6ojF5sy0SYwt0MvNUzpXJNgjo2f8nq+9RUViOcYyA@mail.gmail.com>
Subject: AC_CHECK_HEADERS, preprocessor call and Solaris
To: autoconf@gnu.org
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2a00:1450:4010:c07::22b
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 10 Apr 2017 10:04:12 -0000

Hi all,

I am porting my rsyslog project to the Solaris Sunstudio compiler (no
fun, I know...).

I have a problem with AC_CHECK_HEADERS. When it calls the
preprocessor, it ignores CFLAGS. However, the Sunstudio compiler needs
-std=c99 even when the preprocessor is called and if it is missing,
things do not work out.

I know I can use the optional forth argument to skip the preprocessor
call, but this does not sound like a really clean solution (more kind
of a work-around). I am searching for a way to make autoconf call the
preprocessor with a set of flags I can specify. Is this possible?

For your reference, here is a failed build:

http://build.rsyslog.com:8010/builders/rsyslog%20solaris11x64%20rsyslog/builds/426/steps/shell_3/logs/config.log

A problem line is
""/usr/include/sys/feature_tests.h", line 358: #error: "Compiler or
options invalid; UNIX 03 and POSIX.1-2001 applications require the use
of c99""

Searching for "Compiler or options invalid" brings up the details.
There are multiple instances.

TIA,
Rainer


From MAILER-DAEMON Mon Apr 10 07:42:59 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1cxXil-0001Ry-RH
	for mharc-autoconf@gnu.org; Mon, 10 Apr 2017 07:42:59 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37178)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rgerhards@gmail.com>) id 1cxXij-0001PE-CH
	for autoconf@gnu.org; Mon, 10 Apr 2017 07:42:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rgerhards@gmail.com>) id 1cxXid-0003GA-1N
	for autoconf@gnu.org; Mon, 10 Apr 2017 07:42:52 -0400
Received: from mail-lf0-x235.google.com ([2a00:1450:4010:c07::235]:33474)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <rgerhards@gmail.com>) id 1cxXic-0003EH-Pf
	for autoconf@gnu.org; Mon, 10 Apr 2017 07:42:50 -0400
Received: by mail-lf0-x235.google.com with SMTP id h125so69005265lfe.0
	for <autoconf@gnu.org>; Mon, 10 Apr 2017 04:42:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to; 
	bh=LhBvg6dzXOLnI2Pb10qypicNGaQUxeCeJ+xJSgHRkWw=;
	b=TYbRGlq95G5LEjjv0Q5gINPzHxHx/UVuwRSWEM73CLvEso3l/6jYmwwZgqa13Q6IsG
	wVKi8XjG7CvWQsn6f42Dn2C6G89hA8edv11ggir6l0d2PfB2RpdEWUubxdLvl1oJk6fU
	5HjiRBzdUilHSaIQfo2+ggmz3zQoibyzsDQ2vgvxzKz86iTrug20+PuoOSpFJTV+caS+
	hcdNeEgaLqPJHtE+CUndKey3rph6gL4R6wW7kAG39hicpwn1UAJaMwL83RdVw9tXeAYz
	2blfNrKTJIy7Gc/LSunMW3FYl9Zuutbao6RDoeONRdcMgS5u3ERYf8mrc6JJ0YjLcNWy
	U6Eg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:in-reply-to:references:from:date
	:message-id:subject:to;
	bh=LhBvg6dzXOLnI2Pb10qypicNGaQUxeCeJ+xJSgHRkWw=;
	b=DOb2iMy5feb6sh/G33rY/KjZAiXBORfVn4bbXasY3qvoFk0Gw5Npy0fJS7hLUikZ2u
	tWne4sjlZtrM6mAFDRWtX7VQ7WI8Eef5ztmXM3QxAErwdie8kJbo8sG1BjWKRsbpWx65
	ZgTlBcW78AuucThGrvQhcCdLA+qV3Nv1uVsmR1qsRsEUushfuDjy+lbwS8if2HIPMPL2
	znSDR9bOGQo0zi1+/ITQzFZLkUCltBr7isorHtvPNj/oO4+o2JSuBtpaA3i52vLQz5Jg
	apOR2tFEwV7WD/7PmBgtRmdhcOEt6QcuYZhAa21t39zorx+B2pkyDRIJNjZK9Y+gkh2o
	HrOQ==
X-Gm-Message-State: AFeK/H2+iF2r7cUYQpvytxDZ3r+0bZJMhx7XXOx6ioUr6dkYew1eD9Tbh3pocdRfLHEPyDW0heoAf1+DbUcFfA==
X-Received: by 10.46.92.65 with SMTP id q62mr14767828ljb.48.1491824567048;
	Mon, 10 Apr 2017 04:42:47 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.46.21.67 with HTTP; Mon, 10 Apr 2017 04:42:46 -0700 (PDT)
In-Reply-To: <CAP-up9Ced6ojF5sy0SYwt0MvNUzpXJNgjo2f8nq+9RUViOcYyA@mail.gmail.com>
References: <CAP-up9Ced6ojF5sy0SYwt0MvNUzpXJNgjo2f8nq+9RUViOcYyA@mail.gmail.com>
From: Rainer Gerhards <rgerhards@gmail.com>
Date: Mon, 10 Apr 2017 13:42:46 +0200
Message-ID: <CAP-up9A8DL1hc7uezdD2=jP-Hjn8mY0ND2Ongkv64+p6Dvwwng@mail.gmail.com>
Subject: Re: AC_CHECK_HEADERS, preprocessor call and Solaris
To: autoconf@gnu.org
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2a00:1450:4010:c07::235
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 10 Apr 2017 11:42:58 -0000

sorry for the noise, I should have set CPPFLAGS...

Rainer

On Mon, Apr 10, 2017 at 12:04 PM, Rainer Gerhards <rgerhards@gmail.com> wrote:
> Hi all,
>
> I am porting my rsyslog project to the Solaris Sunstudio compiler (no
> fun, I know...).
>
> I have a problem with AC_CHECK_HEADERS. When it calls the
> preprocessor, it ignores CFLAGS. However, the Sunstudio compiler needs
> -std=c99 even when the preprocessor is called and if it is missing,
> things do not work out.
>
> I know I can use the optional forth argument to skip the preprocessor
> call, but this does not sound like a really clean solution (more kind
> of a work-around). I am searching for a way to make autoconf call the
> preprocessor with a set of flags I can specify. Is this possible?
>
> For your reference, here is a failed build:
>
> http://build.rsyslog.com:8010/builders/rsyslog%20solaris11x64%20rsyslog/builds/426/steps/shell_3/logs/config.log
>
> A problem line is
> ""/usr/include/sys/feature_tests.h", line 358: #error: "Compiler or
> options invalid; UNIX 03 and POSIX.1-2001 applications require the use
> of c99""
>
> Searching for "Compiler or options invalid" brings up the details.
> There are multiple instances.
>
> TIA,
> Rainer


