autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AC_SUBST in config.log?


From: Akim Demaille
Subject: AC_SUBST in config.log?
Date: 24 Apr 2002 18:57:47 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)

This is a proposal, I have to go, but I'll write a ChangeLog.  The
point is showing AC_SUBST in config.log.  There *might* be a
portability issue: we are making a longer trap code in configure.

Here is the result on Bison for instance:

| This file contains any messages produced by compilers while
| running configure, to aid debugging if configure makes a mistake.
| 
| It was created by GNU Bison configure 1.49a, which was
| generated by GNU Autoconf 2.53b.  Invocation command line was
| 
|   $ ./configure 
| 
| ................ CUT ................................
| 
| ## ---------------------- ##
| ## Running config.status. ##
| ## ---------------------- ##
| 
| This file was extended by GNU Bison config.status 1.49a, which was
| generated by GNU Autoconf 2.53b.  Invocation command line was
| 
|   CONFIG_FILES    = 
|   CONFIG_HEADERS  = 
|   CONFIG_LINKS    = 
|   CONFIG_COMMANDS = 
|   $ ./config.status 
| 
| on nostromo
| 
| config.status:697: creating tests/Makefile
| config.status:697: creating tests/atlocal
| config.status:697: creating tests/bison
| config.status:697: creating Makefile
| config.status:697: creating config/Makefile
| config.status:697: creating intl/Makefile
| config.status:697: creating po/Makefile.in
| config.status:697: creating data/Makefile
| config.status:697: creating lib/Makefile
| config.status:697: creating src/Makefile
| config.status:697: creating doc/Makefile
| config.status:697: creating m4/Makefile
| config.status:805: creating config.h
| config.status:1160: config.h is unchanged
| config.status:1266: executing tests/atconfig commands
| config.status:1266: executing depfiles commands
| config.status:1266: executing default-1 commands
| 
| ## ---------------- ##
| ## Cache variables. ##
| ## ---------------- ##
| 
| ac_cv_build=i686-pc-linux-gnu
| ac_cv_build_alias=i686-pc-linux-gnu
| ac_cv_c_backslash_a=yes
| ac_cv_c_compiler_gnu=yes
| ac_cv_c_const=yes
| ac_cv_c_inline=inline
| ac_cv_env_CC_set=
| ac_cv_env_CC_value=
| ac_cv_env_CFLAGS_set=
| ac_cv_env_CFLAGS_value=
| ac_cv_env_CPPFLAGS_set=
| ac_cv_env_CPPFLAGS_value=
| ac_cv_env_CPP_set=
| ac_cv_env_CPP_value=
| ac_cv_env_LDFLAGS_set=
| ac_cv_env_LDFLAGS_value=
| ac_cv_env_build_alias_set=
| ac_cv_env_build_alias_value=
| ac_cv_env_host_alias_set=
| ac_cv_env_host_alias_value=
| ac_cv_env_target_alias_set=
| ac_cv_env_target_alias_value=
| ac_cv_exeext=
| ac_cv_func___argz_count=yes
| ac_cv_func___argz_next=yes
| ac_cv_func___argz_stringify=yes
| ac_cv_func_alloca_works=yes
| ac_cv_func_doprnt=no
| ac_cv_func_feof_unlocked=yes
| ac_cv_func_fgets_unlocked=yes
| ac_cv_func_getc_unlocked=yes
| ac_cv_func_getcwd=yes
| ac_cv_func_getegid=yes
| ac_cv_func_geteuid=yes
| ac_cv_func_getgid=yes
| ac_cv_func_getpagesize=yes
| ac_cv_func_getuid=yes
| ac_cv_func_isascii=yes
| ac_cv_func_iswprint=yes
| ac_cv_func_mbsinit=yes
| ac_cv_func_memchr=yes
| ac_cv_func_mempcpy=yes
| ac_cv_func_memrchr=yes
| ac_cv_func_mkstemp=yes
| ac_cv_func_mmap_fixed_mapped=yes
| ac_cv_func_munmap=yes
| ac_cv_func_obstack=yes
| ac_cv_func_putenv=yes
| ac_cv_func_setenv=yes
| ac_cv_func_setlocale=yes
| ac_cv_func_stpcpy=yes
| ac_cv_func_strcasecmp=yes
| ac_cv_func_strchr=yes
| ac_cv_func_strdup=yes
| ac_cv_func_strerror=yes
| ac_cv_func_strerror_r=yes
| ac_cv_func_strerror_r_char_p=yes
| ac_cv_func_strnlen_working=yes
| ac_cv_func_strspn=yes
| ac_cv_func_strtoul=yes
| ac_cv_func_tsearch=yes
| ac_cv_func_vprintf=yes
| ac_cv_gnu_library_2_1=yes
| ac_cv_have_decl_free=yes
| ac_cv_have_decl_malloc=yes
| ac_cv_have_decl_memchr=yes
| ac_cv_have_decl_memrchr=yes
| ac_cv_have_decl_stpcpy=yes
| ac_cv_have_decl_strchr=yes
| ac_cv_have_decl_strerror=yes
| ac_cv_have_decl_strerror_r=yes
| ac_cv_have_decl_strnlen=yes
| ac_cv_have_decl_strspn=yes
| ac_cv_header_argz_h=yes
| ac_cv_header_ctype_h=yes
| ac_cv_header_inttypes_h=yes
| ac_cv_header_limits_h=yes
| ac_cv_header_locale_h=yes
| ac_cv_header_malloc_h=yes
| ac_cv_header_memory_h=yes
| ac_cv_header_minix_config_h=no
| ac_cv_header_nl_types_h=yes
| ac_cv_header_stdc=yes
| ac_cv_header_stddef_h=yes
| ac_cv_header_stdint_h=yes
| ac_cv_header_stdlib_h=yes
| ac_cv_header_string_h=yes
| ac_cv_header_strings_h=yes
| ac_cv_header_sys_param_h=yes
| ac_cv_header_sys_stat_h=yes
| ac_cv_header_sys_types_h=yes
| ac_cv_header_unistd_h=yes
| ac_cv_header_wchar_h=yes
| ac_cv_header_wctype_h=yes
| ac_cv_host=i686-pc-linux-gnu
| ac_cv_host_alias=i686-pc-linux-gnu
| ac_cv_lib_cposix_strerror=no
| ac_cv_lib_error_at_line=yes
| ac_cv_lib_fl_yywrap=yes
| ac_cv_objext=o
| ac_cv_path_GMSGFMT=/usr/local/bin/msgfmt
| ac_cv_path_M4=/usr/local/bin/m4
| ac_cv_path_MSGFMT=/usr/local/bin/msgfmt
| ac_cv_path_MSGMERGE=/usr/local/bin/msgmerge
| ac_cv_path_XGETTEXT=/usr/local/bin/xgettext
| ac_cv_path_install='/usr/bin/install -c'
| ac_cv_prog_AWK=gawk
| ac_cv_prog_CPP='gcc -E'
| ac_cv_prog_INTLBISON=bison
| ac_cv_prog_LEX=flex
| ac_cv_prog_YACC='bison -y'
| ac_cv_prog_ac_ct_CC=gcc
| ac_cv_prog_ac_ct_RANLIB=ranlib
| ac_cv_prog_cc_g=yes
| ac_cv_prog_cc_stdc=
| ac_cv_prog_gnu_m4=yes
| ac_cv_prog_lex_root=lex.yy
| ac_cv_prog_lex_yytext_pointer=yes
| ac_cv_prog_make_make_set=yes
| ac_cv_type_mbstate_t=yes
| ac_cv_type_off_t=yes
| ac_cv_type_size_t=yes
| ac_cv_working_alloca_h=yes
| acl_cv_hardcode_direct=no
| acl_cv_hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
| acl_cv_hardcode_libdir_separator=
| acl_cv_hardcode_minus_L=no
| acl_cv_libext=a
| acl_cv_path_LD=/usr/bin/ld
| acl_cv_prog_gnu_ld=yes
| acl_cv_rpath=done
| acl_cv_shlibext=so
| acl_cv_sys_lib_dlsearch_path_spec='/lib /usr/lib'
| acl_cv_sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
| acl_cv_wl=-Wl,
| am_cv_CC_dependencies_compiler_type=gcc3
| am_cv_func_iconv=yes
| am_cv_langinfo_codeset=yes
| am_cv_lib_iconv=no
| am_cv_prog_cc_stdc=
| am_cv_proto_iconv='extern size_t iconv (iconv_t cd, char * *inbuf, size_t 
*inbytesleft, char * *outbuf, size_t *outbytesleft);'
| am_cv_proto_iconv_arg1=
| am_cv_val_LC_MESSAGES=yes
| gt_cv_func_gnugettext2_libc=yes
| jm_cv_func_mbrtowc=yes
| jm_cv_func_working_malloc=yes
| jm_cv_func_working_realloc=yes
| nls_cv_force_use_gnu_gettext=no
| nls_cv_header_intl=
| nls_cv_header_libgt=
| nls_cv_use_gnu_gettext=no
| utils_cv_func_mkstemp_limitations=no
| 
| 
| ## ----------------- ##
| ## Output variables. ##
| ## ----------------- ##
| 
| address@hidden
| PACKAGE_NAME=GNU Bison
| PACKAGE_STRING=GNU Bison 1.49a
| PACKAGE_TARNAME=bison
| PACKAGE_VERSION=1.49a
| PATH_SEPARATOR=:
| SHELL=/bin/sh
| bindir=${exec_prefix}/bin
| datadir=${prefix}/share
| exec_prefix=${prefix}
| includedir=${prefix}/include
| infodir=${prefix}/info
| libdir=${exec_prefix}/lib
| libexecdir=${exec_prefix}/libexec
| localstatedir=${prefix}/var
| mandir=${prefix}/man
| oldincludedir=/usr/include
| prefix=/usr/local
| program_transform_name=s,x,x,
| sbindir=${exec_prefix}/sbin
| sharedstatedir=${prefix}/com
| sysconfdir=${prefix}/etc

