From acd399a1c7b8db2651f0e8458e3717a3de09b9e5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 12 Sep 1993 10:47:34 +0000 Subject: [PATCH] Substitute variable `vpath_sed'. If not in $srcdir and $srcdir is configured, issue warning that GNU make is required, and set vpath_sed to use vpath.sed script. --- configure1.in | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/configure1.in b/configure1.in index 24e93b66b9..1d674248e7 100755 --- a/configure1.in +++ b/configure1.in @@ -362,6 +362,23 @@ case "${srcdir}" in * ) srcdir="`(cd ${srcdir}; pwd)`" ;; esac +#### Check if the source directory already has a configured system in it. +if [ `pwd` != `(cd ${srcdir} && pwd)` ] \ + && [ -f "${srcdir}/src/config.h" ] ; then + (echo "${progname}: WARNING: The directory tree \`${srcdir}' is being used" + echo " as a build directory right now; it has been configured in its own" + echo " right. To configure in another directory as well, you MUST" + echo " use GNU make. If you do not have GNU make, then you must" + echo " now do \`make distclean' in ${srcdir}," + echo " and then run ${progname} again.") >&2 + # We need a multi-line sed script, which cannot go in a makefile. + vpath_sed='-f vpath.sed' +else + # Do the normal substitution for VPATH. This will not crash non-GNU make. + vpath_sed='-e '\''s|^\(VPATH *=\).*$$|\1 ='\''"${srcdir}/${subdir}|"' +fi +] AC_SUBST(vpath_sed) [ + ### Make the necessary directories, if they don't exist. for dir in ./src ./lib-src ./cpp ./oldXMenu ./etc ; do if [ ! -d ${dir} ]; then @@ -1293,4 +1310,4 @@ test -n "${prefix}" && test -n "${exec_prefix}" && exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` ] -AC_OUTPUT(Makefile) +AC_OUTPUT(Makefile ${extra_output}) -- 2.20.1