SCM Repository
Annotation of /benchmarks/configure.ac
Parent Directory
|
Revision Log
Revision 1574 - (view) (download)
1 : | jhr | 1533 | dnl Process this file with autoconf to produce a configure script. |
2 : | dnl | ||
3 : | dnl COPYRIGHT (c) 2011 The Diderot Project | ||
4 : | dnl All rights reserved. | ||
5 : | dnl | ||
6 : | |||
7 : | AC_INIT(diderot-benchmarks,0.1,) | ||
8 : | |||
9 : | AC_PREREQ(2.60) | ||
10 : | AC_COPYRIGHT([[COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)]]) | ||
11 : | AC_CONFIG_SRCDIR(programs/vr-lite-cam/bmark-teem.c) | ||
12 : | AC_CONFIG_AUX_DIR(config) | ||
13 : | AC_CONFIG_MACRO_DIR(config) | ||
14 : | |||
15 : | dnl | ||
16 : | dnl get host information | ||
17 : | dnl | ||
18 : | AC_CANONICAL_HOST | ||
19 : | |||
20 : | dnl check for standard programs | ||
21 : | dnl | ||
22 : | AC_PROG_CC([clang gcc cc]) | ||
23 : | AC_PROG_CPP | ||
24 : | AC_PROG_INSTALL | ||
25 : | AC_PROG_MAKE_SET | ||
26 : | |||
27 : | dnl check for c99 support | ||
28 : | dnl | ||
29 : | AC_PROG_CC_C99 | ||
30 : | if test x"$ac_cv_prog_cc_c99" = xno ; then | ||
31 : | AC_MSG_ERROR([Diderot requires c99 support]) | ||
32 : | fi | ||
33 : | |||
34 : | dnl extra C compiler options | ||
35 : | dnl | ||
36 : | CFLAGS="" | ||
37 : | CFLAG_M64="-m64" | ||
38 : | CFLAGS_BASE="-Wformat -Wreturn-type -Wuninitialized" | ||
39 : | AC_SUBST(CFLAG_M64) | ||
40 : | AC_SUBST(CFLAGS_BASE) | ||
41 : | |||
42 : | dnl | ||
43 : | dnl OS-specific linking issues | ||
44 : | dnl | ||
45 : | LD_NEEDS_RPATH=false; | ||
46 : | LIBM="" | ||
47 : | case "$host_os" in | ||
48 : | darwin*) # On Mac OS X we check for the presence of macports and/or fink | ||
49 : | if test -x /opt/local/bin/port ; then | ||
50 : | HAS_MACPORTS=yes | ||
51 : | else | ||
52 : | HAS_MACPORTS=no | ||
53 : | fi | ||
54 : | if test -x /sw/bin/fink ; then | ||
55 : | HAS_FINK=yes | ||
56 : | else | ||
57 : | HAS_FINK=no | ||
58 : | fi | ||
59 : | ;; | ||
60 : | linux*) # On Linux we include the -rpath option to pick up dynamically-loaded libraries | ||
61 : | LD_NEEDS_RPATH=true | ||
62 : | LIBM="-lm" | ||
63 : | ;; | ||
64 : | esac | ||
65 : | |||
66 : | if test x"$HAS_MACPORTS" = xyes ; then | ||
67 : | LDPATHS="-L/opt/local/lib" | ||
68 : | elif test x"$HAS_FINK" = xyes ; then | ||
69 : | LDPATHS="-L/sw/lib" | ||
70 : | else | ||
71 : | LDPATHS="" | ||
72 : | fi | ||
73 : | AC_SUBST(LDPATHS) | ||
74 : | AC_SUBST(LD_NEEDS_RPATH) | ||
75 : | AC_SUBST(LIBM) | ||
76 : | |||
77 : | dnl | ||
78 : | dnl get the path to the TEEM installation | ||
79 : | dnl | ||
80 : | AC_ARG_WITH(teem, | ||
81 : | AC_HELP_STRING([--with-teem=<path>], [specify path to teem installation]), | ||
82 : | [ac_cv_use_teem=$withval], [ac_cv_use_teem=no]) | ||
83 : | if test x"$ac_cv_use_teem" = xno ; then | ||
84 : | TEEM_DIR=none | ||
85 : | else | ||
86 : | AC_MSG_CHECKING([path to teem ($ac_cv_use_teem)]) | ||
87 : | case $ac_cv_use_teem in | ||
88 : | /*) ;; | ||
89 : | *) AC_MSG_ERROR([path to teem must be absolute]) ;; | ||
90 : | esac | ||
91 : | if test -x $ac_cv_use_teem ; then | ||
92 : | TEEM_DIR=$ac_cv_use_teem | ||
93 : | # check that TEEM_DIR actually points to something that looks like teem | ||
94 : | if test -f $TEEM_DIR/include/teem/nrrd.h ; then | ||
95 : | AC_MSG_RESULT([ okay]) | ||
96 : | else | ||
97 : | TEEM_DIR=none | ||
98 : | AC_MSG_RESULT([ invalid]) | ||
99 : | fi | ||
100 : | else | ||
101 : | TEEM_DIR=none | ||
102 : | AC_MSG_RESULT([ invalid]) | ||
103 : | fi | ||
104 : | fi | ||
105 : | if test x"$TEEM_DIR" = xnone ; then | ||
106 : | AC_MSG_ERROR([unable to find teem]) | ||
107 : | fi | ||
108 : | AC_SUBST(TEEM_DIR) | ||
109 : | |||
110 : | dnl ******************** Diderot configuration ******************** | ||
111 : | dnl | ||
112 : | |||
113 : | jhr | 1538 | dnl |
114 : | dnl get the path to the diderot executable | ||
115 : | dnl | ||
116 : | AC_ARG_WITH(diderotc, | ||
117 : | AC_HELP_STRING([--with-diderotc=<path>], [specify path to Diderot compiler]), | ||
118 : | [ac_cv_use_diderotc=$withval], [ac_cv_use_diderotc=no]) | ||
119 : | if test x"$ac_cv_use_diderotc" = xno ; then | ||
120 : | DIDEROTC=none | ||
121 : | else | ||
122 : | AC_MSG_CHECKING([path to diderotc ($ac_cv_use_diderotc)]) | ||
123 : | case $ac_cv_use_diderotc in | ||
124 : | /*) DIDEROTC=$ac_cv_use_diderotc ;; | ||
125 : | *) DIDEROTC=$BMARKS_ROOT$ac_cv_use_diderotc ;; | ||
126 : | esac | ||
127 : | # check that diderotc exists and is executable | ||
128 : | if test -x $DIDEROTC ; then | ||
129 : | AC_MSG_RESULT([ okay]) | ||
130 : | else | ||
131 : | DIDEROTC=none | ||
132 : | AC_MSG_RESULT([ invalid]) | ||
133 : | fi | ||
134 : | fi | ||
135 : | if test x"$DIDEROTC" = xnone ; then | ||
136 : | AC_MSG_ERROR([unable to find diderotc]) | ||
137 : | fi | ||
138 : | jhr | 1533 | AC_SUBST(DIDEROTC) |
139 : | |||
140 : | dnl ******************** Paths ******************** | ||
141 : | |||
142 : | BMARKS_ROOT=`pwd` | ||
143 : | BMARKS_DATADIR=$BMARKS_ROOT/data | ||
144 : | BMARKS_SRCDIR=$BMARKS_ROOT/programs | ||
145 : | BMARKS_BINDIR=$BMARKS_ROOT/scripts | ||
146 : | BMARKS_MKDIR=$BMARKS_ROOT/mk | ||
147 : | |||
148 : | AC_SUBST(BMARKS_ROOT) | ||
149 : | AC_SUBST(BMARKS_DATADIR) | ||
150 : | AC_SUBST(BMARKS_SRCDIR) | ||
151 : | AC_SUBST(BMARKS_BINDIR) | ||
152 : | AC_SUBST(BMARKS_MKDIR) | ||
153 : | |||
154 : | dnl | ||
155 : | dnl ******************** C compiler properties ******************** | ||
156 : | dnl | ||
157 : | |||
158 : | dnl | ||
159 : | dnl run the compiler tests in 64-bit mode | ||
160 : | dnl | ||
161 : | save_CFLAGS=$CFLAGS | ||
162 : | CFLAGS="$CFLAGS $CFLAG_M64" | ||
163 : | |||
164 : | AC_C_BIGENDIAN | ||
165 : | |||
166 : | dnl | ||
167 : | dnl restore CFLAGS | ||
168 : | dnl | ||
169 : | CFLAGS=$save_CFLAGS | ||
170 : | |||
171 : | dnl | ||
172 : | dnl ******************** write output ******************** | ||
173 : | dnl | ||
174 : | |||
175 : | AC_CONFIG_FILES( | ||
176 : | dnl | ||
177 : | dnl ***** Makefiles ***** | ||
178 : | jhr | 1571 | mk/build-rules.gmk:mk/build-rules_gmk.in |
179 : | jhr | 1574 | mk/Makefile |
180 : | jhr | 1533 | ) |
181 : | |||
182 : | dnl | ||
183 : | dnl shell scripts | ||
184 : | dnl | ||
185 : | AC_CONFIG_FILES([ | ||
186 : | scripts/run-one.sh:scripts/run-one_sh.in | ||
187 : | ], [chmod +x scripts/run-one.sh]) | ||
188 : | AC_CONFIG_FILES([ | ||
189 : | scripts/run.sh:scripts/run_sh.in | ||
190 : | ], [chmod +x scripts/run.sh]) | ||
191 : | |||
192 : | jhr | 1574 | AC_CONFIG_COMMANDS([makefiles], |
193 : | [for d in programs/* ; do | ||
194 : | echo " create $d/Makefile" | ||
195 : | cp -p ./mk/Makefile $d/Makefile | ||
196 : | done], | ||
197 : | []) | ||
198 : | |||
199 : | jhr | 1533 | AC_OUTPUT |
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |