autoconf-patches
[Top][All Lists]
Advanced

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

Re: bug fix for F77_LIBRARY_LDFLAGS


From: Steven G. Johnson
Subject: Re: bug fix for F77_LIBRARY_LDFLAGS
Date: Mon, 10 Dec 2001 13:17:06 -0500 (EST)

> there are several problems with your patch:
>   * in ac_f77_v_output, newlines are replaced by spaces, so grep fails
>   * when found, those extra flags must be included first

Whoops, right.

> With the following line, your test does work on my HP-UX box:
>    ac_f77_v_output="`echo $ac_f77_v_output | grep 'LPATH is:' | sed -e 
> 's,^.*LPATH is:,:,' -e 's,: */, -L/,g'` $ac_f77_v_output"

Hmm, how about the following instead:

ac_f77_v_output="`echo $ac_f77_v_output | 
        grep 'LPATH is:' |
        sed 's,.*\(LPATH is: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output"

(This way, it doesn't transform any : to -L after the LPATH line.)

Steven

===================================================================
RCS file: /cvs/autoconf/lib/autoconf/fortran.m4,v
retrieving revision 1.153
diff -u -r1.153 fortran.m4
--- fortran.m4  2001/11/25 15:13:04     1.153
+++ fortran.m4  2001/12/10 18:00:51
@@ -384,6 +384,13 @@
   ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'`
 fi
 
+# 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:
+ac_f77_v_output="`echo $ac_f77_v_output | 
+       grep 'LPATH is:' |
+       sed 's,.*\(LPATH is: *[[^ ]]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output"
+
 # 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?





reply via email to

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