autoconf-patches
[Top][All Lists]
Advanced

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

avoid long ac_user_opts line in configure


From: Ralf Wildenhues
Subject: avoid long ac_user_opts line in configure
Date: Tue, 9 Jan 2007 22:07:19 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Existing applications have already up to several dozens of --with and
--enable flags (e.g., OpenMPI has 86), so the ac_user_opts line can
conceivably exceed text file size (1430 characters in the example).

OK to apply?

I assume that wrapping the warning output is not needed: An interactive
user is unlikely to pass many invalid flags, and automated usage can
easily add --disable-option-checking to avoid long lines.  (The question
isn't totally academic because packages use means other than
AC_CONFIG_SUBDIRS to run sub-configure scripts, so they may not have the
warning turned off without any adjustment for 2.62.)

Cheers,
Ralf

2007-01-09  Ralf Wildenhues  <address@hidden>

        * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Use newlines to
        separate items of `ac_user_opts', to avoid long lines.
        (_AC_INIT_PARSE_ENABLE2, _AC_ENABLE_IF_ACTION): Adjust.

Index: lib/autoconf/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.946
diff -u -r1.946 general.m4
--- lib/autoconf/general.m4     29 Dec 2006 06:44:42 -0000      1.946
+++ lib/autoconf/general.m4     9 Jan 2007 21:03:57 -0000
@@ -409,7 +409,10 @@
 m4_wrap([m4_divert_text([DEFAULTS],
 [ac_subst_vars='m4_ifdef([_AC_SUBST_VARS],  [m4_defn([_AC_SUBST_VARS])])'
 ac_subst_files='m4_ifdef([_AC_SUBST_FILES], [m4_defn([_AC_SUBST_FILES])])'
-ac_user_opts=':enable_option_checking:m4_ifdef([_AC_USER_OPTS], 
[m4_defn([_AC_USER_OPTS]):])'
+ac_user_opts='
+enable_option_checking
+m4_ifdef([_AC_USER_OPTS], [m4_defn([_AC_USER_OPTS])
+])'
 m4_ifdef([_AC_PRECIOUS_VARS],
   [_AC_ARG_VAR_STORE[]dnl
    _AC_ARG_VAR_VALIDATE[]dnl
@@ -960,7 +963,9 @@
     ac_useropt_orig=$ac_useropt
     ac_useropt=`AS_ECHO(["$ac_useropt"]) | sed 's/[[-.]]/_/g'`
     case $ac_user_opts in
-      *:$2_$ac_useropt:*) ;;
+      *"
+"$2_$ac_useropt"
+"*) ;;
       *) 
ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--$1-$ac_useropt_orig"
          ac_unrecognized_sep=', ';;
     esac
@@ -1391,7 +1396,8 @@
 ])
 
 m4_define([_AC_ENABLE_IF_ACTION],
-[m4_append_uniq([_AC_USER_OPTS], [$1_$2], [:])dnl
+[m4_append_uniq([_AC_USER_OPTS], [$1_$2], [
+])dnl
 AS_IF([test "${$1_$2+set}" = set], [$1val=$$1_$2; $3], [$4])dnl
 ])
 




reply via email to

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