dnl Meschach autoconf script dnl Copyright (C) Brook Milligan and David Stewart, 1993 dnl $Id: configure.in,v 1.1.1.1 1999/04/14 14:16:20 borland Exp $ dnl dnl Brook Milligan's prototype check dnl Check if $(CC) supports prototypes define(LOCAL_HAVE_PROTOTYPES, [AC_COMPILE_CHECK([function prototypes], , [extern int test (int i, double x);], AC_DEFINE(HAVE_PROTOTYPES))])dnl dnl dnl Brook Milligan's compiler check dnl Check for the sun ansi c compiler, acc define(LOCAL_PROG_ACC, [AC_BEFORE([$0], [AC_PROG_CPP])AC_PROVIDE([$0])dnl AC_PROGRAM_CHECK(CC, acc, acc, "")])dnl dnl David Stewart's modified compiler check define(LOCAL_PROG_CC, [AC_BEFORE([$0], [AC_PROG_CPP])AC_PROVIDE([$0])dnl AC_PROGRAM_CHECK(CC, acc, acc, cc)])dnl dnl dnl dnl dnl ---------------------------------------------------------------------- dnl Start of configure.in proper dnl ---------------------------------------------------------------------- AC_INIT(err.c) AC_CONFIG_HEADER(machine.h) PROGS="" AC_SUBST(PROGS)dnl LOCAL_PROG_ACC AC_PROGRAM_CHECK(CC, cc, cc, gcc) dnl AC_PROG_CC AC_PROG_CPP AC_AIX AC_MINIX AC_ISC_POSIX dnl dnl Brook Milligan's prototype check dnl Check if $(CC) supports prototypes in function declarations and structures define(LOCAL_HAVE_PROTOTYPES, [AC_COMPILE_CHECK([function prototypes], , [extern int test (int i, double x);], AC_DEFINE(HAVE_PROTOTYPES)) 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 dnl AC_PROG_RANLIB AC_HAVE_HEADERS(memory.h) AC_STDC_HEADERS AC_HEADER_CHECK(complex.h, AC_DEFINE(HAVE_COMPLEX_H),) AC_HEADER_CHECK(malloc.h, AC_DEFINE(HAVE_MALLOC_H),) AC_HEADER_CHECK(varargs.h, AC_DEFINE(VARARGS),) AC_DEFINE(NOT_SEGMENTED) AC_SIZE_T AC_CONST AC_WORDS_BIGENDIAN AC_WITH(complex, AC_DEFINE(COMPLEX)) AC_WITH(sparse, AC_DEFINE(SPARSE)) AC_WITH(all, AC_DEFINE(COMPLEX)) AC_WITH(all, AC_DEFINE(SPARSE)) AC_WITH(unroll, AC_DEFINE(VUNROLL)) AC_WITH(munroll, AC_DEFINE(MUNROLL)) AC_WITH(segmem, AC_DEFINE(SEGMENTED)) AC_WITH(float, AC_DEFINE(REAL_FLT)) AC_WITH(double, AC_DEFINE(REAL_DBL)) LIBS="$LIBS -lm" AC_COMPILE_CHECK([u_int],[#include #ifdef __STDC__ #include #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 computing M_MAX_INT echo $CC -o maxint maxint.c $CC -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"; double *dp; dp = (double *)cp; if ( *dp == 0.0 ) printf("yes\n"); } ],AC_DEFINE(CHAR0ISDBL0)) AC_HAVE_FUNCS(bcopy bzero) LOCAL_HAVE_PROTOTYPES AC_OUTPUT(makefile) 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