[master] 3fbeda7 Polish: do the --prefix inheritance in one place

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Wed Mar 15 13:55:07 CET 2017


commit 3fbeda74ab1c79104134793f7a339b486b8dd087
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Sat Mar 11 11:31:10 2017 +0100

    Polish: do the --prefix inheritance in one place
    
    Closes #2252

diff --git a/varnish.m4 b/varnish.m4
index 3bfeb0e..58248fb 100644
--- a/varnish.m4
+++ b/varnish.m4
@@ -92,14 +92,12 @@ AC_DEFUN([_VARNISH_PKG_CONFIG], [
 	AC_SUBST([VARNISH_TEST_PATH],
 		[$VARNISHAPI_SBINDIR:$VARNISHAPI_BINDIR:$PATH])
 
+	dnl Inherit Varnish's prefix if undefined
+	test "$prefix" = NONE && ac_default_prefix=$VARNISHAPI_PREFIX
+
 	dnl Define the VCL directory for automake
-	AS_CASE([$prefix],
-		[NONE], [
-			vcldir=$VARNISHAPI_VCLDIR
-			ac_default_prefix=$VARNISHAPI_PREFIX],
-		[vcldir=$($PKG_CONFIG --define-variable=datadir=$datadir \
-			--variable=vcldir varnishapi)]
-	)
+	vcldir=$($PKG_CONFIG --define-variable=datadir=$datadir \
+		--variable=vcldir varnishapi)
 	AC_SUBST([vcldir])
 
 	dnl Define the VCL directory for this package
@@ -158,13 +156,8 @@ AC_DEFUN([_VARNISH_VMOD_CONFIG], [
 	AC_SUBST([VARNISHAPI_DATAROOTDIR])
 
 	dnl Define the VMOD directory for libtool
-	AS_CASE([$prefix],
-		[NONE], [
-			vmoddir=$VARNISHAPI_VMODDIR
-			ac_default_prefix=$VARNISHAPI_PREFIX],
-		[vmoddir=$($PKG_CONFIG --define-variable=libdir=$libdir \
-			--variable=vmoddir varnishapi)]
-	)
+	vmoddir=$($PKG_CONFIG --define-variable=libdir=$libdir \
+		--variable=vmoddir varnishapi)
 	AC_SUBST([vmoddir])
 
 	dnl Define an automake silent execution for vmodtool



More information about the varnish-commit mailing list