File: configure.in

package info (click to toggle)
qflow 1.3.17+dfsg.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 3,852 kB
  • sloc: ansic: 8,342; csh: 3,873; sh: 2,869; makefile: 417; tcl: 6
file content (317 lines) | stat: -rw-r--r-- 8,411 bytes parent folder | download
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
#!/bin/sh

AC_INIT(VERSION,, eda-dev@opencircuitdesign.com)
AC_PREREQ(2.60)
AC_CONFIG_SRCDIR([Makefile.in])

# Determine the host and build type.
# ===========================================================================
AC_CANONICAL_HOST

PACKAGE=qflow
VERSION=`cat ./VERSION | cut -d. -f1-2`
REVISION=`cat ./VERSION | cut -d. -f3`

AC_SUBST(VERSION)
AC_SUBST(REVISION)
AC_ARG_PROGRAM

# Required programs
# ===========================================================================
AC_PROG_CC
AC_PROG_CPP
AC_ISC_POSIX
if test "x$U" != "x"; then
  AC_MSG_ERROR(Compiler not ANSI compliant)
fi
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_CHECK_PROG(AUTOCONF, autoconf, autoconf, :)
AC_CHECK_PROG(CP, cp, cp, :)
AC_CHECK_PROG(RM, rm, rm, :)
AC_CHECK_PROG(HAVE_PYTHON3, python3, yes, no)

AC_LANG_C
AC_HEADER_STDC
AC_CHECK_FUNCS(setenv putenv)

AC_PATH_PROG(ENV_PATH, env, env, $PATH)

# Options
# =========================================

dnl Path to Tcl/Tk

AC_ARG_WITH(tclsh,
[  --with-tclsh=DIR		path to tclsh], [
   if test -d "$withval"; then
      TCLSH_DIR=$withval
   elif test -f "$withval"; then
      # Path includes "/tclsh";  remove it
      TCLSH_DIR=${withval%/tclsh}
   else
      TCLSH_DIR=${PATH}
   fi
   AC_PATH_PROG(TCLSH_PATH, tclsh, tclsh, $TCLSH_DIR)
], [
   AC_PATH_PROG(TCLSH_PATH, tclsh, tclsh, )])
AC_DEFINE_UNQUOTED(TCLSH_PATH, "$TCLSH_PATH")

dnl Path to Magic 8.X

AC_ARG_WITH(magic,
[  --with-magic=DIR		path to magic-8.X], [
   if test -d "$withval"; then
      QFLOW_MAGIC_DIR=$withval
   elif test -f "$withval"; then
      # Path includes "/magic";  remove it
      QFLOW_MAGIC_DIR=${withval%/magic}
   else
      QFLOW_MAGIC_DIR=${PATH}
   fi
   AC_PATH_PROG(QFLOW_MAGIC_PATH, magic, , $QFLOW_MAGIC_DIR)
], [
   AC_PATH_PROG(QFLOW_MAGIC_PATH, magic, , )])
AC_DEFINE_UNQUOTED(QFLOW_MAGIC_PATH, "$QFLOW_MAGIC_PATH")

dnl Path to Netgen

AC_ARG_WITH(netgen,
[  --with-netgen=DIR		path to netgen], [
   if test -d "$withval"; then
      QFLOW_NETGEN_DIR=$withval
   elif test -f "$withval"; then
      # Path includes "/netgen";  remove it
      QFLOW_NETGEN_DIR=${withval%/netgen}
   else
      QFLOW_NETGEN_DIR=${PATH}
   fi
   AC_PATH_PROG(QFLOW_NETGEN_PATH, netgen, , $QFLOW_NETGEN_DIR)
], [
   AC_PATH_PROG(QFLOW_NETGEN_PATH, netgen, , )])
AC_DEFINE_UNQUOTED(QFLOW_NETGEN_PATH, "$QFLOW_NETGEN_PATH")

dnl Path to Qrouter

AC_ARG_WITH(qrouter,
[  --with-qrouter=DIR		path to qrouter], [
   if test -d "$withval"; then
      QFLOW_QROUTER_DIR=$withval
   elif test -f "$withval"; then
      # Path includes "/qrouter";  remove it
      QFLOW_QROUTER_DIR=${withval%/qrouter}
   else
      QFLOW_QROUTER_DIR=${PATH}
   fi
   AC_PATH_PROG(QFLOW_QROUTER_PATH, qrouter, , $QFLOW_QROUTER_DIR)
], [
   AC_PATH_PROG(QFLOW_QROUTER_PATH, qrouter, , )])
