]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Keep -lm, if a Fortran
authorAkim Demaille <akim@epita.fr>
Fri, 7 Jul 2000 08:49:18 +0000 (08:49 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 7 Jul 2000 08:49:18 +0000 (08:49 +0000)
compiler needs it, it is likely to be required when linking C/C++
with Fortran.
<-YP,*>: Fix the list of arguments to loop on.
Don't mess with the user variable name space.
<ac_ld_run_path>: Prepend LD_RUN_PATH directories with -R only
when running Solaris (without this, link errors occur).

ChangeLog
THANKS
aclang.m4
lib/autoconf/c.m4
lib/autoconf/fortran.m4
lib/autoconf/lang.m4

index 63855de64cbb460d2c92dd647624e92c3806da31..ec7e9b3a9b5e22e423773f8dd7642cb616989375 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2000-07-07  Martin Wilck <martin@tropos.de>
+
+       * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Keep -lm, if a Fortran
+       compiler needs it, it is likely to be required when linking C/C++
+       with Fortran.
+       <-YP,*>: Fix the list of arguments to loop on.
+       Don't mess with the user variable name space.
+       <ac_ld_run_path>: Prepend LD_RUN_PATH directories with -R only
+       when running Solaris (without this, link errors occur).
+
 2000-07-06  Akim Demaille  <akim@epita.fr>
 
        * acgeneral.m4 (_AC_SHELL_DIRNAME): Fix quotation.
diff --git a/THANKS b/THANKS
index 95bc343d5dfda9c68ae24ab1b2c8308872520e04..a52d506a61841797280c3feff0cc61520ad56e28 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -79,6 +79,7 @@ Mark Elbrecht         snowball3@usa.net
 Markku Savela          msa@msa.tte.vtt.fi
 Markus Oberhumer       markus.oberhumer@jk.uni-linz.ac.at
 Martin Buchholz                martin@xemacs.org
+Martin Wilck           martin@tropos.de
 Martyn Johnson         Martyn.Johnson@cl.cam.ac.uk
 Matthew D. Langston    langston@SLAC.Stanford.EDU
 Michael Schoene                mrs@mlc.de
index 1bfc5668f0c06c210fda83b7b4ec7347f58514ad..0dcde09ad310e1c0aee15387424ddd9090f2e508 100644 (file)
--- a/aclang.m4
+++ b/aclang.m4
@@ -1399,7 +1399,7 @@ for ac_arg in $ac_link_output; do
                             ac_arg=, [AC_LINKER_OPTION([$ac_arg], ac_seen)])
           ;;
           # Ignore these flags.
-        -lang* | -lcrt0.o | -l[[cm]] | -lgcc | -LANG:=*)
+        -lang* | -lcrt0.o | -lc | -lgcc | -LANG:=*)
           ac_arg=
           ;;
         -lkernel32)
@@ -1416,14 +1416,14 @@ for ac_arg in $ac_link_output; do
           ac_arg=
           ;;
         -YP,*)
-          temp_arg=
-          for ac_i in `echo $ac_arg | sed -e 's%^P,%-L%' -e 's%:% -L%g'`; do
+          ac_temp_arg=
+          for ac_j in `echo $ac_arg | sed 's/-YP,/-L/;s/:/ -L/g'`; do
             # Append to AC_SEEN if it's not already there.
-            AC_LIST_MEMBER_OF($ac_i, $ac_seen,
-                              temp_arg="$temp_arg $ac_i",
-                              ac_seen="$ac_seen $ac_i")
+            AC_LIST_MEMBER_OF($ac_j, $ac_seen, ,
+                              [ac_temp_arg="$ac_temp_arg $ac_j"
+                               ac_seen="$ac_seen $ac_j"])
           done
-          ac_arg=$temp_arg
+          ac_arg=$ac_temp_arg
           ;;
         -[[lLR]]*)
           # Append to AC_SEEN if it's not already there.
@@ -1445,11 +1445,17 @@ for ac_arg in $ac_link_output; do
   test "x$ac_arg" != x && FLIBS="$FLIBS $ac_arg"
 done
 
