converted to doxygen comments
[libfirm] / aclocal.m4
1
2 dnl libFIRM Project
3
4 dnl Macros for autoconf
5 dnl $Id$
6
7
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
12   AC_CHECK_TOOL(LD, ld)
13 fi
14 ])
15
16
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
22 if test "$LD"; then
23   cat > conftest.$ac_ext <<EOF
24 int foo() { return 0; }
25 EOF
26   if eval $ac_compile && mv conftest.o conftest2.o; then
27     cat > conftest.$ac_ext <<EOF
28 extern int foo();
29 int main() { return foo(); }
30 EOF
31     if eval $ac_compile; then
32       if $LD -r -o conftest conftest.o conftest2.o; then
33         libfirm_cv_prog_ld_r=yes
34       fi
35     fi
36   fi
37 fi
38 rm -f conftest*])
39 AC_SUBST(libfirm_cv_prog_ld_r)
40 ])
41
42 dnl end of aclocal.m