diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-11-18 15:37:14 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-11-18 15:37:14 +0100 |
commit | 5041a5d5a574449638e7579827d9b67ed1450b0d (patch) | |
tree | 7d565ff30edcadd6e33da22e1e8aa4e4bb46e88e | |
parent | f3b388b80daebb13398f2b6b269eda0aa947e469 (diff) | |
download | cmumble-5041a5d5a574449638e7579827d9b67ed1450b0d.tar.gz cmumble-5041a5d5a574449638e7579827d9b67ed1450b0d.tar.bz2 cmumble-5041a5d5a574449638e7579827d9b67ed1450b0d.zip |
configure: Fix protoc-c detection
* Use --with-protoc=command instead of env var
* Error out when protoc is not found.
-rw-r--r-- | configure.ac | 12 |
1 files 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])]) |