File gwc-meschach-fix.dif of Package gwc
--- meschach/maxint.c-dist 2006-12-20 13:48:45.000000000 +0100
+++ meschach/maxint.c 2006-12-20 13:49:13.000000000 +0100
@@ -23,8 +23,9 @@
**
***************************************************************************/
+#include <stdio.h>
-main()
+int main()
{
int i, old_i;
--- meschach/configure.in-dist 2002-11-26 16:09:31.000000000 +0100
+++ meschach/configure.in 2006-12-20 13:49:58.000000000 +0100
@@ -7,7 +7,7 @@
dnl Brook Milligan's prototype check
dnl Check if $(CC) supports prototypes
define(LOCAL_HAVE_PROTOTYPES,
-[AC_TRY_COMPILE([function prototypes], ,
+[AC_COMPILE_CHECK([function prototypes], ,
[extern int test (int i, double x);],
AC_DEFINE(HAVE_PROTOTYPES))])dnl
dnl
@@ -42,10 +42,10 @@
dnl Brook Milligan's prototype check
dnl Check if $(CC) supports prototypes in function declarations and structures
define(LOCAL_HAVE_PROTOTYPES,
-[AC_TRY_COMPILE([function prototypes], ,
+[AC_COMPILE_CHECK([function prototypes], ,
[extern int test (int i, double x);],
AC_DEFINE(HAVE_PROTOTYPES))
-AC_TRY_COMPILE([function prototypes in structures], ,
+AC_COMPILE_CHECK([function prototypes in structures], ,
[struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};],
AC_DEFINE(HAVE_PROTOTYPES_IN_STRUCT))])dnl
@@ -60,31 +60,39 @@
AC_SIZE_T
AC_CONST
AC_WORDS_BIGENDIAN
-AC_ARG_WITH(complex, AC_DEFINE(COMPLEX))
-AC_ARG_WITH(sparse, AC_DEFINE(SPARSE))
-AC_ARG_WITH(all, AC_DEFINE(COMPLEX))
-AC_ARG_WITH(all, AC_DEFINE(SPARSE))
-AC_ARG_WITH(unroll, AC_DEFINE(VUNROLL))
-AC_ARG_WITH(munroll, AC_DEFINE(MUNROLL))
-AC_ARG_WITH(segmem, AC_DEFINE(SEGMENTED))
-AC_ARG_WITH(float, AC_DEFINE(REAL_FLT))
-AC_ARG_WITH(double, AC_DEFINE(REAL_DBL))
+AC_ARG_WITH(complex, [--with-complex incorporate complex functions],
+ AC_DEFINE(COMPLEX))
+AC_ARG_WITH(sparse, [--with-sparse incorporate sparse matrix functions],
+ AC_DEFINE(SPARSE))
+AC_ARG_WITH(all, [--with-all both of the above],
+ [AC_DEFINE(COMPLEX)
+ AC_DEFINE(SPARSE)])
+AC_ARG_WITH(unroll, [--with-unroll unroll low level loops on vectors],
+ AC_DEFINE(VUNROLL))
+AC_ARG_WITH(munroll, [--with-munroll unroll low level loops on matrices],
+ AC_DEFINE(MUNROLL))
+AC_ARG_WITH(segmem, [--with-segmem segmem],
+ AC_DEFINE(SEGMENTED))
+AC_ARG_WITH(float, [--with-float single precision],
+ AC_DEFINE(REAL_FLT))
+AC_ARG_WITH(double, [--with-double double precision (default)],
+ AC_DEFINE(REAL_DBL))
LIBS="$LIBS -lm"
AC_TRY_COMPILE([u_int],[#include <stdio.h>
#ifdef __STDC__
#include <stdlib.h>
#endif],[u_int i; i = 1;],AC_DEFINE(U_INT_DEF))
echo 'computing machine epsilon(s)'
-echo $CC -o macheps dmacheps.c
-$CC -o macheps dmacheps.c
-AC_DEFINE_UNQUOTED(D_MACHEPS,`macheps`)
-echo $CC -o macheps fmacheps.c
-$CC -o macheps fmacheps.c
-AC_DEFINE_UNQUOTED(F_MACHEPS,`macheps`)
+echo $CC $CFLAGS -o macheps dmacheps.c
+$CC $CFLAGS -o macheps dmacheps.c
+AC_DEFINE_UNQUOTED(D_MACHEPS,`./macheps`)
+echo $CC $CFLAGS -o macheps fmacheps.c
+$CC $CFLAGS -o macheps fmacheps.c
+AC_DEFINE_UNQUOTED(F_MACHEPS,`./macheps`)
echo computing M_MAX_INT
-echo $CC -o maxint maxint.c
-$CC -o maxint maxint.c
-AC_DEFINE_UNQUOTED(M_MAX_INT,`maxint`)
+echo $CC $CFLAGS -o maxint maxint.c
+$CC $CFLAGS -o maxint maxint.c
+AC_DEFINE_UNQUOTED(M_MAX_INT,`./maxint`)
echo checking char '\\0' vs. float zeros
AC_PROGRAM_EGREP(yes,[main() {
char *cp = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
@@ -94,16 +102,6 @@
],AC_DEFINE(CHAR0ISDBL0))
AC_HAVE_FUNCS(bcopy bzero)
LOCAL_HAVE_PROTOTYPES
-AC_CONFIG_FILES([makefile make.mex])
+AC_CONFIG_FILES([makefile])
AC_OUTPUT
-echo "Extensions to basic version: use configure --with-opt1 --with-opt2"
-echo " Option:"
-echo " --with-complex incorporate complex functions"
-echo " --with-sparse incorporate sparse matrix functions"
-echo " --with-all both of the above"
-echo " --with-unroll unroll low level loops on vectors"
-echo " --with-munroll unroll low level loops on matrices"
-echo " --with-float single precision"
-echo " --with-double double precision (default)"
-echo "Re-run configure with these options if you want them"
# configure.in copyright (C) Brook Milligan and David Stewart, 1993, 2002