AC_DEFINE_UNQUOTED(QFLOW_QROUTER_PATH, "$QFLOW_QROUTER_PATH")

dnl Path to GrayWolf

AC_ARG_WITH(graywolf,
[  --with-graywolf=DIR		path to graywolf], [
   if test -d "$withval"; then
      QFLOW_GRAYWOLF_DIR=$withval
   elif test -f "$withval"; then
      # Path includes "/graywolf";  remove it
      QFLOW_GRAYWOLF_DIR=${withval%/graywolf}
   else
      QFLOW_GRAYWOLF_DIR=${PATH}
   fi
   AC_PATH_PROG(QFLOW_GRAYWOLF_PATH, graywolf, , $QFLOW_GRAYWOLF_DIR)
], [
   AC_PATH_PROG(QFLOW_GRAYWOLF_PATH, graywolf, , )])
AC_DEFINE_UNQUOTED(QFLOW_GRAYWOLF_PATH, "$QFLOW_GRAYWOLF_PATH")

dnl Path to yosys

AC_ARG_WITH(yosys,
[  --with-yosys=DIR		path to yosys], [
   if test -d "$withval"; then
      QFLOW_YOSYS_DIR=$withval
   elif test -f "$withval"; then
      # Path includes "/yosys";  remove it
      QFLOW_YOSYS_DIR=${withval%/yosys}
   else
      QFLOW_YOSYS_DIR=${PATH}
   fi
   AC_PATH_PROG(QFLOW_YOSYS_PATH, yosys, , $QFLOW_YOSYS_DIR)
], [
   AC_PATH_PROG(QFLOW_YOSYS_PATH, yosys, , )])
AC_DEFINE_UNQUOTED(QFLOW_YOSYS_PATH, "$QFLOW_YOSYS_PATH")

dnl Path to OpenTimer

AC_ARG_WITH(opentimer,
[  --with-opentimer=DIR		path to ot-shell], [
   if test -d "$withval"; then
      QFLOW_OPENTIMER_DIR=$withval
   elif test -f "$withval"; then
      # Path includes "ot-shell";  remove it
      QFLOW_OPENTIMER_DIR=${withval%/ot-shell}
   else
      QFLOW_OPENTIMER_DIR=${PATH}
   fi
   AC_PATH_PROG(QFLOW_OPENTIMER_PATH, ot-shell, , $QFLOW_OPENTIMER_DIR)
], [
   AC_PATH_PROG(QFLOW_OPENTIMER_PATH, ot-shell, , )])
AC_DEFINE_UNQUOTED(QFLOW_OPENTIMER_PATH, "$QFLOW_OPENTIMER_PATH")

AC_ARG_WITH(opensta,
[  --with-opensta=DIR		path to sta], [
   if test -d "$withval"; then
      QFLOW_OPENSTA_DIR=$withval
   elif test -f "$withval"; then
      # Path includes "sta";  remove it
      QFLOW_OPENSTA_DIR=${withval%/sta}
   else
      QFLOW_OPENSTA_DIR=${PATH}
   fi
   AC_PATH_PROG(QFLOW_OPENSTA_PATH, sta, , $QFLOW_OPENSTA_DIR)
], [
   AC_PATH_PROG(QFLOW_OPENSTA_PATH, sta, , )])
AC_DEFINE_UNQUOTED(QFLOW_OPENSTA_PATH, "$QFLOW_OPENSTA_PATH")

dnl Expand the prefix variable
if test "x$prefix" = xNONE ; then
   prefix=$ac_default_prefix
fi

dnl Target library location

AC_ARG_WITH(libdir,
[  --with-libdir=DIR			path to qflow runtime files], [
   QFLOW_LIB_DIR=$withval
], [
   QFLOW_LIB_DIR=${prefix}/share/qflow
])

AC_ARG_WITH(bindir,
[  --with-bindir=DIR			path to qflow launch script], [
   QFLOW_BIN_DIR=$withval
], [
   QFLOW_BIN_DIR=${prefix}/bin
])

dnl AC_SUBST(QFLOW_YOSYS_PATH)
dnl AC_SUBST(QFLOW_GRAYWOLF_PATH)
dnl AC_SUBST(QFLOW_QROUTER_PATH)
dnl AC_SUBST(QFLOW_MAGIC_PATH)
dnl AC_SUBST(QFLOW_NETGEN_PATH)
dnl AC_SUBST(QFLOW_OPENTIMER_PATH)
dnl AC_SUBST(QFLOW_OPENSTA_PATH)

