[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C/Fortran glue code

From: Akim Demaille
Subject: Re: C/Fortran glue code
Date: 07 Jun 2002 12:04:36 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter)

| Autoconf inserts this code into C program to allow linking against Fortran
| libraries:
| #ifdef F77_DUMMY_MAIN
| #  ifdef __cplusplus
|      extern "C"
| #  endif
|    int F77_DUMMY_MAIN() { return 1; }
| #endif
| However, this isn't necessary if the user never called AC_F77_DUMMY_MAIN.
| Therefore I suggest that this code be omitted in that case, so the
| configure script is shorter and config.log is easier to read.
| I have found the following ChangeLog entry which appears to have had the
| same idea, but in fact it doesn't do what it says --
| _AC_LANG_PROGRAM_C_F77_HOOKS isn't used anywhere.
| 2001-07-18  Akim Demaille  <address@hidden>
|       The C-Fortran 77 hooks are available only once AC_F77_DUMMY_MAIN
|       was run, while they are needed also when it is expanded.
|       Reported by Nicolas Joly.
|       * aclang.m4 (AC_F77_DUMMY_MAIN): Define _AC_LANG_PROGRAM_C_F77_HOOKS.
|       (AC_LANG_PROGRAM(C)): Use it instead of depending upon
|       AC_F77_DUMMY_MAIN being expanded.
| Thus, I propose the attached patch.


Thanks, installed.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]