Quick Search:

View

Revision:
Expand:  
Changeset: MAIN:ragge:20060318153043

Diff

Diff from 1.13 to:

Annotations

Annotate by Age | Author | Mixed | None
/fisheye/browse/pcc/pcc/configure.ac

Annotated File View

pj
1.1
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ(2.59)
ragge
1.13
5 AC_INIT([pcc], [0.9.5], BUG-REPORT-ADDRESS)
pj
1.1
6 AC_CONFIG_HEADER([config.h])
7
ragge
1.3
8 AC_PROG_MAKE_SET
9 AC_PROG_INSTALL
pj
1.7
10 AC_CANONICAL_TARGET
ragge
1.2
11
12
ragge
1.8
13 case "$target_os" in
14     netbsd*)
ragge
1.2
15         targos=netbsd
ragge
1.8
16         case "$target_cpu" in
17             i?86) targmach=x86 ;;
18         esac
ragge
1.2
19         ;;
ragge
1.8
20     linux*)
pj
1.7
21         targos=linux
ragge
1.8
22         case "$target_cpu" in
23             i?86) targmach=x86 ;;
24         esac
pj
1.7
25         ;;
ragge
1.8
26     *)
27         targos="$target_os"
28         case "$target_cpu" in
29             m16c) targmach=m16c ;;
30         esac
pj
1.5
31         ;;
pj
1.7
32 esac
ragge
1.8
33    
ragge
1.2
34 if test "X$targos" = X -o "X$targmach" = X ; then
pj
1.7
35         AC_MSG_ERROR(['$target' is not (yet) supported by pcc.])
ragge
1.2
36 fi
pj
1.1
37
38 # Checks for programs.
39 AC_PROG_CC
ragge
1.3
40 AC_PROG_LEX
pj
1.1
41 AC_PROG_YACC
42
ragge
1.2
43 AC_CHECK_PROG(strip,strip,yes,no)
44
pj
1.1
45 # Checks for libraries.
46
47 # Checks for header files.
ragge
1.2
48 # AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
pj
1.6
49 AC_CHECK_HEADERS([string.h alloca.h])
pj
1.1
50
ragge
1.2
51 # Checks for library functions.
pj
1.6
52 AC_FUNC_ALLOCA
ragge
1.2
53 ##  AC_FUNC_STRTOD
54 # AC_FUNC_VPRINTF
55 # AC_CHECK_FUNCS([memset strchr strdup strrchr strtol])
ragge
1.3
56 AC_CHECK_FUNCS(mkstemp)
ragge
1.2
57
58 AC_SUBST(targos)
59 AC_SUBST(targmach)
60 AC_SUBST(prefix)
61 AC_SUBST(exec_prefix)
62 AC_SUBST(libexecdir)
63 AC_SUBST(strip)
pj
1.1
64
ragge
1.9
65 #
66 # Try with some heuristics to find the largest alignment for this host.
67 # Used for the internal memory management.
68 #
69 AC_MSG_CHECKING(for host struct alignment)
70 AC_TRY_RUN([
71 struct a { long long b; long double c; };
72 main(){
73         struct a *a;
74         int b[24];
75         a = (struct a *)&b[0]; a->b = 8; a->c = 8.0;
76         a = (struct a *)&b[1]; a->b = 8; a->c = 8.0;
77         a = (struct a *)&b[2]; a->b = 8; a->c = 8.0;
78         a = (struct a *)&b[3]; a->b = 8; a->c = 8.0;
79         return 0;
80 }], alignment=int, alignment=fail, alignment=CROSS])
81 if test "$alignment" = fail ; then
82 AC_TRY_RUN([
83 struct a { long long b; long double c; };
84 main(){
85         struct a *a;
86         long b[24];
87         a = (struct a *)&b[0]; a->b = 8; a->c = 8.0;
88         a = (struct a *)&b[1]; a->b = 8; a->c = 8.0;
89         a = (struct a *)&b[2]; a->b = 8; a->c = 8.0;
90         a = (struct a *)&b[3]; a->b = 8; a->c = 8.0;
91         return 0;
92 }], alignment=long, alignment=fail, alignment=CROSS])
93 fi
94 if test "$alignment" = fail ; then
95 AC_TRY_RUN([
96 struct a { long long b; long double c; };
97 main(){
98         struct a *a;
99         long long b[24];
100         a = (struct a *)&b[0]; a->b = 8; a->c = 8.0;
101         a = (struct a *)&b[1]; a->b = 8; a->c = 8.0;
102         a = (struct a *)&b[2]; a->b = 8; a->c = 8.0;
103         a = (struct a *)&b[3]; a->b = 8; a->c = 8.0;
104         return 0;
105 }], alignment="long long", alignment=fail, alignment=CROSS])
106 fi
107 if test "$alignment" = fail ; then
108 AC_TRY_RUN([
109 struct a { long long b; long double c; };
110 main(){
111         struct a *a;
112         long double b[24];
113         a = (struct a *)&b[0]; a->b = 8; a->c = 8.0;
114         a = (struct a *)&b[1]; a->b = 8; a->c = 8.0;
115         a = (struct a *)&b[2]; a->b = 8; a->c = 8.0;
116         a = (struct a *)&b[3]; a->b = 8; a->c = 8.0;
117         return 0;
118 }], alignment="long double", alignment=fail, alignment=CROSS])
119 fi
120 if test "$alignment" = fail ; then
121         AC_MSG_ERROR(can't find out host struct alignment)
122 fi
123 AC_MSG_RESULT($alignment)
124
ragge
1.11
125 pcc_major=`echo $PACKAGE_VERSION | awk -F. '{print $1}'`
126 pcc_minor=`echo $PACKAGE_VERSION | awk -F. '{print $2}'`
127 pcc_minorminor=`echo $PACKAGE_VERSION | awk -F. '{print $3}'`
ragge
1.12
128 versstr="\"$PACKAGE_STRING for $target, $USER@`hostname` `date`\""
ragge
1.11
129
ragge
1.2
130 AC_DEFINE_UNQUOTED(TARGOS, $targos)
ragge
1.9
131 AC_DEFINE_UNQUOTED(ALIGNMENT, $alignment)
ragge
1.11
132 AC_DEFINE_UNQUOTED(PCC_MAJOR, $pcc_major)
133 AC_DEFINE_UNQUOTED(PCC_MINOR, $pcc_minor)
134 AC_DEFINE_UNQUOTED(PCC_MINORMINOR, $pcc_minorminor)
135 AC_DEFINE_UNQUOTED(VERSSTR, $versstr)
pj
1.1
136
137 AC_CONFIG_FILES([Makefile
ragge
1.10
138                 cc/Makefile
139                 cc/cc/Makefile
140                 cc/cpp/Makefile
141                 cc/ccom/Makefile
142                 f77/Makefile
143                 f77/f77/Makefile
144                 f77/fcom/Makefile
145 ])
pj
1.1
146 AC_OUTPUT
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-09-20 03:56 +0200