[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06-polish.patch
From: |
Akim Demaille |
Subject: |
06-polish.patch |
Date: |
Sun, 27 Oct 2002 19:15:13 +0100 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* doc/autoconf.texi: More AC_MSG_FAILURE promotion.
* lib/autoconf/fortran.m4 (_AC_F77_NAME_MANGLING):
Die when a simple Fortran program cannot be compiled.
* lib/autoconf/lang.m4 (AC_LANG_CALL, AC_LANG_FUNC_LINK_TRY):
Issue a warning if no function is given.
Index: NEWS
--- NEWS Sun, 27 Oct 2002 17:17:47 +0100 akim
+++ NEWS Sun, 27 Oct 2002 18:42:53 +0100 akim
@@ -16,6 +16,11 @@
This sections explains how to write good test sources to use with
AC_COMPILE_IFELSE etc. It documents AC_LANG_PROGRAMS and so forth.
+- AC_FOO_IFELSE vs. AC_TRY_FOO
+
+ Explains why Autoconf moves from AC_TRY_COMPILE etc. to
+ AC_COMPILE_IFELSE and AC_LANG_PROGRAM etc.
+
** autoreconf
- Is more robust to different Gettext installations.
Index: doc/autoconf.texi
--- doc/autoconf.texi Sun, 27 Oct 2002 18:41:01 +0100 akim
+++ doc/autoconf.texi Sun, 27 Oct 2002 19:15:29 +0100 akim
@@ -3314,8 +3314,8 @@ @node Libraries
@acindex SEARCH_LIBS
Search for a library defining @var{function} if it's not already
available. This equates to calling
address@hidden([AC_LANG_CALL(address@hidden)])} first with no
-libraries, then for each library listed in @var{search-libs}.
address@hidden([AC_LANG_CALL([], address@hidden)])} first with
+no libraries, then for each library listed in @var{search-libs}.
Add @address@hidden to @code{LIBS} for the first library found
to contain @var{function}, and run @var{action-if-found}. If the
@@ -5850,13 +5850,12 @@ @node Generating Sources
@end defmac
address@hidden AC_LANG_FUNC_LINK_TRY (@var{prologue}, @var{function})
address@hidden AC_LANG_FUNC_LINK_TRY (@var{function})
@acindex LANG_FUNC_LINK_TRY
-Expands into a source file which consists of the @var{prologue}, and
-then a pseudo use of the @var{function} as body of the main function
-(e.g., @code{main} in C): a simple (function pointer) assignment. Since
-it uses @code{AC_LANG_PROGRAMS}, the feature of the latter are
-available.
+Expands into a source file which consists of a pseudo use of the
address@hidden as body of the main function (e.g., @code{main} in C): a
+simple (function pointer) assignment. Since it uses
address@hidden, the feature of the latter are available.
As @code{AC_LANG_CALL}, this macro is documented only for completeness.
It is considered to be severely broken, and in the future will be
@@ -5969,8 +5968,10 @@ @node Running the Compiler
compiling. If Fortran 77 is the currently selected language then
@code{FFLAGS} will be used when compiling.
-This macro does not try to link; use @code{AC_LINK_IFELSE} if you need
-to do that (@pxref{Running the Linker}).
+It is customary to report unexpected failures with
address@hidden This macro does not try to link; use
address@hidden if you need to do that (@pxref{Running the
+Linker}).
@end defmac
@node Running the Linker
@@ -6018,8 +6019,9 @@ @node Running the Linker
compiling. If Fortran 77 is the currently selected language then
@code{FFLAGS} will be used when compiling.
-This macro does not try to execute the program; use @code{AC_RUN_IFELSE}
-if you need to do that (@pxref{Run Time}).
+It is customary to report unexpected failures with
address@hidden This macro does not try to execute the program;
+use @code{AC_RUN_IFELSE} if you need to do that (@pxref{Run Time}).
@end defmac
@@ -6063,6 +6065,9 @@ @node Run Time
the failure of its compilation. In other words, use this feature if
sadist only, it was reestablished because the Autoconf maintainers grew
tired of receiving ``bug reports''.
+
+It is customary to report unexpected failures with
address@hidden
@end defmac
Try to provide a pessimistic default value to use when cross-compiling
Index: lib/autoconf/fortran.m4
--- lib/autoconf/fortran.m4 Sun, 27 Oct 2002 18:08:52 +0100 akim
+++ lib/autoconf/fortran.m4 Sun, 27 Oct 2002 19:05:13 +0100 akim
@@ -385,7 +385,7 @@ AC_DEFUN([_AC_PROG_F77_V_OUTPUT],
# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
# /foo, /bar, and /baz are search directories for the Fortran linker.
# Here, we change these into -L/foo -L/bar -L/baz (and put it first):
-ac_f77_v_output="`echo $ac_f77_v_output |
+ac_f77_v_output="`echo $ac_f77_v_output |
grep 'LPATH is:' |
sed 's,.*LPATH is\(: *[[^ ]]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output"
@@ -735,7 +735,8 @@ AC_DEFUN([_AC_F77_NAME_MANGLING],
LIBS=$ac_save_LIBS
AC_LANG_POP(C)dnl
- rm -f cf77_test* conftest*])
+ rm -f cf77_test* conftest*],
+ [AC_MSG_FAILURE([cannot compile a simple Fortran program])])
AC_LANG_POP(Fortran 77)dnl
])
])# _AC_F77_NAME_MANGLING
Index: lib/autoconf/lang.m4
--- lib/autoconf/lang.m4 Sun, 27 Oct 2002 17:17:47 +0100 akim
+++ lib/autoconf/lang.m4 Sun, 27 Oct 2002 19:13:45 +0100 akim
@@ -231,14 +231,16 @@ AC_DEFUN([AC_LANG_PROGRAM],
# --------------------------------
# Call the FUNCTION.
AC_DEFUN([AC_LANG_CALL],
-[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
+[m4_ifval([$2], [], [m4_warn([syntax], [$0: no function given])])dnl
+_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
# AC_LANG_FUNC_LINK_TRY(FUNCTION)
# -------------------------------
# Produce a source which links correctly iff the FUNCTION exists.
AC_DEFUN([AC_LANG_FUNC_LINK_TRY],
-[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
+[m4_ifval([$1], [], [m4_warn([syntax], [$0: no function given])])dnl
+_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
# AC_LANG_BOOL_COMPILE_TRY(PROLOGUE, EXPRESSION)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 06-polish.patch,
Akim Demaille <=