From 499e0913216eeff4d1f054c8f2afad96d5bcd71b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 8 Feb 2016 18:12:51 +0000 Subject: configure.ac: correct name; use gl_FUNC_REALPATH_WORKS from gnulib git-svn-id: svn://tug.org/texlive/trunk@39625 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/gregorio/ChangeLog | 5 ++ Build/source/texk/gregorio/config_.h.in | 7 ++ Build/source/texk/gregorio/configure | 151 +++++++++++++++++++++++++++++--- Build/source/texk/gregorio/configure.ac | 85 ++++++++++++++++-- Build/source/texk/gregorio/version.ac | 2 +- 5 files changed, 228 insertions(+), 22 deletions(-) diff --git a/Build/source/texk/gregorio/ChangeLog b/Build/source/texk/gregorio/ChangeLog index 31f06ee5f41..9a853ced7f6 100644 --- a/Build/source/texk/gregorio/ChangeLog +++ b/Build/source/texk/gregorio/ChangeLog @@ -1,3 +1,8 @@ +2016-02-08 Karl Berry + + * configure.ac (gl_FUNC_REALPATH_WORKS): from gnulib/canonicalize.m4. + (AC_INIT): replace spurious "ChkTeX" with "gregorio". + 2016-01-23 Akira Kakuto Import gregorio-4.1.0-beta1. diff --git a/Build/source/texk/gregorio/config_.h.in b/Build/source/texk/gregorio/config_.h.in index bf689b3817f..32fbec61b92 100644 --- a/Build/source/texk/gregorio/config_.h.in +++ b/Build/source/texk/gregorio/config_.h.in @@ -6,6 +6,10 @@ /* Define to 1 if the `closedir' function returns void instead of `int'. */ #undef CLOSEDIR_VOID +/* Define to 1 if realpath() can malloc memory, always gives an absolute path, + and handles trailing slash correctly. */ +#undef FUNC_REALPATH_WORKS + /* Define to 1 if you have the header file. */ #undef HAVE_ASSERT_H @@ -62,6 +66,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_PWD_H +/* Define to 1 if you have the `realpath' function. */ +#undef HAVE_REALPATH + /* Define to 1 if you have the header file. */ #undef HAVE_STDALIGN_H diff --git a/Build/source/texk/gregorio/configure b/Build/source/texk/gregorio/configure index 586359e6087..38d3f87ab27 100755 --- a/Build/source/texk/gregorio/configure +++ b/Build/source/texk/gregorio/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ChkTeX (TeX Live) 4.1.0-beta1. +# Generated by GNU Autoconf 2.69 for Gregorio (TeX Live) 4.1.0-beta1. # # Report bugs to . # @@ -588,10 +588,10 @@ MFLAGS= MAKEFLAGS= # Identity of this package. -PACKAGE_NAME='ChkTeX (TeX Live)' -PACKAGE_TARNAME='chktex--tex-live-' +PACKAGE_NAME='Gregorio (TeX Live)' +PACKAGE_TARNAME='gregorio--tex-live-' PACKAGE_VERSION='4.1.0-beta1' -PACKAGE_STRING='ChkTeX (TeX Live) 4.1.0-beta1' +PACKAGE_STRING='Gregorio (TeX Live) 4.1.0-beta1' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -632,6 +632,7 @@ ac_includes_default="\ # include #endif" +ac_func_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS @@ -1329,7 +1330,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ChkTeX (TeX Live) 4.1.0-beta1 to adapt to many kinds of systems. +\`configure' configures Gregorio (TeX Live) 4.1.0-beta1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1378,7 +1379,7 @@ Fine tuning of the installation directories: --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root - [DATAROOTDIR/doc/chktex--tex-live-] + [DATAROOTDIR/doc/gregorio--tex-live-] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1400,7 +1401,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ChkTeX (TeX Live) 4.1.0-beta1:";; + short | recursive ) echo "Configuration of Gregorio (TeX Live) 4.1.0-beta1:";; esac cat <<\_ACEOF @@ -1519,7 +1520,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ChkTeX (TeX Live) configure 4.1.0-beta1 +Gregorio (TeX Live) configure 4.1.0-beta1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2175,7 +2176,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ChkTeX (TeX Live) $as_me 4.1.0-beta1, which was +It was created by Gregorio (TeX Live) $as_me 4.1.0-beta1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2455,6 +2456,7 @@ $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi +as_fn_append ac_func_list " realpath" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -7859,7 +7861,7 @@ fi # Define the identity of the package. - PACKAGE='chktex--tex-live-' + PACKAGE='gregorio--tex-live-' VERSION='4.1.0-beta1' @@ -13464,6 +13466,129 @@ fi + +# [from gnulib] canonicalize.m4 serial 26 + + + +# Check whether realpath works. Assume that if a platform has both +# realpath and canonicalize_file_name, but the former is broken, then +# so is the latter. + +# end function from canonicalize.m4. now call it: + + + + + for ac_func in $ac_func_list +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5 +$as_echo_n "checking whether realpath works... " >&6; } +if ${gl_cv_func_realpath_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + + touch conftest.a + mkdir conftest.d + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_realpath_works="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + GL_NOCRASH + #include + #include + +int +main () +{ + + int result = 0; + { + char *name = realpath ("conftest.a", NULL); + if (!(name && *name == '/')) + result |= 1; + } + { + char *name = realpath ("conftest.b/../conftest.a", NULL); + if (name != NULL) + result |= 2; + } + { + char *name = realpath ("conftest.a/", NULL); + if (name != NULL) + result |= 4; + } + { + char *name1 = realpath (".", NULL); + char *name2 = realpath ("conftest.d//./..", NULL); + if (strcmp (name1, name2) != 0) + result |= 8; + } + return result; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_realpath_works=yes +else + gl_cv_func_realpath_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + rm -rf conftest.a conftest.d + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5 +$as_echo "$gl_cv_func_realpath_works" >&6; } + case "$gl_cv_func_realpath_works" in + *yes) + +$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h + + ;; + esac + + +for ac_header in stdint.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDINT_H 1 +_ACEOF + +fi + +done + for ac_header in stdalign.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdalign.h" "ac_cv_header_stdalign_h" "$ac_includes_default" @@ -14121,7 +14246,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -ChkTeX (TeX Live) config.lt 4.1.0-beta1 +Gregorio (TeX Live) config.lt 4.1.0-beta1 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -15708,7 +15833,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ChkTeX (TeX Live) $as_me 4.1.0-beta1, which was +This file was extended by Gregorio (TeX Live) $as_me 4.1.0-beta1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15774,7 +15899,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ChkTeX (TeX Live) config.status 4.1.0-beta1 +Gregorio (TeX Live) config.status 4.1.0-beta1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/Build/source/texk/gregorio/configure.ac b/Build/source/texk/gregorio/configure.ac index 10a3a1f77d1..b5d299edd89 100644 --- a/Build/source/texk/gregorio/configure.ac +++ b/Build/source/texk/gregorio/configure.ac @@ -1,19 +1,14 @@ dnl Process this file with autoconf to produce a configure script. dnl -dnl Copyright (C) 2015 Peter Breitenlohner +dnl Copyright 2016 Karl Berry +dnl Copyright 2015 Peter Breitenlohner dnl dnl This file is free software; the copyright holder dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl -dnl ********************************************************************* -dnl -dnl Adapted for TeX Live from gregorio-4.0.0-beta/configure.am -dnl -dnl ********************************************************************* -dnl m4_include([version.ac])[] dnl define gregorio_version -AC_INIT([ChkTeX (TeX Live)], gregorio_version, [tex-k@tug.org]) +AC_INIT([Gregorio (TeX Live)], gregorio_version, [tex-k@tug.org]) AC_PREREQ([2.65]) AC_CONFIG_SRCDIR([gregorio-src/src/gregorio-utils.c]) AC_CONFIG_AUX_DIR([../../build-aux]) @@ -22,7 +17,81 @@ AC_CONFIG_MACRO_DIR([../../m4]) dnl Common code for all programs using libkpathsea. KPSE_COMMON([gregorio]) + +# [from gnulib] canonicalize.m4 serial 26 + +dnl Copyright (C) 2003-2007, 2009-2016 Free Software Foundation, Inc. + +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# Check whether realpath works. Assume that if a platform has both +# realpath and canonicalize_file_name, but the former is broken, then +# so is the latter. +AC_DEFUN([gl_FUNC_REALPATH_WORKS], +[ + AC_CHECK_FUNCS_ONCE([realpath]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether realpath works], [gl_cv_func_realpath_works], [ + touch conftest.a + mkdir conftest.d + AC_RUN_IFELSE([ + AC_LANG_PROGRAM([[ + ]GL_NOCRASH[ + #include + #include + ]], [[ + int result = 0; + { + char *name = realpath ("conftest.a", NULL); + if (!(name && *name == '/')) + result |= 1; + } + { + char *name = realpath ("conftest.b/../conftest.a", NULL); + if (name != NULL) + result |= 2; + } + { + char *name = realpath ("conftest.a/", NULL); + if (name != NULL) + result |= 4; + } + { + char *name1 = realpath (".", NULL); + char *name2 = realpath ("conftest.d//./..", NULL); + if (strcmp (name1, name2) != 0) + result |= 8; + } + return result; + ]]) + ], + [gl_cv_func_realpath_works=yes], + [gl_cv_func_realpath_works=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_realpath_works="guessing no" ;; + esac + ]) + rm -rf conftest.a conftest.d + ]) + case "$gl_cv_func_realpath_works" in + *yes) + AC_DEFINE([FUNC_REALPATH_WORKS], [1], [Define to 1 if realpath() + can malloc memory, always gives an absolute path, and handles + trailing slash correctly.]) + ;; + esac +]) +# end function from canonicalize.m4. now call it: + +gl_FUNC_REALPATH_WORKS + dnl Checks for header files. +AC_CHECK_HEADERS([stdint.h]) AC_CHECK_HEADERS([stdalign.h]) AC_C_BIGENDIAN diff --git a/Build/source/texk/gregorio/version.ac b/Build/source/texk/gregorio/version.ac index 2c5edb531e6..87e7ba44039 100644 --- a/Build/source/texk/gregorio/version.ac +++ b/Build/source/texk/gregorio/version.ac @@ -1,4 +1,4 @@ -dnl +dnl Copyright 2016 Karl Berry dnl Copyright 2015 Peter Breitenlohner dnl dnl This file is free software; the copyright holder -- cgit v1.2.3