1999-04-30 22:38:50 +04:00
|
|
|
dnl autoconf tests for bonsai
|
1999-05-04 19:29:31 +04:00
|
|
|
dnl Pontus Lidman 99-05-04
|
1999-04-30 22:38:50 +04:00
|
|
|
dnl
|
|
|
|
dnl Check if mysqltclsh is compiled with tclX support
|
|
|
|
dnl
|
|
|
|
dnl AC_PROG_MYSQLTCL_TCLX([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
|
|
|
dnl Test for mysqltclsh compiled with tclX and define MYSQLTCL
|
|
|
|
dnl
|
|
|
|
AC_DEFUN(AC_PROG_MYSQLTCL_TCLX,
|
|
|
|
[dnl
|
|
|
|
dnl Get the cflags and libraries from the gtk-config script
|
|
|
|
dnl
|
|
|
|
AC_PATH_PROGS(MYSQLTCL, mysqltclsh mysqltcl, no)
|
|
|
|
AC_MSG_CHECKING(for tclX flock in mysqltclsh)
|
|
|
|
no_mysqltclsh=""
|
|
|
|
|
|
|
|
if test "$MYSQLTCL" = "no" ; then
|
|
|
|
no_mysqltclsh=yes
|
|
|
|
else
|
|
|
|
dnl
|
|
|
|
dnl Perform test
|
|
|
|
dnl
|
1999-05-04 19:29:31 +04:00
|
|
|
changequote(<<,>>)
|
|
|
|
have_flock=`echo "echo [infox have_flock]" | $MYSQLTCL 2>/dev/null`
|
|
|
|
changequote([,])
|
|
|
|
if test "x$have_flock" != "x1" ; then
|
1999-04-30 22:38:50 +04:00
|
|
|
no_mysqltclsh=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test "x$no_mysqltclsh" = x ; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
ifelse([$1], , :, [$1])
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
if test "$MYSQLTCL" = "no" ; then
|
|
|
|
echo "*** mysqltclsh could not be found"
|
|
|
|
echo "*** make sure it is installed and in your PATH, then try again"
|
|
|
|
else
|
|
|
|
echo "*** mysqltclsh is not compiled with tclX support"
|
|
|
|
echo "*** see the file INSTALL for additional information"
|
|
|
|
fi
|
|
|
|
ifelse([$2], , :, [$2])
|
|
|
|
fi
|
|
|
|
AC_SUBST(MYSQLTCL)
|
|
|
|
])
|
|
|
|
dnl
|
|
|
|
dnl check if Perl::DB is installed
|
|
|
|
dnl
|
|
|
|
AC_DEFUN(AC_PERL_DB,
|
|
|
|
[
|
|
|
|
AC_MSG_CHECKING(for perl DBD::mysql module)
|
|
|
|
$PERL -w -c -e 'use DBD::mysql' 2>/dev/null; has_dbd=$?
|
|
|
|
if test "x$has_dbd" = "x0" ; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
ifelse([$1], , :, [$1])
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
echo "*** the perl MySQL module (DBD::mysql) could not be found"
|
|
|
|
ifelse([$2], , :, [$2])
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
dnl
|
|
|
|
dnl check if Date::Parse is installed
|
|
|
|
dnl
|
|
|
|
AC_DEFUN(AC_PERL_DATEPARSE,
|
|
|
|
[
|
1999-05-13 01:41:57 +04:00
|
|
|
AC_MSG_CHECKING(for perl Date::Parse module)
|
1999-04-30 22:38:50 +04:00
|
|
|
$PERL -w -c -e 'use Date::Parse' 2>/dev/null; has_dateparse=$?
|
|
|
|
if test "x$has_dateparse" = "x0" ; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
ifelse([$1], , :, [$1])
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
echo "*** the perl Date::Parse module could not be found"
|
|
|
|
ifelse([$2], , :, [$2])
|
|
|
|
fi
|
|
|
|
])
|