590 |
only viable way to distribute automatic build rules for software, but |
only viable way to distribute automatic build rules for software, but |
591 |
one quickly runs into @command{make}'s numerous limitations. Its lack of |
one quickly runs into @command{make}'s numerous limitations. Its lack of |
592 |
support for automatic dependency tracking, recursive builds in |
support for automatic dependency tracking, recursive builds in |
593 |
subdirectories, reliable timestamps (e.g. for network filesystems), and |
subdirectories, reliable timestamps (e.g., for network filesystems), and |
594 |
so on, mean that developers must painfully (and often incorrectly) |
so on, mean that developers must painfully (and often incorrectly) |
595 |
reinvent the wheel for each project. Portability is non-trivial, thanks |
reinvent the wheel for each project. Portability is non-trivial, thanks |
596 |
to the quirks of @command{make} on many systems. On top of all this is the |
to the quirks of @command{make} on many systems. On top of all this is the |
623 |
|
|
624 |
Automake may require that additional tools be present on the |
Automake may require that additional tools be present on the |
625 |
@emph{developer's} machine. For example, the @code{Makefile.in} that |
@emph{developer's} machine. For example, the @code{Makefile.in} that |
626 |
the developer works with may not be portable (e.g. it might use special |
the developer works with may not be portable (e.g., it might use special |
627 |
features of your compiler to automatically generate dependency |
features of your compiler to automatically generate dependency |
628 |
information). Running @code{make dist}, however, produces a |
information). Running @code{make dist}, however, produces a |
629 |
@file{hello-1.0.tar.gz} package (or whatever the program/version is) |
@file{hello-1.0.tar.gz} package (or whatever the program/version is) |
854 |
extending an existing one. The former option is very attractive: all |
extending an existing one. The former option is very attractive: all |
855 |
sorts of optimizations could easily be implemented in the compiler and |
sorts of optimizations could easily be implemented in the compiler and |
856 |
many rigorous checks could be performed on the Autoconf program |
many rigorous checks could be performed on the Autoconf program |
857 |
(e.g. rejecting any non-portable construct). Alternatively, you can |
(e.g., rejecting any non-portable construct). Alternatively, you can |
858 |
extend an existing language, such as the @code{sh} (Bourne shell) |
extend an existing language, such as the @code{sh} (Bourne shell) |
859 |
language. |
language. |
860 |
|
|
1213 |
|
|
1214 |
Warnings about @samp{syntax} are enabled by default, and the environment |
Warnings about @samp{syntax} are enabled by default, and the environment |
1215 |
variable @code{WARNINGS}, a comma separated list of categories, is |
variable @code{WARNINGS}, a comma separated list of categories, is |
1216 |
honored. @samp{autoconf -W @var{category}} will actually |
honored. @samp{autoconf -W @var{category}} will actually |
1217 |
behave as if you had run: |
behave as if you had run: |
1218 |
|
|
1219 |
@example |
@example |
1311 |
@itemx $@{@var{separator}@}@@ |
@itemx $@{@var{separator}@}@@ |
1312 |
All the arguments passed to @var{macro}, separated by the character |
All the arguments passed to @var{macro}, separated by the character |
1313 |
@var{sep} or the string @var{separator} (@samp{,} by default). Each |
@var{sep} or the string @var{separator} (@samp{,} by default). Each |
1314 |
argument is quoted, i.e. enclosed in a pair of square brackets. |
argument is quoted, i.e., enclosed in a pair of square brackets. |
1315 |
|
|
1316 |
@item $* |
@item $* |
1317 |
@itemx $@var{sep}* |
@itemx $@var{sep}* |
1395 |
|
|
1396 |
Installing the various components of the @sc{gnu} Build System can be |
Installing the various components of the @sc{gnu} Build System can be |
1397 |
tedious: running @command{autopoint} for Gettext, @command{automake} for |
tedious: running @command{autopoint} for Gettext, @command{automake} for |
1398 |
@file{Makefile.in} etc. in each directory. It may be needed either |
@file{Makefile.in} etc.@: in each directory. It may be needed either |
1399 |
because some tools such as @command{automake} have been updated on your |
because some tools such as @command{automake} have been updated on your |
1400 |
system, or because some of the sources such as @file{configure.ac} have |
system, or because some of the sources such as @file{configure.ac} have |
1401 |
been updated, or finally, simply in order to install the @sc{gnu} Build |
been updated, or finally, simply in order to install the @sc{gnu} Build |
1775 |
|
|
1776 |
The macros @code{AC_CONFIG_FILES} and @code{AC_CONFIG_HEADERS} use |
The macros @code{AC_CONFIG_FILES} and @code{AC_CONFIG_HEADERS} use |
1777 |
special @var{tag}s: they may have the form @samp{@var{output}} or |
special @var{tag}s: they may have the form @samp{@var{output}} or |
1778 |
@samp{@var{output}:@var{inputs}}. The file @var{output} is instantiated |
@samp{@var{output}:@var{inputs}}. The file @var{output} is instantiated |
1779 |
from its templates, @var{inputs} (defaulting to @samp{@var{output}.in}). |
from its templates, @var{inputs} (defaulting to @samp{@var{output}.in}). |
1780 |
|
|
1781 |
For instance |
For instance |
2175 |
|
|
2176 |
@defvar prefix |
@defvar prefix |
2177 |
@ovindex prefix |
@ovindex prefix |
2178 |
The common installation prefix for all files. If @var{exec_prefix} |
The common installation prefix for all files. If @var{exec_prefix} |
2179 |
is defined to a different value, @var{prefix} is used only for |
is defined to a different value, @var{prefix} is used only for |
2180 |
architecture-independent files. |
architecture-independent files. |
2181 |
@end defvar |
@end defvar |
2226 |
|
|
2227 |
A corollary is that you should not use these variables except in |
A corollary is that you should not use these variables except in |
2228 |
Makefiles. For instance, instead of trying to evaluate @code{datadir} |
Makefiles. For instance, instead of trying to evaluate @code{datadir} |
2229 |
in @file{configure} and hardcoding it in Makefiles using |
in @file{configure} and hard-coding it in Makefiles using |
2230 |
e.g. @samp{AC_DEFINE_UNQUOTED(DATADIR, "$datadir")}, you should add |
e.g., @samp{AC_DEFINE_UNQUOTED(DATADIR, "$datadir")}, you should add |
2231 |
@samp{-DDATADIR="$(datadir)"} to your @code{CPPFLAGS}. |
@samp{-DDATADIR="$(datadir)"} to your @code{CPPFLAGS}. |
2232 |
|
|
2233 |
Similarly you should not rely on @code{AC_OUTPUT_FILES} to replace |
Similarly you should not rely on @code{AC_OUTPUT_FILES} to replace |
2239 |
@example |
@example |
2240 |
@group |
@group |
2241 |
edit = sed \ |
edit = sed \ |
2242 |
-e 's,@@datadir\@@,$(pkgdatadir),g' \ |
-e 's,@@datadir\@@,$(pkgdatadir),g' \ |
2243 |
-e 's,@@prefix\@@,$(prefix),g' |
-e 's,@@prefix\@@,$(prefix),g' |
2244 |
@end group |
@end group |
2245 |
|
|
2246 |
autoconf autoheader: Makefile |
autoconf autoheader: Makefile |
2488 |
#if HAVE_UNISTD_H |
#if HAVE_UNISTD_H |
2489 |
# include <unistd.h> |
# include <unistd.h> |
2490 |
#else |
#else |
2491 |
/* We are in trouble. */ |
/* We are in trouble. */ |
2492 |
#endif |
#endif |
2493 |
@end group |
@end group |
2494 |
@end example |
@end example |
2578 |
@itemx -W @var{category} |
@itemx -W @var{category} |
2579 |
@evindex WARNINGS |
@evindex WARNINGS |
2580 |
Report the warnings related to @var{category} (which can actually be a |
Report the warnings related to @var{category} (which can actually be a |
2581 |
comma separated list). Current categories include: |
comma separated list). Current categories include: |
2582 |
|
|
2583 |
@table @samp |
@table @samp |
2584 |
@item obsolete |
@item obsolete |
2811 |
@end example |
@end example |
2812 |
|
|
2813 |
If a given @var{dir} contains @command{configure.gnu}, it is run instead |
If a given @var{dir} contains @command{configure.gnu}, it is run instead |
2814 |
of @command{configure}. This is for packages that might use a |
of @command{configure}. This is for packages that might use a |
2815 |
non-Autoconf script @command{Configure}, which can't be called through a |
non-Autoconf script @command{Configure}, which can't be called through a |
2816 |
wrapper @command{configure} since it would be the same file on |
wrapper @command{configure} since it would be the same file on |
2817 |
case-insensitive filesystems. Likewise, if a @var{dir} contains |
case-insensitive filesystems. Likewise, if a @var{dir} contains |
2818 |
@file{configure.ac} but no @command{configure}, the Cygnus |
@file{configure.ac} but no @command{configure}, the Cygnus |
2819 |
@command{configure} script found by @code{AC_CONFIG_AUX_DIR} is used. |
@command{configure} script found by @code{AC_CONFIG_AUX_DIR} is used. |
2820 |
|
|
3212 |
@end example |
@end example |
3213 |
|
|
3214 |
You are strongly encouraged to declare the @var{variable} passed to |
You are strongly encouraged to declare the @var{variable} passed to |
3215 |
@code{AC_CHECK_PROG} etc. as precious, @xref{Setting Output Variables}, |
@code{AC_CHECK_PROG} etc.@: as precious, @xref{Setting Output Variables}, |
3216 |
@code{AC_ARG_VAR}, for more details. |
@code{AC_ARG_VAR}, for more details. |
3217 |
|
|
3218 |
@defmac AC_CHECK_PROG (@var{variable}, @var{prog-to-check-for}, @var{value-if-found}, @ovar{value-if-not-found}, @ovar{path}, @ovar{reject}) |
@defmac AC_CHECK_PROG (@var{variable}, @var{prog-to-check-for}, @var{value-if-found}, @ovar{value-if-not-found}, @ovar{path}, @ovar{reject}) |
3259 |
Like @code{AC_CHECK_TOOL}, each of the tools in the list |
Like @code{AC_CHECK_TOOL}, each of the tools in the list |
3260 |
@var{progs-to-check-for} are checked with a prefix of the host type as |
@var{progs-to-check-for} are checked with a prefix of the host type as |
3261 |
determined by @code{AC_CANONICAL_HOST}, followed by a dash |
determined by @code{AC_CANONICAL_HOST}, followed by a dash |
3262 |
(@pxref{Canonicalizing}). If none of the tools can be found with a |
(@pxref{Canonicalizing}). If none of the tools can be found with a |
3263 |
prefix, then the first one without a prefix is used. If a tool is found, |
prefix, then the first one without a prefix is used. If a tool is found, |
3264 |
set @var{variable} to the name of that program. If none of the tools in |
set @var{variable} to the name of that program. If none of the tools in |
3265 |
the list are found, set @var{variable} to @var{value-if-not-found}; if |
the list are found, set @var{variable} to @var{value-if-not-found}; if |
3266 |
@var{value-if-not-found} is not specified, the value of @var{variable} |
@var{value-if-not-found} is not specified, the value of @var{variable} |
3267 |
is not changed. Calls @code{AC_SUBST} for @var{variable}. |
is not changed. Calls @code{AC_SUBST} for @var{variable}. |
3332 |
commands to run if the link fails. If @var{action-if-found} is not |
commands to run if the link fails. If @var{action-if-found} is not |
3333 |
specified, the default action will prepend @option{-l@var{library}} to |
specified, the default action will prepend @option{-l@var{library}} to |
3334 |
@code{LIBS} and define @samp{HAVE_LIB@var{library}} (in all |
@code{LIBS} and define @samp{HAVE_LIB@var{library}} (in all |
3335 |
capitals). This macro is intended to support building of @code{LIBS} in |
capitals). This macro is intended to support building of @code{LIBS} in |
3336 |
a right-to-left (least-dependent to most-dependent) fashion such that |
a right-to-left (least-dependent to most-dependent) fashion such that |
3337 |
library dependencies are satisfied as a natural side-effect of |
library dependencies are satisfied as a natural side-effect of |
3338 |
consecutive tests. Some linkers are very sensitive to library ordering |
consecutive tests. Some linkers are very sensitive to library ordering |
3339 |
so the order in which @code{LIBS} is generated is important to reliable |
so the order in which @code{LIBS} is generated is important to reliable |
3340 |
detection of libraries. |
detection of libraries. |
3341 |
|
|
3342 |
If linking with @var{library} results in unresolved symbols that would |
If linking with @var{library} results in unresolved symbols that would |
3343 |
be resolved by linking with additional libraries, give those libraries |
be resolved by linking with additional libraries, give those libraries |
3344 |
as the @var{other-libraries} argument, separated by spaces: |
as the @var{other-libraries} argument, separated by spaces: |
3345 |
e.g. @option{-lXt -lX11}. Otherwise, this macro will fail to detect |
e.g., @option{-lXt -lX11}. Otherwise, this macro will fail to detect |
3346 |
that @var{library} is present, because linking the test program will |
that @var{library} is present, because linking the test program will |
3347 |
always fail with unresolved symbols. The @var{other-libraries} argument |
always fail with unresolved symbols. The @var{other-libraries} argument |
3348 |
should be limited to cases where it is desirable to test for one library |
should be limited to cases where it is desirable to test for one library |
3349 |
in the presence of another that is not already in @code{LIBS}. |
in the presence of another that is not already in @code{LIBS}. |
3350 |
@end defmac |
@end defmac |
3363 |
If linking with @var{library} results in unresolved symbols that would |
If linking with @var{library} results in unresolved symbols that would |
3364 |
be resolved by linking with additional libraries, give those libraries |
be resolved by linking with additional libraries, give those libraries |
3365 |
as the @var{other-libraries} argument, separated by spaces: |
as the @var{other-libraries} argument, separated by spaces: |
3366 |
e.g. @option{-lXt -lX11}. Otherwise, this macro will fail to detect |
e.g., @option{-lXt -lX11}. Otherwise, this macro will fail to detect |
3367 |
that @var{function} is present, because linking the test program will |
that @var{function} is present, because linking the test program will |
3368 |
always fail with unresolved symbols. |
always fail with unresolved symbols. |
3369 |
@end defmac |
@end defmac |
3425 |
@item @code{sscanf} |
@item @code{sscanf} |
3426 |
@c @fuindex sscanf |
@c @fuindex sscanf |
3427 |
@prindex @code{sscanf} |
@prindex @code{sscanf} |
3428 |
On various old systems, e.g. HP-UX 9, @code{sscanf} requires that its |
On various old systems, e.g., HP-UX 9, @code{sscanf} requires that its |
3429 |
input string be writable (though it doesn't actually change it). This |
input string be writable (though it doesn't actually change it). This |
3430 |
can be a problem when using @command{gcc} since it normally puts |
can be a problem when using @command{gcc} since it normally puts |
3431 |
constant strings in read-only memory |
constant strings in read-only memory |
3467 |
@prindex @code{va_copy} |
@prindex @code{va_copy} |
3468 |
The ISO C99 standard provides @code{va_copy} for copying |
The ISO C99 standard provides @code{va_copy} for copying |
3469 |
@code{va_list} variables. It may be available in older environments |
@code{va_list} variables. It may be available in older environments |
3470 |
too, though possibly as @code{__va_copy} (eg. @command{gcc} in strict |
too, though possibly as @code{__va_copy} (e.g., @command{gcc} in strict |
3471 |
C89 mode). These can be tested with @code{#ifdef}. A fallback to |
C89 mode). These can be tested with @code{#ifdef}. A fallback to |
3472 |
@code{memcpy (&dst, &src, sizeof(va_list))} will give maximum |
@code{memcpy (&dst, &src, sizeof(va_list))} will give maximum |
3473 |
portability. |
portability. |
3476 |
@c @fuindex va_list |
@c @fuindex va_list |
3477 |
@prindex @code{va_list} |
@prindex @code{va_list} |
3478 |
@code{va_list} is not necessarily just a pointer. It can be a |
@code{va_list} is not necessarily just a pointer. It can be a |
3479 |
@code{struct} (eg. @command{gcc} on Alpha), which means @code{NULL} is |
@code{struct} (e.g., @command{gcc} on Alpha), which means @code{NULL} is |
3480 |
not portable. Or it can be an array (eg. @command{gcc} in some |
not portable. Or it can be an array (e.g., @command{gcc} in some |
3481 |
PowerPC configurations), which means as a function parameter it can be |
PowerPC configurations), which means as a function parameter it can be |
3482 |
effectively call-by-reference and library routines might modify the |
effectively call-by-reference and library routines might modify the |
3483 |
value back in the caller (eg. @code{vsnprintf} in the GNU C Library |
value back in the caller (e.g., @code{vsnprintf} in the GNU C Library |
3484 |
2.1). |
2.1). |
3485 |
|
|
3486 |
@item Signed @code{>>} |
@item Signed @code{>>} |
3616 |
@prindex @code{fork} |
@prindex @code{fork} |
3617 |
@c @fuindex vfork |
@c @fuindex vfork |
3618 |
@prindex @code{vfork} |
@prindex @code{vfork} |
3619 |
This macro checks for the @code{fork} and @code{vfork} functions. If a |
This macro checks for the @code{fork} and @code{vfork} functions. If a |
3620 |
working @code{fork} is found, define @code{HAVE_WORKING_FORK}. This macro |
working @code{fork} is found, define @code{HAVE_WORKING_FORK}. This macro |
3621 |
checks whether @code{fork} is just a stub by trying to run it. |
checks whether @code{fork} is just a stub by trying to run it. |
3622 |
|
|
3623 |
If @file{vfork.h} is found, define @code{HAVE_VFORK_H}. If a working |
If @file{vfork.h} is found, define @code{HAVE_VFORK_H}. If a working |
3624 |
@code{vfork} is found, define @code{HAVE_WORKING_VFORK}. Otherwise, |
@code{vfork} is found, define @code{HAVE_WORKING_VFORK}. Otherwise, |
3625 |
define @code{vfork} to be @code{fork} for backward compatibility with |
define @code{vfork} to be @code{fork} for backward compatibility with |
3626 |
previous versions of @command{autoconf}. This macro checks for several known |
previous versions of @command{autoconf}. This macro checks for several known |
3627 |
errors in implementations of @code{vfork} and considers the system to not |
errors in implementations of @code{vfork} and considers the system to not |
3628 |
have a working @code{vfork} if it detects any of them. It is not considered |
have a working @code{vfork} if it detects any of them. It is not considered |
3629 |
to be an implementation error if a child's invocation of @code{signal} |
to be an implementation error if a child's invocation of @code{signal} |
3630 |
modifies the parent's signal handler, since child processes rarely change |
modifies the parent's signal handler, since child processes rarely change |
3631 |
their signal handlers. |
their signal handlers. |
4093 |
|
|
4094 |
Note that this macro replaces the obsolete @code{AC_LIBOBJ_DECL}, with |
Note that this macro replaces the obsolete @code{AC_LIBOBJ_DECL}, with |
4095 |
slightly different semantics: the old macro took the function name, |
slightly different semantics: the old macro took the function name, |
4096 |
e.g. @code{foo}, as its argument rather than the file name. |
e.g., @code{foo}, as its argument rather than the file name. |
4097 |
@end defmac |
@end defmac |
4098 |
|
|
4099 |
@defmac AC_LIBSOURCES (@var{files}) |
@defmac AC_LIBSOURCES (@var{files}) |
4161 |
additions. Please help us keeping it as complete as possible. |
additions. Please help us keeping it as complete as possible. |
4162 |
|
|
4163 |
@table @asis |
@table @asis |
4164 |
@item @file{inttypes.h} vs. @file{stdint.h} |
@item @file{inttypes.h} vs.@: @file{stdint.h} |
4165 |
Paul Eggert notes that: ISO C 1999 says that @file{inttypes.h} includes |
Paul Eggert notes that: ISO C 1999 says that @file{inttypes.h} includes |
4166 |
@file{stdint.h}, so there's no need to include @file{stdint.h} |
@file{stdint.h}, so there's no need to include @file{stdint.h} |
4167 |
separately in a standard environment. Many implementations have |
separately in a standard environment. Many implementations have |
4168 |
@file{inttypes.h} but not @file{stdint.h} (e.g. Solaris 7), but I don't |
@file{inttypes.h} but not @file{stdint.h} (e.g., Solaris 7), but I don't |
4169 |
know of any implementation that has @file{stdint.h} but not |
know of any implementation that has @file{stdint.h} but not |
4170 |
@file{inttypes.h}. Nor do I know of any free software that includes |
@file{inttypes.h}. Nor do I know of any free software that includes |
4171 |
@file{stdint.h}; @file{stdint.h} seems to be a creation of the committee. |
@file{stdint.h}; @file{stdint.h} seems to be a creation of the committee. |
4240 |
@defmac AC_HEADER_STAT |
@defmac AC_HEADER_STAT |
4241 |
@acindex HEADER_STAT |
@acindex HEADER_STAT |
4242 |
@acindex STAT_MACROS_BROKEN |
@acindex STAT_MACROS_BROKEN |
4243 |
If the macros @code{S_ISDIR}, @code{S_ISREG} et al. defined in |
If the macros @code{S_ISDIR}, @code{S_ISREG}, etc.@: defined in |
4244 |
@file{sys/stat.h} do not work properly (returning false positives), |
@file{sys/stat.h} do not work properly (returning false positives), |
4245 |
define @code{STAT_MACROS_BROKEN}. This is the case on Tektronix UTekV, |
define @code{STAT_MACROS_BROKEN}. This is the case on Tektronix UTekV, |
4246 |
Amdahl UTS and Motorola System V/88. |
Amdahl UTS and Motorola System V/88. |
5244 |
@defmac AC_F77_LIBRARY_LDFLAGS |
@defmac AC_F77_LIBRARY_LDFLAGS |
5245 |
@acindex F77_LIBRARY_LDFLAGS |
@acindex F77_LIBRARY_LDFLAGS |
5246 |
@ovindex FLIBS |
@ovindex FLIBS |
5247 |
Determine the linker flags (e.g. @option{-L} and @option{-l}) for the |
Determine the linker flags (e.g., @option{-L} and @option{-l}) for the |
5248 |
@dfn{Fortran 77 intrinsic and run-time libraries} that are required to |
@dfn{Fortran 77 intrinsic and run-time libraries} that are required to |
5249 |
successfully link a Fortran 77 program or shared library. The output |
successfully link a Fortran 77 program or shared library. The output |
5250 |
variable @code{FLIBS} is set to these flags. |
variable @code{FLIBS} is set to these flags. |
5251 |
|
|
5252 |
This macro is intended to be used in those situations when it is |
This macro is intended to be used in those situations when it is |
5253 |
necessary to mix, e.g. C++ and Fortran 77 source code into a single |
necessary to mix, e.g., C++ and Fortran 77 source code into a single |
5254 |
program or shared library (@pxref{Mixing Fortran 77 With C and C++,,, |
program or shared library (@pxref{Mixing Fortran 77 With C and C++,,, |
5255 |
automake, GNU Automake}). |
automake, GNU Automake}). |
5256 |
|
|
5277 |
With many compilers, the Fortran libraries detected by |
With many compilers, the Fortran libraries detected by |
5278 |
@code{AC_F77_LIBRARY_LDFLAGS} provide their own @code{main} entry |
@code{AC_F77_LIBRARY_LDFLAGS} provide their own @code{main} entry |
5279 |
function that initializes things like Fortran I/O, and which then calls |
function that initializes things like Fortran I/O, and which then calls |
5280 |
a user-provided entry function named e.g. @code{MAIN__} to run the |
a user-provided entry function named (say) @code{MAIN__} to run the |
5281 |
user's program. The @code{AC_F77_DUMMY_MAIN} or @code{AC_F77_MAIN} |
user's program. The @code{AC_F77_DUMMY_MAIN} or @code{AC_F77_MAIN} |
5282 |
macro figures out how to deal with this interaction. |
macro figures out how to deal with this interaction. |
5283 |
|
|
5291 |
solution was found, and @code{none} when no such dummy main is needed. |
solution was found, and @code{none} when no such dummy main is needed. |
5292 |
|
|
5293 |
By default, @var{action-if-found} defines @code{F77_DUMMY_MAIN} to the |
By default, @var{action-if-found} defines @code{F77_DUMMY_MAIN} to the |
5294 |
name of this routine (e.g. @code{MAIN__}) @emph{if} it is required. |
name of this routine (e.g., @code{MAIN__}) @emph{if} it is required. |
5295 |
@ovar{action-if-not-found} defaults to exiting with an error. |
@ovar{action-if-not-found} defaults to exiting with an error. |
5296 |
|
|
5297 |
In order to link with Fortran routines, the user's C/C++ program should |
In order to link with Fortran routines, the user's C/C++ program should |
5316 |
@acindex F77_MAIN |
@acindex F77_MAIN |
5317 |
@cvindex F77_MAIN |
@cvindex F77_MAIN |
5318 |
As discussed above for @code{AC_F77_DUMMY_MAIN}, many Fortran libraries |
As discussed above for @code{AC_F77_DUMMY_MAIN}, many Fortran libraries |
5319 |
allow you to provide an entry point called e.g. @code{MAIN__} instead of |
allow you to provide an entry point called (say) @code{MAIN__} instead of |
5320 |
the usual @code{main}, which is then called by a @code{main} function in |
the usual @code{main}, which is then called by a @code{main} function in |
5321 |
the Fortran libraries that initializes things like Fortran I/O. The |
the Fortran libraries that initializes things like Fortran I/O. The |
5322 |
@code{AC_F77_MAIN} macro detects whether it is @emph{possible} to |
@code{AC_F77_MAIN} macro detects whether it is @emph{possible} to |
5375 |
name-mangling scheme of the Fortran 77 compiler, there may be Fortran 77 |
name-mangling scheme of the Fortran 77 compiler, there may be Fortran 77 |
5376 |
compilers that it doesn't support yet. In this case, the above code |
compilers that it doesn't support yet. In this case, the above code |
5377 |
will generate a compile-time error, but some other behavior |
will generate a compile-time error, but some other behavior |
5378 |
(e.g. disabling Fortran-related features) can be induced by checking |
(e.g., disabling Fortran-related features) can be induced by checking |
5379 |
whether the @code{F77_FUNC} macro is defined. |
whether the @code{F77_FUNC} macro is defined. |
5380 |
|
|
5381 |
Now, to call that routine from a C program, we would do something like: |
Now, to call that routine from a C program, we would do something like: |
5388 |
@end example |
@end example |
5389 |
|
|
5390 |
If the Fortran 77 identifier contains an underscore |
If the Fortran 77 identifier contains an underscore |
5391 |
(e.g. @code{foo_bar}), you should use @code{F77_FUNC_} instead of |
(e.g., @code{foo_bar}), you should use @code{F77_FUNC_} instead of |
5392 |
@code{F77_FUNC} (with the same arguments). This is because some Fortran |
@code{F77_FUNC} (with the same arguments). This is because some Fortran |
5393 |
77 compilers mangle names differently if they contain an underscore. |
77 compilers mangle names differently if they contain an underscore. |
5394 |
@end defmac |
@end defmac |
5603 |
@var{input}. |
@var{input}. |
5604 |
|
|
5605 |
This macro uses @code{CPPFLAGS}, but not @code{CFLAGS}, because |
This macro uses @code{CPPFLAGS}, but not @code{CFLAGS}, because |
5606 |
@option{-g}, @option{-O}, etc. are not valid options to many C |
@option{-g}, @option{-O}, etc.@: are not valid options to many C |
5607 |
preprocessors. |
preprocessors. |
5608 |
@end defmac |
@end defmac |
5609 |
|
|
5909 |
sensitive) or HFS+ (case preserving). By default Apple wants you to |
sensitive) or HFS+ (case preserving). By default Apple wants you to |
5910 |
install the OS on HFS+. Unfortunately, there are some pieces of |
install the OS on HFS+. Unfortunately, there are some pieces of |
5911 |
software which really need to be built on UFS. We may want to rebuild |
software which really need to be built on UFS. We may want to rebuild |
5912 |
darwin to have both UFS and HFS+ available (and put the /local/build |
Darwin to have both UFS and HFS+ available (and put the /local/build |
5913 |
tree on the UFS). |
tree on the UFS). |
5914 |
|
|
5915 |
@item @sc{qnx 4.25} |
@item @sc{qnx 4.25} |
5919 |
@c QNX Neutrino. |
@c QNX Neutrino. |
5920 |
@sc{qnx} is a realtime operating system running on Intel architecture |
@sc{qnx} is a realtime operating system running on Intel architecture |
5921 |
meant to be scalable from the small embedded systems to hundred |
meant to be scalable from the small embedded systems to hundred |
5922 |
processor super-computer. It claims to be @sc{posix} certified. More |
processor super-computer. It claims to be @sc{posix} certified. More |
5923 |
information is available on the @href{www.qnx.com, @sc{qnx} home page}, |
information is available on the @href{www.qnx.com, @sc{qnx} home page}, |
5924 |
including the @href{http://support.qnx.com/support/docs/qnx4/, @sc{qnx} |
including the @href{http://support.qnx.com/support/docs/qnx4/, @sc{qnx} |
5925 |
man pages}. |
man pages}. |
5979 |
|
|
5980 |
Autoconf-generated @command{configure} scripts check for the C compiler and |
Autoconf-generated @command{configure} scripts check for the C compiler and |
5981 |
its features by default. Packages that use other programming languages |
its features by default. Packages that use other programming languages |
5982 |
(maybe more than one, e.g. C and C++) need to test features of the |
(maybe more than one, e.g., C and C++) need to test features of the |
5983 |
compilers for the respective languages. The following macros determine |
compilers for the respective languages. The following macros determine |
5984 |
which programming language is used in the subsequent tests in |
which programming language is used in the subsequent tests in |
5985 |
@file{configure.ac}. |
@file{configure.ac}. |
6105 |
|
|
6106 |
If neither @var{value} nor @var{description} are given, then |
If neither @var{value} nor @var{description} are given, then |
6107 |
@var{value} defaults to 1 instead of to the empty string. This is for |
@var{value} defaults to 1 instead of to the empty string. This is for |
6108 |
backwards compatiblity with older versions of Autoconf, but this usage |
backwards compatibility with older versions of Autoconf, but this usage |
6109 |
is obsolescent and may be withdrawn in future versions of Autoconf. |
is obsolescent and may be withdrawn in future versions of Autoconf. |
6110 |
|
|
6111 |
@end defmac |
@end defmac |
6318 |
|
|
6319 |
It is very common to find buggy macros using @code{AC_CACHE_VAL} or |
It is very common to find buggy macros using @code{AC_CACHE_VAL} or |
6320 |
@code{AC_CACHE_CHECK}, because people are tempted to call |
@code{AC_CACHE_CHECK}, because people are tempted to call |
6321 |
@code{AC_DEFINE} in the @var{commands-to-set-it}. Instead, the code that |
@code{AC_DEFINE} in the @var{commands-to-set-it}. Instead, the code that |
6322 |
@emph{follows} the call to @code{AC_CACHE_VAL} should call |
@emph{follows} the call to @code{AC_CACHE_VAL} should call |
6323 |
@code{AC_DEFINE}, by examining the value of the cache variable. For |
@code{AC_DEFINE}, by examining the value of the cache variable. For |
6324 |
instance, the following macro is broken: |
instance, the following macro is broken: |
6390 |
@samp{ac}. |
@samp{ac}. |
6391 |
|
|
6392 |
@item @code{_cv_} |
@item @code{_cv_} |
6393 |
Indicates that this shell variable is a cache value. This string |
Indicates that this shell variable is a cache value. This string |
6394 |
@emph{must} be present in the variable name, including the leading |
@emph{must} be present in the variable name, including the leading |
6395 |
underscore. |
underscore. |
6396 |
|
|
6449 |
file will gradually accumulate information whenever someone runs a new |
file will gradually accumulate information whenever someone runs a new |
6450 |
@command{configure} script. (Running @command{configure} merges the new cache |
@command{configure} script. (Running @command{configure} merges the new cache |
6451 |
results with the existing cache file.) This may cause problems, |
results with the existing cache file.) This may cause problems, |
6452 |
however, if the system configuration (e.g. the installed libraries or |
however, if the system configuration (e.g., the installed libraries or |
6453 |
compilers) changes and the stale cache file is not deleted. |
compilers) changes and the stale cache file is not deleted. |
6454 |
|
|
6455 |
@node Cache Checkpointing |
@node Cache Checkpointing |
6552 |
|
|
6553 |
@defmac AC_MSG_NOTICE (@var{message}) |
@defmac AC_MSG_NOTICE (@var{message}) |
6554 |
@acindex MSG_NOTICE |
@acindex MSG_NOTICE |
6555 |
Deliver the @var{message} to the user. It is useful mainly to print a |
Deliver the @var{message} to the user. It is useful mainly to print a |
6556 |
general description of the overall purpose of a group of feature checks, |
general description of the overall purpose of a group of feature checks, |
6557 |
e.g., |
e.g., |
6558 |
|
|
7204 |
|
|
7205 |
Warnings about @samp{syntax} are enabled by default, and the environment |
Warnings about @samp{syntax} are enabled by default, and the environment |
7206 |
variable @code{WARNINGS}, a comma separated list of categories, is |
variable @code{WARNINGS}, a comma separated list of categories, is |
7207 |
honored. @command{autom4te -W @var{category}} will actually |
honored. @command{autom4te -W @var{category}} will actually |
7208 |
behave as if you had run: |
behave as if you had run: |
7209 |
|
|
7210 |
@example |
@example |
7343 |
needed. |
needed. |
7344 |
|
|
7345 |
The @var{format} is a regular string, with newlines if desired, and |
The @var{format} is a regular string, with newlines if desired, and |
7346 |
several special escape codes. It defaults to @samp{$f:$l:$n:$%}. It can |
several special escape codes. It defaults to @samp{$f:$l:$n:$%}. It can |
7347 |
use the following special escapes: |
use the following special escapes: |
7348 |
|
|
7349 |
@table @samp |
@table @samp |
7371 |
@itemx $@{@var{separator}@}@@ |
@itemx $@{@var{separator}@}@@ |
7372 |
All the arguments passed to @var{macro}, separated by the character |
All the arguments passed to @var{macro}, separated by the character |
7373 |
@var{sep} or the string @var{separator} (@samp{,} by default). Each |
@var{sep} or the string @var{separator} (@samp{,} by default). Each |
7374 |
argument is quoted, i.e. enclosed in a pair of square brackets. |
argument is quoted, i.e., enclosed in a pair of square brackets. |
7375 |
|
|
7376 |
@item $* |
@item $* |
7377 |
@itemx $@var{sep}* |
@itemx $@var{sep}* |
7396 |
Cache the traces of @var{macro}, but do not enable traces. This is |
Cache the traces of @var{macro}, but do not enable traces. This is |
7397 |
especially important to save cpu cycles in the future. For instance, |
especially important to save cpu cycles in the future. For instance, |
7398 |
when invoked, @command{autoconf} preselects all the macros that |
when invoked, @command{autoconf} preselects all the macros that |
7399 |
@command{autoheader}, @command{automake}, @command{autoreconf} etc. will |
@command{autoheader}, @command{automake}, @command{autoreconf} etc.@: will |
7400 |
trace, so that running @command{m4} is not needed to trace them: the |
trace, so that running @command{m4} is not needed to trace them: the |
7401 |
cache suffices. This results in a huge speed-up. |
cache suffices. This results in a huge speed-up. |
7402 |
@end table |
@end table |
7625 |
according to the Webster's Revised Unabridged Dictionary (1913): |
according to the Webster's Revised Unabridged Dictionary (1913): |
7626 |
|
|
7627 |
@quotation |
@quotation |
7628 |
Mash \Mash\, n. [Akin to G. meisch, maisch, meische, maische, mash, |
Mash \Mash\, n. [Akin to G. meisch, maisch, meische, maische, mash, |
7629 |
wash, and prob. to AS. miscian to mix. See ``Mix''.] |
wash, and prob. to AS.@: miscian to mix. See ``Mix''.] |
7630 |
|
|
7631 |
@enumerate 1 |
@enumerate 1 |
7632 |
@item |
@item |
7637 |
A mixture of meal or bran and water fed to animals. |
A mixture of meal or bran and water fed to animals. |
7638 |
|
|
7639 |
@item |
@item |
7640 |
A mess; trouble. [Obs.] --Beau. & Fl. |
A mess; trouble. [Obs.] --Beau.@: & Fl. |
7641 |
@end enumerate |
@end enumerate |
7642 |
@end quotation |
@end quotation |
7643 |
|
|
8249 |
|
|
8250 |
@noindent |
@noindent |
8251 |
If you omit the space before the path, then 4.2@sc{bsd} based systems |
If you omit the space before the path, then 4.2@sc{bsd} based systems |
8252 |
(such as Sequent DYNIX) will ignore the line, because they interpret |
(such as DYNIX) will ignore the line, because they interpret |
8253 |
@samp{#! /} as a 4-byte magic number. Some old systems have quite |
@samp{#! /} as a 4-byte magic number. Some old systems have quite |
8254 |
small limits on the length of the @samp{#!} line too, for instance 32 |
small limits on the length of the @samp{#!} line too, for instance 32 |
8255 |
bytes (not including the newline) on SunOS 4. |
bytes (not including the newline) on SunOS 4. |
8297 |
@cindex Ash |
@cindex Ash |
8298 |
@command{ash} is often used on @sc{gnu}/Linux and @sc{bsd} systems as a |
@command{ash} is often used on @sc{gnu}/Linux and @sc{bsd} systems as a |
8299 |
light-weight Bourne-compatible shell. Ash 0.2 has some bugs that are |
light-weight Bourne-compatible shell. Ash 0.2 has some bugs that are |
8300 |
fixed in the 0.3.x series, but portable shell scripts should workaround |
fixed in the 0.3.x series, but portable shell scripts should work around |
8301 |
them, since version 0.2 is still shipped with many @sc{gnu}/Linux |
them, since version 0.2 is still shipped with many @sc{gnu}/Linux |
8302 |
distributions. |
distributions. |
8303 |
|
|
8331 |
@cindex Bash |
@cindex Bash |
8332 |
To detect whether you are running @command{bash}, test if |
To detect whether you are running @command{bash}, test if |
8333 |
@code{BASH_VERSION} is set. To disable its extensions and require |
@code{BASH_VERSION} is set. To disable its extensions and require |
8334 |
@sc{posix} compatibility, run @samp{set -o posix}. @xref{Bash POSIX |
@sc{posix} compatibility, run @samp{set -o posix}. @xref{Bash POSIX |
8335 |
Mode,, Bash @sc{posix} Mode, bash, The GNU Bash Reference Manual}, for |
Mode,, Bash @sc{posix} Mode, bash, The GNU Bash Reference Manual}, for |
8336 |
details. |
details. |
8337 |
|
|
8356 |
To detect whether you are running @command{zsh}, test if |
To detect whether you are running @command{zsh}, test if |
8357 |
@code{ZSH_VERSION} is set. By default @command{zsh} is @emph{not} |
@code{ZSH_VERSION} is set. By default @command{zsh} is @emph{not} |
8358 |
compatible with the Bourne shell: you have to run @samp{emulate sh} and |
compatible with the Bourne shell: you have to run @samp{emulate sh} and |
8359 |
set @code{NULLCMD} to @samp{:}. @xref{Compatibility,, Compatibility, |
set @code{NULLCMD} to @samp{:}. @xref{Compatibility,, Compatibility, |
8360 |
zsh, The Z Shell Manual}, for details. |
zsh, The Z Shell Manual}, for details. |
8361 |
|
|
8362 |
Zsh 3.0.8 is the native @command{/bin/sh} on Mac OS X 10.0.3. |
Zsh 3.0.8 is the native @command{/bin/sh} on Mac OS X 10.0.3. |
8644 |
|
|
8645 |
@item Invalid characters |
@item Invalid characters |
8646 |
Some characters are invalid in @sc{dos} filenames, and should therefore |
Some characters are invalid in @sc{dos} filenames, and should therefore |
8647 |
be avoided. In a @sc{lfn} environment, these are @samp{/}, @samp{\}, |
be avoided. In a @sc{lfn} environment, these are @samp{/}, @samp{\}, |
8648 |
@samp{?}, @samp{*}, @samp{:}, @samp{<}, @samp{>}, @samp{|} and @samp{"}. |
@samp{?}, @samp{*}, @samp{:}, @samp{<}, @samp{>}, @samp{|} and @samp{"}. |
8649 |
In a @sc{sfn} environment, other characters are also invalid. These |
In a @sc{sfn} environment, other characters are also invalid. These |
8650 |
include @samp{+}, @samp{,}, @samp{[} and @samp{]}. |
include @samp{+}, @samp{,}, @samp{[} and @samp{]}. |
8654 |
@section Shell Substitutions |
@section Shell Substitutions |
8655 |
|
|
8656 |
Contrary to a persistent urban legend, the Bourne shell does not |
Contrary to a persistent urban legend, the Bourne shell does not |
8657 |
systematically split variables and backquoted expressions, in particular |
systematically split variables and back-quoted expressions, in particular |
8658 |
on the right-hand side of assignments and in the argument of @code{case}. |
on the right-hand side of assignments and in the argument of @code{case}. |
8659 |
For instance, the following code: |
For instance, the following code: |
8660 |
|
|
8681 |
since not all shells properly understand @code{"`@dots{}"@dots{}"@dots{}`"}. |
since not all shells properly understand @code{"`@dots{}"@dots{}"@dots{}`"}. |
8682 |
Worse yet, not all shells understand @code{"`@dots{}\"@dots{}\"@dots{}`"} |
Worse yet, not all shells understand @code{"`@dots{}\"@dots{}\"@dots{}`"} |
8683 |
the same way. There is just no portable way to use double-quoted |
the same way. There is just no portable way to use double-quoted |
8684 |
strings inside double-quoted backquoted expressions (pfew!). |
strings inside double-quoted back-quoted expressions (pfew!). |
8685 |
|
|
8686 |
@table @code |
@table @code |
8687 |
@item $@@ |
@item $@@ |
8700 |
|
|
8701 |
@example |
@example |
8702 |
zsh $ @kbd{emulate sh} |
zsh $ @kbd{emulate sh} |
8703 |
zsh $ @kbd{for i in "$@"; do echo $i; done} |
zsh $ @kbd{for i in "$@@"; do echo $i; done} |
8704 |
Hello World |
Hello World |
8705 |
! |
! |
8706 |
zsh $ @kbd{for i in $@{1+"$@@"@}; do echo $i; done} |
zsh $ @kbd{for i in $@{1+"$@@"@}; do echo $i; done} |
8792 |
|
|
8793 |
@noindent |
@noindent |
8794 |
will set @var{var} to @samp{M-yM-uM-,M-yM-aM-a}, i.e., the 8th bit of |
will set @var{var} to @samp{M-yM-uM-,M-yM-aM-a}, i.e., the 8th bit of |
8795 |
each char will be set. You won't observe the phenomenon using a simple |
each char will be set. You won't observe the phenomenon using a simple |
8796 |
@samp{echo $var} since apparently the shell resets the 8th bit when it |
@samp{echo $var} since apparently the shell resets the 8th bit when it |
8797 |
expands $var. Here are two means to make this shell confess its sins: |
expands $var. Here are two means to make this shell confess its sins: |
8798 |
|
|
9216 |
@node Limitations of Builtins |
@node Limitations of Builtins |
9217 |
@section Limitations of Shell Builtins |
@section Limitations of Shell Builtins |
9218 |
|
|
9219 |
No, no, we are serious: some shells do have limitations! :) |
No, no, we are serious: some shells do have limitations! :) |
9220 |
|
|
9221 |
You should always keep in mind that any built-in or command may support |
You should always keep in mind that any built-in or command may support |
9222 |
options, and therefore have a very different behavior with arguments |
options, and therefore have a very different behavior with arguments |
9322 |
@samp{echo}. |
@samp{echo}. |
9323 |
|
|
9324 |
Don't expect any option. @xref{Preset Output Variables}, @code{ECHO_N} |
Don't expect any option. @xref{Preset Output Variables}, @code{ECHO_N} |
9325 |
etc. for a means to simulate @option{-c}. |
etc.@: for a means to simulate @option{-c}. |
9326 |
|
|
9327 |
Do not use backslashes in the arguments, as there is no consensus on |
Do not use backslashes in the arguments, as there is no consensus on |
9328 |
their handling. On @samp{echo '\n' | wc -l}, the @command{sh} of |
their handling. On @samp{echo '\n' | wc -l}, the @command{sh} of |
9756 |
$unset PS1 || PS1='$ ' |
$unset PS1 || PS1='$ ' |
9757 |
@end example |
@end example |
9758 |
|
|
9759 |
@xref{Special Shell Variables}, for some neutralizing values. Also, see |
@xref{Special Shell Variables}, for some neutralizing values. Also, see |
9760 |
@ref{Limitations of Builtins}, documentation of @command{export}, for |
@ref{Limitations of Builtins}, documentation of @command{export}, for |
9761 |
the case of environment variables. |
the case of environment variables. |
9762 |
@end table |
@end table |
9940 |
@quotation |
@quotation |
9941 |
No, under some older flavors of Unix, leading @samp{//} is a special |
No, under some older flavors of Unix, leading @samp{//} is a special |
9942 |
path name: it refers to a ``super-root'' and is used to access other |
path name: it refers to a ``super-root'' and is used to access other |
9943 |
machines' files. Leading @samp{///}, @samp{////}, etc. are equivalent |
machines' files. Leading @samp{///}, @samp{////}, etc.@: are equivalent |
9944 |
to @samp{/}; but leading @samp{//} is special. I think this tradition |
to @samp{/}; but leading @samp{//} is special. I think this tradition |
9945 |
started with Apollo Domain/OS, an OS that is still in use on some older |
started with Apollo Domain/OS, an OS that is still in use on some older |
9946 |
hosts. |
hosts. |
9961 |
replacement @code{grep -E}. To work around this problem, invoke |
replacement @code{grep -E}. To work around this problem, invoke |
9962 |
@code{AC_PROG_EGREP} and then use @code{$EGREP}. |
@code{AC_PROG_EGREP} and then use @code{$EGREP}. |
9963 |
|
|
9964 |
The empty alternative is not portable, use @samp{?} instead. For |
The empty alternative is not portable, use @samp{?} instead. For |
9965 |
instance with Digital Unix v5.0: |
instance with Digital Unix v5.0: |
9966 |
|
|
9967 |
@example |
@example |
10034 |
unfortunately this behaves exactly as the original expression, see the |
unfortunately this behaves exactly as the original expression, see the |
10035 |
@samp{@command{expr} (@samp{:})} entry for more information. |
@samp{@command{expr} (@samp{:})} entry for more information. |
10036 |
|
|
10037 |
Older @command{expr} implementations (e.g. SunOS 4 @command{expr} and |
Older @command{expr} implementations (e.g., SunOS 4 @command{expr} and |
10038 |
Solaris 8 @command{/usr/ucb/expr}) have a silly length limit that causes |
Solaris 8 @command{/usr/ucb/expr}) have a silly length limit that causes |
10039 |
@command{expr} to fail if the matched substring is longer than 120 |
@command{expr} to fail if the matched substring is longer than 120 |
10040 |
bytes. In this case, you might want to fall back on @samp{echo|sed} if |
bytes. In this case, you might want to fall back on @samp{echo|sed} if |
10069 |
|
|
10070 |
@noindent |
@noindent |
10071 |
will output @samp{a} on most hosts, but @samp{aa} on @sc{qnx} 4.25. A |
will output @samp{a} on most hosts, but @samp{aa} on @sc{qnx} 4.25. A |
10072 |
simple work around consists in testing @command{expr} and use a variable |
simple workaround consists in testing @command{expr} and use a variable |
10073 |
set to @command{expr} or to @command{false} according to the result. |
set to @command{expr} or to @command{false} according to the result. |
10074 |
|
|
10075 |
|
|
10084 |
|
|
10085 |
@item @command{find} |
@item @command{find} |
10086 |
@c ----------------- |
@c ----------------- |
10087 |
The option @option{-maxdepth} seems to be GNU specific. Tru64 v5.1, |
The option @option{-maxdepth} seems to be GNU specific. Tru64 v5.1, |
10088 |
NetBSD 1.5 and Solaris 2.5 @command{find} commands do not understand it. |
NetBSD 1.5 and Solaris 2.5 @command{find} commands do not understand it. |
10089 |
|
|
10090 |
The replacement of @samp{@{@}} is guaranteed only if the argument is |
The replacement of @samp{@{@}} is guaranteed only if the argument is |
10126 |
For versions of the DJGPP before 2.04, @command{ln} emulates soft links |
For versions of the DJGPP before 2.04, @command{ln} emulates soft links |
10127 |
for executables by generating a stub that in turn calls the real |
for executables by generating a stub that in turn calls the real |
10128 |
program. This feature also works with nonexistent files like in the |
program. This feature also works with nonexistent files like in the |
10129 |
Unix spec. So @samp{ln -s file link} will generate @file{link.exe}, |
Unix spec. So @samp{ln -s file link} will generate @file{link.exe}, |
10130 |
which will attempt to call @file{file.exe} if run. But this feature only |
which will attempt to call @file{file.exe} if run. But this feature only |
10131 |
works for executables, so @samp{cp -p} is used instead for these |
works for executables, so @samp{cp -p} is used instead for these |
10132 |
systems. DJGPP versions 2.04 and later have full symlink support. |
systems. DJGPP versions 2.04 and later have full symlink support. |
10133 |
|
|
10189 |
Moving directories across mount points is not portable, use @command{cp} |
Moving directories across mount points is not portable, use @command{cp} |
10190 |
and @command{rm}. |
and @command{rm}. |
10191 |
|
|
10192 |
Moving/Deleting open files isn't portable. The following can't be done |
Moving/Deleting open files isn't portable. The following can't be done |
10193 |
on DOS/WIN32: |
on DOS/WIN32: |
10194 |
|
|
10195 |
@example |
@example |
10228 |
|
|
10229 |
Alternation, @samp{\|}, is common but @sc{posix}.2 does not require its |
Alternation, @samp{\|}, is common but @sc{posix}.2 does not require its |
10230 |
support, so it should be avoided in portable scripts. Solaris 8 |
support, so it should be avoided in portable scripts. Solaris 8 |
10231 |
@command{sed} does not support alternation; e.g. @samp{sed '/a\|b/d'} |
@command{sed} does not support alternation; e.g., @samp{sed '/a\|b/d'} |
10232 |
deletes only lines that contain the literal string @samp{a|b}. |
deletes only lines that contain the literal string @samp{a|b}. |
10233 |
|
|
10234 |
Anchors (@samp{^} and @samp{$}) inside groups are not portable. |
Anchors (@samp{^} and @samp{$}) inside groups are not portable. |
10318 |
deleted |
deleted |
10319 |
@end example |
@end example |
10320 |
|
|
10321 |
Why? When processing 1, a matches, therefore sets the t flag, b jumps to |
Why? When processing 1, a matches, therefore sets the t flag, b jumps to |
10322 |
d, and the output is produced. When processing line 2, the t flag is |
d, and the output is produced. When processing line 2, the t flag is |
10323 |
still set (this is the bug). Line a fails to match, but @command{sed} |
still set (this is the bug). Line a fails to match, but @command{sed} |
10324 |
is not supposed to clear the t flag when a substitution fails. Line b |
is not supposed to clear the t flag when a substitution fails. Line b |
10657 |
@example |
@example |
10658 |
VPATH = ../src |
VPATH = ../src |
10659 |
.c.o: |
.c.o: |
10660 |
cc -c $< -o $@ |
cc -c $< -o $@@ |
10661 |
@end example |
@end example |
10662 |
|
|
10663 |
@noindent |
@noindent |
10669 |
@example |
@example |
10670 |
VPATH = ../src |
VPATH = ../src |
10671 |
.c.o: |
.c.o: |
10672 |
cc -c `test -f $< || echo ../src/`$< -o $@ |
cc -c `test -f $< || echo ../src/`$< -o $@@ |
10673 |
@end example |
@end example |
10674 |
|
|
10675 |
This kludge was introduced in Automake in 2000, but the exact context |
This kludge was introduced in Automake in 2000, but the exact context |
10900 |
@end example |
@end example |
10901 |
|
|
10902 |
Another point worth mentioning is that once GNU @command{make} has |
Another point worth mentioning is that once GNU @command{make} has |
10903 |
decided to ignore a @code{VPATH} filename (e.g. it ignored |
decided to ignore a @code{VPATH} filename (e.g., it ignored |
10904 |
@file{../bar.x} in the above example) it will continue to ignore it when |
@file{../bar.x} in the above example) it will continue to ignore it when |
10905 |
the target occurs as a prerequisite of another rule. |
the target occurs as a prerequisite of another rule. |
10906 |
|
|
11697 |
@var{file} and @var{template} may be @samp{-} in which case the standard |
@var{file} and @var{template} may be @samp{-} in which case the standard |
11698 |
output and/or standard input, respectively, is used. If a |
output and/or standard input, respectively, is used. If a |
11699 |
@var{template} filename is relative, it is first looked for in the build |
@var{template} filename is relative, it is first looked for in the build |
11700 |
tree, and then in the source tree. @xref{Configuration Actions}, for |
tree, and then in the source tree. @xref{Configuration Actions}, for |
11701 |
more details. |
more details. |
11702 |
|
|
11703 |
This option and the following ones provide one way for separately |
This option and the following ones provide one way for separately |
11869 |
if @file{./acconfig.h} contains the string @samp{@@BOTTOM@@}, |
if @file{./acconfig.h} contains the string @samp{@@BOTTOM@@}, |
11870 |
@command{autoheader} copies the lines after that line to the end of the |
@command{autoheader} copies the lines after that line to the end of the |
11871 |
file it generates. Either or both of those strings may be omitted. An |
file it generates. Either or both of those strings may be omitted. An |
11872 |
even older alternate way to produce the same effect in jurasik versions |
even older alternate way to produce the same effect in ancient versions |
11873 |
of Autoconf is to create the files @file{@var{file}.top} (typically |
of Autoconf is to create the files @file{@var{file}.top} (typically |
11874 |
@file{config.h.top}) and/or @file{@var{file}.bot} in the current |
@file{config.h.top}) and/or @file{@var{file}.bot} in the current |
11875 |
directory. If they exist, @command{autoheader} copies them to the |
directory. If they exist, @command{autoheader} copies them to the |
12125 |
|
|
12126 |
@defmac AC_DYNIX_SEQ |
@defmac AC_DYNIX_SEQ |
12127 |
@acindex DYNIX_SEQ |
@acindex DYNIX_SEQ |
12128 |
If on Dynix/PTX (Sequent @sc{unix}), add @option{-lseq} to output variable |
If on DYNIX/ptx, add @option{-lseq} to output variable |
12129 |
@code{LIBS}. This macro used to be defined as |
@code{LIBS}. This macro used to be defined as |
12130 |
|
|
12131 |
@example |
@example |
12596 |
@acindex SYS_RESTARTABLE_SYSCALLS |
@acindex SYS_RESTARTABLE_SYSCALLS |
12597 |
@cvindex HAVE_RESTARTABLE_SYSCALLS |
@cvindex HAVE_RESTARTABLE_SYSCALLS |
12598 |
If the system automatically restarts a system call that is interrupted |
If the system automatically restarts a system call that is interrupted |
12599 |
by a signal, define @code{HAVE_RESTARTABLE_SYSCALLS}. This macro does |
by a signal, define @code{HAVE_RESTARTABLE_SYSCALLS}. This macro does |
12600 |
not check if system calls are restarted in general--it tests whether a |
not check if system calls are restarted in general--it tests whether a |
12601 |
signal handler installed with @code{signal} (but not @code{sigaction}) |
signal handler installed with @code{signal} (but not @code{sigaction}) |
12602 |
causes system calls to be restarted. It does not test if system calls |
causes system calls to be restarted. It does not test if system calls |
12603 |
can be restarted when interrupted by signals that have no handler. |
can be restarted when interrupted by signals that have no handler. |
12604 |
|
|
12605 |
These days portable programs should use @code{sigaction} with |
These days portable programs should use @code{sigaction} with |
13170 |
|
|
13171 |
|
|
13172 |
@node AC_LIBOBJ vs LIBOBJS |
@node AC_LIBOBJ vs LIBOBJS |
13173 |
@subsection @code{AC_LIBOBJ} vs. @code{LIBOBJS} |
@subsection @code{AC_LIBOBJ} vs.@: @code{LIBOBJS} |
13174 |
|
|
13175 |
Up to Autoconf 2.13, the replacement of functions was triggered via the |
Up to Autoconf 2.13, the replacement of functions was triggered via the |
13176 |
variable @code{LIBOBJS}. Since Autoconf 2.50, the macro |
variable @code{LIBOBJS}. Since Autoconf 2.50, the macro |
13701 |
@defmac AC_CONFIG_TESTDIR (@var{directory}, @dvar{test-path, @var{directory}}) |
@defmac AC_CONFIG_TESTDIR (@var{directory}, @dvar{test-path, @var{directory}}) |
13702 |
@acindex CONFIG_TESTDIR |
@acindex CONFIG_TESTDIR |
13703 |
An Autotest test suite is to be configured in @var{directory}. This |
An Autotest test suite is to be configured in @var{directory}. This |
13704 |
macro requires the instanciation of @file{@var{directory}/atconfig} from |
macro requires the instantiation of @file{@var{directory}/atconfig} from |
13705 |
@file{@var{directory}/atconfig.in}, and sets the default |
@file{@var{directory}/atconfig.in}, and sets the default |
13706 |
@code{AUTOTEST_PATH} to @var{test-path} (@pxref{testsuite Invocation}). |
@code{AUTOTEST_PATH} to @var{test-path} (@pxref{testsuite Invocation}). |
13707 |
@end defmac |
@end defmac |
14000 |
the @href{http://www.gnu.org/software/ac-archive/, Autoconf Macro |
the @href{http://www.gnu.org/software/ac-archive/, Autoconf Macro |
14001 |
Archive}. |
Archive}. |
14002 |
|
|
14003 |
This solution is not conformant with the GNU Coding Standards. |
This solution does not conform to the GNU Coding Standards. |
14004 |
|
|
14005 |
@item |
@item |
14006 |
Note that all the previous solutions hard wire the absolute path to |
Note that all the previous solutions hard wire the absolute path to |