[jp] On compiling from CVS

David A. Desrosiers hacker at gnu-designs.com
Thu Dec 11 10:58:26 EST 2003

>    I know anyone who is going to build from CVS should already know, but
>    it might save someone some time...

	I just spend the last few minutes going through the configure.in
for J-Pilot, and added some minor changes to my local copy. I might send
Judd a patch, if this ends up solving some issues. It did on my systems.

	autoconf, through aclocal, already tests for sed, so that previous
check I mentioned might be irrelevant here. I'm not sure why the check for
sed fails on your system (is it in an odd path that isn't scanned?).

	Does anybody else have a Mandrake system to test and validate this

	Did you compile cleanly from CVS? Or was this in a directory with
a previous CVS checkout already existing?

	If so, did you 'distclean' and 'rm -Rf autom4te.cache configure'
before building this instance?

	In any case, on to my bug: On my system, the f77 compiler is
actually a symlink to /etc/alternatives/f77, which is a symlink to
/usr/bin/fort77. If you run autogen.sh, and see an error like the
following, this small patch below SHOULD fix that (it did for me):

checking for g77... no
checking for f77... f77
checking whether we are using the GNU Fortran 77 compiler... no
checking whether f77 accepts -g... yes
appending configuration tag "F77" to libtool
checking for f77 option to produce PIC... -fPIC
checking if f77 PIC flag -fPIC works... no
checking if f77 supports -c -o file.o... no
checking whether the f77 linker (/usr/bin/ld) supports shared libraries...
/usr/bin/f77: Illegal option: -print-search-dirs

	The problem here is that my system (stock Debian), has g77 as
/usr/bin/g77-3.3, without the convenience symlink to it. I could create
the symlink, but I can't guarantee that all users of Debian will know how
to do that (or want to). When the test for g77 fails, it tries to find
f77, which exists on my system also (/usr/bin/f77). That, however, is a
script which internally calls f2c, which doesn't accept the argument being
passed to it (-print-search-dirs). The call is '$CC -print-search-dirs..'
in the autoconf test. Hence the error seen above. This small patch fixes

Index: configure.in
RCS file: /cvs/jpilot/jpilot_src/configure.in,v
retrieving revision 1.32
diff -u -r1.32 configure.in
--- configure.in        5 Jul 2003 18:27:47 -0000       1.32
+++ configure.in        11 Dec 2003 15:51:43 -0000
@@ -15,12 +15,13 @@


+AC_PROG_F77(g77 g77-3.2 g77-3.3 fl32 f77 fort77 xlf f90 xlf90)

 if test "x$prefix" = "xNONE"; then

	The important thing here, is that AC_PROG_F77 comes BEFORE the
test for AM_PROG_LIBTOOL. I had to enumerate across some of the common f77
variants, making sure to stick the g77-x.x BEFORE the f77 one (which I
know will fail here, if reached).

	This should help some other people with their issues as well. I am
very pedantic when it comes to an ABSOLUTELY CLEAN configure output,
including any and all warnings or errors being treated gracefully. I try
to maintain the same level of standards in pilot-link as well, but that's
a much larger beast to maintain the various platform support for =)

	Hope this helps.

If this has helped you in any way, please take the time to rate the value
of this post:  http://rate.affero.net/hacker/

More information about the Jpilot mailing list