octave-maintainers
[Top][All Lists]
Advanced

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

f2c support


From: Evgeniy Dushistov
Subject: f2c support
Date: Tue, 21 Aug 2007 10:57:59 +0400

I try to compile last cvs snapshot "--with-f2c",
but configure says that libf2c doesn't exists, and after long build,
link failed.

I have libf2c and f2c on my system, to force it compile I have to made such 
changes:
---
Index: configure.in
===================================================================
RCS file: /cvs/octave/configure.in,v
retrieving revision 1.570
diff -u -r1.570 configure.in
--- configure.in        30 Jul 2007 18:36:01 -0000      1.570
+++ configure.in        20 Aug 2007 12:45:56 -0000
@@ -774,7 +774,11 @@
       CONFLIB_ARG="-MD"
       ;;
   esac
-  AC_CHECK_LIB(f2c, f_open, FLIBS=-lf2c, FLIBS=, $CONFLIB_ARG)
+#  AC_CHECK_LIB(f2c, f_open, FLIBS=-lf2c, FLIBS=, $CONFLIB_ARG)
+#  if test -z "$FLIBS"; then
+       AC_DEFINE_UNQUOTED(F77_DUMMY_MAIN, MAIN__)
+       AC_CHECK_LIB(f2c, f_open, FLIBS=-lf2c, FLIBS=, $CONFLIB_ARG)
+#  fi
   rm -f $oct_conflib
 
   if test -z "$FLIBS"; then
Index: liboctave/f2c-main.c
===================================================================
RCS file: /cvs/octave/liboctave/f2c-main.c,v
retrieving revision 1.5
diff -u -r1.5 f2c-main.c
--- liboctave/f2c-main.c        26 Apr 2005 19:24:28 -0000      1.5
+++ liboctave/f2c-main.c        20 Aug 2007 12:45:57 -0000
@@ -20,6 +20,9 @@
 02110-1301, USA.
 
 */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <assert.h>
 
----
As you can see, linking with libf2c require MAIN__ definition, so 
simple check "AC_CHECK_LIB(f2c..." failed, also to successfully link octave 
with libf2c
somewhere in octave should exist function "MAIN__".

May be someone from maintainers can assist me in integrating some kind of such 
changes 
into mainline, so in future I can build octave without problems?


reply via email to

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