[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
autoconf-2.52 and configure.in "fragments"
From: |
Adam J. Richter |
Subject: |
autoconf-2.52 and configure.in "fragments" |
Date: |
Mon, 30 Jul 2001 00:21:43 -0700 |
glibc (at least glibc-2.2.3 through current glibc-cvs) maintains
a bunch of little configure "fragment" files in subdirectories that are
sourced by the parent configure script. Each of these configure
"fragments" is generated from a matching configure.in by running
autoconf individually on that "fragment" configure.in.
Many thanks to Roland McGrath for correcting my original
misunderstanding of this situation.
The problem is that autoconf-2.52 seems to require a number
of definitions that are normally created by calling AC_INIT, but
having each of these "fragment" configure.in files call AC_INIT
results in the answers to previous configuration tests done by
the parent configure script being forgotten, presumably because AC_INIT
clears some variables or files.
I would like to propose that AC_INIT be restructured like so:
AC_DEFUN(AC_INIT, [
AC_BEGIN_FRAGMENT($1)
AC_ERASE_ANSWERS
])
AC_DEFUN(AC_BEGIN_FRAGMENT, [
...code to AC_REQUIRE or otherwise define whatever macros are needed...
AC_LANG_PUSH(C)
])
AC_DEFUN(AC_ERASE_ANSWERS, [
...current code that clears files and variables that AC_INIT clears...
])
AC_DEFUN(AC_END_FRAGMENT, [
AC_LANG_POP(C)
])
Under this scheme, configure.in "fragments" could be portably written
with
AC_BEGIN_FRAGMENT(configure.in)
...
AC_END_FRAGMENT
and the main configure.in script, would still start with
AC_INIT(configure.in).
Am I duplicating someone else's effort? If not, does this
look good? Should I develop a patch?
Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
address@hidden \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."
- autoconf-2.52 and configure.in "fragments",
Adam J. Richter <=