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.
This commit is contained in:
Andrea Mazzoleni 2016-11-07 19:00:07 +01:00
parent ee1aa840f1
commit 31a8dc9a13
2 changed files with 2 additions and 6 deletions

View file

@ -1,6 +1,8 @@
bin_PROGRAMS = snapraid
check_PROGRAMS = mktest mkstream
AM_CPPFLAGS = -DSYSCONFDIR="\"${sysconfdir}\""
snapraid_SOURCES = \
raid/raid.c \
raid/check.c \

View file

@ -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