comparison host/acinclude.m4 @ 151:25e238959bae

Merge from eCos master repository on 2001-02-12-23:44:24-GMT
author jlarmour
date Tue, 13 Feb 2001 01:23:16 +0000
parents a9ac27ec7abc
children 511f4dc167f6
comparison
equal deleted inserted replaced
150:f0e3fb000de8 151:25e238959bae
243 AC_DEFINE(CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS) 243 AC_DEFINE(CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS)
244 fi 244 fi
245 245
246 ]) 246 ])
247 247
248 dnl ====================================================================
249 dnl Inspired by KDE's autoconfig
250 dnl This macro takes three Arguments like this:
251 dnl AC_FIND_FILE(foo.h, $incdirs, incdir)
252 dnl the filename to look for, the list of paths to check and
253 dnl the variable with the result.
254
255 AC_DEFUN(AC_FIND_FILE,
256 [
257 $3=NO
258 for i in $2;
259 do
260 for j in $1;
261 do
262 if test -r "$i/$j"; then
263 $3=$i
264 break 2
265 fi
266 done
267 done
268 ])
269
270
248 dnl -------------------------------------------------------------------- 271 dnl --------------------------------------------------------------------
249 dnl Convert a cygwin pathname to something acceptable to VC++ (but 272 dnl Convert a cygwin pathname to something acceptable to VC++ (but
250 dnl still invoked from bash and cygwin's make). This means using 273 dnl still invoked from bash and cygwin's make). This means using
251 dnl the cygpath utility and then translating any backslashes into 274 dnl the cygpath utility and then translating any backslashes into
252 dnl forward slashes to avoid confusing make. 275 dnl forward slashes to avoid confusing make.
319 AC_MSG_RESULT(${cyg_ac_tcl_version}) 342 AC_MSG_RESULT(${cyg_ac_tcl_version})
320 AC_SUBST(cyg_ac_tcl_version) 343 AC_SUBST(cyg_ac_tcl_version)
321 344
322 dnl Where is the Tcl installation? By default assume Tcl is already 345 dnl Where is the Tcl installation? By default assume Tcl is already
323 dnl installed in the same place as the eCos host-side. 346 dnl installed in the same place as the eCos host-side.
347
324 AC_ARG_WITH(tcl,[ --with-tcl-header=<path> location of Tcl header]) 348 AC_ARG_WITH(tcl,[ --with-tcl-header=<path> location of Tcl header])
325 AC_ARG_WITH(tcl,[ --with-tcl-lib=<path> location of Tcl libraries]) 349 AC_ARG_WITH(tcl,[ --with-tcl-lib=<path> location of Tcl libraries])
350 AC_ARG_WITH(tcl,[ --with-tcl=<path> location of Tcl header and libraries])
326 351
327 AC_MSG_CHECKING(for Tcl installation) 352 AC_MSG_CHECKING(for Tcl installation)
328 AC_ARG_WITH(tcl,[ --with-tcl=<path> location of Tcl header and libraries],[ 353
329 cyg_ac_tcl_incdir=${with_tcl}/include 354 tcl_incdirs="${with_tcl_header} ${with_tcl}/include ${prefix}/include /usr/include/tcl$cyg_ac_tcl_version /usr/include"
330 cyg_ac_tcl_libdir=${with_tcl}/lib 355 AC_FIND_FILE(tcl.h, $tcl_incdirs, cyg_ac_tcl_incdir)
331 ],[
332 if test "${with_tcl_header}" = "no"; then
333 cyg_ac_tcl_incdir=${prefix}/include
334 else
335 with_tcl=yes
336 cyg_ac_tcl_incdir=${with_tcl_header}/include
337 fi
338
339 if test "${with_tcl_lib}" = "no"; then
340 cyg_ac_tcl_libdir=${prefix}/lib
341 else
342 with_tcl=yes
343 cyg_ac_tcl_libdir=${with_tcl_lib}/lib
344 fi
345 ])
346 AC_MSG_RESULT(${cyg_ac_tcl_libdir})
347 356
348 dnl Sanity check, make sure that there is a tcl.h header file. 357 dnl Sanity check, make sure that there is a tcl.h header file.
349 dnl If not then there is no point in proceeding. 358 dnl If not then there is no point in proceeding.
350 if test \! -r ${cyg_ac_tcl_incdir}/tcl.h ; then 359 if test \! -r ${cyg_ac_tcl_incdir}/tcl.h ; then
351 AC_MSG_ERROR(unable to locate Tcl header file tcl.h) 360 AC_MSG_ERROR(unable to locate Tcl header file tcl.h)
352 fi 361 fi
362
363 tcl_libdirs="${with_tcl_lib} ${with_tcl}/lib ${prefix}/lib /usr/lib/tcl$cyg_ac_tcl_version /usr/lib"
364 AC_FIND_FILE(tclConfig.sh, $tcl_libdirs, cyg_ac_tcl_libdir)
365
366 AC_MSG_RESULT(${cyg_ac_tcl_libdir})
353 367
354 dnl If using VC++ then there is no tclConfig.sh file, so the 368 dnl If using VC++ then there is no tclConfig.sh file, so the
355 dnl library information has to be hard-wired. Otherwise ther 369 dnl library information has to be hard-wired. Otherwise ther
356 dnl should be a tclConfig.sh file containing the necessary information. 370 dnl should be a tclConfig.sh file containing the necessary information.
357 if test "${MSVC}" = "yes" ; then 371 if test "${MSVC}" = "yes" ; then