AC_SUBST(QFLOW_BIN_DIR)
AC_SUBST(QFLOW_LIB_DIR)

AC_SUBST(TCLSH_PATH)
AC_SUBST(HAVE_PYTHON3)

AC_SUBST(CFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(LD)
AC_SUBST(STDLIBS)

if test "x${ac_cv_path_QFLOW_YOSYS_PATH}" == "x"; then
   HAVE_YOSYS=0
else
   HAVE_YOSYS=1
fi

AC_SUBST(HAVE_YOSYS)

if test "x${ac_cv_path_QFLOW_MAGIC_PATH}" == "x"; then
   HAVE_MAGIC=0
else
   HAVE_MAGIC=1
fi

AC_SUBST(HAVE_MAGIC)

if test "x${ac_cv_path_QFLOW_NETGEN_PATH}" == "x"; then
   HAVE_NETGEN=0
else
   HAVE_NETGEN=1
fi

AC_SUBST(HAVE_NETGEN)

if test "x${ac_cv_path_QFLOW_OPENTIMER_PATH}" == "x"; then
   HAVE_OPENTIMER=0
else
   HAVE_OPENTIMER=1
fi

AC_SUBST(HAVE_OPENTIMER)

if test "x${ac_cv_path_QFLOW_OPENSTA_PATH}" == "x"; then
   HAVE_OPENSTA=0
else
   HAVE_OPENSTA=1
fi

AC_SUBST(HAVE_OPENSTA)

AC_OUTPUT(Makefile scripts/Makefile src/Makefile tech/Makefile tech/osu050/Makefile tech/osu035/Makefile tech/osu035_redm4/Makefile tech/osu018/Makefile)

echo ""
echo "Configuration results:"
echo "----------------------------------------------------"
echo ""

if test "x${ac_cv_path_QFLOW_YOSYS_PATH}" == "x"; then
   echo "ERROR: yosys not found.  Use --with-yosys=<DIR>"
else
   echo "Using yosys verilog synthesis tool at: ${ac_cv_path_QFLOW_YOSYS_PATH}"
fi

if test "x${ac_cv_path_QFLOW_GRAYWOLF_PATH}" == "x"; then
   echo "ERROR: GrayWolf not found.  Use --with-graywolf=<DIR>"
else
   echo "Using graywolf placement tool at: ${ac_cv_path_QFLOW_GRAYWOLF_PATH}"
fi

if test "x${ac_cv_path_QFLOW_QROUTER_PATH}" == "x"; then
   echo "ERROR: qrouter not found.  Use --with-qrouter=<DIR>"
else
   echo "Using qrouter detail route tool at: ${ac_cv_path_QFLOW_QROUTER_PATH}"
fi

if test "x${ac_cv_path_QFLOW_MAGIC_PATH}" == "x"; then
   echo "WARNING: Magic 8.X layout tool not found.  Use --with-magic=<DIR>"
else
   echo "Using Magic layout tool at: ${ac_cv_path_QFLOW_MAGIC_PATH}"
fi

if test "x${ac_cv_path_QFLOW_NETGEN_PATH}" == "x"; then
   echo "WARNING: Netgen LVS tool not found.  Use --with-netgen=<DIR>"
else
   echo "Using Netgen LVS tool at: ${ac_cv_path_QFLOW_NETGEN_PATH}"
fi

if test "x${ac_cv_path_QFLOW_OPENTIMER_PATH}" == "x"; then
#  echo "INFO: OpenTimer not found.  Use --with-opentimer=<DIR>"
   if test "x${ac_cv_path_QFLOW_OPENSTA_PATH}" == "x"; then
       echo "Using Vesta STA tool (internal)"
   fi
else
   echo "EXPERIMENTAL: Using OpenTimer static timing analysys tool at: ${ac_cv_path_QFLOW_OPENTIMER_PATH}"
fi

if test "x${ac_cv_path_QFLOW_OPENSTA_PATH}" == "x"; then
#  echo "INFO: OpenSTA not found.  Use --with-opensta=<DIR>"
   if test "x${ac_cv_path_QFLOW_OPENTIMER_PATH}" == "x"; then
      echo "Using Vesta STA tool (internal)"
   fi
else
   echo "EXPERIMENTAL: Using OpenSTA static timing analysys tool at: ${ac_cv_path_QFLOW_OPENSTA_PATH}"
fi

if test "x${HAVE_PYTHON3}" == "x"; then
   echo "No python3 on system, will not install qflow GUI or spi2xspice.py"
fi

echo "----------------------------------------------------"