Quantcast

Output additional header file

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Output additional header file

A.P. Horst
Hello,

I am trying to output an additional header file which should hold a
small subset if the defines in the regular config.h.
Currently my simple test setup is set to create test.h:
AC_CONFIG_HEADERS([config.h test.h])

I have written test.h.in, in which I just copied over a #undef entry
from config.h.in:
/* HAVE_FOO_H */
#undef HAVE_FOO_H

Which is generated by autoreconf (autoheader) from an AC_DEFINE statement.

When doing configure, it says it creates test.h:
config.status: creating config.h
config.status: creating test.h

And it does. But test.h still has the #undef line, while config.h
correctly has the #undef line replaced.

What am I missing here or doing wrong?

With kind regards,
Arie Horst


_______________________________________________
Autoconf mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/autoconf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Output additional header file

Gavin Smith
On 27 May 2016 at 12:56, A.P. Horst <[hidden email]> wrote:

> I am trying to output an additional header file which should hold a small
> subset if the defines in the regular config.h.
> Currently my simple test setup is set to create test.h:
> AC_CONFIG_HEADERS([config.h test.h])
>
> I have written test.h.in, in which I just copied over a #undef entry from
> config.h.in:
> /* HAVE_FOO_H */
> #undef HAVE_FOO_H
>
> Which is generated by autoreconf (autoheader) from an AC_DEFINE statement.
>
> When doing configure, it says it creates test.h:
> config.status: creating config.h
> config.status: creating test.h
>
> And it does. But test.h still has the #undef line, while config.h correctly
> has the #undef line replaced.
>
> What am I missing here or doing wrong?

If you emailed a small, self-contained example with this problem, I'd
try to work out what was going wrong with it.

_______________________________________________
Autoconf mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/autoconf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Output additional header file

A.P. Horst
Thanks for your help.
Attached is a bare-minimum configure script which demonstrates the problem.

I am using:
msys-autoconf-2.68-1-msys-1.0.17
msys-automake-1.11.1-1-msys-1.0.13
On windows 10.

With kind regards,
Arie


On 5/28/2016 09:47, Gavin Smith wrote:

> On 27 May 2016 at 12:56, A.P. Horst <[hidden email]> wrote:
>> I am trying to output an additional header file which should hold a small
>> subset if the defines in the regular config.h.
>> Currently my simple test setup is set to create test.h:
>> AC_CONFIG_HEADERS([config.h test.h])
>>
>> I have written test.h.in, in which I just copied over a #undef entry from
>> config.h.in:
>> /* HAVE_FOO_H */
>> #undef HAVE_FOO_H
>>
>> Which is generated by autoreconf (autoheader) from an AC_DEFINE statement.
>>
>> When doing configure, it says it creates test.h:
>> config.status: creating config.h
>> config.status: creating test.h
>>
>> And it does. But test.h still has the #undef line, while config.h correctly
>> has the #undef line replaced.
>>
>> What am I missing here or doing wrong?
> If you emailed a small, self-contained example with this problem, I'd
> try to work out what was going wrong with it.
>
> _______________________________________________
> Autoconf mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/autoconf
>

_______________________________________________
Autoconf mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/autoconf

