1 sinclude(../config/acx.m4)
2 sinclude(../config/gettext-sister.m4)
3 sinclude(../config/nls.m4)
4 sinclude(../config/po.m4)
5 sinclude(../config/progtest.m4)
6 sinclude(../config/stdint.m4)
7 sinclude(../bfd/bfd.m4)
8 sinclude(../bfd/warning.m4)
10 dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
11 AC_DEFUN([BFD_BINARY_FOPEN],
12 [AC_REQUIRE([AC_CANONICAL_TARGET])
15 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
17 AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;;
20 dnl Get a default for CC_FOR_BUILD to put into Makefile.
21 AC_DEFUN([BFD_CC_FOR_BUILD],
22 [# Put a plausible default for CC_FOR_BUILD in Makefile.
23 if test -z "$CC_FOR_BUILD"; then
24 if test "x$cross_compiling" = "xno"; then
30 AC_SUBST(CC_FOR_BUILD)
31 # Also set EXEEXT_FOR_BUILD.
32 if test "x$cross_compiling" = "xno"; then
33 EXEEXT_FOR_BUILD='$(EXEEXT)'
35 AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
37 echo 'int main () { return 0; }' > conftest.c
39 ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
40 for file in conftest.*; do
42 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
43 *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
47 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
49 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
51 AC_SUBST(EXEEXT_FOR_BUILD)])dnl
53 sinclude(../libtool.m4)
54 dnl The lines below arrange for aclocal not to bring libtool.m4
55 dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
56 dnl to add a definition of LIBTOOL to Makefile.in.
58 AC_DEFUN([AM_PROG_LIBTOOL],)
59 AC_DEFUN([AM_DISABLE_SHARED],)
63 AC_DEFUN([AM_INSTALL_LIBBFD],
64 [AC_MSG_CHECKING([whether to install libbfd])
65 AC_ARG_ENABLE(install-libbfd,
66 [ --enable-install-libbfd controls installation of libbfd and related headers],
67 install_libbfd_p=$enableval,
68 if test "${host}" = "${target}" || test "$enable_shared" = "yes"; then
73 AC_MSG_RESULT($install_libbfd_p)
74 AM_CONDITIONAL(INSTALL_LIBBFD, test $install_libbfd_p = yes)
75 # Need _noncanonical variables for this.
77 ACX_NONCANONICAL_TARGET
78 # libbfd.a is a host library containing target dependent code
80 bfdincludedir='$(includedir)'
81 if test "${host}" != "${target}"; then
82 bfdlibdir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/lib'
83 bfdincludedir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/include'
86 AC_SUBST(bfdincludedir)