bug-autoconf
[Top][All Lists]
Advanced

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

autoconf / configure bug


From: Mike Davis
Subject: autoconf / configure bug
Date: Wed, 8 Jun 2005 13:19:04 -0500 (CDT)

The Cray XT3 compiler drivers pass options containing quoted strings to the
PGI compilers, specifically for the case of -L and -l options.  These single-
quotes are being picked up by 'configure' scripts, which then pass options
with unbalanced quoted strings on subsequent compile commands.  The 'configure'
scripts already contain code to handle special cases of verbose output
produced by specific compilers/platforms (e.g., cft90).  What is the best
mechanism for adding XT3 compiler specific handling into the configure scripts?

Below is an excerpt of a configure script that has exhibited the problem.

-----------------------

echo "$as_me:$LINENO: checking for Fortran libraries of $F77" >&5
echo $ECHO_N "checking for Fortran libraries of $F77... $ECHO_C" >&6
if test "${ac_cv_f77_libs+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "x$FLIBS" != "x"; then
  ac_cv_f77_libs="$FLIBS" # Let the user override the test.
else
cat >conftest.$ac_ext <<_ACEOF
      program main
      end
_ACEOF
# Compile and link our simple test program by passing a flag (argument
# 1 to this macro) to the Fortran compiler in order to get
# "verbose" output that we can then parse for the Fortran linker
# flags.
ac_save_FFLAGS=$FFLAGS
FFLAGS="$FFLAGS $ac_cv_prog_f77_v"
(eval echo $as_me:8439: \"$ac_link\") >&5
ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
echo "$ac_f77_v_output" >&5
FFLAGS=$ac_save_FFLAGS
rm -f conftest*
# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
# /foo, /bar, and /baz are search directories for the Fortran linker.
# Here, we change these into -L/foo -L/bar -L/baz (and put it first):
ac_f77_v_output="`echo $ac_f77_v_output |
        grep 'LPATH is:' |
        sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output"
case $ac_f77_v_output in
  # If we are using xlf then replace all the commas with spaces.
  *xlfentry*)
    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;;
  # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
  # $LIBS confuse us, and the libraries appear later in the output anyway).
  *mGLOB_options_string*)
    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/\"-mGLOB[^\"]*\"/ /g'` ;;
  # If we are using Cray Fortran then delete quotes.
  # Use "\"" instead of '"' for font-lock-mode.
  # FIXME: a more general fix for quoted arguments with spaces?
  *cft90*)
    ac_f77_v_output=`echo $ac_f77_v_output | sed "s/\"//g"` ;;
esac

-----------------------

Below is an example of the output of running this 'configure' with XT3
compilers:

-----------------------

configure:8597: result:  -L/opt/rs/x-comp_0502/xt-libsci/1.1.00/lib/cnos64
-L/opt/rs/x-comp_0502/xt-mpt/1.1.00/sma/lib
-L/opt/rs/x-comp_0502/xt-mpt/1.1.00/mpich2-64/P2/lib -lsci -lmpichf90 -lmpich
-lpapi -L/opt/rs/x-comp_0502/xt-catamount/1.1.00/lib/cnos64
-L/opt/rs/x-comp_0502/xt-pe/1.1.00/lib/cnos64
-L/opt/rs/x-comp_0502/xt-libc/1.1.00/amd64/lib
-L/opt/rs/x-comp_0502/xt-os/1.1.00/lib/cnos64
-L/opt/rs/x-comp_0502/xt-service/1.1.00/lib/cnos64
-L/opt/rs/x-comp_0502/xt-mpt/1.1.00/sma/lib
-L/opt/gcc/3.2.3/lib/gcc-lib/x86_64-suse-linux/3.2.3/ -lpgf90 -lpgf90_rpm1
-lpgf902 -lpgf90rtl -lpgftnrtl -lpgc -lm -lcatamount -lsysio -lportals -lC
-lcrtend' -lcrtend

-----------------------

Notice the unmatched single quote near the end.




reply via email to

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