autoconf-patches
[Top][All Lists]
Advanced

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

Re: "./configure --help" doesn't mention LIBS


From: Ralf Wildenhues
Subject: Re: "./configure --help" doesn't mention LIBS
Date: Wed, 20 Sep 2006 18:03:50 +0200
User-agent: Mutt/1.5.13 (2006-09-01)

Hello Olly,

* Olly Betts wrote on Tue, Sep 19, 2006 at 01:21:58AM CEST:
> 
> After mail from a user who'd tried to specify "-l<library>" in LDFLAGS
> I was suprised to realise that the output of "./configure --help"
> doesn't mention LIBS at all.  I think it should
[...]
> Digging deeper, I noticed LIBS doesn't seem to get marked as precious,
> which I think must be an oversight.

Thanks for the report.  The documentation even already lists LIBS as
precious (Preset Output Variables: ...They are all precious...).

OK to install?

Cheers,
Ralf

        * lib/autoconf/c.m4 (_AC_ARG_VAR_LDFLAGS): Update comment.
        (_AC_ARG_VAR_LIBS): New macro: let LIBS be precious.
        (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Call _AC_ARG_VAR_LIBS.
        * lib/autoconf/fortran.m4 (AC_PROG_F77, AC_PROG_FC): Likewise.
        Report by Olly Betts.

Index: lib/autoconf/c.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/c.m4,v
retrieving revision 1.234
diff -u -r1.234 c.m4
--- lib/autoconf/c.m4   24 Aug 2006 18:08:17 -0000      1.234
+++ lib/autoconf/c.m4   20 Sep 2006 16:00:09 -0000
@@ -389,13 +389,21 @@
 # _AC_ARG_VAR_LDFLAGS
 # -------------------
 # Document and register LDFLAGS, which is used by
-# AC_PROG_{CC, CXX, F77}.
+# AC_PROG_{CC, CXX, F77, FC, OBJC}.
 AC_DEFUN([_AC_ARG_VAR_LDFLAGS],
 [AC_ARG_VAR([LDFLAGS],
            [linker flags, e.g. -L<lib dir> if you have libraries in a
             nonstandard directory <lib dir>])])
 
 
+# _AC_ARG_VAR_LIBS
+# ----------------
+# Document and register LIBS, which is used by
+# AC_PROG_{CC, CXX, F77, FC, OBJS}.
+AC_DEFUN([_AC_ARG_VAR_LIBS],
+[AC_ARG_VAR([LIBS],
+           [libraries to pass to the linker, e.g. -l<library>])])
+
 
 # AC_LANG_PREPROC(C)
 # -------------------
@@ -517,6 +525,7 @@
 AC_ARG_VAR([CC],     [C compiler command])dnl
 AC_ARG_VAR([CFLAGS], [C compiler flags])dnl
 _AC_ARG_VAR_LDFLAGS()dnl
+_AC_ARG_VAR_LIBS()dnl
 _AC_ARG_VAR_CPPFLAGS()dnl
 m4_ifval([$1],
       [AC_CHECK_TOOLS(CC, [$1])],
@@ -756,6 +765,7 @@
 AC_ARG_VAR([CXX],      [C++ compiler command])dnl
 AC_ARG_VAR([CXXFLAGS], [C++ compiler flags])dnl
 _AC_ARG_VAR_LDFLAGS()dnl
+_AC_ARG_VAR_LIBS()dnl
 _AC_ARG_VAR_CPPFLAGS()dnl
 _AC_ARG_VAR_PRECIOUS([CCC])dnl
 if test -z "$CXX"; then
@@ -926,6 +936,7 @@
 AC_ARG_VAR([OBJC],      [Objective C compiler command])dnl
 AC_ARG_VAR([OBJCFLAGS], [Objective C compiler flags])dnl
 _AC_ARG_VAR_LDFLAGS()dnl
+_AC_ARG_VAR_LIBS()dnl
 _AC_ARG_VAR_CPPFLAGS()dnl
 _AC_ARG_VAR_PRECIOUS([OBJC])dnl
 AC_CHECK_TOOLS(OBJC,
Index: lib/autoconf/fortran.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/fortran.m4,v
retrieving revision 1.212
diff -u -r1.212 fortran.m4
--- lib/autoconf/fortran.m4     5 Sep 2006 17:17:31 -0000       1.212
+++ lib/autoconf/fortran.m4     20 Sep 2006 16:00:09 -0000
@@ -392,6 +392,7 @@
 AC_ARG_VAR([F77],    [Fortran 77 compiler command])dnl
 AC_ARG_VAR([FFLAGS], [Fortran 77 compiler flags])dnl
 _AC_ARG_VAR_LDFLAGS()dnl
+_AC_ARG_VAR_LIBS()dnl
 _AC_PROG_FC([Fortran 77], [$1])
 G77=`test $ac_compiler_gnu = yes && echo yes`
 AC_LANG_POP(Fortran 77)dnl
@@ -407,6 +408,7 @@
 AC_ARG_VAR([FC],    [Fortran compiler command])dnl
 AC_ARG_VAR([FCFLAGS], [Fortran compiler flags])dnl
 _AC_ARG_VAR_LDFLAGS()dnl
+_AC_ARG_VAR_LIBS()dnl
 _AC_PROG_FC([$2], [$1])
 AC_LANG_POP(Fortran)dnl
 ])# AC_PROG_FC




reply via email to

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