File: configure.in

package info (click to toggle)
meschach 1.2b-6
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,272 kB
  • ctags: 1,757
  • sloc: ansic: 21,958; makefile: 509; sh: 11
file content (105 lines) | stat: -rw-r--r-- 3,536 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
dnl Meschach autoconf script
dnl Copyright (C) Brook Milligan and David Stewart, 1993
dnl $Id: configure.in,v 1.3 1994/03/08 05:41:32 des 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 <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 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