On 3-Jul-2000, Akim Demaille <[EMAIL PROTECTED]> wrote:
| Below we have a question regarding AC_F77_NAME_MANGLING, which, I
| think, you wrote.
I don't think I wrote that, or any of the other f77 support for
autoconf, though I believe that the f77 support for autoconf is based
on the macros that I use for Octave.
The code that I wrote for Octave's configure script to detect whether
underscores are appended to subroutine names uses nm and doesn't try
to handle the case of identifiers that already contain underscores. I
simply avoid the problem in Octave's source code by not calling any
f77 subroutines that have names containing underscores.
It seems you may really need to distinguish all of the following
independently
foobar -> foobar
foobar -> foobar_
foo_bar -> foo_bar
foo_bar -> foo_bar_
foo_bar -> foo_bar__
I don't know of any compilers that would add two underscores to
`foo_bar' but none `foobar', or that would add an underscore to
`foobar' but none to `foo_bar', so maybe handling the following cases
would be sufficient.
if foobar -> foobar
f77_no_underscore_id_mangling = none
if foo_bar -> foo_bar
f77_underscore_id_mangling = none
else if foo_bar -> foo_bar_
f77_underscore_id_mangling = append_one_underscore
fi
else if foobar -> foobar_
f77_no_underscore_id_mangling = append_one_underscore
if foo_bar -> foo_bar_
f77_underscore_id_mangling = append_one_underscore
else if foo_bar -> foo_bar__
f77_underscore_id_mangling = append_two_underscores
fi
else
unrecognized/warning/error
fi
jwe
--
www.che.wisc.edu/octave | Thanking you in advance. This sounds as if the
www.che.wisc.edu/~jwe | writer meant, "It will not be worth my while to
| write to you again." -- Strunk and White