-# Assumption: We only see "LD_RUN_PATH" on Solaris systems.  If this
-# is seen, then we insist that the "run path" must be an absolute
-# path (i.e. it must begin with a "/").
-ac_ld_run_path=`echo $ac_link_output |
-                sed -n -e 's%^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$%\1%p'`
+# We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
+# then we insist that the "run path" must be an absolute path (i.e. it
+# must begin with a "/").
+case `(uname -sr) 2>/dev/null` in
+   "SunOS 5"*)
+      ac_ld_run_path=`echo $ac_link_output |
+                        sed -n 's%^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$%-R\1%p'`
+      test "x$ac_ld_run_path" != x &&
+        AC_LINKER_OPTION([$ac_ld_run_path], ac_cv_flibs)
+      ;;
+esac
 test "x$ac_ld_run_path" != x && FLIBS="$ac_ld_run_path $FLIBS"
 ac_cv_flibs=$FLIBS
 fi # test "x$FLIBS" = "x"
index 1bfc5668f0c06c210fda83b7b4ec7347f58514ad..0dcde09ad310e1c0aee15387424ddd9090f2e508 100644 (file)
@@ -1399,7 +1399,7 @@ for ac_arg in $ac_link_output; do
                             ac_arg=, [AC_LINKER_OPTION([$ac_arg], ac_seen)])
           ;;
           # Ignore these flags.
-        -lang* | -lcrt0.o | -l[[cm]] | -lgcc | -LANG:=*)
+        -lang* | -lcrt0.o | -lc | -lgcc | -LANG:=*)
           ac_arg=
           ;;
         -lkernel32)
@@ -1416,14 +1416,14 @@ for ac_arg in $ac_link_output; do
           ac_arg=
           ;;
         -YP,*)
-          temp_arg=
-          for ac_i in `echo $ac_arg | sed -e 's%^P,%-L%' -e 's%:% -L%g'`; do
+          ac_temp_arg=
+          for ac_j in `echo $ac_arg | sed 's/-YP,/-L/;s/:/ -L/g'`; do
             # Append to AC_SEEN if it's not already there.
-            AC_LIST_MEMBER_OF($ac_i, $ac_seen,
-                              temp_arg="$temp_arg $ac_i",
-                              ac_seen="$ac_seen $ac_i")
+            AC_LIST_MEMBER_OF($ac_j, $ac_seen, ,
+                              [ac_temp_arg="$ac_temp_arg $ac_j"
+                               ac_seen="$ac_seen $ac_j"])
           done
-          ac_arg=$temp_arg
+          ac_arg=$ac_temp_arg
           ;;
         -[[lLR]]*)
           # Append to AC_SEEN if it's not already there.
@@ -1445,11 +1445,17 @@ for ac_arg in $ac_link_output; do
   test "x$ac_arg" != x && FLIBS="$FLIBS $ac_arg"
 done
 
-# Assumption: We only see "LD_RUN_PATH" on Solaris systems.  If this
-# is seen, then we insist that the "run path" must be an absolute
-# path (i.e. it must begin with a "/").
-ac_ld_run_path=`echo $ac_link_output |
-                sed -n -e 's%^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$%\1%p'`
+# We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
+# then we insist that the "run path" must be an absolute path (i.e. it
+# must begin with a "/").
+case `(uname -sr) 2>/dev/null` in
+   "SunOS 5"*)
+      ac_ld_run_path=`echo $ac_link_output |
+                        sed -n 's%^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$%-R\1%p'`
+      test "x$ac_ld_run_path" != x &&
+        AC_LINKER_OPTION([$ac_ld_run_path], ac_cv_flibs)
+      ;;
+esac
 test "x$ac_ld_run_path" != x && FLIBS="$ac_ld_run_path $FLIBS"
 ac_cv_flibs=$FLIBS
 fi # test "x$FLIBS" = "x"
index 1bfc5668f0c06c210fda83b7b4ec7347f58514ad..0dcde09ad310e1c0aee15387424ddd9090f2e508 100644 (file)
@@ -1399,7 +1399,7 @@ for ac_arg in $ac_link_output; do
                             ac_arg=, [AC_LINKER_OPTION([$ac_arg], ac_seen)])
           ;;
           # Ignore these flags.
-        -lang* | -lcrt0.o | -l[[cm]] | -lgcc | -LANG:=*)
+        -lang* | -lcrt0.o | -lc | -lgcc | -LANG:=*)
           ac_arg=
           ;;
         -lkernel32)
@@ -1416,14 +1416,14 @@ for ac_arg in $ac_link_output; do
           ac_arg=
           ;;
         -YP,*)
-          temp_arg=
-          for ac_i in `echo $ac_arg | sed -e 's%^P,%-L%' -e 's%:% -L%g'`; do
+          ac_temp_arg=
+          for ac_j in `echo $ac_arg | sed 's/-YP,/-L/;s/:/ -L/g'`; do
             # Append to AC_SEEN if it's not already there.