Maybe I should add ', as in:

bindir='${exec_prefix}/bin'

| ## ----------- ##
| ## confdefs.h. ##
| ## ----------- ##
| 
| #define ENABLE_NLS 1
| #define HAVE_ALLOCA 1
| #define HAVE_ALLOCA_H 1
| #define HAVE_ARGZ_H 1
| #define HAVE_CTYPE_H 1
| #define HAVE_C_BACKSLASH_A 1
| #define HAVE_DCGETTEXT 1
| #define HAVE_DECL_FREE 1
| #define HAVE_DECL_MALLOC 1
| #define HAVE_DECL_MEMCHR 1
| #define HAVE_DECL_MEMRCHR 1
| #define HAVE_DECL_STPCPY 1
| #define HAVE_DECL_STRCHR 1
| #define HAVE_DECL_STRERROR 1
| #define HAVE_DECL_STRERROR_R 1
| #define HAVE_DECL_STRNLEN 1
| #define HAVE_DECL_STRSPN 1
| #define HAVE_DONE_WORKING_MALLOC_CHECK 1
| #define HAVE_DONE_WORKING_REALLOC_CHECK 1
| #define HAVE_FEOF_UNLOCKED 1
| #define HAVE_FGETS_UNLOCKED 1
| #define HAVE_GETCWD 1
| #define HAVE_GETC_UNLOCKED 1
| #define HAVE_GETEGID 1
| #define HAVE_GETEUID 1
| #define HAVE_GETGID 1
| #define HAVE_GETPAGESIZE 1
| #define HAVE_GETTEXT 1
| #define HAVE_GETUID 1
| #define HAVE_ICONV 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_ISASCII 1
| #define HAVE_ISWPRINT 1
| #define HAVE_LANGINFO_CODESET 1
| #define HAVE_LC_MESSAGES 1
| #define HAVE_LIMITS_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_MALLOC_H 1
| #define HAVE_MBRTOWC 1
| #define HAVE_MBSINIT 1
| #define HAVE_MEMCHR 1
| #define HAVE_MEMORY_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_MEMPCPY 1
| #define HAVE_MEMRCHR 1
| #define HAVE_MKSTEMP 1
| #define HAVE_MMAP 1
| #define HAVE_MUNMAP 1
| #define HAVE_NL_TYPES_H 1
| #define HAVE_OBSTACK 1
| #define HAVE_PUTENV 1
| #define HAVE_SETENV 1
| #define HAVE_SETLOCALE 1
| #define HAVE_SETLOCALE 1
| #define HAVE_STDDEF_H 1
| #define HAVE_STDDEF_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STPCPY 1
| #define HAVE_STPCPY 1
| #define HAVE_STRCASECMP 1
| #define HAVE_STRCHR 1
| #define HAVE_STRDUP 1
| #define HAVE_STRERROR 1
| #define HAVE_STRERROR_R 1
| #define HAVE_STRINGS_H 1
| #define HAVE_STRING_H 1
| #define HAVE_STRING_H 1
| #define HAVE_STRING_H 1
| #define HAVE_STRING_H 1
| #define HAVE_STRING_H 1
| #define HAVE_STRING_H 1
| #define HAVE_STRSPN 1
| #define HAVE_STRTOUL 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_TSEARCH 1
| #define HAVE_UNISTD_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_VPRINTF 1
| #define HAVE_WCHAR_H 1
| #define HAVE_WCTYPE_H 1
| #define HAVE___ARGZ_COUNT 1
| #define HAVE___ARGZ_NEXT 1
| #define HAVE___ARGZ_STRINGIFY 1
| #define ICONV_CONST 
| #define M4 "/usr/local/bin/m4"
| #define PACKAGE "bison"
| #define PACKAGE_BUGREPORT "address@hidden"
| #define PACKAGE_NAME "GNU Bison"
| #define PACKAGE_STRING "GNU Bison 1.49a"
| #define PACKAGE_TARNAME "bison"
| #define PACKAGE_VERSION "1.49a"
| #define PROTOTYPES 1
| #define PROTOTYPES 1
| #define STDC_HEADERS 1
| #define STDC_HEADERS 1
| #define STDC_HEADERS 1
| #define STDC_HEADERS 1
| #define STDC_HEADERS 1
| #define STDC_HEADERS 1
| #define STRERROR_R_CHAR_P 1
| #define VERSION "1.49a"
| #define YYTEXT_POINTER 1
| #define _GNU_SOURCE 1
| 
| configure: exit 0

