From: Thomas D Date: Tue, 5 Jan 2016 15:39:07 +0000 (+0100) Subject: configure: Add base check for dynmodules parameter to prevent impossible build attemp... X-Git-Tag: dnsdist-1.0.0-alpha2~2^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09acf5464f18268f898e6a4b5a96af53ed9f523d;p=thirdparty%2Fpdns.git configure: Add base check for dynmodules parameter to prevent impossible build attempts due to invalid values We didn't validate dynmodules parameter values which allows build failures like > [...] > Making all in geobackend > /bin/sh: line 20: cd: geobackend: No such file or directory > Makefile:499: recipe for target 'all-recursive' failed > make[2]: *** [all-recursive] Error 1 which happens for example if a dynamic module was removed (or the user just passed an invalid value). Now we will do a base check by checking for the existence of the module's source dir. This will allow us to catch errors like that and show a meaningful error message if necessary. Reference: https://github.com/PowerDNS/pdns/issues/3171 --- diff --git a/configure.ac b/configure.ac index b205ef7eb3..9155c8be81 100644 --- a/configure.ac +++ b/configure.ac @@ -308,7 +308,14 @@ for a in $modules; do done for a in $dynmodules; do - moduledirs="$moduledirs ${a}backend" + AC_MSG_CHECKING([whether we can build dynamic module "${a}"]) + if [[ -d "$srcdir/modules/${a}backend" ]]; then + AC_MSG_RESULT([yes]) + moduledirs="$moduledirs ${a}backend" + else + AC_MSG_RESULT([no]) + AC_MSG_ERROR([Do not know how to build module "$a", "$srcdir/modules/${a}backend" doesn't exist! Please review --with-dynmodules parameter for supported values.]) + fi done LDFLAGS="$RELRO_LDFLAGS $LDFLAGS"