-            AC_LIST_MEMBER_OF($ac_i, $ac_seen,
-                              temp_arg="$temp_arg $ac_i",
-                              ac_seen="$ac_seen $ac_i")
+            AC_LIST_MEMBER_OF($ac_j, $ac_seen, ,
+                              [ac_temp_arg="$ac_temp_arg $ac_j"
+                               ac_seen="$ac_seen $ac_j"])
           done
-          ac_arg=$temp_arg
+          ac_arg=$ac_temp_arg
           ;;
         -[[lLR]]*)
           # Append to AC_SEEN if it's not already there.
@@ -1445,11 +1445,17 @@ for ac_arg in $ac_link_output; do
   test "x$ac_arg" != x && FLIBS="$FLIBS $ac_arg"
 done
 
-# Assumption: We only see "LD_RUN_PATH" on Solaris systems.  If this
-# is seen, then we insist that the "run path" must be an absolute
-# path (i.e. it must begin with a "/").
-ac_ld_run_path=`echo $ac_link_output |
-                sed -n -e 's%^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$%\1%p'`
+# We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
+# then we insist that the "run path" must be an absolute path (i.e. it
+# must begin with a "/").
+case `(uname -sr) 2>/dev/null` in
+   "SunOS 5"*)
+      ac_ld_run_path=`echo $ac_link_output |
+                        sed -n 's%^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$%-R\1%p'`
+      test "x$ac_ld_run_path" != x &&
+        AC_LINKER_OPTION([$ac_ld_run_path], ac_cv_flibs)
+      ;;
+esac
 test "x$ac_ld_run_path" != x && FLIBS="$ac_ld_run_path $FLIBS"
 ac_cv_flibs=$FLIBS
 fi # test "x$FLIBS" = "x"
index 1bfc5668f0c06c210fda83b7b4ec7347f58514ad..0dcde09ad310e1c0aee15387424ddd9090f2e508 100644 (file)
@@ -1399,7 +1399,7 @@ for ac_arg in $ac_link_output; do
                             ac_arg=, [AC_LINKER_OPTION([$ac_arg], ac_seen)])
           ;;
           # Ignore these flags.
-        -lang* | -lcrt0.o | -l[[cm]] | -lgcc | -LANG:=*)
+        -lang* | -lcrt0.o | -lc | -lgcc | -LANG:=*)
           ac_arg=
           ;;
         -lkernel32)
@@ -1416,14 +1416,14 @@ for ac_arg in $ac_link_output; do
           ac_arg=
           ;;
         -YP,*)
-          temp_arg=
-          for ac_i in `echo $ac_arg | sed -e 's%^P,%-L%' -e 's%:% -L%g'`; do
+          ac_temp_arg=
+          for ac_j in `echo $ac_arg | sed 's/-YP,/-L/;s/:/ -L/g'`; do
             # Append to AC_SEEN if it's not already there.
-            AC_LIST_MEMBER_OF($ac_i, $ac_seen,
-                              temp_arg="$temp_arg $ac_i",
-                              ac_seen="$ac_seen $ac_i")
+            AC_LIST_MEMBER_OF($ac_j, $ac_seen, ,
+                              [ac_temp_arg="$ac_temp_arg $ac_j"
+                               ac_seen="$ac_seen $ac_j"])
           done
-          ac_arg=$temp_arg
+          ac_arg=$ac_temp_arg
           ;;
         -[[lLR]]*)
           # Append to AC_SEEN if it's not already there.
@@ -1445,11 +1445,17 @@ for ac_arg in $ac_link_output; do
   test "x$ac_arg" != x && FLIBS="$FLIBS $ac_arg"
 done
 
-# Assumption: We only see "LD_RUN_PATH" on Solaris systems.  If this
-# is seen, then we insist that the "run path" must be an absolute
-# path (i.e. it must begin with a "/").
-ac_ld_run_path=`echo $ac_link_output |
-                sed -n -e 's%^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$%\1%p'`
+# We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
+# then we insist that the "run path" must be an absolute path (i.e. it
+# must begin with a "/").
+case `(uname -sr) 2>/dev/null` in
+   "SunOS 5"*)
+      ac_ld_run_path=`echo $ac_link_output |
+                        sed -n 's%^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$%-R\1%p'`
+      test "x$ac_ld_run_path" != x &&
+        AC_LINKER_OPTION([$ac_ld_run_path], ac_cv_flibs)
+      ;;
+esac
 test "x$ac_ld_run_path" != x && FLIBS="$ac_ld_run_path $FLIBS"
 ac_cv_flibs=$FLIBS
 fi # test "x$FLIBS" = "x"