Hi,
after two months, I'm trying to get my Fortran/cpp and Fortran 90
macros to work with cvs autoconf.
So far I have utterly failed. I was able to track down (at least part of)
my problems to this trivial configure.in, totally unrelated to Fortran
stuff:
AC_INIT(fpptest, 0.0.1, [EMAIL PROTECTED])
AM_INIT_AUTOMAKE(fpptest, 0.0.1)
AC_PREREQ(2.14b)
AC_CONFIG_SRCDIR(foo.c)
AC_LANG_COMPILER(C)
AC_LANG_COMPILER(C++)
AC_REQUIRE_C
AC_REQUIRE_CXX
AC_OUTPUT(Makefile)
AC_REQURE_C and AC_REQUIRE_CXX are two mini-macros I wrote into
aclocal.m4:
AC_DEFUN([AC_REQUIRE_C],
[AC_REQUIRE([AC_LANG_COMPILER(C)])
AC_WARNING([Hey Joe! (C version)
])
])
AC_DEFUN([AC_REQUIRE_CXX],
[AC_REQUIRE([AC_LANG_COMPILER(C++)])
AC_WARNING([Hey Joe! (C++ version)
])
])
Now here comes the output of running autoconf:
configure.in:6: warning: AC_PROG_CPP was called before AC_PROG_CC
configure.in:7: warning: Hey Joe! (C version)
configure.in:8: warning: AC_PROG_CPP was called before AC_PROG_CC
configure.in:8: warning: AC_LANG_COMPILER(C++) is AC_REQUIRE'd but is not AC_DEFUN'd
configure.in:8: warning: Hey Joe! (C++ version)
- There are two bogus warnings about calling PROG_CPP before PROG_CC
(btw: these disappear if I comment out AM_INIT_AUTOMAKE in
configure.in).
- There is one bogus warning that AC_LANG_COMPILER(C++) isn't DEFUN'd, as
it should be. I guess this is serious, but I can't figure out what
happens. Btw, this is independent on whether or not I call
AC_LANG_COMPILER(C++) before, which I also don't understand.
The same happens if I use Fortran77 instead of C++. (He complains
AC_LANG_COMPILER(Fortran 77) isn't DEFUN'd). Interestingly, the warning
message doesn't show up for C.
These are only warnings, but if I try to activate my own stuff, serious
errors show up, which also seem to be related to PROVIDE/REQUIRE business.
Am I overlooking something here?
Regards,
Martin
--
MartinWilck <[EMAIL PROTECTED]>
Institute for Tropospheric Research, Permoserstr. 15, D-04318 Leipzig, Germany
Tel. +49-341-2352151 / Fax +49-341-2352361