Index: configure
===================================================================
RCS file: /cvsroot/autoconf/autoconf/configure,v
retrieving revision 1.210
diff -u -u -r1.210 configure
--- configure 23 Apr 2002 16:58:42 -0000 1.210
+++ configure 24 Apr 2002 16:54:27 -0000
@@ -978,14 +978,46 @@
     esac;
 }
     echo
-    if test -s confdefs.h; then
+    echo
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    sort <<_ACLEOF
+SHELL=$SHELL
+PATH_SEPARATOR=$PATH_SEPARATOR
+PACKAGE_NAME=$PACKAGE_NAME
+PACKAGE_TARNAME=$PACKAGE_TARNAME
+PACKAGE_VERSION=$PACKAGE_VERSION
+PACKAGE_STRING=$PACKAGE_STRING
+PACKAGE_BUGREPORT=$PACKAGE_BUGREPORT
+exec_prefix=$exec_prefix
+prefix=$prefix
+program_transform_name=$program_transform_name
+bindir=$bindir
+sbindir=$sbindir
+libexecdir=$libexecdir
+datadir=$datadir
+sysconfdir=$sysconfdir
+sharedstatedir=$sharedstatedir
+localstatedir=$localstatedir
+libdir=$libdir
+includedir=$includedir
+oldincludedir=$oldincludedir
+infodir=$infodir
+mandir=$mandir
+
+_ACLEOF
+    echo
+        if test -s confdefs.h; then
       cat <<\_ASBOX
 ## ----------- ##
 ## confdefs.h. ##
 ## ----------- ##
 _ASBOX
       echo
