echo "${short_usage}") >&2
exit 1
fi
- val="$1"; shift
+ val="$1"; shift
fi
srcdir="${val}"
;;
run_in_place=1
;;
+ ## Should this use the "single tree" configuration?
+ "single_tree" )
+ run_in_place=
+ single_tree=1
+ ;;
+
## Has the user specified one of the path options?
prefix | exec_prefix | bindir | libdir | etcdir | datadir | \
archlibdir | statedir | mandir | infodir | lispdir | lockdir | \
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=]'AC_QUOTE_SQUOTE(AC_QUOTE_SQUOTE('-e '\''s|^\(VPATH *=\).*$$|\1 ='\''"${srcdir}/${subdir}|"'))'[
+ extrasub='/^VPATH[ ]*=/c\
+vpath %.c $(srcdir)\
+vpath %.h $(srcdir)\
+vpath %.y $(srcdir)\
+vpath %.l $(srcdir)\
+vpath %.s $(srcdir)\
+vpath %.in $(srcdir)'
fi
-] AC_SUBST(vpath_sed) [
### Make the necessary directories, if they don't exist.
for dir in ./src ./lib-src ./cpp ./oldXMenu ./etc ; do
dnl checks for UNIX variants that set `DEFS'
dnl checks for header files
-AC_HAVE_HEADERS(sys/timeb.h sys/time.h)
+AC_HAVE_HEADERS(sys/timeb.h sys/time.h unistd.h)
AC_STDC_HEADERS
AC_TIME_WITH_SYS_TIME
dnl other checks for UNIX variants
[
-
#### Choose a window system.
echo "Checking window system."
test -n "${exec_prefix}" &&
exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
]
-AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile src/Makefile.in)
-[
+AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile src/Makefile.in) [
# Build src/Makefile from ${srcdir}/src/Makefile.in. This must be done
# after src/config.h is built, since we rely on that file. Only do the
# build if "config.status" is present, since it's non-presence indicates
exit $status
fi
topsrcdir=${srcdir}
+ # We discard all lines in Makefile.in that start with `# Generated' or /**/#
+ # because some cpps get confused by them.
+ # Really we should preserve them somehow into Makefile,
+ # but that is beyond my level of shell programming.
makefile_command='echo "creating src/Makefile";
topsrcdir='"${topsrcdir}"';
( cd ./src;
- cp Makefile.in junk.c;
+ rm -f junk.c;
+ sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c;
eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
< junk.cpp '\
' sed -e '\''s/^#.*//'\'' '\
' -e '\''s/^ / /'\'' '\
' | sed -n -e '\''/^..*$/p'\'' '\
' > Makefile.new;
-dnl There is a window of lossage if you mv Makefile.new before chmoding it.
chmod 444 Makefile.new;
mv -f Makefile.new Makefile;
rm -f junk.c junk.cpp;
done
exit 0
]
-