1 dnl sxe-bldchain-progs.m4 -- Necessary build chain stuff
3 AC_DEFUN([SXE_PROG_MAKEINFO], [dnl
4 AC_ARG_VAR([MAKEINFO], [the makeinfo command])
5 AC_CHECK_TOOL([MAKEINFO], [makeinfo], [:], [$PATH])
6 eval "$MAKEINFO --version > /dev/null 2>&1"
8 if echo $MAKEINFO | grep -q "missing --run"; then
9 # libtool missing has a much nicer error message
12 # This should be a good enough error message even in complement
13 # to the libtool missing
15 Could not find the makeinfo program. Check your PATH or install the texinfo package.
16 For more details see the INSTALL and PROBLEMS files.
17 SXEmacs generates the documentation during the build process.])
20 SXE_MSG_CHECKING([makeinfo version])
21 makeinfo_ver=`eval "$MAKEINFO" --version 2> /dev/null | head -n 1`
22 SXE_MSG_RESULT([${makeinfo_ver}])
23 AC_DEFINE_UNQUOTED(MAKEINFO_VERSION, "${makeinfo_ver}",
24 [the makeinfo command version])
25 case `echo "$makeinfo_ver" | $SED -e 's/^.* \([[0-9.]]*\).*/\1/'` in
28 Your makeinfo program is too old. Please install 5.x or later.])
33 AC_SUBST(MAKEINFO_VERSION)
34 ])dnl SXE_PROG_MAKEINFO
37 AC_DEFUN([SXE_PROG_AR], [dnl
38 AC_ARG_VAR([AR], [the ar command])
39 AC_CHECK_TOOL([AR], [ar], [:], [$PATH])
40 if test "$AR" = ":"; then
41 AC_PATH_TOOL([USR_CCS_BIN_AR], [ar], [:],
44 if test "$AR" = ":" -a "$USR_CCS_BIN_AR" = ":"; then
45 AC_MSG_ERROR([Uh oh, no ar is rilly bad news.])
46 elif test "$AR" = ":"; then
53 AC_DEFUN([SXE_PROG_BISON], [
55 SXE_MSG_CHECKING([for bison])
56 if test "$YACC" != "bison -y"; then
57 AC_SUBST([BISON], [:], [location of bison])
59 sxe_cv_feat_bison="no"
60 dnl AC_MSG_ERROR([bison not found but required])
62 AC_SUBST([BISON], [bison], [location of bison])
64 sxe_cv_feat_bison="yes"
66 SXE_MSG_RESULT([${sxe_cv_feat_bison}])
68 ## check if bison is capable
69 if test "$sxe_cv_feat_bison" = "yes"; then
70 SXE_MSG_CHECKING([if bison is recent enough])
71 sxe_cv_feat_bison_version="$(${BISON} --version | head -n1)"
72 case "$sxe_cv_feat_bison_version" in
79 SXE_MSG_RESULT([${have_bison} (${sxe_cv_feat_bison_version})])
84 AC_DEFUN([SXE_CHECK_AUTOTOOL], [dnl
85 ## arg 1 tool's binary name
86 ## arg 2 sxemacs_version.m4's name
87 ## arg 3 config.h.in description
88 pushdef([autotool], [$1])
89 pushdef([AUTOTOOL], translit($1, [-a-z], [_A-Z]))
90 pushdef([v3rs1on], indir($2))
91 pushdef([descr], [$3])
93 AC_MSG_CHECKING([for ]autotool[ version])
94 AC_MSG_RESULT(v3rs1on)
95 AC_DEFINE_UNQUOTED(AUTOTOOL[_VERSION], "v3rs1on", descr)
101 ])dnl SXE_CHECK_AUTOTOOL
103 AC_DEFUN([SXE_CHECK_AUTOTOOLS], [dnl
104 ## brag about the autotools versions
105 m4_ifdef([4UTOCONF_VERSION], [dnl
106 SXE_CHECK_AUTOTOOL([autoconf], [4UTOCONF_VERSION],
107 [version of autoconf used to build the configure script])])
108 m4_ifdef([4UTOHEADER_VERSION], [dnl
109 SXE_CHECK_AUTOTOOL([autoheader], [4UTOHEADER_VERSION],
110 [version of autoheader used to build the config.h.in])])
111 m4_ifdef([4CLOCAL_VERSION], [dnl
112 SXE_CHECK_AUTOTOOL([aclocal], [4CLOCAL_VERSION],
113 [version of aclocal used to incorporate m4 macros])])
114 m4_ifdef([4UTOMAKE_VERSION], [dnl
115 SXE_CHECK_AUTOTOOL([automake], [4UTOMAKE_VERSION],
116 [version of automake used to build the Makefiles])])
117 m4_ifdef([4IBTOOL_VERSION], [dnl
118 SXE_CHECK_AUTOTOOL([libtool], [4IBTOOL_VERSION],
119 [version of libtool used to provide portable linking])])
120 ])dnl SXE_CHECK_AUTOTOOLS
123 dnl recommended interface function
124 AC_DEFUN([SXE_CHECK_BUILDCHAIN], [dnl
135 dnl dnl m4_ifdef([LT_INIT], [LT_INIT], [AC_PROG_LIBTOOL])
139 ])dnl SXE_CHECK_BUILDCHAIN
141 dnl recommended interface macro for parser/lexer
142 AC_DEFUN([SXE_CHECK_PARSER_LEXER], [dnl
146 ])dnl SXE_CHECK_PARSER_LEXER
149 dnl sxe-bldchain-progs.m4 ends here