|
a/configure.in |
|
b/configure.in |
|
... |
|
... |
3 |
VERSION=`cat VERSION`
|
3 |
VERSION=`cat VERSION`
|
4 |
AC_SUBST(VERSION)
|
4 |
AC_SUBST(VERSION)
|
5 |
|
5 |
|
6 |
AC_PROG_INSTALL
|
6 |
AC_PROG_INSTALL
|
7 |
|
7 |
|
|
|
8 |
############################################## TCL/TK config
|
8 |
# Looking for tclConfig and tkConfig to set all defaults
|
9 |
# Looking for tclConfig and tkConfig to set all defaults
|
9 |
# this is an awful mess because this not always found in the same
|
10 |
# this is an awful mess because this not always found in the same
|
10 |
# place, especially on systems where tcl and/or tk are part of the
|
11 |
# place, especially on systems where tcl and/or tk are part of the
|
11 |
# standard install (then there under /usr, not /usr/local).
|
12 |
# standard install (then there under /usr, not /usr/local).
|
12 |
# We look for executable tclsh and wish in the PATH and use this to get the
|
13 |
# We look for executable tclsh and wish in the PATH and use this to get the
|
|
... |
|
... |
31 |
tclsh="$withval")
|
32 |
tclsh="$withval")
|
32 |
if test -n "$tclsh"; then
|
33 |
if test -n "$tclsh"; then
|
33 |
AC_MSG_CHECKING(for tclsh)
|
34 |
AC_MSG_CHECKING(for tclsh)
|
34 |
AC_MSG_RESULT($tclsh)
|
35 |
AC_MSG_RESULT($tclsh)
|
35 |
else
|
36 |
else
|
36 |
tclsh_list=""
|
37 |
tclsh_list="tclsh"
|
37 |
for v in $tcl_versions "" ; do
|
38 |
for v in $tcl_versions "" ; do
|
38 |
tclsh_list="$tclsh_list tclsh$v"
|
39 |
tclsh_list="$tclsh_list tclsh$v"
|
39 |
done
|
40 |
done
|
40 |
#echo "tclsh_list=$tclsh_list"
|
41 |
#echo "tclsh_list=$tclsh_list"
|
41 |
# Look for tclsh variants in $prefix/bin, and then in $PATH.
|
42 |
# Look for tclsh variants in $prefix/bin, and then in $PATH.
|
|
... |
|
... |
57 |
wish="$withval")
|
58 |
wish="$withval")
|
58 |
if test -n "$wish"; then
|
59 |
if test -n "$wish"; then
|
59 |
AC_MSG_CHECKING(for wish)
|
60 |
AC_MSG_CHECKING(for wish)
|
60 |
AC_MSG_RESULT($wish)
|
61 |
AC_MSG_RESULT($wish)
|
61 |
else
|
62 |
else
|
62 |
wish_list=""
|
63 |
wish_list="wish"
|
63 |
for v in $tk_versions "" ; do
|
64 |
for v in $tk_versions "" ; do
|
64 |
wish_list="$wish_list wish$v"
|
65 |
wish_list="$wish_list wish$v"
|
65 |
done
|
66 |
done
|
66 |
# Look for wish variants in $prefix/bin, and then in $PATH.
|
67 |
# Look for wish variants in $prefix/bin, and then in $PATH.
|
67 |
AC_PATH_PROGS(wish,$wish_list)
|
68 |
AC_PATH_PROGS(wish,$wish_list)
|
|
... |
|
... |
74 |
fi
|
75 |
fi
|
75 |
|
76 |
|
76 |
changequote(,)
|
77 |
changequote(,)
|
77 |
tkversion=`echo 'puts stdout [info tclversion];flush stdout;exit' | $wish`
|
78 |
tkversion=`echo 'puts stdout [info tclversion];flush stdout;exit' | $wish`
|
78 |
changequote([,])
|
79 |
changequote([,])
|
79 |
|
|
|
80 |
if test "$tclversion" != "$tkversion" ; then
|
80 |
if test "$tclversion" != "$tkversion" ; then
|
81 |
AC_MSG_ERROR("Different versions for tclsh and wish: $tclversion and $tkvesion")
|
81 |
AC_MSG_ERROR("Different versions for tclsh and wish: $tclversion and $tkvesion")
|
82 |
exit 1
|
|
|
83 |
fi
|
82 |
fi
|
|
|
83 |
AC_MSG_NOTICE([Tcl version: $tclversion])
|
84 |
|
84 |
|
85 |
###########
|
85 |
######
|
86 |
# Finding tclConfig.sh and tkConfig.sh. This is a mess, there is no
|
86 |
# Finding tclConfig.sh and tkConfig.sh. This is a mess, there is no
|
87 |
# standard way to do it, these files may not even be installed on the
|
87 |
# standard way to do it, these files may not even be installed on the
|
88 |
# system (happens). In this case you have to recompile and install standard
|
88 |
# system (happens). In this case you have to recompile and install standard
|
89 |
# tcl and tk distribs.
|
89 |
# tcl and tk distribs.
|
90 |
|
90 |
|
|
... |
|
... |
128 |
])
|
128 |
])
|
129 |
fi
|
129 |
fi
|
130 |
|
130 |
|
131 |
AC_MSG_RESULT($tclConfigSH)
|
131 |
AC_MSG_RESULT($tclConfigSH)
|
132 |
|
132 |
|
133 |
|
|
|
134 |
|
|
|
135 |
#### Look for tkConfig.sh
|
133 |
#### Look for tkConfig.sh
|
136 |
AC_MSG_CHECKING(for tkConfig.sh)
|
134 |
AC_MSG_CHECKING(for tkConfig.sh)
|
137 |
AC_ARG_WITH(tkconfig,
|
135 |
AC_ARG_WITH(tkconfig,
|
138 |
[ --with-tkconfig=<path> directory that contains tkConfig.sh],
|
136 |
[ --with-tkconfig=<path> directory that contains tkConfig.sh],
|
139 |
tkconfig="$withval")
|
137 |
tkconfig="$withval")
|
140 |
|
138 |
|
141 |
if test -n "$kconfig"; then
|
139 |
if test -n "$kconfig"; then
|
142 |
tkConfigSH="$tkconfig/tkConfig.sh"
|
140 |
tkConfigSH="$tkconfig/tkConfig.sh"
|
143 |
else
|
141 |
else
|
144 |
changequote(,)
|
142 |
changequote(,)
|
|
... |
|
... |
172 |
])
|
170 |
])
|
173 |
fi
|
171 |
fi
|
174 |
|
172 |
|
175 |
AC_MSG_RESULT($tkConfigSH)
|
173 |
AC_MSG_RESULT($tkConfigSH)
|
176 |
|
174 |
|
|
|
175 |
###########
|
177 |
# Find a place to install. Need to execute a script for this, things have
|
176 |
# Find a place to install to. Need to execute a script for this, things
|
178 |
# become complicated
|
177 |
# have become complicated
|
|
|
178 |
AC_MSG_CHECKING([for an appropriate Sqlscreens installation directory])
|
179 |
PACKAGEDIR=`$tclsh findpkgdir.tcl`/sqlsc/
|
179 |
PACKAGEDIR=`$tclsh findpkgdir.tcl`/sqlsc/
|
180 |
AC_SUBST(PACKAGEDIR)
|
180 |
AC_SUBST(PACKAGEDIR)
|
181 |
AC_MSG_RESULT(Will install to $PACKAGEDIR)
|
181 |
AC_MSG_RESULT([$PACKAGEDIR])
|
182 |
|
182 |
|
183 |
#### Load the Tcl/Tk configuration files
|
183 |
#### Load the Tcl/Tk configuration files
|
184 |
. $tclConfigSH
|
184 |
. $tclConfigSH
|
185 |
. $tkConfigSH
|
185 |
. $tkConfigSH
|
186 |
|
186 |
|
187 |
|
|
|
188 |
# Directories for include files
|
|
|
189 |
TCL_INCLUDE_DIR=none
|
|
|
190 |
dirs="$TCL_PREFIX/include/tcl$TCL_VERSION $TCL_PREFIX/include"
|
|
|
191 |
for d in $dirs ;do
|
|
|
192 |
if test -f $d/tcl.h ; then
|
|
|
193 |
TCL_INCLUDE_DIR=$d;break
|
|
|
194 |
fi
|
|
|
195 |
done
|
|
|
196 |
if test x$TCL_INCLUDE_DIR = x ; then
|
187 |
if test X$TCL_INCLUDE_SPEC = X; then
|
197 |
AC_MSG_ERROR([I could not find tcl.h (looked in $dirs)])
|
188 |
AC_MSG_ERROR([tclConfig.sh does not define TCL_INCLUDE_SPEC])
|
198 |
fi
|
189 |
fi
|
199 |
AC_SUBST(TCL_INCLUDE_DIR)
|
190 |
AC_SUBST(TCL_INCLUDE_SPEC)
|
200 |
|
191 |
|
201 |
TK_INCLUDE_DIR=none
|
|
|
202 |
dirs="$TK_PREFIX/include/tk$TK_VERSION $TK_PREFIX/include"
|
|
|
203 |
for d in $dirs ;do
|
|
|
204 |
if test -f $d/tk.h ; then
|
|
|
205 |
TK_INCLUDE_DIR=$d;break
|
|
|
206 |
fi
|
|
|
207 |
done
|
|
|
208 |
if test x$TK_INCLUDE_DIR = x ; then
|
192 |
if test x$TK_INCLUDE_SPEC = x ; then
|
209 |
AC_MSG_ERROR([I could not find tk.h (looked in $dirs)])
|
193 |
AC_MSG_ERROR([tcl/tkConfig.sh do not define TK_INCLUDE_SPEC])
|
210 |
fi
|
194 |
fi
|
211 |
AC_SUBST(TK_INCLUDE_DIR)
|
195 |
AC_SUBST(TK_INCLUDE_SPEC)
|
212 |
|
196 |
|
213 |
|
197 |
|
214 |
CC=${CC:-$TCL_CC}
|
198 |
CC=${CC:-$TCL_CC}
|
215 |
|
199 |
|
216 |
# Under solaris, if compiling with gcc, have to add the right gcc to
|
200 |
# Under solaris, if compiling with gcc, have to add the right gcc to
|
217 |
# the link command line for the dynamic obj
|
201 |
# the link command line for the dynamic obj
|
218 |
if test -x /usr/bin/uname ; then
|
202 |
if test -x /usr/bin/uname ; then
|
219 |
if test `/usr/bin/uname` = SunOS ; then
|
203 |
if test `/usr/bin/uname` = SunOS ; then
|
220 |
AC_PROG_CC
|
204 |
AC_PROG_CC
|
221 |
if test "A$GCC" = "Ayes" ; then
|
205 |
if test "A$GCC" = "Ayes" ; then
|
222 |
set `$CC -v 2>&1 | grep 'Reading specs'`
|
206 |
set `$CC -v 2>&1 | grep 'Reading specs'`
|
223 |
GCCLIBDIR=-L`/usr/bin/dirname $4`
|
207 |
GCCLIBDIR=-L`/usr/bin/dirname $4`
|
224 |
GCCLIB=-lgcc
|
208 |
GCCLIB=-lgcc
|
|
|
209 |
fi
|
225 |
fi
|
210 |
fi
|
226 |
fi
|
|
|
227 |
fi
|
211 |
fi
|
228 |
|
212 |
|
229 |
# If the link prog is ld, check the rpath opt, it's sometimes wrong in
|
213 |
# If the link prog is ld, check the rpath opt, it's sometimes wrong in
|
230 |
# tclconfig (in a form that would be suitable for cc)
|
214 |
# tclconfig (in a form that would be suitable for cc)
|
231 |
case "$TCL_SHLIB_LD" in
|
215 |
case "$TCL_SHLIB_LD" in
|
|
... |
|
... |
237 |
;;
|
221 |
;;
|
238 |
esac
|
222 |
esac
|
239 |
;;
|
223 |
;;
|
240 |
esac
|
224 |
esac
|
241 |
|
225 |
|
242 |
echo "TCL_LD_SEARCH_FLAGS: $TCL_LD_SEARCH_FLAGS"
|
|
|
243 |
|
|
|
244 |
WISH=$wish
|
226 |
WISH=$wish
|
245 |
|
227 |
|
246 |
AC_SUBST(CC)
|
228 |
AC_SUBST(CC)
|
247 |
AC_SUBST(GCCLIB)
|
229 |
AC_SUBST(GCCLIB)
|
248 |
AC_SUBST(GCCLIBDIR)
|
230 |
AC_SUBST(GCCLIBDIR)
|
|
... |
|
... |
251 |
AC_SUBST(INSTALL_DATA)
|
233 |
AC_SUBST(INSTALL_DATA)
|
252 |
AC_SUBST(TCL_SHLIB_CFLAGS)
|
234 |
AC_SUBST(TCL_SHLIB_CFLAGS)
|
253 |
AC_SUBST(TCL_SHLIB_SUFFIX)
|
235 |
AC_SUBST(TCL_SHLIB_SUFFIX)
|
254 |
AC_SUBST(TCL_SHLIB_LD)
|
236 |
AC_SUBST(TCL_SHLIB_LD)
|
255 |
AC_SUBST(TCL_VERSION)
|
237 |
AC_SUBST(TCL_VERSION)
|
256 |
AC_SUBST(TCL_XINCLUDES)
|
|
|
257 |
AC_SUBST(TCL_PREFIX)
|
238 |
AC_SUBST(TCL_PREFIX)
|
258 |
AC_SUBST(TCL_EXEC_PREFIX)
|
239 |
AC_SUBST(TCL_EXEC_PREFIX)
|
259 |
AC_SUBST(TCL_CFLAGS)
|
240 |
AC_SUBST(TCL_CFLAGS)
|
260 |
AC_SUBST(TCL_DEFS)
|
241 |
AC_SUBST(TCL_DEFS)
|
261 |
AC_SUBST(TCL_LIB_SPEC)
|
242 |
AC_SUBST(TCL_LIB_SPEC)
|
|
... |
|
... |
271 |
AC_SUBST(TK_DEFS)
|
252 |
AC_SUBST(TK_DEFS)
|
272 |
AC_SUBST(TK_LIBS)
|
253 |
AC_SUBST(TK_LIBS)
|
273 |
AC_SUBST(TK_LIB_SPEC)
|
254 |
AC_SUBST(TK_LIB_SPEC)
|
274 |
AC_SUBST(WISH)
|
255 |
AC_SUBST(WISH)
|
275 |
|
256 |
|
|
|
257 |
###################################################### MySQL
|
276 |
# Mysql includes and libs. The user can specify where they are,
|
258 |
# Mysql includes and libs. The user can specify where they are,
|
277 |
# else we try to find them
|
259 |
# else we try to find them
|
278 |
|
260 |
|
|
|
261 |
# Enable use of mysql. This needs libmysqlclient, so it can be disabled for
|
|
|
262 |
# people which don't need/want to install mysql. Other dbs depend on
|
|
|
263 |
# run-time detection of the appropriate tcl module.
|
|
|
264 |
AC_ARG_ENABLE(mysql,
|
|
|
265 |
AC_HELP_STRING([--disable-mysql],
|
|
|
266 |
[Disable mysql interface. Avoids having to install libmysqlclient-dev.]),
|
|
|
267 |
mysqlEnabled=$enableval, mysqlEnabled=yes)
|
|
|
268 |
|
|
|
269 |
if test X$mysqlEnabled = Xyes ; then
|
|
|
270 |
NOMYSQL=""
|
|
|
271 |
else
|
|
|
272 |
NOMYSQL="#"
|
|
|
273 |
fi
|
|
|
274 |
AC_SUBST(NOMYSQL)
|
|
|
275 |
|
|
|
276 |
if test X$mysqlEnabled = Xyes ; then
|
|
|
277 |
|
279 |
# Use mysql_config if available
|
278 |
# Use mysql_config if available
|
280 |
AC_PATH_PROGS(mysqlconf, mysql_config)
|
279 |
AC_PATH_PROGS(mysqlconf, mysql_config)
|
281 |
if test -z "$mysqlconf" ; then
|
280 |
if test -z "$mysqlconf" ; then
|
282 |
AC_MSG_ERROR([mysql_config not found])
|
281 |
AC_MSG_ERROR([mysql_config not found])
|
283 |
fi
|
282 |
fi
|
284 |
|
283 |
|
285 |
AC_ARG_WITH(mysql-libs,
|
|
|
286 |
[ --with-mysql-libs Specify directory to search for mysql client libs.],
|
|
|
287 |
[ mysql_libs=$withval ],
|
|
|
288 |
[ mysql_libs=no ]
|
|
|
289 |
)
|
|
|
290 |
|
|
|
291 |
# The MySQL library directory is needed for the dynlink search path? It's
|
|
|
292 |
# not given by mysql_config.
|
|
|
293 |
if test "$mysql_libs" != "no" ; then
|
|
|
294 |
MYSQLLIBDIR=$mysql_libs
|
|
|
295 |
else
|
|
|
296 |
MYSQLLIBDIR=`$mysqlconf --libs | awk '{print $1}'`
|
|
|
297 |
case A"$MYSQLLIBDIR" in
|
|
|
298 |
A-L*) MYSQLLIBDIR=`echo $MYSQLLIBDIR | sed -e 's/-L//'`;;
|
|
|
299 |
*) MYSQLLIBDIR="";;
|
|
|
300 |
esac
|
|
|
301 |
if test -z "$MYSQLLIBDIR" ; then
|
|
|
302 |
AC_MSG_ERROR([Sorry, can't find mysql libmysqlclient.a.
|
|
|
303 |
Check that the mysql development libraries are installed or
|
|
|
304 |
try using --with-mysql-libs])
|
|
|
305 |
fi
|
|
|
306 |
fi
|
|
|
307 |
|
|
|
308 |
MYSQLLIBSW=`$mysqlconf --libs`
|
284 |
MYSQLLIBSW=`$mysqlconf --libs`
|
309 |
|
|
|
310 |
AC_ARG_WITH(mysql-includes,
|
|
|
311 |
[ --with-mysql-includes Specify directory to search for mysql .h files.],
|
|
|
312 |
[ mysql_includes=$withval ],
|
|
|
313 |
[ mysql_includes=no ]
|
|
|
314 |
)
|
|
|
315 |
|
|
|
316 |
if test "$mysql_includes" != "no" ; then
|
|
|
317 |
MYSQLINCSW=-I$mysql_includes
|
|
|
318 |
else
|
|
|
319 |
# If the new mysql_config utility is available, use it
|
|
|
320 |
if test ! -z "$mysqlconf"; then
|
|
|
321 |
MYSQLINCSW=`$mysqlconf --cflags`
|
285 |
MYSQLINCSW=`$mysqlconf --cflags`
|
322 |
else
|
|
|
323 |
# libs can be like local/lib/mysql or local/mysql/lib, not the same
|
|
|
324 |
# way to compute the include file directory...
|
|
|
325 |
if test `expr $MYSQLLIBDIR : '.*mysql/lib'` -eq 0; then
|
|
|
326 |
MYSQLINCDIR=$MYSQLLIBDIR/../../include/mysql
|
|
|
327 |
else
|
|
|
328 |
MYSQLINCDIR=$MYSQLLIBDIR/../include
|
|
|
329 |
fi
|
|
|
330 |
if test ! -f "$MYSQLINCDIR/mysql.h" ; then
|
|
|
331 |
echo "Sorry, can't find mysql.h"
|
|
|
332 |
echo "I searched in: $MYSQLINCDIR"
|
|
|
333 |
echo "Check that the mysql development files are installed and"
|
|
|
334 |
echo "try using --with-mysql-includes"
|
|
|
335 |
exit 1
|
|
|
336 |
fi
|
|
|
337 |
MYSQLINCSW=-I${MYSQLINCDIR}
|
|
|
338 |
fi
|
|
|
339 |
fi
|
|
|
340 |
|
286 |
|
341 |
AC_SUBST(MYSQLINCSW)
|
287 |
AC_SUBST(MYSQLINCSW)
|
342 |
AC_SUBST(MYSQLLIBSW)
|
288 |
AC_SUBST(MYSQLLIBSW)
|
343 |
AC_SUBST(MYSQLLIBDIR)
|
289 |
|
|
|
290 |
fi
|
|
|
291 |
# end mysql optional section
|
344 |
|
292 |
|
345 |
AC_EGREP_HEADER(gethostname, unistd.h,,AC_DEFINE(HASNO_GETHOSTNAME_PROTO))
|
293 |
AC_EGREP_HEADER(gethostname, unistd.h,,AC_DEFINE(HASNO_GETHOSTNAME_PROTO))
|
346 |
|
294 |
|
347 |
AC_OUTPUT(Makefile)
|
295 |
AC_OUTPUT(Makefile)
|
348 |
|
296 |
|