diff --git a/autoconf.texi b/autoconf.texi index 7a5e4930..159cac10 100644 --- a/autoconf.texi +++ b/autoconf.texi @@ -452,18 +452,20 @@ and they also warn you when creating @code{configure} if they are called out of order. To encourage consistency, here is a suggested order for calling the -Autoconf macros. +Autoconf macros. Generally speaking, the things near the end of this +list could depend on things earlier in it. For example, library +functions could be affected by typedefs and libraries. @display @group @code{AC_INIT(@var{file})} -checks for alternative programs +checks for programs checks for libraries checks for header files checks for typedefs -checks for library functions checks for structures checks for compiler characteristics +checks for library functions checks for system services @code{AC_OUTPUT(@r{[}@var{file@dots{}}@r{]})} @end group @@ -4153,10 +4155,10 @@ which few people have to do (mainly its maintainer). @section Why Not Imake? @display -Why not use Imake, instead of @code{configure} scripts? +Why not use Imake instead of @code{configure} scripts? @end display -Several people have written addressing this question, so I will include +Several people have written addressing this question, so I include adaptations of their explanations here. The following answer is based on one written by Richard Pixley: @@ -4191,13 +4193,15 @@ restrictions. Here is some further explanation, written by Per Bothner: One of the advantages of Imake is that it easy to generate large -Makefiles using cpp's @samp{#include} and macro mechanisms. However, -cpp is not programmable: it has limited conditional facilities, and no -looping. And cpp cannot inspect its environment. +Makefiles using @code{cpp}'s @samp{#include} and macro mechanisms. +However, @code{cpp} is not programmable: it has limited conditional +facilities, and no looping. And @code{cpp} cannot inspect its +environment. -All of these problems are solved by using @file{/bin/sh} instead of cpp. -The shell is fully programmable, has macro substitution, can execute (or -source) other shell scripts, and can inspect its environment. +All of these problems are solved by using @code{sh} instead of +@code{cpp}. The shell is fully programmable, has macro substitution, +can execute (or source) other shell scripts, and can inspect its +environment. Paul Eggert elaborates more: @@ -4224,6 +4228,25 @@ which uses the general-purpose preprocessor @code{m4}, and where the package's author (rather than the installer) does the preprocessing in a standard way. +Finally, Mark Eichin notes: + +Imake isn't all that extensible, either. In order to add new features to +Imake, you need to provide you own project template, and duplicate most +of the features of the existing one. This means that for a sophisticated +project, using the vendor-provided Imake templates fails to provide any +leverage---since they don't cover anything that your own project needs +(unless it is an X11 program). + +On the other side, though: + +The one advantage that Imake has over @code{configure}: +@file{Imakefile}s tend to be much shorter (likewise, less redundant) +than @file{Makefile.in}s. There is a fix to this, however---at least +for the Kerberos V5 tree, we've modified things to call in common +@file{post.in} and @file{pre.in} @file{Makefile} fragments for the +entire tree. This means that a lot of common things don't have to be +duplicated, even though they normally are in @code{configure} setups. + @node Upgrading, History, Questions, Top @chapter Upgrading From Version 1 @@ -4585,7 +4608,7 @@ In July 1992, after months of alpha testing, I released Autoconf 1.0, and converted many GNU packages to use it. I was surprised by how positive the reaction to it was. More people started using it than I could keep track of, including people working on software that wasn't -part of the GNU Project (such as TCL, FSP, and Kerberos v5). +part of the GNU Project (such as TCL, FSP, and Kerberos V5). Autoconf continued to improve rapidly, as many people using the @code{configure} scripts reported problems they encountered. diff --git a/autoscan.in b/autoscan.in index 69f82db1..7f7a82a2 100644 --- a/autoscan.in +++ b/autoscan.in @@ -40,7 +40,7 @@ exit 0; sub parse_args { local ($usage) = - "Usage: $0 [--macrodir=dir] [--help] [--verbose] [--version] [srcdir]\n"; + "Usage: autoscan [--macrodir=dir] [--help] [--verbose] [--version] [srcdir]\n"; foreach $_ (@ARGV) { if (/^--m[a-z]*=(.*)/) { @@ -369,7 +369,7 @@ sub output_identifiers { local ($word); - print CONF "dnl Checks for identifiers.\n"; + print CONF "dnl Checks for typedefs, structures, and compiler characteristics.\n"; foreach $word (sort keys %identifiers) { &print_unique($identifiers_macros{$word}); } @@ -379,7 +379,7 @@ sub output_functions { local ($word); - print CONF "dnl Checks for functions.\n"; + print CONF "dnl Checks for library functions.\n"; foreach $word (sort keys %functions) { if ($functions_macros{$word} eq 'AC_CHECK_FUNCS') { push(@have_funcs, $word); diff --git a/autoscan.pl b/autoscan.pl index 69f82db1..7f7a82a2 100644 --- a/autoscan.pl +++ b/autoscan.pl @@ -40,7 +40,7 @@ exit 0; sub parse_args { local ($usage) = - "Usage: $0 [--macrodir=dir] [--help] [--verbose] [--version] [srcdir]\n"; + "Usage: autoscan [--macrodir=dir] [--help] [--verbose] [--version] [srcdir]\n"; foreach $_ (@ARGV) { if (/^--m[a-z]*=(.*)/) { @@ -369,7 +369,7 @@ sub output_identifiers { local ($word); - print CONF "dnl Checks for identifiers.\n"; + print CONF "dnl Checks for typedefs, structures, and compiler characteristics.\n"; foreach $word (sort keys %identifiers) { &print_unique($identifiers_macros{$word}); } @@ -379,7 +379,7 @@ sub output_functions { local ($word); - print CONF "dnl Checks for functions.\n"; + print CONF "dnl Checks for library functions.\n"; foreach $word (sort keys %functions) { if ($functions_macros{$word} eq 'AC_CHECK_FUNCS') { push(@have_funcs, $word); diff --git a/bin/autoscan.in b/bin/autoscan.in index 69f82db1..7f7a82a2 100644 --- a/bin/autoscan.in +++ b/bin/autoscan.in @@ -40,7 +40,7 @@ exit 0; sub parse_args { local ($usage) = - "Usage: $0 [--macrodir=dir] [--help] [--verbose] [--version] [srcdir]\n"; + "Usage: autoscan [--macrodir=dir] [--help] [--verbose] [--version] [srcdir]\n"; foreach $_ (@ARGV) { if (/^--m[a-z]*=(.*)/) { @@ -369,7 +369,7 @@ sub output_identifiers { local ($word); - print CONF "dnl Checks for identifiers.\n"; + print CONF "dnl Checks for typedefs, structures, and compiler characteristics.\n"; foreach $word (sort keys %identifiers) { &print_unique($identifiers_macros{$word}); } @@ -379,7 +379,7 @@ sub output_functions { local ($word); - print CONF "dnl Checks for functions.\n"; + print CONF "dnl Checks for library functions.\n"; foreach $word (sort keys %functions) { if ($functions_macros{$word} eq 'AC_CHECK_FUNCS') { push(@have_funcs, $word); diff --git a/bin/ifnames.in b/bin/ifnames.in index 6b4106c9..895646e5 100644 --- a/bin/ifnames.in +++ b/bin/ifnames.in @@ -66,9 +66,9 @@ for arg do sed -n ' # Remove comments. Not perfect, but close enough. -s,/\*[^/]*\*/,,g +s%/\*[^/]*\*/%%g # Comments that end on a later line. -s,/\*[^/]*,,g +s%/\*[^/]*%%g /^[ ]*#[ ]*ifn*def[ ][ ]*\([A-Za-z0-9_]*\).*/s//\1/p /^[ ]*#[ ]*e*l*if[ ]/{ s/// @@ -87,7 +87,7 @@ s,/\*[^/]*,,g /g p } -' $arg | sort -u | sed 's,$, '$arg',' +' $arg | sort -u | sed 's%$% '$arg'%' done | awk ' { files[$1] = files[$1] " " $2 } END { for (sym in files) print sym files[sym] }' | sort diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 7a5e4930..159cac10 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -452,18 +452,20 @@ and they also warn you when creating @code{configure} if they are called out of order. To encourage consistency, here is a suggested order for calling the -Autoconf macros. +Autoconf macros. Generally speaking, the things near the end of this +list could depend on things earlier in it. For example, library +functions could be affected by typedefs and libraries. @display @group @code{AC_INIT(@var{file})} -checks for alternative programs +checks for programs checks for libraries checks for header files checks for typedefs -checks for library functions checks for structures checks for compiler characteristics +checks for library functions checks for system services @code{AC_OUTPUT(@r{[}@var{file@dots{}}@r{]})} @end group @@ -4153,10 +4155,10 @@ which few people have to do (mainly its maintainer). @section Why Not Imake? @display -Why not use Imake, instead of @code{configure} scripts? +Why not use Imake instead of @code{configure} scripts? @end display -Several people have written addressing this question, so I will include +Several people have written addressing this question, so I include adaptations of their explanations here. The following answer is based on one written by Richard Pixley: @@ -4191,13 +4193,15 @@ restrictions. Here is some further explanation, written by Per Bothner: One of the advantages of Imake is that it easy to generate large -Makefiles using cpp's @samp{#include} and macro mechanisms. However, -cpp is not programmable: it has limited conditional facilities, and no -looping. And cpp cannot inspect its environment. +Makefiles using @code{cpp}'s @samp{#include} and macro mechanisms. +However, @code{cpp} is not programmable: it has limited conditional +facilities, and no looping. And @code{cpp} cannot inspect its +environment. -All of these problems are solved by using @file{/bin/sh} instead of cpp. -The shell is fully programmable, has macro substitution, can execute (or -source) other shell scripts, and can inspect its environment. +All of these problems are solved by using @code{sh} instead of +@code{cpp}. The shell is fully programmable, has macro substitution, +can execute (or source) other shell scripts, and can inspect its +environment. Paul Eggert elaborates more: @@ -4224,6 +4228,25 @@ which uses the general-purpose preprocessor @code{m4}, and where the package's author (rather than the installer) does the preprocessing in a standard way. +Finally, Mark Eichin notes: + +Imake isn't all that extensible, either. In order to add new features to +Imake, you need to provide you own project template, and duplicate most +of the features of the existing one. This means that for a sophisticated +project, using the vendor-provided Imake templates fails to provide any +leverage---since they don't cover anything that your own project needs +(unless it is an X11 program). + +On the other side, though: + +The one advantage that Imake has over @code{configure}: +@file{Imakefile}s tend to be much shorter (likewise, less redundant) +than @file{Makefile.in}s. There is a fix to this, however---at least +for the Kerberos V5 tree, we've modified things to call in common +@file{post.in} and @file{pre.in} @file{Makefile} fragments for the +entire tree. This means that a lot of common things don't have to be +duplicated, even though they normally are in @code{configure} setups. + @node Upgrading, History, Questions, Top @chapter Upgrading From Version 1 @@ -4585,7 +4608,7 @@ In July 1992, after months of alpha testing, I released Autoconf 1.0, and converted many GNU packages to use it. I was surprised by how positive the reaction to it was. More people started using it than I could keep track of, including people working on software that wasn't -part of the GNU Project (such as TCL, FSP, and Kerberos v5). +part of the GNU Project (such as TCL, FSP, and Kerberos V5). Autoconf continued to improve rapidly, as many people using the @code{configure} scripts reported problems they encountered. diff --git a/ifnames.in b/ifnames.in index 6b4106c9..895646e5 100644 --- a/ifnames.in +++ b/ifnames.in @@ -66,9 +66,9 @@ for arg do sed -n ' # Remove comments. Not perfect, but close enough. -s,/\*[^/]*\*/,,g +s%/\*[^/]*\*/%%g # Comments that end on a later line. -s,/\*[^/]*,,g +s%/\*[^/]*%%g /^[ ]*#[ ]*ifn*def[ ][ ]*\([A-Za-z0-9_]*\).*/s//\1/p /^[ ]*#[ ]*e*l*if[ ]/{ s/// @@ -87,7 +87,7 @@ s,/\*[^/]*,,g /g p } -' $arg | sort -u | sed 's,$, '$arg',' +' $arg | sort -u | sed 's%$% '$arg'%' done | awk ' { files[$1] = files[$1] " " $2 } END { for (sym in files) print sym files[sym] }' | sort diff --git a/ifnames.sh b/ifnames.sh index 6b4106c9..895646e5 100644 --- a/ifnames.sh +++ b/ifnames.sh @@ -66,9 +66,9 @@ for arg do sed -n ' # Remove comments. Not perfect, but close enough. -s,/\*[^/]*\*/,,g +s%/\*[^/]*\*/%%g # Comments that end on a later line. -s,/\*[^/]*,,g +s%/\*[^/]*%%g /^[ ]*#[ ]*ifn*def[ ][ ]*\([A-Za-z0-9_]*\).*/s//\1/p /^[ ]*#[ ]*e*l*if[ ]/{ s/// @@ -87,7 +87,7 @@ s,/\*[^/]*,,g /g p } -' $arg | sort -u | sed 's,$, '$arg',' +' $arg | sort -u | sed 's%$% '$arg'%' done | awk ' { files[$1] = files[$1] " " $2 } END { for (sym in files) print sym files[sym] }' | sort