--- Begin Message ---
Subject: |
AC_CHECK_LIB small problem which Solaris C compiler |
Date: |
Wed, 11 Apr 2001 15:55:22 +0200 |
Hi,
I just tested CVS autoconf under Solaris 2.5.1 and found a small
problem with AC_CHECK_LIB macro.
Under some circumstances, some temporary files remains, which generate
testsuite failures (by example with `AC_IRIX_SUN' macro, see
testsuite.log below).
This problem appears if AC_CHECK_LIB result is `no'.
AC_CHECK_LIB(m, log) ... works fine
AC_CHECK_LIB(m, log200) ... problem
I tracked down the problem and found that Solaris cc compiler do not
remove temporary compilations files if link pass fails.
One solution can be to force cleaning of `conftest.$ac_objext' in
`_AC_LINK_IFELSE' macro.
NB: configure script remove this files at the end using the trap.
=====================================
Test suite log for GNU Autoconf 2.49e
=====================================
/home/sis/njoly/autoconf-2.49e/ChangeLog :
| 2001-04-10 Lars J. Aas <address@hidden>
|
| * Makefile.am: AC_SUBST fixes for PACKAGE_NAME, VERSION, PACKAGE...
| * configure.in: Moved here.
| Suggested by Akim Demaille and Raja R Harinath.
|
| 2001-04-10 Lars J. Aas <address@hidden>
|
| * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Re-enable logging to
| `config.log' from `config.status', but delay logging till after
Failed tests:
87: acspecific.at:27 AC_IRIX_SUN
## ---------- ##
## Platform. ##
## ---------- ##
hostname = ptolemee.pasteur.fr
uname -m = sun4u
uname -r = 5.5.1
uname -s = SunOS
uname -v = Generic_103640-12
/usr/bin/uname -p = sparc
/bin/uname -X = unknown
/bin/arch = sun4
/usr/bin/arch -k = sun4u
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH =
/home/sis/njoly/autoconf-2.49e/tests:/home/sis/njoly/autoconf-2.49e:/home/sis/njoly/bin:/opt/local/bin:/usr/sbin:/usr/bin:/usr/openwin/bin:/usr/ccs/bin:/opt/SUNWspro/bin:/usr/ucb
=================================
Test suite for GNU Autoconf 2.49e
=================================
87. ./acspecific.at:27: testing AC_IRIX_SUN...
./acspecific.at:27: autoconf --autoconf-dir .. -l $at_srcdir
./acspecific.at:27: autoheader --autoconf-dir .. -l $at_srcdir
./acspecific.at:27: top_srcdir=$top_srcdir ./configure
stdout:
checking for gcc... no
checking for cc... cc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... no
checking whether cc accepts -g... yes
checking for getmntent in -lsun... no
checking for getmntent in -lseq... no
checking for getmntent in -lgen... yes
checking for getmntent... yes
checking for getpwnam in -lsun... no
configure: creating ./config.status
config.status: creating config.h
./acspecific.at:27: cat state-env.after
./acspecific.at:27: cat state-ls.after
20a21
> conftest.o
87. ./acspecific.at:27: FAILED near `acspecific.at:27'
--
Nicolas Joly
Informatique Scientifique
Institut Pasteur, Paris.
--- End Message ---
--- Begin Message ---
Subject: |
Re: AC_CHECK_LIB small problem with Solaris C compiler |
Date: |
Thu, 12 Apr 2001 17:12:38 +0200 |
On Wed, Apr 11, 2001 at 03:55:22PM +0200, Nicolas Joly wrote:
>
> I just tested CVS autoconf under Solaris 2.5.1 and found a small
> problem with AC_CHECK_LIB macro.
[...]
> I tracked down the problem and found that Solaris cc compiler do not
> remove temporary compilations files if link pass fails.
>
> One solution can be to force cleaning of `conftest.$ac_objext' in
> `_AC_LINK_IFELSE' macro.
Here is my proposal :
Index: ChangeLog
===================================================================
RCS file: /cvs/autoconf/ChangeLog,v
retrieving revision 1.1354
diff -u -r1.1354 ChangeLog
--- ChangeLog 2001/04/12 03:05:28 1.1354
+++ ChangeLog 2001/04/12 14:19:46
@@ -1,3 +1,8 @@
+2001-04-12 Nicolas Joly <address@hidden>
+
+ * acgeneral.m4 (_AC_LINK_IFELSE): Be sure to remove temporary
+ `conftest.$ac_objext', as some compilers may forget it.
+
2001-04-11 Steven G. Johnson <address@hidden>
* doc/autoconf.texi (AC_F77_WRAPPERS): Mention C++ as well as C.
Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.710
diff -u -r1.710 acgeneral.m4
--- acgeneral.m4 2001/04/11 16:29:15 1.710
+++ acgeneral.m4 2001/04/12 14:19:50
@@ -2857,7 +2857,7 @@
[echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
m4_ifvaln([$3], [$3])dnl])[]dnl
-rm -f conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
+rm -f conftest.$ac_objext conftest$ac_exeext m4_ifval([$1],
[conftest.$ac_ext])[]dnl
])# _AC_LINK_IFELSE
--
Nicolas Joly
Informatique Scientifique
Institut Pasteur, Paris.
--- End Message ---