diff options
| author | kx <kx@radix-linux.su> | 2026-10-17 16:39:23 +0300 |
|---|---|---|
| committer | kx <kx@radix-linux.su> | 2026-10-17 16:39:23 +0300 |
| commit | ec1891d58b9514b621725620453cec0e31e18389 (patch) | |
| tree | 6721f92c0afae3d933343b4a573ac8e5389827c6 /acsite.m4 | |
| parent | 73d23259a690cd29c0ac74a4de963e23ecfebfac (diff) | |
| download | svgc-trunk.tar.xz | |
Diffstat (limited to 'acsite.m4')
| -rw-r--r-- | acsite.m4 | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/acsite.m4 b/acsite.m4 new file mode 100644 index 0000000..583462d --- /dev/null +++ b/acsite.m4 @@ -0,0 +1,142 @@ + +dnl ============================================================ +dnl We define the macro GLIBC_PROVIDES to do an AC_PROVIDE for +dnl each macro which appears in configure.ac before the sysdep +dnl configure scripts are run. Each sysdep configure.ac does +dnl SVGC_PROVIDES first, to avoid any AC_REQUIREs or +dnl AC_BEFOREs duplicating their code. +dnl ============================================================ +define([SVGC_PROVIDES], [dnl +AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_PROVIDE([AC_CONFIG_SUBDIRS])dnl +AC_PROVIDE([_AS_ECHO_N_PREPARE])dnl +AC_PROVIDE([_AS_ECHO_PREPARE])dnl +AC_PROVIDE([_AS_CR_PREPARE])dnl +AC_PROVIDE([_AS_TR_SH_PREPARE])dnl +AC_PROVIDE([_AS_VAR_ARITH_PREPARE])dnl +AC_PROVIDE([AC_PROG_INSTALL])dnl +AC_PROVIDE([AC_PROG_CC])dnl +AC_PROVIDE([AC_PROG_CPP])dnl +AC_PROVIDE([_AS_PATH_SEPARATOR_PREPARE])dnl +AC_PROVIDE([_AS_TEST_PREPARE])dnl +AC_PROVIDE([_AS_BASENAME_PREPARE])dnl +AC_PROVIDE([_AS_ME_PREPARE])dnl +AC_PROVIDE([_AS_LINENO_PREPARE])dnl +AC_PROVIDE([AS_SHELL_FN_as_fn_set_status])dnl +AC_PROVIDE([AS_SHELL_FN_as_fn_exit])dnl +AC_PROVIDE([AS_SHELL_FN_as_fn_arith])dnl +AC_PROVIDE([AS_SHELL_FN_ac_fn_c_try_compile])dnl +define([AS_MESSAGE_LOG_FD],5)dnl +define([AS_MESSAGE_FD],6)dnl +dnl Ripped out of AS_INIT, which does more cruft we do not want. +m4_wrap([m4_divert_pop([BODY])[]]) +m4_divert_push([BODY])[]dnl +dnl End of ripped out of AS_INIT. +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! +define([_AC_LANG], [C])dnl +])dnl + +dnl ============================================================ +dnl Force configure to run under /bin/bash +dnl ============================================================ +m4_define([AC_SVGC_REQUIRE_BASH], [dnl +m4_divert_push([M4SH-SANITIZE])dnl + +if test ! -x /bin/bash; then + echo "configure: error: /bin/bash is required" >&2 + exit 1 +fi + +CONFIG_SHELL=/bin/bash +export CONFIG_SHELL + +m4_divert_pop([M4SH-SANITIZE])dnl +])dnl + +dnl ============================================================ +dnl Support for Configuration Headers +dnl +dnl configure.ac: +dnl AC_SVGC_HEADLINE(<short-name>, <long-name>, +dnl <vers-var>, <copyright>) +dnl +dnl See Autoconf manual paragraph 8.3.3, Diversion support. +dnl ============================================================ +m4_define([AC_SVGC_HEADLINE], [dnl +m4_divert_push([M4SH-INIT])dnl +{ + if test ".`echo dummy [$]@ | grep help`" = .; then + + dnl Use portable printf rather than echo -e, which is not POSIX. + if test -t 1; then + TB=`printf '\033@<:@1m'` + TN=`printf '\033@<:@0m'` + else + TB='' + TN='' + fi + + $3="AC_PACKAGE_VERSION" + AC_SUBST($3) + + echo "Configuring:" + echo "" + echo "${TB}$1${TN} ($2), Version ${TB}${$3}${TN}" + echo "$4" + echo "" + fi +} +m4_divert_pop([M4SH-INIT])dnl +])dnl + + +dnl ============================================================ +dnl Display Configuration Headers +dnl +dnl configure.ac: +dnl AC_MSG_CFG_PART(<text>) +dnl ============================================================ +AC_DEFUN([AC_MSG_CFG_PART], [dnl + AC_MSG_RESULT() + AC_MSG_RESULT([${TB}$1:${TN}]) +])dnl + + +dnl ============================================================ +dnl SVGC Library Version Information for GNU Libtool +dnl +dnl configure.ac: +dnl AC_SVGC_LT_VERSION_INFO([current:revision:age]) +dnl +dnl This controls the Libtool interface version (not the SVGC +dnl package version). Keep current:revision:age in one place. +dnl ============================================================ +AC_DEFUN([AC_SVGC_LT_VERSION_INFO], [dnl + AC_MSG_CHECKING([for SVGC Library Version Information]) + + svgc_lt_info="$1" + svgc_lt_current=`echo "${svgc_lt_info}" | cut -f1 -d':'` + svgc_lt_revision=`echo "${svgc_lt_info}" | cut -f2 -d':'` + svgc_lt_age=`echo "${svgc_lt_info}" | cut -f3 -d':'` + + AS_IF([test -z "${svgc_lt_info}" || + test -z "${svgc_lt_current}" || + test -z "${svgc_lt_revision}" || + test -z "${svgc_lt_age}"], [ + AC_MSG_ERROR([SVGC Library Version Information is not declared.]) + ]) + + ac_cv_svgc_lt_release="${svgc_lt_current}.${svgc_lt_revision}" + ac_cv_svgc_lt_current="${svgc_lt_current}" + ac_cv_svgc_lt_revision="${svgc_lt_revision}" + ac_cv_svgc_lt_age="${svgc_lt_age}" + ac_cv_svgc_lt_version_info="${svgc_lt_current}:${svgc_lt_revision}:${svgc_lt_age}" + + AC_SUBST([SVGC_LT_RELEASE], [$ac_cv_svgc_lt_release]) + AC_SUBST([SVGC_LT_VERSION_INFO], [$ac_cv_svgc_lt_version_info]) + AC_SUBST([SVGC_LT_CURRENT], [$ac_cv_svgc_lt_current]) + AC_SUBST([SVGC_LT_REVISION], [$ac_cv_svgc_lt_revision]) + AC_SUBST([SVGC_LT_AGE], [$ac_cv_svgc_lt_age]) + + AC_MSG_RESULT([$ac_cv_svgc_lt_version_info]) +])dnl |
