|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
|
|
|
Re: AC_OPENMP / AC_LANG_FUNC_LINK_TRY: unknown language: Fortran-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 According to Ralf Wildenhues on 10/30/2009 12:22 PM: > > OK to push these two patches, and add Bart to THANKS? The first one - yes. The second one - let's work on it a bit more... > I'm not all that fond of _AC_CC in the second patch, as it is in a > central location rather than grouped with each language (makes > third-party additions harder), so maybe it should derive from > per-language defines instead? Anyway, that patch is not so critical. Wouldn't it work to reuse an existing per-language macro, as in: m4_toupper(_AC_LANG_ABBREV) well, that gives $ERL instead of $ERLC. So I guess we don't have anything. That being the case, I would prefer to add another argument to AC_LANG_DEFINE to populate _AC_CC(lang) in the same manner as _AC_LANG_ABBREV(lang) is populated, rather than hardcoding the translation in lang.m4. - -- Don't work too hard, make some time for fun as well! Eric Blake ebb9@... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrrT3IACgkQ84KuGfSFAYAaqACff8O1/fS69nWCeHvNUDYyn0+v QIcAn2PXf7DipPhIT5Eq9tKitWo6Vd+U =tx+l -----END PGP SIGNATURE----- |
|
|
Re: AC_OPENMP / AC_LANG_FUNC_LINK_TRY: unknown language: Fortran* Ralf Wildenhues wrote on Fri, Oct 30, 2009 at 07:22:48PM CET:
> Fix AC_OPENMP for Fortran (F77 and FC). > > * lib/autoconf/fortran.m4 (AC_LANG_FUNC_LINK_TRY(Fortran): New. > * tests/c.at (AC_C_RESTRICT and C++, AC_OPENMP and C) > (AC_OPENMP and C++): New tests. > * tests/fortran.at (AC_OPENMP and Fortran 77) > (AC_OPENMP and Fortran): New tests. > * THANKS: Update. > Report by Bart Oldeman. Pushing this obvious followup to fix the test on some systems. Only OpenMP related failures I'm still seeing are with the plain `AC_OPENMP' test: Solaris 2.6 cc may dump core at some point during configure, and IRIX cc may create a directory rii_files, both of which upset the leftover file checks. I'm not sure when it is suitable to remove rii_files, though. Cheers, Ralf Do not fail OpenMP tests on systems without aclocal. * tests/c.at (AC_OPENMP and C, AC_OPENMP and C++): Override `ACLOCAL=true' for autoreconf, the tests don't need aclocal. * tests/fortran.at (AC_OPENMP and Fortran 77) (AC_OPENMP and Fortran): Likewise. diff --git a/tests/c.at b/tests/c.at index 78edf45..34f83ae 100644 --- a/tests/c.at +++ b/tests/c.at @@ -369,7 +369,7 @@ int main () ]]) : ${MAKE=make} -AT_CHECK([autoreconf -vi], [], [ignore], [ignore]) +AT_CHECK([env ACLOCAL=true autoreconf -vi], [], [ignore], [ignore]) AT_CHECK([./configure $configure_options], [], [ignore], [ignore]) AT_CHECK([$MAKE], [], [ignore], [ignore]) @@ -412,7 +412,7 @@ AT_DATA([foo.cpp], ]]) : ${MAKE=make} -AT_CHECK([autoreconf -vi], [], [ignore], [ignore]) +AT_CHECK([env ACLOCAL=true autoreconf -vi], [], [ignore], [ignore]) AT_CHECK([./configure $configure_options], [], [ignore], [ignore]) AT_CHECK([$MAKE], [], [ignore], [ignore]) diff --git a/tests/fortran.at b/tests/fortran.at index 151b13f..d511e3d 100644 --- a/tests/fortran.at +++ b/tests/fortran.at @@ -108,7 +108,7 @@ AT_DATA([foo.f], ]]) : ${MAKE=make} -AT_CHECK([autoreconf -vi], [], [ignore], [ignore]) +AT_CHECK([env ACLOCAL=true autoreconf -vi], [], [ignore], [ignore]) AT_CHECK([./configure $configure_options], [], [ignore], [ignore]) AT_CHECK([$MAKE], [], [ignore], [ignore]) @@ -148,7 +148,7 @@ AT_DATA([foo.f], ]]) : ${MAKE=make} -AT_CHECK([autoreconf -vi], [], [ignore], [ignore]) +AT_CHECK([env ACLOCAL=true autoreconf -vi], [], [ignore], [ignore]) AT_CHECK([./configure $configure_options], [], [ignore], [ignore]) AT_CHECK([$MAKE], [], [ignore], [ignore]) |
|
|
Re: AC_OPENMP / AC_LANG_FUNC_LINK_TRY: unknown language: Fortran* Eric Blake wrote on Fri, Oct 30, 2009 at 09:41:22PM CET:
> Wouldn't it work to reuse an existing per-language macro, as in: > m4_toupper(_AC_LANG_ABBREV) > > well, that gives $ERL instead of $ERLC. So I guess we don't have anything. > > That being the case, I would prefer to add another argument to > AC_LANG_DEFINE to populate _AC_CC(lang) in the same manner as > _AC_LANG_ABBREV(lang) is populated, rather than hardcoding the translation > in lang.m4. Yes, that sounds better; thanks. IIUC then AC_LANG_DEFINE is not public yet and not used outside Autoconf, so we can reorder arguments. OK to apply? Thanks, Ralf Fix AC_OPENMP configure message for non-C compilers. * lib/autoconf/lang.m4 (AC_LANG_DEFINE): Accept as additional fourth arg the compiler variable name, defined in _AC_CC($1). (_AC_CC): New language dispatch macro. * lib/autoconf/erlang.m4 (AC_LANG(Erlang)): Adjust. * lib/autoconf/fortran.m4 (AC_LANG(Fortran 77), AC_LANG(Fortran)): Likewise. * lib/autoconf/c.m4 (AC_LANG(C), AC_LANG(C++)) (AC_LANG(Objective C), AC_LANG(Objective C++)): Likewise. (AC_OPENMP): Use _AC_CC instead of $CC. diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index 3b7cf36..420c8b6 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -59,7 +59,7 @@ # AC_LANG(C) # ---------- # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -AC_LANG_DEFINE([C], [c], [C], [], +AC_LANG_DEFINE([C], [c], [C], [CC], [], [ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD' @@ -238,7 +238,7 @@ static unsigned long int ulongval () { return $2; } # AC_LANG(C++) # ------------ # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -AC_LANG_DEFINE([C++], [cxx], [CXX], [C], +AC_LANG_DEFINE([C++], [cxx], [CXX], [CXX], [C], [ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD' @@ -260,7 +260,7 @@ AU_DEFUN([AC_LANG_CPLUSPLUS], [AC_LANG(C++)]) # AC_LANG(Objective C) # -------------------- -AC_LANG_DEFINE([Objective C], [objc], [OBJC], [C], +AC_LANG_DEFINE([Objective C], [objc], [OBJC], [OBJC], [C], [ac_ext=m ac_cpp='$OBJCPP $CPPFLAGS' ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD' @@ -282,7 +282,7 @@ AU_DEFUN([AC_LANG_OBJC], [AC_LANG(Objective C)]) # AC_LANG(Objective C++) # ---------------------- -AC_LANG_DEFINE([Objective C++], [objcxx], [OBJCXX], [C++], +AC_LANG_DEFINE([Objective C++], [objcxx], [OBJCXX], [OBJCXX], [C++], [ac_ext=mm ac_cpp='$OBJCXXCPP $CPPFLAGS' ac_compile='$OBJCXX -c $OBJCXXFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD' @@ -1973,7 +1973,7 @@ AC_DEFUN([AC_OPENMP], AC_ARG_ENABLE([openmp], [AS_HELP_STRING([--disable-openmp], [do not use OpenMP])]) if test "$enable_openmp" != no; then - AC_CACHE_CHECK([for $CC option to support OpenMP], + AC_CACHE_CHECK([for $[]_AC_CC[] option to support OpenMP], [ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp], [AC_LINK_IFELSE([_AC_LANG_OPENMP], [ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp='none needed'], diff --git a/lib/autoconf/erlang.m4 b/lib/autoconf/erlang.m4 index d87510a..748fca8 100644 --- a/lib/autoconf/erlang.m4 +++ b/lib/autoconf/erlang.m4 @@ -99,7 +99,7 @@ fi # AC_LANG(Erlang) # --------------- -AC_LANG_DEFINE([Erlang], [erl], [ERL], [], +AC_LANG_DEFINE([Erlang], [erl], [ERL], [ERLC], [], [ac_ext=erl ac_compile='$ERLC $ERLCFLAGS -b beam conftest.$ac_ext >&AS_MESSAGE_LOG_FD' ac_link='$ERLC $ERLCFLAGS -b beam conftest.$ac_ext >&AS_MESSAGE_LOG_FD && echo "[#]!/bin/sh" > conftest$ac_exeext && AS_ECHO(["\"$ERL\" -run conftest start -run init stop -noshell"]) >> conftest$ac_exeext && chmod +x conftest$ac_exeext' diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4 index 6cbcfa2..f5918d0 100644 --- a/lib/autoconf/fortran.m4 +++ b/lib/autoconf/fortran.m4 @@ -140,7 +140,7 @@ fi[]dnl # AC_LANG(Fortran 77) # ------------------- -AC_LANG_DEFINE([Fortran 77], [f77], [F], [], +AC_LANG_DEFINE([Fortran 77], [f77], [F], [F77], [], [ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD' @@ -220,7 +220,7 @@ m4_define([AC_LANG_FUNC_LINK_TRY(Fortran 77)], # AC_LANG(Fortran) # ---------------- -AC_LANG_DEFINE([Fortran], [fc], [FC], [Fortran 77], +AC_LANG_DEFINE([Fortran], [fc], [FC], [FC], [Fortran 77], [ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&AS_MESSAGE_LOG_FD' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD' diff --git a/lib/autoconf/lang.m4 b/lib/autoconf/lang.m4 index 5b44c68..1beda24 100644 --- a/lib/autoconf/lang.m4 +++ b/lib/autoconf/lang.m4 @@ -160,27 +160,28 @@ m4_defun([AC_LANG_ASSERT], -# AC_LANG_DEFINE(NAME, ABBREV, PREFIX, COPY-FROM, SHELL-VARS) -# ----------------------------------------------------------- +# AC_LANG_DEFINE(NAME, ABBREV, PREFIX, COMPILER-VAR, COPY-FROM, SHELL-VARS) +# ------------------------------------------------------------------------- # Define a language referenced by AC_LANG(NAME), with cache variable prefix -# ABBREV and Makefile variable prefix PREFIX. AC_LANG(NAME) is defined -# to SHELL-VARS, other macros are copied from language COPY-FROM. Even if -# COPY-FROM is empty, a default definition is provided for language-specific -# macros AC_LANG_SOURCE(NAME) and AC_LANG_CONFTEST(NAME). +# ABBREV, Makefile variable prefix PREFIX and compiler variable COMPILER-VAR. +# AC_LANG(NAME) is defined to SHELL-VARS, other macros are copied from language +# COPY-FROM. Even if COPY-FROM is empty, a default definition is provided for +# language-specific macros AC_LANG_SOURCE(NAME) and AC_LANG_CONFTEST(NAME). m4_define([AC_LANG_DEFINE], -[m4_define([AC_LANG($1)], [$5])] +[m4_define([AC_LANG($1)], [$6])] [m4_define([_AC_LANG_ABBREV($1)], [$2])] [m4_define([_AC_LANG_PREFIX($1)], [$3])] -[m4_copy([AC_LANG_CONFTEST($4)], [AC_LANG_CONFTEST($1)])] -[m4_copy([AC_LANG_SOURCE($4)], [AC_LANG_SOURCE($1)])] -[m4_copy([_AC_LANG_NULL_PROGRAM($4)], [_AC_LANG_NULL_PROGRAM($1)])] -[m4_ifval([$4], -[m4_copy([AC_LANG_PROGRAM($4)], [AC_LANG_PROGRAM($1)])] -[m4_copy([AC_LANG_CALL($4)], [AC_LANG_CALL($1)])] -[m4_copy([AC_LANG_FUNC_LINK_TRY($4)], [AC_LANG_FUNC_LINK_TRY($1)])] -[m4_copy([AC_LANG_BOOL_COMPILE_TRY($4)], [AC_LANG_BOOL_COMPILE_TRY($1)])] -[m4_copy([AC_LANG_INT_SAVE($4)], [AC_LANG_INT_SAVE($1)])] -[m4_copy([_AC_LANG_IO_PROGRAM($4)], [_AC_LANG_IO_PROGRAM($1)])])]) +[m4_define([_AC_CC($1)], [$4])] +[m4_copy([AC_LANG_CONFTEST($5)], [AC_LANG_CONFTEST($1)])] +[m4_copy([AC_LANG_SOURCE($5)], [AC_LANG_SOURCE($1)])] +[m4_copy([_AC_LANG_NULL_PROGRAM($5)], [_AC_LANG_NULL_PROGRAM($1)])] +[m4_ifval([$5], +[m4_copy([AC_LANG_PROGRAM($5)], [AC_LANG_PROGRAM($1)])] +[m4_copy([AC_LANG_CALL($5)], [AC_LANG_CALL($1)])] +[m4_copy([AC_LANG_FUNC_LINK_TRY($5)], [AC_LANG_FUNC_LINK_TRY($1)])] +[m4_copy([AC_LANG_BOOL_COMPILE_TRY($5)], [AC_LANG_BOOL_COMPILE_TRY($1)])] +[m4_copy([AC_LANG_INT_SAVE($5)], [AC_LANG_INT_SAVE($1)])] +[m4_copy([_AC_LANG_IO_PROGRAM($5)], [_AC_LANG_IO_PROGRAM($1)])])]) ## ----------------------- ## ## 2. Producing programs. ## @@ -284,6 +285,12 @@ AC_DEFUN([AC_LANG_INT_SAVE], [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) +# _AC_CC +# ------ +# The variable name of the compiler. +m4_define([_AC_CC], +[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) + ## -------------------------------------------- ## ## 3. Looking for Compilers and Preprocessors. ## |
|
|
Re: AC_OPENMP / AC_LANG_FUNC_LINK_TRY: unknown language: Fortran-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 According to Ralf Wildenhues on 10/31/2009 2:21 AM: >> That being the case, I would prefer to add another argument to >> AC_LANG_DEFINE to populate _AC_CC(lang) in the same manner as >> _AC_LANG_ABBREV(lang) is populated, rather than hardcoding the translation >> in lang.m4. > > Yes, that sounds better; thanks. IIUC then AC_LANG_DEFINE is not public > yet and not used outside Autoconf, so we can reorder arguments. OK to > apply? Yes, that looks better; go ahead and push. And I agree that AC_LANG_DEFINE is an internal helper (maybe we should have named it _AC_LANG_DEFINE, oh well). - -- Don't work too hard, make some time for fun as well! Eric Blake ebb9@... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrsNYYACgkQ84KuGfSFAYAvvwCfd6CM4w4xJrv2CLJUGdoPG4je A4oAn0uTnTF0ohF9bUnv8GqBBrF5XKaz =vUKY -----END PGP SIGNATURE----- |
| Free embeddable forum powered by Nabble | Forum Help |