forked from systemc/systemc-2.3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
327 lines (303 loc) · 8.62 KB
/
configure.in
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
dnl ***************************************************************************
dnl
dnl The following code is derived, directly or indirectly, from the SystemC
dnl source code Copyright (c) 1996-2002 by all Contributors.
dnl All Rights reserved.
dnl
dnl The contents of this file are subject to the restrictions and limitations
dnl set forth in the SystemC Open Source License Version 2.3 (the "License");
dnl You may not use this file except in compliance with such restrictions and
dnl limitations. You may obtain instructions on how to receive a copy of the
dnl License at http://www.systemc.org/. Software distributed by Contributors
dnl under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
dnl ANY KIND, either express or implied. See the License for the specific
dnl language governing rights and limitations under the License.
dnl
dnl ***************************************************************************
dnl
dnl configure.in --
dnl Process this file with autoconf to produce a configure script.
dnl
dnl Original Author: Martin Janssen, Synopsys, Inc., 2001-05-21
dnl
dnl ***************************************************************************
dnl
dnl MODIFICATION LOG - modifiers, enter your name, affiliation, date and
dnl changes you are making here.
dnl
dnl Name, Affiliation, Date:
dnl Description of Modification:
dnl
dnl ***************************************************************************
dnl
dnl Initialization.
dnl
AC_INIT([systemc],[2.3.0])
AC_CONFIG_SRCDIR([NEWS])
AC_CONFIG_AUX_DIR([config])
dnl
dnl Some simple checks.
dnl
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE([1.10 no-define]) # for .s file support of LIBTOOLFLAGS
AM_PROG_AS
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
dnl
dnl check for pthreads compiler flags.
dnl
AX_PTHREAD
dnl
dnl Set the compiler flags and target architecture.
dnl
CXX_COMP=`set $CXX; basename $1`
EXTRA_CXXFLAGS="-Wall"
DEBUG_CXXFLAGS="-g"
OPT_CXXFLAGS="-O3"
case "$target" in
x386-apple-* | i386-apple-*)
case "$CXX_COMP" in
CC)
TARGET_ARCH="macosx386"
#CCAS=as
;;
c++ | g++)
TARGET_ARCH="macosx386"
;;
*)
AC_MSG_ERROR("sorry...compiler not supported")
;;
esac
QT_ARCH="x86_64"
;;
powerpc-apple-macosx*)
case "$CXX_COMP" in
CC)
EXTRA_CXXFLAGS=""
TARGET_ARCH="macosx"
CCAS=as
;;
c++ | g++)
TARGET_ARCH="macosx"
;;
*)
AC_MSG_ERROR("sorry...compiler not supported")
;;
esac
QT_ARCH="powerpc-apple-macosx"
;;
sparc-sun-solaris*)
case "$CXX_COMP" in
CC)
EXTRA_CXXFLAGS=""
TARGET_ARCH="sparcOS5"
CCAS=as
;;
c++ | g++)
TARGET_ARCH="gccsparcOS5"
;;
*)
AC_MSG_ERROR("sorry...compiler not supported")
;;
esac
QT_ARCH="sparc-os2"
;;
x86_64*linux*)
case "$CXX_COMP" in
c++ | g++)
TARGET_ARCH="linux64"
;;
*)
AC_MSG_ERROR("sorry...compiler not supported")
;;
esac
QT_ARCH="x86_64"
;;
*linux*)
case "$CXX_COMP" in
c++ | g++)
case "$build" in
x86_64*linux*)
# It is mandatory to modify CC for libtool to recognize
# cross-compilation
CXX="$CXX -m32"
CCAS="$CCAS -m32"
;;
*)
;;
esac
TARGET_ARCH="linux"
;;
*)
AC_MSG_ERROR("sorry...compiler not supported")
;;
esac
QT_ARCH="iX86"
;;
amd64*freebsd* | x86_64*freebsd*)
case "$CXX_COMP" in
c++ | g++)
TARGET_ARCH="freebsd64"
;;
*)
AC_MSG_ERROR("sorry...compiler not supported")
;;
esac
QT_ARCH="x86_64"
;;
*freebsd*)
case "$CXX_COMP" in
c++ | g++)
TARGET_ARCH="freebsd"
;;
*)
AC_MSG_ERROR("sorry...compiler not supported")
;;
esac
QT_ARCH="iX86"
;;
*cygwin*)
case "$CXX_COMP" in
c++ | g++)
TARGET_ARCH="cygwin"
;;
*)
AC_MSG_ERROR("sorry...compiler not supported")
;;
esac
QT_ARCH="iX86"
;;
amd64*mingw* | x86_64*mingw*)
case "$CXX_COMP" in
c++ | g++)
TARGET_ARCH="mingw64"
;;
*)
AC_MSG_ERROR("sorry...compiler not supported")
;;
esac
QT_ARCH="x86_64"
;;
*mingw*)
case "$CXX_COMP" in
c++ | g++ | *mingw*-g++)
TARGET_ARCH="mingw"
;;
*)
AC_MSG_ERROR("sorry...compiler not supported")
;;
esac
QT_ARCH="iX86"
;;
*hpux11*)
case "$CXX_COMP" in
aCC)
EXTRA_CXXFLAGS="-AA -ext +DA2.0 +DS2.0"
OPT_CXXFLAGS="+O1"
TARGET_ARCH="hpux11"
EXTRA_CFLAGS="-Wa,-w36"
CCAS=/usr/ccs/bin/as
;;
c++ | g++)
TARGET_ARCH="gcchpux11"
;;
*)
AC_MSG_ERROR("sorry...compiler not supported")
;;
esac
QT_ARCH="hppa"
;;
*)
AC_MSG_ERROR("sorry...architecture not supported")
;;
esac
dnl Set conditionals for various quick thread architectures:
AM_CONDITIONAL([QT_ARCH_X86_64], [ test "${QT_ARCH}" = "x86_64" ])
AM_CONDITIONAL([QT_ARCH_POWERPC_MACOSX], [ test "${QT_ARCH}" = "powerpc-apple-macosx" ])
AM_CONDITIONAL([QT_ARCH_SPARC], [ test "${QT_ARCH}" = "sparc-os2" ])
AM_CONDITIONAL([QT_ARCH_X86], [ test "${QT_ARCH}" = "iX86" ])
AM_CONDITIONAL([QT_ARCH_HPPA], [ test "${QT_ARCH}" = "hppa" ])
dnl set C-related variables
dnl
CC="$CXX"
AM_CFLAGS="$EXTRA_CXXFLAGS $OPT_CXXFLAGS $EXTRA_CFLAGS"
dnl
dnl The fixed-point datatypes "package" is included.
dnl
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DSC_INCLUDE_FX"
AM_CXXFLAGS="$EXTRA_CXXFLAGS $OPT_CXXFLAGS"
dnl libtools should be put *after* all CC options have been set
AC_PROG_LIBTOOL
dnl
dnl Set the default prefix and make sure the prefix is absolute.
dnl
test "x$prefix" = xNONE && prefix=$srcdir
current_dir=`pwd`; cd $prefix; prefix=`pwd`; cd $current_dir
dnl
dnl Substitution variables.
dnl
AC_SUBST(EXTRA_CXXFLAGS)
AC_SUBST(DEBUG_CXXFLAGS)
AC_SUBST(OPT_CXXFLAGS)
AC_SUBST(TARGET_ARCH)
AC_SUBST(QT_ARCH)
AC_SUBST(AM_CFLAGS)
AC_SUBST(AM_CXXFLAGS)
dnl
dnl Create the Makefiles.
dnl
AC_OUTPUT(
Makefile
src/Makefile
src/sysc/Makefile
src/sysc/communication/Makefile
src/sysc/datatypes/Makefile
src/sysc/datatypes/bit/Makefile
src/sysc/datatypes/fx/Makefile
src/sysc/datatypes/int/Makefile
src/sysc/datatypes/misc/Makefile
src/sysc/kernel/Makefile
src/sysc/tracing/Makefile
src/sysc/qt/Makefile
src/sysc/utils/Makefile
src/sysc/packages/Makefile
src/sysc/packages/boost/Makefile
src/sysc/packages/boost/bind/Makefile
src/sysc/packages/boost/config/Makefile
src/sysc/packages/boost/config/compiler/Makefile
src/sysc/packages/boost/config/platform/Makefile
src/sysc/packages/boost/config/stdlib/Makefile
src/sysc/packages/boost/mpl/Makefile
src/sysc/packages/boost/mpl/aux_/Makefile
src/sysc/packages/boost/mpl/aux_/config/Makefile
src/sysc/packages/boost/detail/Makefile
src/sysc/packages/boost/utility/Makefile
src/sysc/packages/boost/utility/detail/Makefile
examples/Makefile
examples/sysc/Makefile
examples/sysc/fir/Makefile
examples/sysc/fft/Makefile
examples/sysc/fft/fft_flpt/Makefile
examples/sysc/fft/fft_fxpt/Makefile
examples/sysc/pipe/Makefile
examples/sysc/pkt_switch/Makefile
examples/sysc/rsa/Makefile
examples/sysc/simple_bus/Makefile
examples/sysc/simple_fifo/Makefile
examples/sysc/simple_perf/Makefile
examples/sysc/2.1/Makefile
examples/sysc/2.1/dpipe/Makefile
examples/sysc/2.1/forkjoin/Makefile
examples/sysc/2.1/reset_signal_is/Makefile
examples/sysc/2.1/sc_export/Makefile
examples/sysc/2.1/sc_report/Makefile
examples/sysc/2.1/scx_barrier/Makefile
examples/sysc/2.1/scx_mutex_w_policy/Makefile
examples/sysc/2.1/specialized_signals/Makefile
examples/sysc/2.3/Makefile
examples/sysc/2.3/include/Makefile
examples/sysc/2.3/sc_rvd/Makefile
examples/sysc/2.3/sc_ttd/Makefile
)
dnl Taf!