Subject: problem with simple autoconf for fortran
From: Michael Lemke <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Mon, 11 Nov 2002 23:56:48 +0100

I am just trying to learn autoconf and automake and found something where
I don't know if I am doing something wrong.  I am doing this on cygwin with
W98 SE:

$ uname -a
CYGWIN_98-4.10 MICHA 1.3.13(0.62/3/2) 2002-10-13 23:15 i586 unknown

I have these three files (+ the stuff created by autoconf etc):

x.F

$ cat configure.ac
dnl Process this file with autoconf to produce a configure script.
AC_INIT(x,1.0)
AM_INIT_AUTOMAKE

dnl Checks for programs.
AC_PROG_MAKE_SET
AC_PROG_F77

dnl Checks for libraries.

dnl Checks for header files.

dnl Checks for typedefs, structures, and compiler characteristics.

dnl Checks for library functions.

AC_OUTPUT(Makefile)

$ cat Makefile.am
bin_PROGRAMS = x
x_SOURCES = x.F

Then I ran
$ aclocal
$ autoconf
$ automake -a
$ touch NEWS README AUTHORS ChangeLog
$ automake -a
$ configure

That went all fine.  Then I do a make:
$ make
g77 -DPACKAGE_NAME=\"x\" -DPACKAGE_TARNAME=\"x\" -DPACKAGE_VERSION=\"1.0\" -
DPACKAGE_STRING=\"x\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"x\" -DVERSION=
\"1.0\"  -I. -I.   @CPPFLAGS@  -g -O2 -c -o x.o `test -f 'x.F' || echo './'`x.F
g77: cannot specify -o with -c or -S and multiple compilations
make: *** [x.o] Error 1

Why is there a @CPPFLAGS@ ?  Isn't that supposed to be replaced by some real
flags?  Did I miss something in my configure.ac/Makefile.am?

Thanks for any pointers,
Michael

P.S.
$ autoconf -V
autoconf (GNU Autoconf) 2.53a
Written by David J. MacKenzie and Akim Demaille.

Copyright 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ automake -V
automake (GNU automake) 1.6.2
Written by Tom Tromey <[email-masked]>.

Copyright 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/