1 dnl Process this file with autoconf to produce a configure script.
5 [ --with-libbfd=<file> path to libbfd.a library to use ],
6 [ ac_libbfd=$withval ],
10 AC_ARG_WITH(libiberty,
11 [ --with-libiberty=<file> path to libiberty.a library to use ],
12 [ ac_libiberty=$withval ],
16 AC_ARG_WITH(bfd-include-dir,
17 [ --with-bfd-include-dir=<dir> include path for correct bfd.h ],
18 [ ac_bfd_include_dir=$withval ],
19 [ ac_bfd_include_dir=NONE ]
25 dnl Checks for programs.
29 dnl Checks for libraries.
30 if test "$ac_libiberty" = "NONE"; then
31 AC_CHECK_LIB(iberty, objalloc_create)
34 LIBS="$ac_libiberty $LIBS"
36 if test "$ac_libbfd" = "NONE"; then
37 AC_CHECK_LIB(bfd, bfd_openr)
40 LIBS="$ac_libbfd $LIBS"
44 if test "$ac_bfd_include_dir" != "NONE"; then
45 bfd_include_dir="-I$ac_bfd_include_dir"
48 if test "$ac_libbfd" = "NONE" -o "$ac_libiberty" = "NONE" ; then
50 echo "You need to specify the location of the libfd.a and libiberty.a"
51 echo "host libraries from the binutils package."
53 echo "Run configure again specifying these options:"
55 echo " ./configure --target=<ARCH> --with-bfd-include-dir=<dir> --with-libbfd=<libbfd.a> --with-libiberty=<libiberty.a>"
60 if test "$ac_bfd_include_dir" = "NONE" ; then
62 echo "You need to specify the location of the bfd.h header from a"
63 echo "configured/compiled version of the binutils package for your target."
64 echo "Without this your elf2flt may crash as it will try to use the"
65 echo "systems bfd.h which may be from a different binutils package."
67 echo "Run configure again specifying these options:"
69 echo " ./configure --target=<ARCH> --with-bfd-include-dir=<dir> --with-libbfd=<libbfd.a> --with-libiberty=<libiberty.a>"
74 dnl Checks for header files.
76 AC_CHECK_HEADERS(fcntl.h unistd.h bfd.h)
78 dnl Checks for typedefs, structures, and compiler characteristics.
81 dnl Checks for library functions.
86 AC_SUBST(target_alias)
89 AC_SUBST(target_vendor)
90 AC_SUBST(bfd_include_dir)
92 AC_OUTPUT(Makefile ld-elf2flt)