configure: add checks for objcopy and objdump
author"Yann E. MORIN" <yann.morin.1998@free.fr>
Tue Jul 17 21:42:32 2012 +0200 (2012-07-17)
changeset 30002d362c2a8ed3
parent 2999 4ccfca658d9b
child 3001 0dfc9c1fcb34
configure: add checks for objcopy and objdump

These two went MIA after the migration to an autoconf-based ./configure.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
configure.ac
     1.1 --- a/configure.ac	Sat Jul 14 18:25:47 2012 +0200
     1.2 +++ b/configure.ac	Tue Jul 17 21:42:32 2012 +0200
     1.3 @@ -121,6 +121,25 @@
     1.4  AS_IF([test -z "$CC"],
     1.5        [AC_MSG_ERROR([no suitable compiler found])])
     1.6  AC_PROG_CPP
     1.7 +
     1.8 +# But we still need a way to specify the PATH to GNU versions (Damn MacOS)
     1.9 +AC_ARG_WITH([objcopy],
    1.10 +    AS_HELP_STRING([--with-objcopy=PATH],
    1.11 +                   [Specify the full PATH to GNU objcopy]),
    1.12 +    [OBJCOPY=$withval])
    1.13 +AC_ARG_WITH([objdump],
    1.14 +    AS_HELP_STRING([--with-objdump=PATH],
    1.15 +                   [Specify the full PATH to GNU objdump]),
    1.16 +    [OBJDUMP=$withval])
    1.17 +AC_ARG_WITH([ranlib],
    1.18 +    AS_HELP_STRING([--with-ranlib=PATH],
    1.19 +                   [Specify the full PATH to GNU ranlib]),
    1.20 +    [RANLIB=$withval])
    1.21 +AC_ARG_WITH([readelf],
    1.22 +    AS_HELP_STRING([--with-readelf=PATH],
    1.23 +                   [Specify the full PATH to GNU readelf]),
    1.24 +    [READELF=$withval])
    1.25 +
    1.26  AC_PROG_RANLIB
    1.27  ACX_PATH_TOOL_REQ([OBJCOPY], [objcopy])
    1.28  ACX_PATH_TOOL_REQ([OBJDUMP], [objdump])