-      sed "/^$/d" confdefs.h
+      sed "/^$/d" confdefs.h | sort
       echo
     fi
     test "$ac_signal" != 0 &&
Index: lib/autoconf/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.796
diff -u -u -r1.796 general.m4
--- lib/autoconf/general.m4 22 Apr 2002 17:05:22 -0000 1.796
+++ lib/autoconf/general.m4 24 Apr 2002 16:54:27 -0000
@@ -1168,10 +1168,31 @@
 ],                [],
                   ['], ['"'"'])
     echo
+    m4_ifdef([_AC_SUBST_VARS],
+    [echo
+    AS_BOX([Output variables.])
+    sort <<_ACLEOF
+AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_VARS]),
+           [AC_Var=$AC_Var
+])
+_ACLEOF
+    echo
+])dnl
+    m4_ifdef([_AC_SUBST_FILES],
+    [echo
+    AS_BOX([Output files.])
+    echo
+    sort <<_ACLEOF
+AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_FILES]),
+           [AC_Var=$AC_Var
+])
+_ACLEOF
+   echo
+])dnl
     if test -s confdefs.h; then
       AS_BOX([confdefs.h.])
       echo
-      sed "/^$/d" confdefs.h
+      sed "/^$/d" confdefs.h | sort
       echo
     fi
     test "$ac_signal" != 0 &&
