* baseboards/unix.exp: Don't link with -lm on cygwin.
[dejagnu.git] / acinclude.m4
blob20497d0abe5eef9b2cbebdc4f6b65a99b1fa07e3
1 AC_DEFUN(DJ_AC_PATH_TCLSH, [
2 dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../
3 ../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../..
4 /../../../../../.."
5 no_itcl=true
6 AC_MSG_CHECKING(for the tclsh program)
7 AC_ARG_WITH(tclinclude, [  --with-tclinclude       directory where tcl header
8 s are], with_tclinclude=${withval})
9 AC_CACHE_VAL(ac_cv_path_tclsh,[
10 dnl first check to see if --with-itclinclude was specified
11 if test x"${with_tclinclude}" != x ; then
12   if test -f ${with_tclinclude}/tclsh ; then
13     ac_cv_path_tclsh=`(cd ${with_tclinclude}; pwd)`
14   elif test -f ${with_tclinclude}/src/tclsh ; then
15     ac_cv_path_tclsh=`(cd ${with_tclinclude}/src; pwd)`
16   else
17     AC_MSG_ERROR([${with_tclinclude} directory doesn't contain tclsh])
18   fi
22 dnl next check in private source directory
23 dnl since ls returns lowest version numbers first, reverse its output
24 if test x"${ac_cv_path_tclsh}" = x ; then
25     dnl find the top level Itcl source directory
26     for i in $dirlist; do
27         if test -n "`ls -dr $srcdir/$i/tcl* 2>/dev/null`" ; then
28             tclpath=$srcdir/$i
29             break
30         fi
31     done
33     dnl find the exact Itcl source dir. We do it this way, cause there
34     dnl might be multiple version of Itcl, and we want the most recent one.
35     for i in `ls -dr $tclpath/tcl* 2>/dev/null ` ; do
36         if test -f $i/src/tclsh ; then
37           ac_cv_path_tclsh=`(cd $i/src; pwd)`/tclsh
38           break
39         fi
40     done
43 dnl see if one is installed
44 if test x"${ac_cv_path_tclsh}" = x ; then
45    AC_MSG_RESULT(none)
46    AC_PATH_PROG(tclsh, tclsh)
47 else
48    AC_MSG_RESULT(${ac_cv_path_tclsh})
50 TCLSH="${ac_cv_path_tclsh}"
51 AC_SUBST(TCLSH)
55 AC_DEFUN(DJ_AC_PATH_DOCBOOK, [
56 dirlist=".. ../../ ../../.. ../../../.. ../../../../.. ../../../../../.. ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
57 AC_MSG_CHECKING(for docbook tools)
58 AC_ARG_WITH(oskith, [  --with-docbook       directory where the db2 sgml tools are], with_docbook=${withval})
59 AC_CACHE_VAL(ac_cv_c_docbook,[
60 dnl first check to see if --with-docbook was specified
61 if test x"${with_docbook}" != x ; then
62   if test -f ${with_docbook}/db2html ; then
63     ac_cv_c_docbook=`(cd ${with_docbook}; pwd)`
64   else
65     AC_MSG_ERROR([${with_docbook} directory doesn't contain SGML tools])
66   fi
69 if test x"${ac_cv_c_docbook}" = x ; then
70     for i in $ac_default_prefix/bin /usr/local/bin $OSKITHDIR/../bin /usr/bin /bin /opt /home; do
71         dnl See is we have an SGML tool in that directory.
72         if test -f $i/db2html ; then
73             ac_cv_c_docbook=$i
74             break
75         fi
76     done
79 if test x"${ac_cv_c_docbook}" = x ; then
80     AC_MSG_RESULT(none)
81 else
82     DOCBOOK="${ac_cv_c_docbook}"
83     AC_MSG_RESULT(${ac_cv_c_docbook})
86 AC_SUBST(DOCBOOK)