From d2bc2be8db11a678c5caff8a6a5b6bcadd3fc3b7 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sat, 14 Sep 2013 02:45:23 +0100 Subject: 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 Message-Id: Patchwork-Id: 274892 diff --git a/Makefile.in b/Makefile.in index 09bbf7c..895983b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -68,6 +68,7 @@ export objcopy := @OBJCOPY@ export objdump := @OBJDUMP@ export readelf := @READELF@ export patch := @PATCH@ +export gperf := @GPERF@ export CC := @CC@ export CPP := @CPP@ export CPPFLAGS := @CPPFLAGS@ @@ -212,6 +213,7 @@ paths.mk: FORCE echo 'export objdump=$(objdump)'; \ echo 'export readelf=$(readelf)'; \ echo 'export patch=$(patch)'; \ + echo 'export gperf=$(gperf)'; \ ) >$@ paths.sh: FORCE @@ -228,6 +230,7 @@ paths.sh: FORCE echo 'export objdump="$(objdump)"'; \ echo 'export readelf="$(readelf)"'; \ echo 'export patch="$(patch)"'; \ + echo 'export gperf="$(gperf)"'; \ ) >$@ config/configure.in: FORCE diff --git a/configure.ac b/configure.ac index 719d3cb..df3f9dd 100644 --- a/configure.ac +++ b/configure.ac @@ -143,15 +143,19 @@ AC_ARG_WITH([readelf], AS_HELP_STRING([--with-readelf=PATH], [Specify the full PATH to GNU readelf]), [READELF=$withval]) +AC_ARG_WITH([gperf], + AS_HELP_STRING([--with-gperf=PATH], + [Specify the full PATH to GNU gperf]), + [GPERF=$withval]) AC_PROG_RANLIB ACX_PATH_TOOL_REQ([OBJCOPY], [objcopy]) ACX_PATH_TOOL_REQ([OBJDUMP], [objdump]) ACX_PATH_TOOL_REQ([READELF], [readelf]) +ACX_PATH_TOOL_REQ([GPERF], [gperf]) ACX_CHECK_PROGS_REQ([bison], [bison]) ACX_CHECK_PROGS_REQ([flex], [flex]) -ACX_CHECK_PROGS_REQ([gperf], [gperf]) ACX_CHECK_PROGS_REQ([makeinfo], [makeinfo]) ACX_CHECK_PROGS_REQ([cut], [cut]) ACX_CHECK_PROGS_REQ([stat], [stat]) diff --git a/kconfig/Makefile b/kconfig/Makefile index 93b3fe6..f7db96a 100644 --- a/kconfig/Makefile +++ b/kconfig/Makefile @@ -84,7 +84,7 @@ zconf.tab.c: zconf.y zconf.hash.c: zconf.gperf @echo " GPERF '$@'" - @gperf < $< > $@ + @$(gperf) < $< > $@ lex.zconf.c: zconf.l @echo " LEX '$@'" -- cgit v0.10.2-6-g49f6