3 dnl File name: aclocal.m4
4 dnl Purpose: Macros for autoconf
5 dnl Author: Till Riedel
9 dnl Copyright: (c) 2002-2003 Universität Karlsruhe
10 dnl Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
14 dnl Set variable `LD' to the name of the linker program.
15 AC_DEFUN(LIBFIRM_PROG_LD,[
16 dnl AC_REQUIRE([AC_PROG_CC])
17 if test -z "$LD"; then
23 dnl Set variable `libfirm_cv_prog_ld_r' to yes if the linker accepts -r, else to no.
24 AC_DEFUN(LIBFIRM_PROG_LD_R,
25 [AC_CACHE_CHECK(whether $LD accepts -r, libfirm_cv_prog_ld_r,
26 [AC_REQUIRE([LIBFIRM_PROG_LD])
27 libfirm_cv_prog_ld_r=no
29 cat > conftest.$ac_ext <<EOF
30 int foo() { return 0; }
32 if eval $ac_compile && mv conftest.o conftest2.o; then
33 cat > conftest.$ac_ext <<EOF
35 int main() { return foo(); }
37 if eval $ac_compile; then
38 if $LD -r -o conftest conftest.o conftest2.o; then
39 libfirm_cv_prog_ld_r=yes
45 AC_SUBST(libfirm_cv_prog_ld_r)