test.zip (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Output additional header file

Keith Marshall-3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 30/05/16 07:06, A.P. Horst wrote:
> I am using: msys-autoconf-2.68-1-msys-1.0.17
> msys-automake-1.11.1-1-msys-1.0.13

Just curious, but why?  From the package description for the former:
> <paragraph>This msys port of autoconf has been modified
> specifically for the MSYS System Builder (msys-dvlpr) environment;
> that is, it is intended to be used only when producing binary
> packages for the MSYS subsystem.  If you intend to produce
> executables for the native "mingw32" subsystem (that is,
> applications that should work on Microsoft Windows installations
> without the MSYS dll), then you should install the
> mingw32-autoconf-*, mingw32-autoconf2.5-*, and/or
> mingw32-autoconf2.1-* packages instead. </paragraph>

I don't recognize you as an MSYS developer -- i.e. as an associate of
the MinGW.org owner project.  Should you not be using the mingw32-*
variants of those packages, as that quoted paragraph suggests?

- --
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJXS/TEAAoJEMCtNsY0flo/ywIP/jTDpzOC5X22+FTfTCvn62H/
tNO887/PG55wSXg1IaKyizWF5f8eaAcfBEk8Xr12coI90HBCoq8vfzmFF80r3Edq
HIuhpDIYJfzV1qX+Q11NeKeIYQ8zP8i1QaW/6HyxrbrsuXQemjyxkwnPbYyRdWE1
0Np0+N1ema0HUVrd2OPBfbsAqWovJHCNCHiSUE23chScZxuXTw95iGai1G9ZruEy
9aOZsLnElRG/NtBPOJEpiRqjhvNHjelSXiIWm6ds36maAAuv3vH7inySsLenrYID
PCM9hSB3PR5lsXzX8SolUf/ps8H3X1gcVLW2s5dFevcmKxi76TMJ1WjafxzxOigZ
e50KK4Frkb2+F43zPs8+M20ySZlPhRw+Yv+AuQgPWvWeNSata7Ra3g4/dmFCYmDE
lOLpDcl3oGKBOhEq/nkobejuFhFns7gOqAw1JWEMFEF6FXv8lns40gmezpWoYL2K
NdiZTdbXNAdtKZKpTYr1i+E0hfOxl+XfAZar6q42jmMtEKsOoGNvIt8o2I0qZXnl
yFqBZmHE6UKxAdpm7N8mPcAavz+1F/5/sfGiWROO8F9gkfM9+GJ5WmNXMZp19r7l
akR1D89KCzVfyqQl5XJHmwULRomM6TDVZ31v1gwWgKcvnS50EV2GS/35Uk0Y7b2W
RaRRelZA+BUsMCQ3Vqce
=A7i7
-----END PGP SIGNATURE-----

_______________________________________________
Autoconf mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/autoconf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Output additional header file

A.P. Horst

On 5/30/2016 10:07, Keith Marshall wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 30/05/16 07:06, A.P. Horst wrote:
>> I am using: msys-autoconf-2.68-1-msys-1.0.17
>> msys-automake-1.11.1-1-msys-1.0.13
> Just curious, but why?  From the package description for the former:
Very valid question. Simple answer: the mingw package didn't/doesn't
work. Don't remember the exact problems we had with it.
You think it could have something to do with it?

>> <paragraph>This msys port of autoconf has been modified
>> specifically for the MSYS System Builder (msys-dvlpr) environment;
>> that is, it is intended to be used only when producing binary
>> packages for the MSYS subsystem.  If you intend to produce
>> executables for the native "mingw32" subsystem (that is,
>> applications that should work on Microsoft Windows installations
>> without the MSYS dll), then you should install the
>> mingw32-autoconf-*, mingw32-autoconf2.5-*, and/or
>> mingw32-autoconf2.1-* packages instead. </paragraph>
> I don't recognize you as an MSYS developer -- i.e. as an associate of
> the MinGW.org owner project.  Should you not be using the mingw32-*
> variants of those packages, as that quoted paragraph suggests?
>
> - --
> Regards,
> Keith.
>
> Public key available from keys.gnupg.net
> Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.20 (GNU/Linux)
>
> iQIcBAEBAgAGBQJXS/TEAAoJEMCtNsY0flo/ywIP/jTDpzOC5X22+FTfTCvn62H/
> tNO887/PG55wSXg1IaKyizWF5f8eaAcfBEk8Xr12coI90HBCoq8vfzmFF80r3Edq
> HIuhpDIYJfzV1qX+Q11NeKeIYQ8zP8i1QaW/6HyxrbrsuXQemjyxkwnPbYyRdWE1
> 0Np0+N1ema0HUVrd2OPBfbsAqWovJHCNCHiSUE23chScZxuXTw95iGai1G9ZruEy
> 9aOZsLnElRG/NtBPOJEpiRqjhvNHjelSXiIWm6ds36maAAuv3vH7inySsLenrYID
> PCM9hSB3PR5lsXzX8SolUf/ps8H3X1gcVLW2s5dFevcmKxi76TMJ1WjafxzxOigZ
> e50KK4Frkb2+F43zPs8+M20ySZlPhRw+Yv+AuQgPWvWeNSata7Ra3g4/dmFCYmDE
> lOLpDcl3oGKBOhEq/nkobejuFhFns7gOqAw1JWEMFEF6FXv8lns40gmezpWoYL2K
> NdiZTdbXNAdtKZKpTYr1i+E0hfOxl+XfAZar6q42jmMtEKsOoGNvIt8o2I0qZXnl
> yFqBZmHE6UKxAdpm7N8mPcAavz+1F/5/sfGiWROO8F9gkfM9+GJ5WmNXMZp19r7l
> akR1D89KCzVfyqQl5XJHmwULRomM6TDVZ31v1gwWgKcvnS50EV2GS/35Uk0Y7b2W
> RaRRelZA+BUsMCQ3Vqce
> =A7i7
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Autoconf mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/autoconf
>

BR,
Arie


_______________________________________________
Autoconf mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/autoconf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Output additional header file

Gavin Smith
In reply to this post by A.P. Horst
On 30 May 2016 at 07:06, A.P. Horst <[hidden email]> wrote:
> Thanks for your help.
> Attached is a bare-minimum configure script which demonstrates the problem.

Thanks, I replicated the problem.

I noticed that test.h.in had MS-DOS style line endings (CR LF). When I
changed it to Unix-style (LF), the output file test.h was created
correctly.

_______________________________________________
Autoconf mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/autoconf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Output additional header file

A.P. Horst
Glad the problem and solution is so simple.
Thanks for helping out!

BR,
Arie


On 5/30/2016 10:22, Gavin Smith wrote:

> On 30 May 2016 at 07:06, A.P. Horst <[hidden email]> wrote:
>> Thanks for your help.
>> Attached is a bare-minimum configure script which demonstrates the problem.
> Thanks, I replicated the problem.
>
> I noticed that test.h.in had MS-DOS style line endings (CR LF). When I
> changed it to Unix-style (LF), the output file test.h was created
> correctly.
>
> _______________________________________________
> Autoconf mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/autoconf
>


_______________________________________________
Autoconf mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/autoconf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Output additional header file

Keith Marshall-3
In reply to this post by A.P. Horst
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 30/05/16 09:17, A.P. Horst wrote:

> On 5/30/2016 10:07, Keith Marshall wrote:
>> On 30/05/16 07:06, A.P. Horst wrote:
>>> I am using: msys-autoconf-2.68-1-msys-1.0.17
>>> msys-automake-1.11.1-1-msys-1.0.13
>>
>> Just curious, but why?  From the package description for the
>> former:
>
> Very valid question. Simple answer: the mingw package
> didn't/doesn't work. Don't remember the exact problems we had with
> it.

Curious.  I dumped Windows, for good and all, about three years ago.
Before then, I used the mingw32-autoconf package, and never had the
slightest problem with it; (I never saw the point in automake).

> You think it could have something to do with it?

Possibly.  Seems like Gavin has identified your problem as being
related to CRLF vs. LF line endings.  The mingw32 packages would
likely be more tolerant of Windows native (CRLF) endings; MSYS
packages will always expect LF only, (because they make no effort to
support the native Windows environment).

- --
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJXTAyaAAoJEMCtNsY0flo/S5wQALX9albX7U8uXn04S5sWIChN
3iqDfRvm2zfso4R33m4ohIxs1/lNfD8Ht5Zh9HU2s57nhppffbCeROUaTx5SZAUM
rt06H967vv7bBa9eehJJ+hupJy6Gb2RToXFCK+aYfMuejjSB+L82KHngTpy8FyDw
E3njriLbQZ99B8inP4J6V+bd/hpQGShLYHNo9pMd/Ey1a0Q/UtPKfu6cnvMG7Dxf
5H19dLlZj/1rPLzB+scvueT/nf6p76evlVPe46rjT7T+1DyI3BmH7DpFYo9oa3W9
0Das0t1ebkVVaQKdsOcKYE/Zj9Uuqk4rfM1kpCBn/eL2EbJnv72eNCKE01SaUqAh
29YT624qhC+i3m5vixvERdGW/i7YMjwy48fjjAAhw0BMv3u69A+m7M+0WsoJDU3e
6vlpe5yeh8Dpqq9gTP97sKH8Vy84dubcYEyJvrZrNcBq8qlZS/VKWenM1oRRB/Xv
usN/STlGVfMUu8IjC1QTTMYnDt5+vmFhaCcYkN15QR9bcRaz9QoeSxq9ThiuRhEW
WMeRxvo9ryPreXhNMVN2ppOiDrDv4NF/uHZeEzlef0acB3AQrolrKa06xf8Wk50d
jjkdro9nUsY4EfAXgDJkcf9XcFhfHmHA/XNjVjME4SXue6ria6vSeEv3HuAue7Ke
/0iTP9Xg5oKaxzJiHp+4
=L2ME
-----END PGP SIGNATURE-----

_______________________________________________
Autoconf mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/autoconf
Loading...