Discussion:
Output additional header file
A.P. Horst
2016-05-27 11:56:06 UTC
Permalink
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
Gavin Smith
2016-05-28 07:47:06 UTC
Permalink
I am trying to output an additional header file which should hold a small
subset if the defines in the regular config.h.
AC_CONFIG_HEADERS([config.h test.h])
I have written test.h.in, in which I just copied over a #undef entry from
/* HAVE_FOO_H */
#undef HAVE_FOO_H
Which is generated by autoreconf (autoheader) from an AC_DEFINE statement.
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.
Keith Marshall
2016-05-30 09:49:14 UTC
Permalink
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
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
A.P. Horst
2016-05-30 08:37:56 UTC
Permalink
Glad the problem and solution is so simple.
Thanks for helping out!

BR,
Arie
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
https://lists.gnu.org/mailman/listinfo/autoconf
Loading...