@@ -1849,7 +1870,7 @@
 # sed script at the top of _AC_OUTPUT_FILES.
 m4_define([AC_SUBST],
 [m4_ifvaln([$2], [$1=$2])[]dnl
-_AC_SUBST([$1], [s,@$1@,[$]$1,;t t])dnl
+m4_append_uniq([_AC_SUBST_VARS], [$1], [ ])dnl
 ])# AC_SUBST
 
 
@@ -1857,8 +1878,7 @@
 # -----------------------
 # Read the comments of the preceding macro.
 m4_define([AC_SUBST_FILE],
-[_AC_SUBST([$1], [/@$1@/r [$]$1
-s,@$1@,,;t t])])
+[m4_append_uniq([_AC_SUBST_FILES], [$1], [ ])])
 
 
 
Index: lib/autoconf/status.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v
retrieving revision 1.24
diff -u -u -r1.24 status.m4
--- lib/autoconf/status.m4 21 Apr 2002 07:25:21 -0000 1.24
+++ lib/autoconf/status.m4 24 Apr 2002 16:54:27 -0000
@@ -862,7 +862,15 @@
 dnl These here document variables are unquoted when configure runs
 dnl but quoted when config.status runs, so variables are expanded once.
 dnl Insert the sed substitutions of variables.
-_AC_SUBST_SED_PROGRAM()dnl
+m4_ifdef([_AC_SUBST_VARS],
+         [AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_VARS]),
+[s,@AC_Var@,$AC_Var,;t t
+])])dnl
+m4_ifdef([_AC_SUBST_FILES],
+         [AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_FILES]),
+[/@AC_Var@/r $AC_Var
+s,@AC_Var@,,;t t
+])])dnl
 CEOF
 
 _ACEOF


-- 
Ashamed.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]