[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/5] objc++: initial support for Objective C++
From: |
Stefano Lattarini |
Subject: |
Re: [PATCH 1/5] objc++: initial support for Objective C++ |
Date: |
Mon, 30 Apr 2012 13:01:55 +0200 |
Hi Peter, sorry for the delay.
On 04/27/2012 10:19 AM, Stefano Lattarini wrote:
> From: Peter Breitenlohner <address@hidden>
>
> Original thread (dating back to almost three years ago):
> <http://lists.gnu.org/archive/html/automake-patches/2009-07/msg00016.html>
>
> * automake.in: Register new language 'objcxx'.
> (lang_objcxx_rewrite): New subroutine.
> (resolve_linker): Add OBJCXXLINK.
> (%_am_macro_for_cond): Add am__fastdepOBJCXX and AC_PROG_OBJCXX.
> (%_ac_macro_for_var): Add OBJCXX and OBJCXXFLAGS.
> * m4/depend.m4 (_AM_DEPENDENCIES): Add OBJCXX.
> * m4/init.m4 (AM_INIT_AUTOMAKE): Add AC_PROG_OBJCXX hook.
>
Unfortunately, this patch breaks automake with older autoconfs (e.g., 2.62),
even when the Objective C++ is not used. For example:
$ cat t/whoami.sh
#! /bin/sh
# Copyright (C) 1998-2012 Free Software Foundation, Inc.
# ...
. ./defs || Exit 1
cat >> configure.ac << 'END'
WHO_AM_I=17
END
$ACLOCAL
$ PATH=/opt/extra/autoconf-2.62/bin:$PATH t/whoami.sh
whoami: exec /bin/sh t/whoami.sh
Running from installcheck: no
Using TAP: no
PATH = ...
++ pwd
/home/stefano/src/am/branches/objc++-support/t/whoami.dir
+ cat
+ aclocal-1.12a -Werror
configure.ac:2: error: defn: undefined macro: AC_PROG_OBJCXX
/home/stefano/src/am/branches/objc++-support/m4/options.m4:31: _AM_IF_OPTION
is expanded from...
/home/stefano/src/am/branches/objc++-support/m4/init.m4:25: AM_INIT_AUTOMAKE
is expanded from...
configure.ac:2: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: autom4te failed with exit status: 1
+ exit_status=1
+ set +e
+ cd /home/stefano/src/am/branches/objc++-support
+ test no = yes
+ case $am_explicit_skips in
+ test 1 -eq 0
+ keep_testdirs=yes
+ am_keeping_testdirs
+ case $keep_testdirs in
+ return 0
+ set +x
whoami: exit 1
This is due to the unconditional use of 'AC_PROG_OBJCXX' in AM_INIT_AUTOMAKE.
I've
squashed in the diff below, that solves the issue.
Regards,
Stefano
-*-*-
diff --git a/m4/init.m4 b/m4/init.m4
index dd4ac67..07ed584 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -100,10 +100,13 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
[_AM_DEPENDENCIES([OBJC])],
[define([AC_PROG_OBJC],
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+dnl Support for Objective C++ was only introduced in Autoconf 2.65,
+dnl but we still cater to Autoconf 2.62.
+m4_ifdef([AC_PROG_OBJCXX],
+[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
[_AM_DEPENDENCIES([OBJCXX])],
[define([AC_PROG_OBJCXX],
-
defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
+
defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
])
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
- ObjC++ integration (was: Re: bug#11346: automake-1.12 - one test fails (due to truncated timestamp), Stefano Lattarini, 2012/04/26
- [SPAM] Re: ObjC++ integration (was: Re: bug#11346: automake-1.12 - one test fails (due to truncated timestamp), Peter Breitenlohner, 2012/04/26
- [PATCH 0/5] Add Objective C++ support in Automake, Stefano Lattarini, 2012/04/27
- [PATCH 3/5] objc++: test support for '.mm' suffix in _SOURCES enrries, Stefano Lattarini, 2012/04/27
- [PATCH 2/5] objc++: add documentation, Stefano Lattarini, 2012/04/27
- [PATCH 4/5] news: announce initial support for Objective C++, Stefano Lattarini, 2012/04/27
- [PATCH 1/5] objc++: initial support for Objective C++, Stefano Lattarini, 2012/04/27
- Re: [PATCH 1/5] objc++: initial support for Objective C++,
Stefano Lattarini <=
- Re: [PATCH 1/5] objc++: initial support for Objective C++, Peter Breitenlohner, 2012/04/30
- Re: [PATCH 1/5] objc++: initial support for Objective C++, Stefano Lattarini, 2012/04/30
- [PATCH 5/5] objc++: add first tests, Stefano Lattarini, 2012/04/27
- Re: [PATCH 5/5] objc++: add first tests, Stefano Lattarini, 2012/04/27
- Re: [PATCH 5/5] objc++: add first tests, Peter Breitenlohner, 2012/04/27
- Re: [PATCH 5/5] objc++: add first tests, Stefano Lattarini, 2012/04/27