Skip to content

Commit

Permalink
Include macros from autoconf-archive (pristine)
Browse files Browse the repository at this point in the history
Reverting this commit should remove the macro code. The project would
still be buildable on any system with autoconf-archive, but since that
is considerably less than systems with autoconf which is our actual
target, we're vendoring a copy of them here. These files should be
bit-for-bit the same as what appears in current macro archives.
  • Loading branch information
alerque committed Apr 4, 2024
1 parent f73cb86 commit ae3344a
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 0 deletions.
29 changes: 29 additions & 0 deletions build-aux/ax_add_am_macro.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_add_am_macro.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_ADD_AM_MACRO([RULE])
#
# DESCRIPTION
#
# Adds the specified rule to $AMINCLUDE. This macro will only work
# properly with implementations of Make which allow include statements.
# See also AX_ADD_AM_MACRO_STATIC.
#
# LICENSE
#
# Copyright (c) 2009 Tom Howard <[email protected]>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 10

AC_DEFUN([AX_ADD_AM_MACRO],[
AC_REQUIRE([AX_AM_MACROS])
AX_APPEND_TO_FILE([$AMINCLUDE],[$1])
])
44 changes: 44 additions & 0 deletions build-aux/ax_am_macros.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_am_macros.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_AM_MACROS
#
# DESCRIPTION
#
# Adds support for macros that create Make rules. You must manually add
# the following line
#
# @INC_AMINCLUDE@
#
# to your Makefile.in (or Makefile.am if you use Automake) files.
#
# LICENSE
#
# Copyright (c) 2009 Tom Howard <[email protected]>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 11

AC_DEFUN([AX_AM_MACROS],
[
AC_MSG_NOTICE([adding automake macro support])
AMINCLUDE="aminclude.am"
AC_SUBST(AMINCLUDE)
AC_MSG_NOTICE([creating $AMINCLUDE])
AMINCLUDE_TIME=`LC_ALL=C date`
AX_PRINT_TO_FILE([$AMINCLUDE],[[
# generated automatically by configure from AX_AUTOMAKE_MACROS
# on $AMINCLUDE_TIME
]])
INC_AMINCLUDE="include \$(top_builddir)/$AMINCLUDE"
AC_SUBST(INC_AMINCLUDE)
])
27 changes: 27 additions & 0 deletions build-aux/ax_append_to_file.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_append_to_file.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_APPEND_TO_FILE([FILE],[DATA])
#
# DESCRIPTION
#
# Appends the specified data to the specified file.
#
# LICENSE
#
# Copyright (c) 2008 Tom Howard <[email protected]>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 9

AC_DEFUN([AX_APPEND_TO_FILE],[
AC_REQUIRE([AX_FILE_ESCAPES])
printf "%s" "$2" >> "$1"
])
27 changes: 27 additions & 0 deletions build-aux/ax_print_to_file.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_print_to_file.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PRINT_TO_FILE([FILE],[DATA])
#
# DESCRIPTION
#
# Writes the specified data to the specified file.
#
# LICENSE
#
# Copyright (c) 2008 Tom Howard <[email protected]>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 8

AC_DEFUN([AX_PRINT_TO_FILE],[
AC_REQUIRE([AX_FILE_ESCAPES])
printf "$2" > "$1"
])

0 comments on commit ae3344a

Please sign in to comment.