Commit 09fa0705 by Zack Weinberg Committed by Zack Weinberg

aclocal.m4 (gcc_AC_CHECK_PROG_VER): New macro.

	* aclocal.m4 (gcc_AC_CHECK_PROG_VER): New macro.
	* configure.in: Look for makeinfo in the unified tree, then
	for a system makeinfo which is sufficiently new.
	* Makefile.in: If configure says makeinfo is too old, don't
	build or install Info documentation.

From-SVN: r33614
parent 1ce4a39d
2000-05-02 Zack Weinberg <zack@wolery.cumb.org> 2000-05-02 Zack Weinberg <zack@wolery.cumb.org>
* aclocal.m4 (gcc_AC_CHECK_PROG_VER): New macro.
* configure.in: Look for makeinfo in the unified tree, then
for a system makeinfo which is sufficiently new.
* Makefile.in: If configure says makeinfo is too old, don't
build or install Info documentation.
2000-05-02 Zack Weinberg <zack@wolery.cumb.org>
* cpphash.c (collect_params): Fix off-by-one error. * cpphash.c (collect_params): Fix off-by-one error.
(dump_hash_helper): Dump all four macro nodetypes. (dump_hash_helper): Dump all four macro nodetypes.
......
...@@ -108,9 +108,7 @@ LN_S=@LN_S@ ...@@ -108,9 +108,7 @@ LN_S=@LN_S@
# These permit overriding just for certain files. # These permit overriding just for certain files.
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
MAKEINFO = `if [ -f $(objdir)/../texinfo/makeinfo/Makefile ] ; \ MAKEINFO = @MAKEINFO@
then echo $(objdir)/../texinfo/makeinfo/makeinfo ; \
else echo makeinfo ; fi`
MAKEINFOFLAGS = MAKEINFOFLAGS =
TEXI2DVI = texi2dvi TEXI2DVI = texi2dvi
# For GNUmake: let us decide what gets passed to recursive makes. # For GNUmake: let us decide what gets passed to recursive makes.
...@@ -425,6 +423,10 @@ LIBCONVERT = ...@@ -425,6 +423,10 @@ LIBCONVERT =
# Control whether header files are installed. # Control whether header files are installed.
INSTALL_HEADERS=install-headers INSTALL_HEADERS=install-headers
# Control whether Info documentation is built and installed.
BUILD_INFO = @BUILD_INFO@
INSTALL_INFO = @INSTALL_INFO@
# Additional directories of header files to run fixincludes on. # Additional directories of header files to run fixincludes on.
# These should be directories searched automatically by default # These should be directories searched automatically by default
# just as /usr/include is. # just as /usr/include is.
...@@ -2313,7 +2315,7 @@ stmp-fixproto: fixhdr.ready fixproto stmp-int-hdrs ...@@ -2313,7 +2315,7 @@ stmp-fixproto: fixhdr.ready fixproto stmp-int-hdrs
# #
# Remake the info files. # Remake the info files.
doc: info gccbug doc: $(BUILD_INFO) gccbug
info: cpp.info gcc.info lang.info info: cpp.info gcc.info lang.info
cpp.info: $(srcdir)/cpp.texi cpp.info: $(srcdir)/cpp.texi
...@@ -2473,8 +2475,8 @@ install: $(INSTALL_TARGET) ; @true ...@@ -2473,8 +2475,8 @@ install: $(INSTALL_TARGET) ; @true
# Install the driver last so that the window when things are # Install the driver last so that the window when things are
# broken is small. # broken is small.
install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \ install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
$(INSTALL_CPP) install-man install-info intl.install lang.install-normal \ $(INSTALL_CPP) install-man $(INSTALL_INFO) intl.install \
install-driver lang.install-normal install-driver
# Do nothing while making gcc with a cross-compiler. The person who # Do nothing while making gcc with a cross-compiler. The person who
# makes gcc for the target machine has to know how to put a complete # makes gcc for the target machine has to know how to put a complete
......
...@@ -798,3 +798,28 @@ if test $ac_cv_func_mmap_file = yes; then ...@@ -798,3 +798,28 @@ if test $ac_cv_func_mmap_file = yes; then
[Define if read-only mmap of a plain file works.]) [Define if read-only mmap of a plain file works.])
fi fi
]) ])
dnl Locate a program and check that its version is acceptable.
dnl AC_PROG_CHECK_VER(var, name, version-switch,
dnl version-extract-regexp, version-glob)
AC_DEFUN(gcc_AC_CHECK_PROG_VER,
[AC_CHECK_PROG([$1], [$2], [$2])
if test -n "[$]$1"; then
# Found it, now check the version.
AC_CACHE_CHECK(for modern $2, gcc_cv_prog_$2_modern,
[changequote(<<,>>)dnl
ac_prog_version=`<<$>>$1 $3 2>&1 |
sed -n 's/^.*patsubst(<<$4>>,/,\/).*$/\1/p'`
echo "configure:__oline__: version of $2 is $ac_prog_version" >&AC_FD_CC
case $ac_prog_version in
'') gcc_cv_prog_$2_modern=no;;
<<$5>>)
gcc_cv_prog_$2_modern=yes;;
*) gcc_cv_prog_$2_modern=no;;
esac
changequote([,])dnl
])
else
gcc_cv_prog_$2_modern=no
fi
])
...@@ -383,6 +383,30 @@ AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=]) ...@@ -383,6 +383,30 @@ AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
# See if GNAT has been installed # See if GNAT has been installed
AC_CHECK_PROG(gnat, gnatbind, yes, no) AC_CHECK_PROG(gnat, gnatbind, yes, no)
# Do we have a single-tree copy of texinfo?
if test -f $srcdir/../texinfo/Makefile.in; then
MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
gcc_cv_prog_makeinfo_modern=yes
AC_MSG_RESULT([Using makeinfo from the unified source tree.])
else
# See if makeinfo has been installed and is modern enough
# that we can use it.
gcc_AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version,
[GNU texinfo.* \([0-9][0-9.]*\)],
[3.1[2-9] | 3.[2-9][0-9] | 4.* | 1.6[89] | 1.7[0-9]])
fi
if test $gcc_cv_prog_makeinfo_modern = no; then
AC_MSG_WARN([
*** Makeinfo is missing or too old.
*** Info documentation will not be built or installed.])
BUILD_INFO=
INSTALL_INFO=
else
BUILD_INFO=info AC_SUBST(BUILD_INFO)
INSTALL_INFO=install-info AC_SUBST(INSTALL_INFO)
fi
# See if the stage1 system preprocessor understands the ANSI C # See if the stage1 system preprocessor understands the ANSI C
# preprocessor stringification operator. # preprocessor stringification operator.
AC_C_STRINGIZE AC_C_STRINGIZE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment