libtool
[Top][All Lists]
Advanced

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

Re: F77 tag, and default tags in 1.4b?


From: Erik Lindahl
Subject: Re: F77 tag, and default tags in 1.4b?
Date: Mon, 16 Jul 2001 09:27:24 +0200 (CEST)

Hi,

I think I've spotted the configuration problem with autoconf
always performing the CXX check, regardless of the corresponding
tag being built or not. Since AC_PROG_CXX isn't present in my
scripts, it's being expanded due to the AC_REQUIRE macros. For now
I've worked around it by adding AC_PROG_CXX and AC_PROG_CXXCPP inside
an always-false conditional :-)

I forgot one thing in the F77 support, though - when checking for the
-c -o support we should use FFLAGS iso CFLAGS. Just change the line
at the end of the F77 tag configuration to AC_LIBTOOL_PROG_F77_C_O
and add this macro version which is changed to FFLAGS:


# AC_LIBTOOL_PROG_F77_C_O([TAGNAME])
# ---------------------------------
# Check to see if options -c and -o are simultaneously supported by
compiler
AC_DEFUN([AC_LIBTOOL_PROG_F77_C_O],
[AC_REQUIRE([AC_PROG_F77])dnl

AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
   $rm -r conftest 2>/dev/null
   mkdir conftest
   cd conftest
   mkdir out
   save_FFLAGS="$FFLAGS"
   FFLAGS="$FFLAGS -o out/conftest2.$ac_objext"
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext

   # According to Tom Tromey, Ian Lance Taylor reported there are C
compilers
   # that will create temporary files in the current directory regardless
of
   # the output directory.  Thus, making CWD read-only will cause this
test
   # to fail, enabling locking or at least warning the user not to do
parallel
   # builds.
   chmod -w .

   if (eval $ac_compile 2>out/conftest.err) && test -s
out/conftest2.$ac_objext
   then
     # The compiler can only warn and ignore the option if not recognized
     # So say no if there are warnings
     if test -s out/conftest.err; then
       # Append any errors to the config.log.
       cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
     else
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
     fi
   fi
   FFLAGS="$save_FFLAGS"

   chmod u+w .
   $rm conftest* out/*
   rmdir out
   cd ..
   rmdir conftest
   $rm conftest*
])
])# AC_LIBTOOL_PROG_F77_C_O



Robert and people - since I'm fully occupied with another software project
I might not follow the libtool list to 100%, but don't hesitate to mail
me in case there are any problems with the (minimal) F77 support. Of
course I'd love to see it in the main dist so I can forget about it :-)


By the way: From an autoconf/automake user's point of view I guess it
would be coolest if libtool checked which languages were used in configure
and only included the appropriate tags. (But remember to check for the
AC_PROG_*** macros really being executed, not only present - it's not
uncommon for CXX or F77 parts to be optional!)

Regards,

Erik
---------------------------------------------------------------------
Erik Lindahl, PhD                                address@hidden
Dept. Biophysical Chemistry, Groningen University, THE NETHERLANDS
Phone: +31 50 3634335    Fax: +31 50 3634800
(You can also reach me as address@hidden and address@hidden)
Hi! I'm a mutated .sig virus! Put me in ~/.signature to multiply me!




reply via email to

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