From f9603fa3f775274b5012b36aba8dbe5c96429b6e Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sun, 21 Oct 2001 18:05:38 +0000 Subject: [PATCH] * m4/regex.m4: Use AC_LIBOBJ. Require 2.50, and use AC_LIBSOURCES freely. * tests/asm.tests: Formatting changes. Exercise AM_PROG_AS. --- ChangeLog | 7 +++++++ m4/as.m4 | 5 ++++- m4/regex.m4 | 12 ++++++------ tests/Makefile.in | 21 ++++++++++++++++++--- tests/asm.test | 45 ++++++++++++++++++++++++++++++--------------- 5 files changed, 65 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 413c28415..99b9f534f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-10-21 Akim Demaille + + * m4/regex.m4: Use AC_LIBOBJ. + Require 2.50, and use AC_LIBSOURCES freely. + * tests/asm.tests: Formatting changes. + Exercise AM_PROG_AS. + 2001-10-21 Akim Demaille * tests/install.test: This test is an empty shell, do not run diff --git a/m4/as.m4 b/m4/as.m4 index 7c2542e85..431b15e06 100644 --- a/m4/as.m4 +++ b/m4/as.m4 @@ -1,4 +1,6 @@ -# Figure out how to run the assembler. +# Figure out how to run the assembler. -*- Autoconf -*- + +# serial 2 # Copyright 2001 Free Software Foundation, Inc. @@ -18,6 +20,7 @@ # 02111-1307, USA. # AM_PROG_AS +# ---------- AC_DEFUN([AM_PROG_AS], [# By default we simply use the C compiler to build assembly code. AC_REQUIRE([AC_PROG_CC]) diff --git a/m4/regex.m4 b/m4/regex.m4 index f2949c1fb..54155c0f9 100644 --- a/m4/regex.m4 +++ b/m4/regex.m4 @@ -1,4 +1,4 @@ -## --------------------------------- ## +## --------------------------------- ## -*- Autoconf -*- ## Check if --with-regex was given. ## ## --------------------------------- ## @@ -19,7 +19,8 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. -# serial 2 +# serial 3 +AC_PREREQ(2.50) # AM_WITH_REGEX # ------------- @@ -37,8 +38,7 @@ # FIXME: This macro seems quite obsolete now since rx doesn't seem to # be maintained, while regex is. AC_DEFUN([AM_WITH_REGEX], -[ifdef([AC_LIBSOURCES], - [AC_LIBSOURCES([rx.h, rx.c, regex.c, regex.h])])dnl +[AC_LIBSOURCES([rx.h, rx.c, regex.c, regex.h])dnl AC_MSG_CHECKING([which of GNU rx or gawk's regex is wanted]) AC_ARG_WITH(regex, [ --without-regex use GNU rx in lieu of gawk's regex for matching], @@ -53,11 +53,11 @@ if test -n "$am_with_regex"; then [am_cv_gnu_regex=yes], [am_cv_gnu_regex=no])]) if test $am_cv_gnu_regex = no; then - LIBOBJS="$LIBOBJS regex.$ac_objext" + AC_LIBOBJ([regex]) fi else AC_MSG_RESULT(rx) - AC_CHECK_FUNC(re_rx_search, , [LIBOBJS="$LIBOBJS rx.$ac_objext"]) + AC_CHECK_FUNC(re_rx_search, , [AC_LIBOBJ([rx])]) fi AC_SUBST(LIBOBJS)dnl ]) diff --git a/tests/Makefile.in b/tests/Makefile.in index 8fe7ff543..4f328c72a 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -61,16 +61,32 @@ POST_UNINSTALL = : EXEEXT = @EXEEXT@ OBJEXT = @OBJEXT@ PATH_SEPARATOR = @PATH_SEPARATOR@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AWK = @AWK@ +DEFS = @DEFS@ DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBS = @LIBS@ +MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ PERL = @PERL@ +SET_MAKE = @SET_MAKE@ VERSION = @VERSION@ -am__include = @am__include@ -am__quote = @am__quote@ +build_alias = @build_alias@ +host_alias = @host_alias@ install_sh = @install_sh@ +program_transform_name = @program_transform_name@ +target_alias = @target_alias@ XFAIL_TESTS = condd.test subdir5.test auxdir2.test cond17.test nobase.test @@ -228,7 +244,6 @@ include.test \ info.test \ insh.test \ insh2.test \ -install.test \ install2.test \ installsh.test \ instdata.test \ diff --git a/tests/asm.test b/tests/asm.test index 6fdbea366..0022310a4 100755 --- a/tests/asm.test +++ b/tests/asm.test @@ -4,13 +4,6 @@ . $srcdir/defs || exit 1 -cat > configure.in << 'END' -AC_INIT -AM_INIT_AUTOMAKE(nonesuch, nonesuch) -AC_SUBST(ASFLAGS) -AC_OUTPUT(Makefile) -END - cat > Makefile.am << 'END' noinst_PROGRAMS = maude maude_SOURCES = maude.s @@ -18,11 +11,20 @@ END : > maude.s -# Should fail because we need cc and as. +# Should fail because we need CC and AS. echo 1 +cat > configure.in << 'END' +AC_INIT +AM_INIT_AUTOMAKE(nonesuch, nonesuch) +AC_SUBST(ASFLAGS) +AC_OUTPUT(Makefile) +END + $ACLOCAL || exit 1 $AUTOMAKE && exit 1 +# We still need AS. +echo 2 cat > configure.in << 'END' AC_INIT AM_INIT_AUTOMAKE(nonesuch, nonesuch) @@ -31,11 +33,11 @@ AC_SUBST(ASFLAGS) AC_OUTPUT(Makefile) END -# We still need as. -echo 2 $ACLOCAL || exit 1 $AUTOMAKE && exit 1 +# We need ASFLAGS. +echo 3 cat > configure.in << 'END' AC_INIT AM_INIT_AUTOMAKE(nonesuch, nonesuch) @@ -45,11 +47,11 @@ AC_PROG_CC AC_OUTPUT(Makefile) END -# We need ASFLAGS. -echo 3 $ACLOCAL || exit 1 $AUTOMAKE && exit 1 +# We have every needed, expect a success. +echo 4 cat > configure.in << 'END' AC_INIT AM_INIT_AUTOMAKE(nonesuch, nonesuch) @@ -60,6 +62,19 @@ AC_SUBST(ASFLAGS) AC_OUTPUT(Makefile) END -echo 4 -$ACLOCAL || exit 1 -$AUTOMAKE +$ACLOCAL || exit 1 +$AUTOMAKE || exit 1 + + +# We have every needed, expect a success. +echo 5 +cat > configure.in << 'END' +AC_INIT +AM_INIT_AUTOMAKE(nonesuch, nonesuch) +AC_PROG_AS +END + +$ACLOCAL || exit 1 +$AUTOMAKE || exit 1 + +exit 0 -- 2.34.1