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.])
21 ])dnl SXE_PROG_MAKEINFO
24 AC_DEFUN([SXE_PROG_AR], [dnl
25 AC_ARG_VAR([AR], [the ar command])
26 AC_CHECK_TOOL([AR], [ar], [:], [$PATH])
27 if test "$AR" = ":"; then
28 AC_PATH_TOOL([USR_CCS_BIN_AR], [ar], [:],
31 if test "$AR" = ":" -a "$USR_CCS_BIN_AR" = ":"; then
32 AC_MSG_ERROR([Uh oh, no ar is rilly bad news.])
33 elif test "$AR" = ":"; then
40 AC_DEFUN([SXE_PROG_BISON], [
42 SXE_MSG_CHECKING([for bison])
43 if test "$YACC" != "bison -y"; then
44 AC_SUBST([BISON], [:], [location of bison])
46 sxe_cv_feat_bison="no"
47 dnl AC_MSG_ERROR([bison not found but required])
49 AC_SUBST([BISON], [bison], [location of bison])
51 sxe_cv_feat_bison="yes"
53 SXE_MSG_RESULT([${sxe_cv_feat_bison}])
55 ## check if bison is capable
56 if test "$sxe_cv_feat_bison" = "yes"; then
57 SXE_MSG_CHECKING([if bison is recent enough])
58 sxe_cv_feat_bison_version="$(${BISON} --version | head -n1)"
59 case "$sxe_cv_feat_bison_version" in
66 SXE_MSG_RESULT([${have_bison} (${sxe_cv_feat_bison_version})])
71 AC_DEFUN([SXE_CHECK_AUTOTOOL], [dnl
72 ## arg 1 tool's binary name
73 ## arg 2 sxemacs_version.m4's name
74 ## arg 3 config.h.in description
75 pushdef([autotool], [$1])
76 pushdef([AUTOTOOL], translit($1, [-a-z], [_A-Z]))
77 pushdef([v3rs1on], indir($2))
78 pushdef([descr], [$3])
80 AC_MSG_CHECKING([for ]autotool[ version])
81 AC_MSG_RESULT(v3rs1on)
82 AC_DEFINE_UNQUOTED(AUTOTOOL[_VERSION], "v3rs1on", descr)
88 ])dnl SXE_CHECK_AUTOTOOL
90 AC_DEFUN([SXE_CHECK_AUTOTOOLS], [dnl
91 ## brag about the autotools versions
92 m4_ifdef([4UTOCONF_VERSION], [dnl
93 SXE_CHECK_AUTOTOOL([autoconf], [4UTOCONF_VERSION],
94 [version of autoconf used to build the configure script])])
95 m4_ifdef([4UTOHEADER_VERSION], [dnl
96 SXE_CHECK_AUTOTOOL([autoheader], [4UTOHEADER_VERSION],
97 [version of autoheader used to build the config.h.in])])
98 m4_ifdef([4CLOCAL_VERSION], [dnl
99 SXE_CHECK_AUTOTOOL([aclocal], [4CLOCAL_VERSION],
100 [version of aclocal used to incorporate m4 macros])])
101 m4_ifdef([4UTOMAKE_VERSION], [dnl
102 SXE_CHECK_AUTOTOOL([automake], [4UTOMAKE_VERSION],
103 [version of automake used to build the Makefiles])])
104 m4_ifdef([4IBTOOL_VERSION], [dnl
105 SXE_CHECK_AUTOTOOL([libtool], [4IBTOOL_VERSION],
106 [version of libtool used to provide portable linking])])
107 ])dnl SXE_CHECK_AUTOTOOLS
110 dnl recommended interface function
111 AC_DEFUN([SXE_CHECK_BUILDCHAIN], [dnl
122 dnl dnl m4_ifdef([LT_INIT], [LT_INIT], [AC_PROG_LIBTOOL])
126 ])dnl SXE_CHECK_BUILDCHAIN
128 dnl recommended interface macro for parser/lexer
129 AC_DEFUN([SXE_CHECK_PARSER_LEXER], [dnl
133 ])dnl SXE_CHECK_PARSER_LEXER
136 dnl sxe-bldchain-progs.m4 ends here