+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.
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
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)
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.
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"
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)
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.
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"
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)
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.
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"
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)
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.
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"