[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 1-gary-leopard-dSYM-removal.patch
From: |
Ralf Wildenhues |
Subject: |
Re: 1-gary-leopard-dSYM-removal.patch |
Date: |
Thu, 20 Mar 2008 21:21:34 +0100 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
Hello, and sorry for the delay,
picking up this thread:
<http://thread.gmane.org/gmane.comp.sysutils.autoconf.patches/5273/focus=5334>
* Gary V. Vaughan wrote on Fri, Jan 18, 2008 at 10:12:09AM CET:
>
> I thought it better to remove all of the file droppings we check for in
> _AC_COMPILER_OBJEXT_REJECT, incase I move to an OS that drops one of
> the other files and try to run make distcheck for libtool...
Well, but there is no need for a loop here with several rm commands.
> Note that it is actually an a.out.dSYM file that distcheck chokes on, so
> removing conftest.dSYM is no help :-(
Thanks for this information.
> "Gary V. Vaughan" writes:
>
> >> another way I thought of doing it was to find the sites that call:
> >>
> >> m4_expand_once([_AC_COMPILER_EXEEXT])
> >> m4_expand_once([_AC_COMPILER_OBJEXT])
> >>
> >> And replace with a single:
> >>
> >> m4_expand_once([_AC_COMPILER_CHECKS])
That would hurt GCC (and AC_NO_EXECUTABLES, which is Autoconf's copy of
GCC_NO_EXECUTABLES). It needs those two things to be separate.
Here's a simple patch I've come up with, it passes the Autoconf
testsuite on several systems including Leopard (thanks Peter!),
I will apply it soon unless I hear complaints.
Cheers,
Ralf
2008-03-20 Ralf Wildenhues <address@hidden>
* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT): Remove a.out.dSYM
directory created on darwin.
(AC_NO_EXECUTABLES): Likewise; also remove objects which may be
left over from a broken link.
* tests/c.at (AC_NO_EXECUTABLES (working linker))
(AC_NO_EXECUTABLES (broken linker)): New tests.
Report by Gary V. Vaughan.
diff --git a/lib/autoconf/lang.m4 b/lib/autoconf/lang.m4
index f17aa8c..c67a34c 100644
--- a/lib/autoconf/lang.m4
+++ b/lib/autoconf/lang.m4
@@ -356,6 +356,7 @@ if _AC_DO_VAR(ac_link); then
ac_no_link=no
]m4_defn([_AC_COMPILER_EXEEXT])[
else
+ rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.o conftest.obj
conftest.dSYM
ac_no_link=yes
# Setting cross_compile will disable run tests; it will
# also disable AC_CHECK_FILE but that's generally
@@ -592,10 +593,10 @@ AC_MSG_RESULT([$ac_cv_exeext])
m4_define([_AC_COMPILER_EXEEXT],
[AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
_AC_COMPILER_EXEEXT_DEFAULT
_AC_COMPILER_EXEEXT_WORKS
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
_AC_COMPILER_EXEEXT_CROSS
_AC_COMPILER_EXEEXT_O
diff --git a/tests/c.at b/tests/c.at
index e05a67c..c9714c2 100644
--- a/tests/c.at
+++ b/tests/c.at
@@ -209,3 +209,24 @@ AT_CHECK_DEFINES(
])
AT_CLEANUP
+
+
+## ------------------------------------ ##
+## AC_NO_EXECUTABLES (working linker). ##
+## ------------------------------------ ##
+
+AT_CHECK_MACRO([AC_NO_EXECUTABLES (working linker)],
+[AC_NO_EXECUTABLES
+AC_PROG_CC
+])
+
+
+## ----------------------------------- ##
+## AC_NO_EXECUTABLES (broken linker). ##
+## ----------------------------------- ##
+
+AT_CHECK_MACRO([AC_NO_EXECUTABLES (broken linker)],
+[LDFLAGS=-lnosuchlibrary
+AC_NO_EXECUTABLES
+AC_PROG_CC
+])
- Re: 1-gary-leopard-dSYM-removal.patch,
Ralf Wildenhues <=