1 dnl ===========================================================================
2 dnl Additional macros used to configure GiNaC. We don't start our own
3 dnl additions' names with AC_ but with GINAC_ in order to steer clear of
5 dnl ===========================================================================
7 dnl Usage: GINAC_TERMCAP
8 dnl libreadline is based on the termcap functions.
9 dnl Some systems have tgetent(), tgetnum(), tgetstr(), tgetflag(), tputs(),
10 dnl tgoto() in libc, some have it in libtermcap, some have it in libncurses.
11 dnl When both libtermcap and libncurses exist, we prefer the latter, because
12 dnl libtermcap is being phased out.
13 AC_DEFUN(GINAC_TERMCAP,
15 AC_CHECK_FUNCS(tgetent)
16 if test "x$ac_cv_func_tgetent" = "xyes"; then
19 AC_CHECK_LIB(ncurses, tgetent, LIBTERMCAP="-lncurses")
20 if test -z "$LIBTERMCAP"; then
21 AC_CHECK_LIB(termcap, tgetent, LIBTERMCAP="-ltermcap")
27 dnl Usage: GINAC_ERROR(message)
28 dnl This macro displays the warning "message" and sets the flag ginac_error
30 AC_DEFUN(GINAC_ERROR,[
31 ginac_error_txt="$ginac_error_txt
36 dnl Usage: GINAC_WARNING(message)
37 dnl This macro displays the warning "message" and sets the flag ginac_warning
39 AC_DEFUN(GINAC_WARNING,[
40 ginac_warning_txt="$ginac_warning_txt
45 dnl Usage: GINAC_CHECK_ERRORS
46 dnl (preferably to be put at end of configure.in)
47 dnl This macro displays a warning message if GINAC_ERROR or GINAC_WARNING
48 dnl has occured previously.
49 AC_DEFUN(GINAC_CHECK_ERRORS,[
50 if test "x${ginac_error}" = "xyes"; then
51 echo "**** The following problems have been detected by configure."
52 echo "**** Please check the messages below before running \"make\"."
53 echo "**** (see the section 'Common Problems' in the INSTALL file)"
54 echo "$ginac_error_txt"
55 if test "x${ginac_warning_txt}" != "x"; then
56 echo "${ginac_warning_txt}"
58 echo "deleting cache ${cache_file}"
61 if test x$ginac_warning = xyes; then
62 echo "=== The following minor problems have been detected by configure."
63 echo "=== Please check the messages below before running \"make\"."
64 echo "=== (see the section 'Common Problems' in the INSTALL file)"
65 echo "$ginac_warning_txt"
67 echo "Configuration of GiNaC $VERSION done. Now type \"make\"."