forked from Manarabdelaty/verilog-covered
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
222 lines (196 loc) · 6.01 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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/main.c)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(covered,covered-20090802)
dnl Get host information
AC_CANONICAL_HOST
case $host_os in
*cygwin* ) build_cygwin=yes;;
* ) build_cygwin=no;;
esac
AM_CONDITIONAL([BUILD_CYGWIN], [test x$build_cygwin = xyes])
dnl Checks for programs.
AC_PROG_MAKE_SET
AC_PROG_CC
dnl AC_ARG_PROGRAM
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PROG_YACC
AC_PROG_LEX
AC_SYS_LARGEFILE
AC_C_BIGENDIAN
AC_CHECK_PROGS(XGPERF,gperf,none)
if test "$XGPERF" = "none"
then
echo "*** Error: No suitable gperf found. ***"
echo " Please install the 'gperf' package."
exit 1
fi
dnl Libraries
AC_CHECK_LIB(z,gzdopen)
## Tcl/Tk.
AC_ARG_WITH([tcltk],
[AC_HELP_STRING([--with-tcltk],
[use Tcl/Tk, or specify its library dir @<:@yes@:>@])],
[if test "${withval}" = no; then
want_tcltk=no
elif test "${withval}" = yes; then
want_tcltk=yes
else
want_tcltk=yes
LDFLAGS="${LDFLAGS} -L${withval}"
tcltk_prefix="${withval}"
fi],
[want_tcltk=yes])
AC_ARG_WITH([tcl-config],
[AC_HELP_STRING([--with-tcl-config=TCL_CONFIG],
[specify location of tclConfig.sh @<:@@:>@])],
[TCL_CONFIG="${withval}"],
[TCL_CONFIG=""])
AC_ARG_WITH([tk-config],
[AC_HELP_STRING([--with-tk-config=TK_CONFIG],
[specify location of tkConfig.sh @<:@@:>@])],
[TK_CONFIG="${withval}"],
[TK_CONFIG=""])
AC_ARG_VAR([TCLTK_LIBS],
[flags needed for linking against the Tcl and Tk libraries])
AC_ARG_VAR([TCLTK_CPPFLAGS],
[flags needed for finding the tcl.h and tk.h headers])
## Tcl/Tk.
COVERED_TCLTK
## Check for browser for help pages
COVERED_PROG_BROWSER
dnl Specify debug enabling
COVERED_DEBUG
dnl Specify profiler enabling
COVERED_PROFILER
dnl Specify test-mode enabling
COVERED_TEST
## Simulators supported
AC_ARG_WITH([iv],
[AC_HELP_STRING([--with-iv=IV_BASE_DIR],
[Create covered.vpi module for the Icarus Verilog simulator with the specified base directory @<:@@:>@])],
[if test "${withval}" = no; then
want_iv=no
elif test "${withval}" = yes; then
want_iv=yes
else
AC_CHECK_HEADER([$withval/include/iverilog/vpi_user.h],
[want_iv=yes
iv_prefix="${withval}"
iv_inc_prefix="${withval}/include/iverilog"],
[AC_CHECK_HEADER([$withval/include/vpi_user.h],
[want_iv=yes
iv_prefix="${withval}"
iv_inc_prefix="${withval}/include"],
[AC_CHECK_HEADER([$withval/include/verilog/vpi_user.h],
[want_iv=yes
iv_prefix="${withval}"
iv_inc_prefix="${withval}/include/verilog"],AC_MSG_ERROR([Invalid base directory specified in --with-iv]))])])
fi],
[want_iv=no])
if test "$want_iv" = yes; then
AC_SUBST([IVLIB], ['covered.vpi'])
AC_SUBST([IVDIR], ["${iv_prefix}"])
AC_SUBST([IVINC], ["${iv_inc_prefix}"])
fi
AC_ARG_WITH([vcs],
[AC_HELP_STRING([--with-vcs=VCS_INCLUDE_DIR],
[Create covered.vcs.so file for the VCS simulator with the specified include directory @<:@@:>@])],
[if test "${withval}" = no; then
want_vcs=no
elif test "${withval}" = yes; then
want_vcs=yes
else
AC_CHECK_HEADER([$withval/vpi_user.h],
[want_vcs=yes
vcs_prefix="${withval}"],AC_MSG_ERROR([Invalid include directory specified in --with-vcs]))
fi],
[want_vcs=no])
if test "$want_vcs" = yes; then
if test "$build_cygwin" = yes; then
AC_MSG_ERROR([Cygwin version of VCS library is not available])
else
AC_SUBST([VCSLIB], ['covered.vcs.so'])
AC_SUBST([VCSINC], ["${vcs_prefix}"])
fi
fi
AC_ARG_WITH([ncv],
[AC_HELP_STRING([--with-ncv=NCV_INCLUDE_DIR],
[Create covered.ncv.so file for the NCVerilog simulator with the specified include directory @<:@@:>@])],
[if test "${withval}" = no; then
want_ncv=no
elif test "${withval}" = yes; then
want_ncv=yes
else
AC_CHECK_HEADER([$withval/vpi_user.h],
[want_ncv=yes
ncv_prefix="${withval}"],AC_MSG_ERROR([Invalid include directory specified in --with-ncv]))
fi],
[want_ncv=no])
if test "$want_ncv" = yes; then
if test "$build_cygwin" = yes; then
AC_MSG_ERROR([Cygwin version of NCVerilog library is not available])
else
AC_SUBST([NCVLIB], ['covered.ncv.so'])
AC_SUBST([NCVINC], ["${ncv_prefix}"])
fi
fi
AC_ARG_WITH([cver],
[AC_HELP_STRING([--with-cver=CVER_INCLUDE_DIR],
[Create covered.cver.so file for the CVER simulator with the specified include directory @<:@@:>@])],
[if test "${withval}" = no; then
want_cver=no
elif test "${withval}" = yes; then
want_cver=yes
else
AC_CHECK_HEADER([$withval/vpi_user.h],
[want_cver=yes
cver_prefix="${withval}"],AC_MSG_ERROR([Invalid include directory specified in --with-cver]))
fi],
[want_cver=no])
if test "$want_cver" = yes; then
if test "$build_cygwin" = yes; then
AC_SUBST([CVERLIB], ['covered.cver.dll'])
else
AC_SUBST([CVERLIB], ['covered.cver.so'])
fi
AC_SUBST([CVERINC], ["${cver_prefix}"])
fi
dnl AC_CHECK_HEADERS(getopt.h)
AC_CHECK_HEADERS(string.h)
AC_CHECK_HEADERS(sys/time.h)
AC_CHECK_HEADERS(math.h)
dnl Checks for libraries.
dnl AM_WITH_MPATROL(yes)
dnl Checks for header files.
AC_HEADER_STDC
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_CHECK_SIZEOF(char,4)
AC_CHECK_SIZEOF(short,4)
AC_CHECK_SIZEOF(int,4)
AC_CHECK_SIZEOF(long,4)
AC_CHECK_SIZEOF([long long],4)
AC_CHECK_SIZEOF(float,4)
AC_CHECK_SIZEOF(double,4)
dnl Checks for library functions.
AC_TYPE_SIGNAL
AC_TYPE_SIZE_T
AC_CHECK_LIB(m,round)
AC_CHECK_LIB(m,roundf)
dnl Stuff for creating dynamically loadable shared objects in a system-neutral way
# Compiler option for position independent code, needed when making shared objects.
# CFLAGS inherited by cadpli/Makefile?
AX_C_PICFLAG
# may modify CPPFLAGS and CFLAGS
AX_CPP_PRECOMP
# Linker option used when compiling the target
AX_LD_RDYNAMIC
# linker options when building a shared library
AX_LD_SHAREDLIB_OPTS
AC_OUTPUT(Makefile src/Makefile lib/vpi/Makefile lib/run/Makefile scripts/Makefile doc/Makefile doc/docbook/Makefile)
if test -n "${warn_tcltk_version}"; then
AC_MSG_WARN([${warn_tcltk_version}])
fi