From 5041a5d5a574449638e7579827d9b67ed1450b0d Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Mon, 18 Nov 2013 15:37:14 +0100 Subject: configure: Fix protoc-c detection * Use --with-protoc=command instead of env var * Error out when protoc is not found. --- configure.ac | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index fed636d..de8a9ff 100644 --- a/configure.ac +++ b/configure.ac @@ -13,12 +13,18 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -AC_ARG_VAR([PROTOC_C], [path to protoc-c utility]) - # Check for programs AC_PROG_CC AC_PROG_SED -AC_PATH_PROG([PROTOC_C], [protoc-c], [false]) + +AC_ARG_WITH([protoc], + [AS_HELP_STRING([--with-protoc=COMMAND], + [use the given protoc command])], + [PROTOC_C=$withval], + [AC_PATH_PROG([PROTOC_C], [protoc-c], [false])]) + +AS_IF([test "x$PROTOC_C" = "xfalse"], + [AC_MSG_ERROR([protoc-c compiler not found])]) AC_CHECK_LIB([ncurses], [tputs], [], [AC_MSG_ERROR([ncurses needed for libreadline])]) -- cgit