From 31a8dc9a13183ffb31a61169df165e53565a8e70 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Mon, 7 Nov 2016 19:00:07 +0100 Subject: [PATCH] Comply wih the autoconf manual about SYSCONFDIR The manual says to allow to configure the dirs when calling make, meaning that we cannot expand them in configure.ac. Note that we use additional quoting to allow dirs with spaces in the gcc command line. This is done for the Window port of SnapRAID. --- Makefile.am | 2 ++ configure.ac | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index a7647d0e..387c002d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,8 @@ bin_PROGRAMS = snapraid check_PROGRAMS = mktest mkstream +AM_CPPFLAGS = -DSYSCONFDIR="\"${sysconfdir}\"" + snapraid_SOURCES = \ raid/raid.c \ raid/check.c \ diff --git a/configure.ac b/configure.ac index d78bb769..845b6488 100644 --- a/configure.ac +++ b/configure.ac @@ -364,12 +364,6 @@ AC_ARG_VAR([TESTENV_SSSE3], [Test environment for SSSE3]) AC_ARG_VAR([TESTENV_SSE42], [Test environment for SSE42]) AC_ARG_VAR([TESTENV_AVX2], [Test environment for AVX2]) -dnl Expand default prefix, required to expand sysconfdir=$prefix/etc -test "x$prefix" = xNONE && prefix=$ac_default_prefix - -dnl Set the configuration directory in config.h -AC_DEFINE_UNQUOTED([SYSCONFDIR],["$(eval echo $sysconfdir)"],[Configuration directory]) - AC_CONFIG_FILES([Makefile]) AC_OUTPUT