This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
f2c configure fix
- To: egcs-patches at egcs dot cygnus dot com
- Subject: f2c configure fix
- From: Richard Henderson <rth at twiddle dot net>
- Date: Thu, 4 Feb 1999 22:27:06 -0800
- Cc: ghazi at caip dot rutgers dot edu
I don't recall noticing when it started, but libf2c's fragile
integer size detection widgetry has broken again.
This time it gets confused because f/proj.h includes system,
which includes system.h, which includes libiberty.h, which
includes ansidecl.h (the libiberty version), which defines
PROTO in a way that is incompatible with gcc's headers. So
you wind up with lots of error messages from cpp. Why libf2c
doesn't die in its configury here, I don't know.
But it winds up deciding that an int is a long, and on Alpha
things go downhill with that.
It appears one must get gansidecl.h to define PROTO properly,
which requires IN_GCC and tm.h.
The following seems to work. Kaveh, is this the best thing
to do to get what's needed?
r~
Index: configure.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/libf2c/configure.in,v
retrieving revision 1.21
diff -u -p -d -r1.21 configure.in
--- configure.in 1998/11/26 01:48:26 1.21
+++ configure.in 1999/02/05 06:14:42
@@ -98,7 +98,9 @@ fi
AC_CACHE_VAL(g77_cv_sys_f2cinteger,
echo "configure:__oline__: using $ac_cpp" >&AC_FD_CC
AC_EGREP_CPP(F2C_INTEGER=long int,
-[#include "proj.h"
+[#define IN_GCC 1
+#include "tm.h"
+#include "proj.h"
#define FFECOM_DETERMINE_TYPES 1
#include "com.h"
#if FFECOM_f2cINTEGER == FFECOM_f2ccodeLONG
@@ -113,7 +115,9 @@ F2C_INTEGER=int
if test "$g77_cv_sys_f2cinteger" = ""; then
echo "configure:__oline__: using $ac_cpp" >&AC_FD_CC
AC_EGREP_CPP(F2C_INTEGER=int,
-[#include "proj.h"
+[#define IN_GCC 1
+#include "tm.h"
+#include "proj.h"
#define FFECOM_DETERMINE_TYPES 1
#include "com.h"
#if FFECOM_f2cINTEGER == FFECOM_f2ccodeLONG
@@ -145,7 +149,9 @@ fi
AC_CACHE_VAL(g77_cv_sys_f2clongint,
echo "configure:__oline__: using $ac_cpp" >&AC_FD_CC
AC_EGREP_CPP(F2C_LONGINT=long int,
-[#include "proj.h"
+[#define IN_GCC 1
+#include "tm.h"
+#include "proj.h"
#define FFECOM_DETERMINE_TYPES 1
#include "com.h"
#if FFECOM_f2cLONGINT == FFECOM_f2ccodeLONG
@@ -160,7 +166,9 @@ F2C_LONGINT=long long int
if test "$g77_cv_sys_f2clongint" = ""; then
echo "configure:__oline__: using $ac_cpp" >&AC_FD_CC
AC_EGREP_CPP(F2C_LONGINT=long long int,
-[#include "proj.h"
+[#define IN_GCC 1
+#include "tm.h"
+#include "proj.h"
#define FFECOM_DETERMINE_TYPES 1
#include "com.h"
#if FFECOM_f2cLONGINT == FFECOM_f2ccodeLONG