etcdir='${datadir}/emacs/${version}/etc'
lockdir='${statedir}/emacs/lock'
archlibdir='${libdir}/emacs/${version}/${configuration}'
+CC=
# We cannot use this variable in the case statement below, because many
# /bin/sh's have broken semantics for "case". Unfortunately, you must
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
machine=symmetry opsys=bsd4-3
;;
+ ## Unspecified sysv on an ncr machine defaults to svr4.
+ i[34]86-ncr-sysv* )
+ machine=intel386 opsys=usg5-4
+ ;;
+
## Intel 860
- i860-*-sysvr4* )
+ i860-*-sysv4* )
machine=i860 opsys=usg5-4
;;
;;
mips-mips-riscos4* )
machine=mips4 opsys=bsd4-3
+ NON_GNU_CC="cc -systype bsd43"
;;
mips-mips-bsd* )
machine=mips opsys=bsd4-3
;;
## NeXT
- m68*-next-mach* | m68*-next-bsd* )
+ m68*-next-* )
machine=next opsys=mach2
;;
*-sunos4.0* ) opsys=sunos4-0 ;;
*-sunos4.1.3* ) opsys=sunos4-1-3 ;;
*-sunos4* | *-sunos ) opsys=sunos4-1 ;;
- *-sunos5* | *-solaris* ) opsys=sol2 ;;
+ *-sunos5.3* | *-solaris2.3* )
+ opsys=sol2-3
+ NON_GNU_CPP=/usr/ccs/lib/cpp
+ ;;
+ *-sunos5* | *-solaris* )
+ opsys=sol2
+ NON_GNU_CPP=/usr/ccs/lib/cpp
+ ;;
* ) opsys=bsd4-2 ;;
esac
;;
*-bsd386* ) opsys=bsd386 ;;
*-386bsd* ) opsys=386bsd ;;
*-netbsd* ) opsys=netbsd ;;
+ *-nextstep* ) opsys=mach2 ;;
## Otherwise, we'll fall through to the generic opsys code at the bottom.
esac
;;
#### Choose a compiler.
case ${with_gcc} in
"yes" ) CC="gcc" GCC=1 ;;
- "no" ) CC="cc" ;;
+ "no" ) CC=${CC:-"cc"} ;;
* )
] AC_PROG_CC [
esac
+#### Some systems specify a CPP to use unless we are using GCC.
+#### Now that we know whether we are using GCC, we can decide whether
+#### to use that one.
+if [ x$NON_GNU_CPP = x ] || [ x$GCC = x1 ]
+then true
+else
+ CPP=$NON_GNU_CPP
+fi
+
+#### Some systems specify a CC to use unless we are using GCC.
+#### Now that we know whether we are using GCC, we can decide whether
+#### to use that one.
+if [ x$NON_GNU_CC = x ] || [ x$GCC = x1 ]
+then true
+else
+ CC=$NON_GNU_CC
+fi
+
#### Some other nice autoconf tests. If you add a test here which
#### should make an entry in src/config.h, don't forget to add an
#### #undef clause to src/config.h.in for autoconf to modify.
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."
if test "${HAVE_X11}" = "yes"; then
DEFS="$C_SWITCH_X_SITE $DEFS"
LIBS="$LD_SWITCH_X_SITE $LIBX $LIBS"
- AC_HAVE_FUNCS(XrmSetDatabase XScreenResourceString XScreenNumberOfScreen)
+ AC_HAVE_FUNCS(XrmSetDatabase XScreenResourceString XScreenNumberOfScreen XSetWMProtocols)
fi
AC_ALLOCA
# logb and frexp are found in -lm on most systems.
AC_HAVE_LIBRARY(-lm)
-AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir mkdir rmdir random bcopy logb frexp ftime res_init)
+AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir mkdir rmdir random bcopy logb frexp ftime res_init setsid)
ok_so_far=true
AC_FUNC_CHECK(socket, , ok_so_far=)
if [ "$run_in_place" = "1" ]; then
lispdir='${srcdir}/lisp'
- locallisppath='${srcdir}/site-lisp:${datadir}/emacs/site-lisp'
+ locallisppath='${srcdir}/site-lisp'
etcdir='${srcdir}/etc'
lockdir='${srcdir}/lock'
archlibdir='${srcdir}/lib-src'
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;
+ chmod 444 Makefile.new;
mv -f Makefile.new Makefile;
- chmod 444 Makefile;
rm -f junk.c junk.cpp;
)'
eval `echo $makefile_command`
done
exit 0
]
-