4 dnl Macros for autoconf
8 dnl Set variable `LD' to the name of the linker program.
9 AC_DEFUN(LIBFIRM_PROG_LD,[
10 dnl AC_REQUIRE([AC_PROG_CC])
11 if test -z "$LD"; then
17 dnl Set variable `libfirm_cv_prog_ld_r' to yes if the linker accepts -r, else to no.
18 AC_DEFUN(LIBFIRM_PROG_LD_R,
19 [AC_CACHE_CHECK(whether $LD accepts -r, libfirm_cv_prog_ld_r,
20 [AC_REQUIRE([LIBFIRM_PROG_LD])
21 libfirm_cv_prog_ld_r=no
23 cat > conftest.$ac_ext <<EOF
24 int foo() { return 0; }
26 if eval $ac_compile && mv conftest.o conftest2.o; then
27 cat > conftest.$ac_ext <<EOF
29 int main() { return foo(); }
31 if eval $ac_compile; then
32 if $LD -r -o conftest conftest.o conftest2.o; then
33 libfirm_cv_prog_ld_r=yes
39 AC_SUBST(libfirm_cv_prog_ld_r)