configure: Add --with-gperf option
authorRay Donnelly <mingw.android@gmail.com>
Sat Sep 14 02:45:23 2013 +0100 (2013-09-14)
changeset 323169f5dc1ff327
parent 3230 86a8d1d467c8
child 3232 c500e2df7952
configure: Add --with-gperf option

On OS X, Apple supply an old gperf (3.0.3) with xcode and
xcode commandline tools which causes build failures:

./zconf.hash.c:183:17: error: expected expression
{offsetof(struct kconf_id_strings_t, kconf_id_strings_str2),

.. upgrading to gperf 3.0.4 was sufficient to fix this,
so this option allows the user to specify the gperf
program that they wish to use.

To install gperf 3.0.4 from homebrew, I did:

brew tap homebrew/dupes
brew install homebrew/dupes/gperf

.. then passed --with-gperf=$BREWFIX/Cellar/gperf/3.0.4/bin/gperf
to configure

Signed-off-by: Ray Donnelly <mingw.android@gmail.com>
Message-Id: <CAOYw7dtCmcJ9WiqmQ81MmZeRPcV-tDOqe9=kRDW4uQGuZNd2Ng@mail.gmail.com>
Patchwork-Id: 274892
Makefile.in
configure.ac
kconfig/Makefile
     1.1 --- a/Makefile.in	Thu Aug 01 20:24:35 2013 +0000
     1.2 +++ b/Makefile.in	Sat Sep 14 02:45:23 2013 +0100
     1.3 @@ -68,6 +68,7 @@
     1.4  export objdump         := @OBJDUMP@
     1.5  export readelf         := @READELF@
     1.6  export patch           := @PATCH@
     1.7 +export gperf           := @GPERF@
     1.8  export CC              := @CC@
     1.9  export CPP             := @CPP@
    1.10  export CPPFLAGS        := @CPPFLAGS@
    1.11 @@ -212,6 +213,7 @@
    1.12  	  echo 'export objdump=$(objdump)';         \
    1.13  	  echo 'export readelf=$(readelf)';         \
    1.14  	  echo 'export patch=$(patch)';             \
    1.15 +	  echo 'export gperf=$(gperf)';             \
    1.16  	 ) >$@
    1.17  
    1.18  paths.sh: FORCE
    1.19 @@ -228,6 +230,7 @@
    1.20  	  echo 'export objdump="$(objdump)"';       \
    1.21  	  echo 'export readelf="$(readelf)"';       \
    1.22  	  echo 'export patch="$(patch)"';           \
    1.23 +	  echo 'export gperf="$(gperf)"';           \
    1.24  	 ) >$@
    1.25  
    1.26  config/configure.in: FORCE
     2.1 --- a/configure.ac	Thu Aug 01 20:24:35 2013 +0000
     2.2 +++ b/configure.ac	Sat Sep 14 02:45:23 2013 +0100
     2.3 @@ -143,15 +143,19 @@
     2.4      AS_HELP_STRING([--with-readelf=PATH],
     2.5                     [Specify the full PATH to GNU readelf]),
     2.6      [READELF=$withval])
     2.7 +AC_ARG_WITH([gperf],
     2.8 +    AS_HELP_STRING([--with-gperf=PATH],
     2.9 +                   [Specify the full PATH to GNU gperf]),
    2.10 +    [GPERF=$withval])
    2.11  
    2.12  AC_PROG_RANLIB
    2.13  ACX_PATH_TOOL_REQ([OBJCOPY], [objcopy])
    2.14  ACX_PATH_TOOL_REQ([OBJDUMP], [objdump])
    2.15  ACX_PATH_TOOL_REQ([READELF], [readelf])
    2.16 +ACX_PATH_TOOL_REQ([GPERF], [gperf])
    2.17  
    2.18  ACX_CHECK_PROGS_REQ([bison], [bison])
    2.19  ACX_CHECK_PROGS_REQ([flex], [flex])
    2.20 -ACX_CHECK_PROGS_REQ([gperf], [gperf])
    2.21  ACX_CHECK_PROGS_REQ([makeinfo], [makeinfo])
    2.22  ACX_CHECK_PROGS_REQ([cut], [cut])
    2.23  ACX_CHECK_PROGS_REQ([stat], [stat])
     3.1 --- a/kconfig/Makefile	Thu Aug 01 20:24:35 2013 +0000
     3.2 +++ b/kconfig/Makefile	Sat Sep 14 02:45:23 2013 +0100
     3.3 @@ -84,7 +84,7 @@
     3.4  
     3.5  zconf.hash.c: zconf.gperf
     3.6  	@echo "  GPERF  '$@'"
     3.7 -	@gperf < $< > $@
     3.8 +	@$(gperf) < $< > $@
     3.9  
    3.10  lex.zconf.c: zconf.l
    3.11  	@echo "  LEX    '$@'"