dnl This is an autoconf script. dnl To rebuild the `configure.com' script from this, execute the command dnl autoconf dnl in the directory containing this script. You must have autoconf dnl for VMS version 1.4 or later. dnl dnl The following text appears in the resulting `configure.com' script, dnl explaining how to rebuild it. [$! This is the VMS version of configure.in $!#### Configuration script for GNU Emacs $!#### Copyright (C) 1992 Free Software Foundation, Inc. $ $!### Don't edit this script! $!### This script was automatically generated by the `autoconf' program $!### from the file `configure.com_in'. $!### To rebuild it, execute the command $!### autoconf $!### in the this directory. You must have autoconf for VMS $!### version 1.4 or later. $ $!### This file is part of GNU Emacs. $ $!### GNU Emacs is free software; you can redistribute it and/or modify $!### it under the terms of the GNU General Public License as published by $!### the Free Software Foundation; either version 1, or (at your option) $!### any later version. $ $!### GNU Emacs is distributed in the hope that it will be useful, $!### but WITHOUT ANY WARRANTY; without even the implied warranty of $!### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the $!### GNU General Public License for more details. $ $!### You should have received a copy of the GNU General Public License $!### along with GNU Emacs; see the file COPYING. If not, write to $!### the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. $ $!### Since Emacs has configuration requirements that autoconf can't $!### meet, this file is an unholy marriage of custom-baked $!### configuration code and autoconf macros. $!### $!### We use the m4 quoting characters [ ] (as established by the $!### autoconf system) to include large sections of raw sewage - Oops, I $!### mean, shell code - in the final configuration script. $!### $!### Usage: @configure config_name $!### $!### If configure succeeds, it leaves its status in config.status. $!### If configure fails after disturbing the status quo, $!### config.status is removed. $ $ progname = f$element(0,";",f$environment("procedure")) $ say := write sys$output $ sayerr := write sys$error $ $!### Establish some default values $ run_in_place="" $ single_tree="" $ force="" $ with_debug_hack="" $ startupdir:=sys$common:[sys$startup] $ vuelibdir:=sys$common:[vue$library.user] $ prefix:=sys$sysdevice:[gnu] $ prefix_dev = f$parse(prefix,,,"NODE") + f$parse(prefix,,,"DEVICE") $ prefix_dir = f$parse(prefix,,,"DIRECTORY") - "[" - "<" - "]" - ">" $ exec_prefix="'prefix'" $ exec_prefix_dev = "'prefix_dev'" $ exec_prefix_dir = "'prefix_dir'" $ bindir_dev="'exec_prefix_dev'" $ bindir_dir="'exec_prefix_dir'.bin" $ bindir="'bindir_dev'['bindir_dir']" $ datadir_dev="'prefix_dev'" $ datadir_dir="'prefix_dir'.lib" $ datadir="'datadir_dev'['datadir_dir']" $ statedir_dev="'prefix_dev'" $ statedir_dir="'prefix_dir'.lib" $ statedir="'statedir_dev'['statedir_dir']" $ libdir_dev="'exec_prefix_dev'" $ libdir_dir="'exec_prefix_dir'.lib" $ libdir="'libdir_dev'['libdir_dir']" $ mandir_dev="'prefix_dev'" $ mandir_dir="'prefix_dir'.help" $ mandir="'mandir_dev'['mandir_dir']" $ infodir_dev="'prefix_dev'" $ infodir_dir="'prefix_dir'.info" $ infodir="'infodir_dev'['infodir_dir']" $ lispdir_dev="'datadir_dev'" $ lispdir_dir="'datadir_dir'.emacs.'version_us'.lisp" $ lispdir="'lispdir_dev'['lispdir_dir']" $ locallisppath="'datadir_dev'['datadir_dir'.emacs.site-lisp]" $ lisppath="'locallisppath','lispdir'" $ etcdir_dev="'datadir_dev'" $ etcdir_dir="'datadir_dir'.emacs.'version_us'.etc" $ etcdir="'etcdir_dev'['etcdir_dir']" $ lockdir_dev="'statedir_dev'" $ lockdir_dir="'statedir_dir'.emacs.lock" $ lockdir="'lockdir_dev'['lockdir_dir']" $ archlibdir_dev="'libdir_dev'" $ archlibdir_dir="'libdir_dir'.emacs.'version_us'.'configuration'" $ archlibdir="'archlibdir_dev'['archlibdir_dir']" $ vmslibdir_dev="'libdir_dev'" $ vmslibdir_dir="'libdir_dir'.emacs.vms" $ vmslibdir="'vmslibdir_dev'['vmslibdir_dir']" $ $!### These are all the options we have to change the different paths. $ path_options="| PREFIX | EXEC_PREFIX | BINDIR | LIBDIR | ETCDIR | DATADIR" $ path_options=path_options+" | ARCHLIBDIR | STATEDIR | MANDIR | INFODIR" $ path_options=path_options+" | LISPDIR | LOCKDIR | LISPPATH | LOCALLISPPATH" $ path_options=path_options+" | VMSLIBDIR | STARTUPDIR | VUELIBDIR |" $ $ goto main $! $!!!! Usage messages. These are implemented as subroutine you GOSUB to. $short_usage: $ say "Usage: ''progname' CONFIGURATION [-OPTION[=VALUE] ...]" $ say "" $ say "Set compilation and installation parameters for GNU Emacs, and report." $ say "CONFIGURATION specifies the machine and operating system to build for." $ say "If you omit the CONFIGURATION, ''progname' will find out by itself." $ say "--WITH-X Support the X Window System." $ say "--WITH-X=NO Don't support X." $ say "--WITH-GCC Use GCC to compile Emacs." $ say "--WITH-GCC=NO Don't use GCC to compile Emacs." $ say "--WITH-UCX Use the Digital UCX TCP/IP kit." $ say "--WITH-MULTINET Use the MultiNet TCP/IP kit." $ say "--WITH-DEBUG-HACK Use the dirty debug hack. See [.SRC]DESCRIP.MMS_IN_IN" $ say "--RUN-IN-PLACE Use libraries and data files directly out of the " $ say " source tree." $ say "--SINGLE-TREE=dev:[dir] Has the effect of creating a directory tree" $ say " at dev:[dir...] which looks like:" $ say " dev:[dir.BIN.configname] (emacs, etags, etc.)" $ say " dev:[dir.BIN.configname.ETC] (movemail, etc.)" $ say " dev:[dir.COMMON.LISP] (emacs' lisp files)" $ say " dev:[dir.COMMON.SITE-LISP] (local lisp files)" $ say " dev:[dir.COMMON.LIB] (DOC, TUTORIAL, etc.)" $ say " dev:[dir.COMMON.LOCK] (lockfiles)" $ say "--SRCDIR=dir Look for the Emacs source files in DIR." $ say "--PREFIX=dir Install files below DIR. Defaults to `''prefix''." $ say "--FORCE Forces a reconfiguration." $ say "" $ say "You may also specify any of the `path' variables found in Makefile.in," $ say "including --bindir, --libdir, --etcdir, --infodir, and so on. This allows" $ say "you to override a single default location when configuring." $ say "" $ say "If successful, 'progname' leaves its status in config.status. If" $ say "unsuccessful after disturbing the status quo, it removes config.status."" $ say "" $ return $! $main: $!#### Option processing. $ $!### Record all the arguments, so we can save them in config.status. $ arguments=f$edit("''p1' ''p2' ''p3' ''p4' ''p5' ''p6' ''p7' ''p8'",- "compress,trim") $ $!### Don't use shift -- that destroys the argument list, which autoconf needs $!### to produce config.status. It turns out that "set - ${arguments}" doesn't $!### work portably. $!### In configure.in, it ended up using shift in any case, because some shells $!### cannot expand ${10}. We don't need it here, because a .COM file will not $!### receive more than 8 arguments in any case. And if it did, it would be no $!### problem handling it. Thus, we don't need the quoted arguments either. $ args_from_file := NO $ arg_line = "" $ index = 0 $ goto while $arg_file_end: $ close arg_file $ args_from_file := NO $ arg_line = "" $while: $ if index .lt. 8 .or. args_from_file $ then $ if .not. args_from_file $ then $ index = index+1 $ current_arg = p'index' $ else $ arg_file_loop1: $ if arg_line .eqs. "" $ then $ read/error=arg_file_end/end=arg_file_end arg_file arg_line $ goto arg_file_loop1 $ endif $ current_arg = "" $ arg_line = f$edit(arg_line,"TRIM") $ arg_file_loop2: $! sh sym arg_line $ if arg_line .nes. "" $ then $ i1 = f$locate(" ",arg_line) $ arg_file_loop3: $ i2 = f$locate("""",arg_line) $ if i2 .lt. i1 $ then $ current_arg = current_arg + f$extract(0,i2,arg_line) $ arg_line = f$extract(i2,f$length(arg_line)-i2,arg_line) $ i1 = i1 - i2 $ i2 = f$locate("""",arg_line) $ current_arg = current_arg + f$extract(0,i2,arg_line) $ arg_line = f$extract(i2,f$length(arg_line)-i2,arg_line) $ i1 = i1 - i2 $ if i1 .lt. i1 then goto arg_file_loop2: ! The space was between quotes $ goto arg_file_loop3: $ endif $ current_arg = current_arg + f$extract(0,i1,arg_line) $ arg_line = f$extract(i1,f$length(arg_line)-i1,arg_line) $ endif $ ! This should make sure the argument is treated the same way as a command $ ! line argument. $ current_arg := 'current_arg' $ endif $! $! sh sym current_arg $ if current_arg .nes. "" $ then $ if f$extract(0,1,current_arg) .eqs. "+" $ then $ open/read/error=arg_file_end arg_file 'f$extract(1,999,current_arg)' $ args_from_file := YES $ goto while $ endif $ if f$extract(0,1,current_arg) .eqs. "-" $ then $ p = current_arg $ while2: $ if f$extract(0,1,p) .eqs. "-" $ then $ p = f$extract(1,999,p) $ goto while2 $ endif $ opt = f$element(0,"=",p) $ val = f$element(1,"=",p) $ if val .eqs. "=" $ then $ !!! If FOO is a boolean argument, --FOO is equivalent to $ !!! --FOO=yes. Otherwise, the value comes from the next $ !!! argument - see below. $ valomitted = "YES" $ val = "YES" $ else $ valomitted = "NO" $ endif $ tmp = f$element(0,"-",opt) $ n = 1 $us_loop: ! us = underscore, not United States :-) $ e = f$element(n,"-",opt) $ n = n + 1 $ if e .nes. "-" $ then $ tmp = tmp + "_" + e $ goto us_loop $ endif $ opt = f$edit(tmp,"upcase") $ valu = f$edit(val,"upcase") $ $ !! Process the option $ if opt .nes. "WITH_X" then goto NOT_WITH_X $ if f$extract(0,f$length(valu),"YES") .eqs. valu $ then $ val = "YES" $ else $ if f$extract(0,f$length(valu),"NO") .eqs. valu $ then $ val = "NO" $ else $ sayerr "''progname': the `--''opt'' option is supposed to have a boolean value." $ sayerr "Set it to either `yes' or `no'."" $ gosub short_usage $ exit 0 $ endif $ endif $ 'opt'=val $ goto while $ NOT_WITH_X: $ if opt .nes. "WITH_GCC" .and. opt .nes. "WITH_GNU_CC" then - goto NOT_WITH_GCC $ if f$extract(0,f$length(valu),"YES") .eqs. valu $ then $ val = "YES" $ else $ if f$extract(0,f$length(valu),"NO") .eqs. valu $ then $ val = "NO" $ else $ sayerr "''progname': the `--''opt'' option is supposed to have a boolean value." $ sayerr "Set it to either `yes' or `no'."" $ gosub short_usage $ exit 0 $ endif $ endif $ with_gcc=val $ goto while $ NOT_WITH_GCC: $ if opt .nes. "WITH_UCX" then goto NOT_WITH_UCX $ if f$extract(0,f$length(valu),"YES") .eqs. valu $ then $ val = "YES" $ else $ if f$extract(0,f$length(valu),"NO") .eqs. valu $ then $ val = "NO" $ else $ sayerr "''progname': the `--''opt'' option is supposed to have a boolean value." $ sayerr "Set it to either `yes' or `no'."" $ gosub short_usage $ exit 0 $ endif $ endif $ 'opt'=val $ goto while $ NOT_WITH_UCX: $ if opt .nes. "WITH_MULTINET" then goto NOT_WITH_MULTINET $ if f$extract(0,f$length(valu),"YES") .eqs. valu $ then $ val = "YES" $ else $ if f$extract(0,f$length(valu),"NO") .eqs. valu $ then $ val = "NO" $ else $ sayerr "''progname': the `--''opt'' option is supposed to have a boolean value." $ sayerr "Set it to either `yes' or `no'."" $ gosub short_usage $ exit 0 $ endif $ endif $ 'opt'=val $ goto while $ NOT_WITH_MULTINET: $ if opt .nes. "WITH_DEBUG_HACK" then goto NOT_WITH_DEBUG_HACK $ with_debug_hack = "YES" $ goto while $ NOT_WITH_DEBUG_HACK: $ if opt .nes. "SRCDIR" then goto NOT_SRCDIR $ if valomitted $ then $ i = index + 1 $ if index .eq. 8 .or. (index .lt. 8 .and. p'i' .eqs. "") $ then $ sayerr "''progname': You must give a value for the `--''opt'' option, as in" $ sayerr " `--''opt'=FOO'." $ gosub short_usage $ exit 0 $ endif $ index = i $ val = current_arg $ endif $ SRCDIR = val $ goto while $ NOT_SRCDIR: $ if opt .nes. "RUN_IN_PLACE" then goto NOT_RUN_IN_PLACE $ single_tree="NO" $ run_in_place="YES" $ goto while $ NOT_RUN_IN_PLACE: $ if opt .nes. "SINGLE_TREE" then goto NOT_SINGLE_TREE $ single_tree="YES" $ run_in_place="NO" $ goto while $ NOT_SINGLE_TREE: $! ## Has the user specified one of the path_options? $ if f$locate("| "+opt+" |", path_options) .ge. f$length(path_options) - then goto NO_PATH_OPTION $ if valomitted $ then $ i = index + 1 $ if index .eq. 8 .or. (index .lt. 8 .and. p'i' .eqs. "") $ then $ sayerr "''progname': You must give a value for the `--''opt'' option, as in" $ sayerr " `--''opt'=FOO'." $ gosub short_usage $ exit 0 $ endif $ index = i $ val = current_arg $ endif $ if f$locate("PATH",opt) .ne. f$length(opt) $ then $ 'opt' = val $ 'opt'_specified = "YES" $ else $ 'opt'_dev = f$parse(val,,,"NODE")+f$parse(val,,,"DEVICE") $ 'opt'_dir = f$parse(val,,,"DIRECTORY")-"["-"<"-"]"-">" $ 'opt' = val $ 'opt'_specified = "YES" $ endif $ goto while $ NO_PATH_OPTION: $ if opt .nes. "VERBOSE" then goto NOT_VERBOSE $ VERBOSE = "YES" $ goto while $ NOT_VERBOSE: $ if opt .eqs. "USAGE" .or. opt .eqs. "HELP" $ then $ gosub short_usage $ exit 1 $ endif $ if opt .nes. "FORCE" then goto NOT_FORCE $ force = "YES" $ goto while $ NOT_FORCE: $ else $ !! Anything not starting with a hyphen we assume is a $ !! configuration name. $ !! This really is stupid... We know it is VMS, so we just cancel it. $ configuration = current_arg $ endif $ endif $ goto while $ endif $! done $ $ if "''configuration'" .eqs. "" $ then $ ! We use 'avms' for AXP/VMS because stupid Digital made a new $ ! version number serie for that one! $ configuration = "alpha-dec-avms" $ if f$getsyi("HW_MODEL") .ge. 1024 - .and. f$extract(1,1,f$getsyi("VERSION")) .nes. "1" then - configuration = "alpha-dec-vms" $ if f$getsyi("HW_MODEL") .lt. 1024 then - configuration = "vax-dec-vms" $ vms_version = f$extract(1,3,f$getsyi("version")) !! from V5.5-2 we have 5.5 $ vms_version_major = f$extract(0,1,vms_version) $ vms_version_minor = f$extract(2,1,vms_version) $ vms_version_tmp = vms_version_major+"-"+vms_version_minor $ configuration = configuration + vms_version_tmp $ canonical = configuration $ use_avms_h := no $ if f$element(0,"-",configuration) .eqs. "alpha" - .and. f$extract(0,4,f$element(2,"-",configuration)) .eqs. "avms" then - use_avms_h := yes $ endif $ $!#### Decide where the source is. $ if "''SRCDIR'" .eqs. "" $ then $ !+ ]changequote(,)dnl $ dirname=f$parse("A.;0",progname) - "A.;0" $ dirname=dirname - ".][000000" - ".><000000" - ".>[000000" - ".]<000000" $ dirname=dirname - "][" - "><" - ">[" - "]<" $ if f$element(1,"<",dirname) .nes. "<" then - dirname = f$element(0,"<",dirname) + "[" + f$element(1,"<",dirname) $ if f$element(1,">",dirname) .nes. ">" then - dirname = f$element(0,">",dirname) + "]" + f$element(1,">",dirname) $ if dirname - "[000000." .nes. dirname then dirname = dirname - "000000." $ !- $ !! We know this file is in the root of the source $ if f$search(dirname - "]" + ".SRC]LISP.H") .nes. "" - .and. f$search(dirname - "]" + ".LISP]VERSION.EL") .nes. "" $ then $ srcdir = dirname $ else $ if f$search("[.SRC]LISP.H") .nes. "" - .and. f$search("[.LISP]VERSION.EL") .nes. "" $ then $ srcdir = f$parse("A.;0") - "A.;0" $ else $ if f$search("[-.SRC]LISP.H") .nes. "" - .and. f$search("[-.LISP]VERSION.EL") .nes. "" $ then $ srcdir = f$parse("[-]A.;0") - "A.;0" $ else $ sayerr "''progname': Neither the current directory nor its parent seem to" $ sayerr "contain the Emacs sources. If you do not want to build Emacs in its" $ sayerr "source tree, you should run `''progname'' in the directory in which" $ sayerr "you wish to build Emacs, using its `--SRCDIR' option to say where the" $ sayerr "sources may be found." $ gosub short_usage $ exit 0 $ endif $ endif $ endif $ else $ if f$search(srcdir - "]" + ".SRC]LISP.H") .eqs. "" - .or. f$search(srcdir - "]" + ".LISP]VERSION.EL") .eqs. "" $ then $ sayerr "''progname': The directory specified with the `--SRCDIR' option," $ sayerr "`''srcdir'', doesn't seem to contain the Emacs sources. You should" $ sayerr "either run the `''progname'' script at the top of the Emacs source" $ sayerr "tree, or use the `--SRCDIR' option to specify where the Emacs sources" $ sayerr "are." $ gosub short_usage $ exit 0 $ endif $ endif $! $!#### Make srcdir absolute, if it isn't already. It's important to $!#### avoid running the path through pwd unnecessary, since pwd can $!#### give you automounter prefixes, which can go away. $ save_default = f$environment("DEFAULT") $ set def 'srcdir' $ srcdir = f$environment("DEFAULT") $ set def 'save_default' $ $!#### Check if the source directory already has a configured system in it. $ if f$search (srcdir - "]" + ".SRC]CONFIG.H") .nes. "" .and. .not. force $ then $ sayerr "''progname': WARNING: The directory tree `''srcdir'' is being used" $ sayerr " as a build directory right now; it has been configured in its own" $ sayerr " right. To configure in another directory as well, you MUST" $!#$ sayerr " right. To configure in another directory as well, you MUST" $!#$ sayerr " use GNU make. If you do not have GNU make, then you must" $ sayerr " now do `make distclean' in ''srcdir'," $ sayerr " and then run ''progname' again." $!#AC_INSTALL_extrasub(LINE_BEGIN+("VPATH"+(((span(" "+ASCII(9))|"")+"=")) $!#$ extrasub="/^VPATH[ ]*=/c\ $!#! vpath %.c $(srcdir)\ $!#! vpath %.h $(srcdir)\ $!#! vpath %.y $(srcdir)\ $!#! vpath %.l $(srcdir)\ $!#! vpath %.s $(srcdir)\ $!#! vpath %.in $(srcdir)' $ exit 0 $ endif $! $!### Make the necessary directories, if they don't exist. $ dirs = "[.src] [.lib-src] [.cpp] [.oldXmenu] [.etc] [.vms]" $ diri = 0 $dir_loop: $ dir = f$element(diri," ",dirs) $ diri = diri + 1 $ if dir .nes. " " $ then $ if f$parse(dir) .eqs. "" then create/directory 'dir' $ goto dir_loop $ endif $! done $ $!#### Given the configuration name, set machfile and opsysfile to the $!#### names of the m/*.h and s/*.h files we should use. $ $ sdir = srcdir - "]" + ".SRC.S]" $ !! Let's assume they come in rising version order... $ max_tmp = "" $ opsystmp = "vms" $ if use_avms_h then opsystmp = "avms" $conf_loop: $ tmp = f$search("''sdir'''opsystmp'%*.H") $ if tmp .nes. "" $ then $ tmp = f$parse(tmp,,,"NAME") - f$edit(opsystmp,"UPCASE") $ test_major = f$element(0,"-",tmp) $ test_minor = f$element(1,"-",tmp) $ if tmp .les. vms_version_tmp .and. tmp .ges. max_tmp $ then $ max_tmp = tmp $ machine = f$element(0,"-",configuration) $ opsys = "''opsystmp'''tmp'" $ endif $ goto conf_loop $ endif $ say "Guessing the configuration to be ''configuration'" $ machfile = "''machine'.h" $ opsysfile = "''opsys'.h" $! $ changequote([,])dnl AC_PREPARE(lisp.dir) AC_CONFIG_HEADER([[.src]config.h]) [$ $ $!#### Choose a compiler. $ cc := cc $ if "''WITH_GCC'" .eqs. "YES" $ then $ cc := gcc/nocase_hack $ use_gcc := yes $ else ] AC_PROG_CC [ $ endif $ $!#### 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 programs AC_LN_S AC_PROG_CPP AC_PROG_INSTALL AC_PROG_YACC $ dnl checks for UNIX variants that set `DEFS' $ dnl checks for header files AC_HAVE_HEADERS(sys/timeb.h sys/time.h fcntl.h unistd.h) AC_STDC_HEADERS AC_TIME_WITH_SYS_TIME $ dnl checks for typedefs AC_RETSIGTYPE $ dnl checks for structure members AC_STRUCT_TM AC_TIMEZONE $ dnl checks for compiler characteristics AC_CONST $ dnl checks for operating system services AC_LONG_FILE_NAMES $ dnl other checks for UNIX variants $ $ $ $!#### Choose a TCP/IP package. $ say "Checking TCP/IP package." $ tcpip_package = "" $ if "''with_ucx'" .eqs. "YES" $ then tcpip_package = "UCX" $ else if "''with_multinet'" .eqs. "YES" $ then tcpip_package = "MultiNet" $ else $ say " No TCP/IP package specified. Looking for TCP/IP package." $ if f$search("SYS$LIBRARY:UCX$IPC.OLB") .nes. "" - .or. f$search("SYS$SHARE:UCX$IPC_SHR.EXE") .nes. "" $ then tcpip_package = "UCX" $ else $ if f$trnlnm("multinet") .nes. "" $ then if f$search("MULTINET:MULTINET_SOCKET_LIBRARY.EXE") .nes. "" $ then tcpip_package = "MultiNet" $ endif $ endif $ endif $ endif $ endif $ if tcpip_package .nes. "" $ then changequote(,)dnl $ if tcpip_package .eqs. "UCX" $ then $ netinet_includes := vaxc$include:,sys$library: $ arpa_includes := vaxc$include:,sys$library: $ else if tcpip_package .eqs. "MultiNet" $ then $ a = f$trnlnm("multinet_root") - ".]" $ netinet_includes := 'a'.netinet] $ arpa_includes := 'a'.arpa] $ endif $ endif $ defi netinet 'netinet_includes' $ defi arpa 'arpa_includes' changequote([,])dnl $ have_sockets = "YES" $ say " Using ''tcpip_package'." $ else $ netinet_includes = "" $ arpa_includes = "" $ have_sockets = "NO" $ say " Using no TCP/IP package." $ endif AC_SUBST(netinet_includes)dnl AC_SUBST(arpa_includes)dnl $ $!#### Choose a window system. $ say "Checking window system." $ $ window_system="" $ if "''with_x'" .eqs. "YES" $ then window_system = "x11" $ else if "''with_x'" .eqs. "NO" then window_system = "none" $ endif $ if window_system .eqs. "" $ then $ say " No window system specified. Looking for X11." $ if f$trnlnm("DECW$INCLUDE") .nes. "" then window_system = "x11" $ endif $ if window_system .eqs. "x11" .or. window_system .eqs. "" $ then $ if f$type(x_includes) .eqs. "" .and. f$type(x_libraries) .eqs. "" $ then AC_FIND_X $ endif $ if f$type(x_includes) .nes. "" .or. f$type(x_libraries) .nes. "" then window_system = "x11" $ endif $ $ if window_system .eqs. "" then window_system = "none" $ $ if window_system .eqs. "x11" $ then $ have_x_windows = "YES" $ have_x11 = "YES" $ say " Using X11." $ else $ have_x_windows = "NO" $ have_x11 = "NO" $ say " Using no window system." $ endif $ $!### If we're using X11, we should use the X menu package. $ have_x_menu = have_x11 $ $!#### Extract some information from the operating system and machine files. $ $ say "Examining the machine- and system-dependent files to find out" $ say " - which libraries the lib-src programs will want, and" $ say " - whether the GNU malloc routines are usable." $!### It's not important that this name contain the PID; you can't run $!### two configures in the same directory and have anything work $!### anyway. $ tempcname="configure-tmp.c" ! Named this way so configure.com* don't get erased $ open /write out 'tempcname' $ sout := write out changequote(,)dnl $ sdir = srcdir - "]" + ".SRC.S]" $ mdir = srcdir - "]" + ".SRC.M]" changequote([,])dnl $ if "''tcpip_package'" .nes. "" then - sout "#define ",f$edit(tcpip_package, "UPCASE") $ sout "#include ""''sdir'''opsysfile'""" $ sout "#include ""''mdir'''machfile'""" $ type sys$input/output=out !This is a piece of dark DCL magic /* Added for VMS */ #ifndef C_SWITCH_MACHINE #define C_SWITCH_MACHINE #endif configure___ c_switch_machine:=C_SWITCH_MACHINE #ifndef C_SWITCH_X_MACHINE #define C_SWITCH_X_MACHINE #endif configure___ c_switch_x_machine:=C_SWITCH_X_MACHINE #ifndef C_SWITCH_X_SYSTEM #define C_SWITCH_X_SYSTEM #endif configure___ c_switch_x_system:=C_SWITCH_X_SYSTEM #ifndef C_SWITCH_SITE #define C_SWITCH_SITE #endif configure___ c_switch_site:=C_SWITCH_SITE #ifndef C_SWITCH_X_SITE #define C_SWITCH_X_SITE #endif configure___ c_switch_x_site:=C_SWITCH_X_SITE /* End of VMS addition */ #ifndef LIBS_MACHINE #define LIBS_MACHINE #endif #ifndef LIBS_SYSTEM #define LIBS_SYSTEM #endif #ifndef C_SWITCH_SYSTEM #define C_SWITCH_SYSTEM #endif configure___ libsrc_libs:=LIBS_MACHINE LIBS_SYSTEM configure___ c_switch_system:=C_SWITCH_SYSTEM #ifndef LIB_X11_LIB #define LIB_X11_LIB sys$share:decw$xlibshr/share #endif #ifndef LIBX11_MACHINE #define LIBX11_MACHINE #endif #ifndef LIBX11_SYSTEM #define LIBX11_SYSTEM #endif configure___ LIBX:=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM #ifdef UNEXEC configure___ unexec:=UNEXEC #else configure___ unexec:=,vmsmap.obj #endif #ifdef SYSTEM_MALLOC configure___ system_malloc:=yes #else configure___ system_malloc:=no #endif #ifndef C_DEBUG_SWITCH #define C_DEBUG_SWITCH /debug #endif #ifndef C_OPTIMIZE_SWITCH #define C_OPTIMIZE_SWITCH #endif #ifdef __GNUC__ configure___ __tmp:=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH #else configure___ __tmp:=C_DEBUG_SWITCH #endif configure___ if f$type(CFLAGS) .eqs. "" then CFLAGS = "" configure___ CFLAGS = CFLAGS + __tmp $ close out $ $ cc /preprocess='tempcname'-i /include=('mdir','sdir') 'tempcname' $ search/nohead/output='tempcname'-stripped 'tempcname'-i "configure___" $ open/read in 'tempcname'-stripped $read_loop: $ read/end=stop_reading in foo $ foo = f$extract(12,999,foo) ! Get rid of "configure___" $ 'foo' $ goto read_loop $stop_reading: $ close in $ delete/nolog 'tempcname'*.* $ $!### Compute the unexec souce name from the object name. $ UNEXEC_SRC = "$(srcdir)" + f$edit(unexec-",","UPCASE,TRIM") - ".OBJ" + ".C" $ $!# Do the opsystem or machine files prohibit the use of the GNU malloc? $!# Assume not, until told otherwise. $ GNU_MALLOC="YES" $ if "''system_malloc'" .eqs. "" $ then $ gnu_malloc = "NO" $ gnu_malloc_reason = - "(The GNU allocators don't work with this system configuration.)" $ endif $! if "''rel_alloc'" .eqs. "" then rel_alloc = gnu_malloc $ rel_alloc = "NO" ! it doesn't work at the moment, and won't probably ever $ lisp_float_type = "YES" $ $!#### Add the libraries to LIBS and check for some functions. $ $ $ ac_flags=c_switch_system+" "+cflags $ LIBS=libsrc_libs $ dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks, dnl and also adds -ldnet to LIBS, which Autoconf uses for checks. dnl NOT ON VMS: AC_HAVE_LIBRARY(-ldnet) $ dnl NOT ON VMS: AC_HAVE_LIBRARY(-lXbsd, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd") dnl NOT ON VMS: dnl NOT ON VMS: echo checking for XFree86 dnl NOT ON VMS: if test -d /usr/X386/include; then dnl NOT ON VMS: HAVE_XFREE386=yes dnl NOT ON VMS: test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X386/include" dnl NOT ON VMS: fi $ $ if "''HAVE_X11'" = "YES" $ then $ if "''C_SWITCH_X_SITE'" .nes. "" then ac_flags=C_SWITCH_X_SITE + " " + ac_flags $ if "''LIBX'" .nes. "" then LIBS=LIBX + " " + LIBS $ if "''LD_SWITCH_X_SITE'" .nes. "" then LDFLAGS=LD_SWITCH_X_SITE + " " + LDFLAGS AC_HAVE_FUNCS(XrmSetDatabase XScreenResourceString XScreenNumberOfScreen) $ endif $ AC_ALLOCA $ $!# logb and frexp are found in -lm on most systems. dnl NOT ON VMS: AC_HAVE_LIBRARY(-lm) AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir mkdir rmdir random bcopy logb frexp ftime) dnl dnl vfork needs special handling, as it is sometimes implemented as a macro AC_COMPILE_CHECK([vfork],[#include ], [/* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_vfork) || defined (__stub___vfork) choke me #else #ifndef vfork /* It might be implemented as a macro, as with DEC C for AXP */ /* Override any gcc2 internal prototype to avoid an error. */ extern char vfork(); #endif vfork(); #endif ], [AC_DEFINE([HAVE_VFORK])], dnl [AC_COMPILE_CHECK(,[#include #include ], [/* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_vfork) || defined (__stub___vfork) choke me #else #ifndef vfork /* It might be implemented as a macro, as with DEC C for AXP */ /* Override any gcc2 internal prototype to avoid an error. */ extern char vfork(); #endif vfork(); #endif ], [AC_DEFINE([HAVE_VFORK])])]) $ $ ok_so_far="YES" AC_FUNC_CHECK(socket, , [$ ok_so_far="NO"]) $ if ok_so_far $ then AC_HEADER_CHECK(netinet/in.h, , [$ ok_so_far="NO"]) $ endif $ if ok_so_far $ then AC_HEADER_CHECK(arpa/inet.h, , [$ ok_so_far="NO"]) $ endif $ if ok_so_far $ then AC_DEFINE(HAVE_INET_SOCKETS) $ endif $ changequote(,)dnl $!#### Find out which version of Emacs this is. $ versiontempname = "version-tmp-''pid'.lis" $ __lispdir = srcdir - "]" + ".LISP]" $ search '__lispdir'version.el "defconst","emacs-version"/match=and/nohead- /output='versiontempname' $ open/read/error=no_version/end=no_version in 'versiontempname' $ read/error=no_version/end=no_version in foo $ close in $ delete/nolog 'versiontempname'*.* $ foo = f$element(1,"""",foo) $ version = f$element(0,".",foo)+"."+f$element(1,".",foo) $ if "''version'" .nes. "" $ then say "Emacs version is ''version'" $ version_us = f$element(0,".",version) $ v_i = 1 $loop_version: $ v_e = f$element(v_i,".",version) $ v_i = v_i + 1 $ if v_e .nes. "." $ then $ version_us = version_us + "_" + v_e $ endif $ else $no_version: $ a = srcdir - "]" + ".LISP]" $ sayerr "''progname': can't find current emacs version in" $ sayerr " `''a'VERSION.EL'." $ exit 0 $ endif changequote([,])dnl $ dnl NOT ON VMS: if [ -f /usr/lpp/X11/bin/smt.exp ]; then dnl NOT ON VMS: ] dnl NOT ON VMS: AC_DEFINE(HAVE_AIX_SMT_EXP) dnl NOT ON VMS: [ dnl NOT ON VMS: fi $ $ $!#### Specify what sort of things we'll be editing into Makefile and config.h. $!### Use configuration here uncanonicalized to avoid exceeding size limits. $ AC_SUBST(configuration)dnl AC_SUBST(version)dnl AC_SUBST(version_us)dnl changequote(,)dnl $ srcdir_dev = f$parse(srcdir,,,"DEVICE") $ srcdir_dir = f$parse(srcdir,,,"DIRECTORY") - "[" - "<" - "]" - ">" changequote([,])dnl AC_SUBST(srcdir_dev)dnl AC_SUBST(srcdir_dir)dnl AC_SUBST(srcdir)dnl AC_SUBST(libsrc_libs)dnl AC_SUBST(LD_SWITCH_X_SITE)dnl AC_SUBST(C_SWITCH_MACHINE)dnl AC_SUBST(C_SWITCH_X_MACHINE)dnl AC_SUBST(C_SWITCH_SYSTEM)dnl AC_SUBST(C_SWITCH_X_SYSTEM)dnl AC_SUBST(C_SWITCH_SITE)dnl AC_SUBST(C_SWITCH_X_SITE)dnl AC_SUBST(C_DEBUG_SWITCH)dnl AC_SUBST(CFLAGS)dnl AC_SUBST(LDFLAGS)dnl AC_SUBST(startupdir)dnl AC_SUBST(vuelibdir)dnl AC_SUBST(prefix_dev)dnl AC_SUBST(prefix_dir)dnl AC_SUBST(prefix)dnl AC_SUBST(exec_prefix_dev)dnl AC_SUBST(exec_prefix_dir)dnl AC_SUBST(exec_prefix)dnl AC_SUBST(bindir_dev)dnl AC_SUBST(bindir_dir)dnl AC_SUBST(bindir)dnl AC_SUBST(datadir_dev)dnl AC_SUBST(datadir_dir)dnl AC_SUBST(datadir)dnl AC_SUBST(statedir_dev)dnl AC_SUBST(statedir_dir)dnl AC_SUBST(statedir)dnl AC_SUBST(libdir_dev)dnl AC_SUBST(libdir_dir)dnl AC_SUBST(libdir)dnl AC_SUBST(mandir_dev)dnl AC_SUBST(mandir_dir)dnl AC_SUBST(mandir)dnl AC_SUBST(infodir_dev)dnl AC_SUBST(infodir_dir)dnl AC_SUBST(infodir)dnl AC_SUBST(lispdir_dev)dnl AC_SUBST(lispdir_dir)dnl AC_SUBST(lispdir_file)dnl AC_SUBST(lispdir)dnl AC_SUBST(locallisppath)dnl AC_SUBST(lisppath)dnl AC_SUBST(etcdir_dev)dnl AC_SUBST(etcdir_dir)dnl AC_SUBST(etcdir_file)dnl AC_SUBST(etcdir)dnl AC_SUBST(lockdir_dev)dnl AC_SUBST(lockdir_dir)dnl AC_SUBST(lockdir_file)dnl AC_SUBST(lockdir)dnl AC_SUBST(archlibdir_dev)dnl AC_SUBST(archlibdir_dir)dnl AC_SUBST(archlibdir)dnl AC_SUBST(vmslibdir_dev)dnl AC_SUBST(vmslibdir_dir)dnl AC_SUBST(vmslibdir)dnl $ AC_DEFINE_UNQUOTED(config_machfile, [""""''srcdir_dev'[''srcdir_dir'.src.m]''machfile'""""]) AC_DEFINE_UNQUOTED(config_opsysfile, [""""''srcdir_dev'[''srcdir_dir'.src.s]''opsysfile'""""]) AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ''LD_SWITCH_X_SITE') AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ''C_SWITCH_X_SITE') AC_DEFINE_UNQUOTED(UNEXEC_SRC, ''UNEXEC_SRC') $ if with_debug_hack $ then AC_DEFINE(USE_DEBUG_HACK) $ endif $ [$ $ if "''HAVE_SOCKETS'" .eqs. "YES" $ then ] AC_DEFINE(HAVE_SOCKETS) AC_DEFINE(''f$edit(tcpip_package,""UPCASE"")') [ $ endif $ if "''HAVE_X_WINDOWS'" .eqs. "YES" $ then ] AC_DEFINE(HAVE_X_WINDOWS) [ $ endif $ if "''HAVE_X11'" .eqs. "YES" $ then ] AC_DEFINE(HAVE_X11) [ $ endif $ if "''HAVE_XFREE386'" .eqs. "YES" $ then ] AC_DEFINE(HAVE_XFREE386) [ $ endif $ if "''HAVE_X_MENU'" .eqs. "YES" $ then ] AC_DEFINE(HAVE_X_MENU) [ $ endif $ if "''GNU_MALLOC'" .eqs. "YES" $ then ] AC_DEFINE(GNU_MALLOC) [ $ endif $ if "''REL_ALLOC'" .eqs. "YES" $ then ] AC_DEFINE(REL_ALLOC) [ $ endif $ if "''LISP_FLOAT_TYPE'" .eqs. "YES" $ then ] AC_DEFINE(LISP_FLOAT_TYPE) [ $ endif $ $!# ====================== Developer's configuration ======================= $ $!# The following assignments make sense if you're running Emacs on a single $!# machine, one version at a time, and you want changes to the lisp and etc $!# directories in the source tree to show up immediately in your working $!# environment. It saves a great deal of disk space by not duplicating the $!# lisp and etc directories. $ $ if "''run_in_place'" $ then $ if .not. "''lispdir_specified'" $ then $ lispdir_dev="'srcdir_dev'" $ lispdir_dir="'srcdir_dir'.lisp" $ lispdir="'lispdir_dev'['lispdir_dir']" $ endif $ if .not. "''locallisp_specified'" $ then $ locallisppath="'srcdir_dev'['srcdir_dir'.site-lisp]" $ endif $ if .not. "''etcdir_specified'" $ then $ etcdir_dev="'srcdir_dev'" $ etcdir_dir="'srcdir_dir'.etc" $ etcdir="'etcdir_dev'['etcdir_dir']" $ endif $ if .not. "''lockdir_specified'" $ then $ lockdir_dev="'srcdir_dev'" $ lockdir_dir="'srcdir_dir'.lock" $ lockdir="'lockdir_dev'['lockdir_dir']" $ endif $! if .not. "''archlibdir_specified'" $! then $! archlibdir_dev="'srcdir_dev'" $! archlibdir_dir="'srcdir_dir'.lib-src" $! archlibdir="'archlibdir_dev'['archlibdir_dir']" $! endif $ if .not. "''vmslibdir_specified'" $ then $ vmslibdir_dev="'srcdir_dev'" $ vmslibdir_dir="'srcdir_dir'.vms" $ vmslibdir="'vmslibdir_dev'['vmslibdir_dir']" $ endif $ if .not. "''infodir_specified'" $ then $ infodir_dev="'srcdir_dev'" $ infodir_dir="'srcdir_dir'.info" $ infodir="'infodir_dev'['infodir_dir']" $ endif $ else if "''single_tree'" $ then $ if .not. "''exec_prefix_specified'" $ then $ exec_prefix_dev = "'prefix_dev'" $ exec_prefix_dir = "'prefix_dir'" $ exec_prefix="'prefix'" $ endif $ if .not. "''bindir_specified'" $ then $ bindir_dev="'exec_prefix_dev'" $ bindir_dir="'exec_prefix_dir'.bin.'configuration'" $ bindir="'bindir_dev'['bindir_dir']" $ endif $ if .not. "''datadir_specified'" $ then $ datadir_dev="'prefix_dev'" $ datadir_dir="'prefix_dir'.common" $ datadir="'datadir_dev'['datadir_dir']" $ endif $ if .not. "''statedir_specified'" $ then $ statedir_dev="'prefix_dev'" $ statedir_dir="'prefix_dir'.common" $ statedir="'statedir_dev'['statedir_dir']" $ endif $ if .not. "''libdir_specified'" $ then $ libdir_dev="'bindir_dev'" $ libdir_dir="'bindir_dir'" $ libdir="'libdir_dev'['libdir_dir']" $ endif $ if .not. "''lispdir_specified'" $ then $ lispdir_dev="'prefix_dev'" $ lispdir_dir="'prefix_dir'.common.lisp" $ lispdir="'lispdir_dev'['lispdir_dir']" $ endif $ if .not. "''locallisppath_specified'" $ then $ locallisppath="'prefix_dev'['prefix_dir'.common.site-lisp]" $ endif $ if .not. "''lockdir_specified'" $ then $ lockdir_dev="'prefix_dev'" $ lockdir_dir="'prefix_dir'.common.lock" $ lockdir="'lockdir_dev'['lockdir_dir']" $ endif $ if .not. "''archlibdir_specified'" $ then $ archlibdir_dev="'libdir_dev'" $ archlibdir_dir="'libdir_dir'.etc" $ archlibdir="'archlibdir_dev'['archlibdir_dir']" $ endif $ if .not. "''etcdir_specified'" $ then $ etcdir_dev="'prefix_dev'" $ etcdir_dir="'prefix_dir'.common.data" $ etcdir="'etcdir_dev'['etcdir_dir']" $ endif $ if .not. "''vmslibdir_specified'" $ then $ vmslibdir_dev="'libdir_dev'" $ vmslibdir_dir="'libdir_dir'.vms" $ vmslibdir="'vmslibdir_dev'['vmslibdir_dir']" $ endif $ if .not. "''vuelibdir_specified'" $ then $ vuelibdir_dev="'prefix_dev'" $ vuelibdir_dir="'prefix_dir'" $ vuelibdir="'vuelibdir_dev'['vuelibdir_dir']" $ endif $ if .not. "''startupdir_specified'" $ then $ startupdir_dev="'prefix_dev'" $ startupdir_dir="'prefix_dir'.vms" $ startupdir="'startupdir_dev'['startupdir_dir']" $ endif $ endif $ endif $ $!#### Report on what we decided to do. $ say "" $ say "" $ say "Configured for `''canonical''." $ say "" $ say " Where should the build process find the source code? ''srcdir'" $ say " What operating system and machine description files should Emacs use?" $ say " `''opsysfile'' and `''machfile''" $ say " What compiler should emacs be built with? ''CC' ''CFLAGS'" $ say " Should Emacs use the GNU version of malloc? ''GNU_MALLOC'''GNU_MALLOC_reason'" $ say " Should Emacs use the relocating allocator for buffers? ''REL_ALLOC'" $ say " What window system should Emacs use? ''window_system'" $ if "''x_includes'" .nes. "" then - say " Where do we find X Windows header files? ''x_includes'" $ if "''x_libraries'" .nes. "" then - say " Where do we find X Windows libraries? ''x_libraries'" $ say "" $ say "" $ $!# Remove any trailing slashes in these variables. $!test -n "${prefix}" && $! prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` $!test -n "${exec_prefix}" && $! exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` $] AC_DEFINE_POST_HOOK( [$!# Build [.src]descrip.mms from [.src]descrip.mms_in. $!!# # 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 descrip.mms, $!!# # but that is beyond my level of DCL programming. $ write sys$output "creating [.src]descrip.mms" $ topsrcdir_dev=srcdir_dev $ topsrcdir_dir=srcdir_dir $ topsrcdir=srcdir $ save_default = f$environment("DEFAULT") $ set default [.src] $! $ open/write foo junk1.tpu $ write foo "input_file := GET_INFO (COMMAND_LINE, ""file_name"");" $ write foo "main_buffer := CREATE_BUFFER (""main"", input_file);" $ write foo "p_spcs := (SPAN("" "") | """");" $ write foo "!" $ write foo "POSITION (BEGINNING_OF (main_buffer));" $ write foo "my_pattern := LINE_BEGIN + (""# Generated"" | ""/**/#"") + unanchor + """" + LINE_END;" $ write foo "LOOP" $ write foo " my_range := SEARCH_QUIETLY (my_pattern, FORWARD);" $ write foo " EXITIF my_range = 0;" $ write foo " ERASE (my_range);" $ write foo " POSITION (END_OF (my_range));" $ write foo "ENDLOOP;" $ write foo "!" $ write foo "WRITE_FILE (main_buffer, get_info (command_line, ""output_file""));" $ write foo "QUIT;" $ close foo $ set noon $ save_mesg = f$environment("MESSAGE") $ set message/nofacility/noseverity/noident/notext $ edit/tpu/nosection/command=junk1.tpu/nodisplay/out=junk.c - descrip.mms_in $ set message 'save_mesg' $! $ save_mesg = f$environment("MESSAGE") $ set message/nofacility/noseverity/noident/notext $ CPP /include=(sys$disk:[],sys$disk:[-.src],- 'topsrcdir_dev'['topsrcdir_dir'.src]) - 'CFLAGS' 'c_switch_system' junk.c $ set message 'save_mesg' $ set on $ junkname := junk.cpp $ if f$search(junkname) .eqs. "" then junkname := junk.i $ open/write foo junk2.tpu $ write foo "input_file := GET_INFO (COMMAND_LINE, ""file_name"");" $ write foo "main_buffer := CREATE_BUFFER (""main"", input_file);" $ write foo "p_spcs := (SPAN("" "") | """");" $ write foo "!" $ write foo "POSITION (BEGINNING_OF (main_buffer));" $ write foo "my_pattern := ((LINE_BEGIN + LINE_END)@r) | ((LINE_BEGIN + SPAN("" ""+ASCII(12)+ASCII(9)) + LINE_END)@r) | (((LINE_BEGIN + ""#"" + unanchor + """")@r)+LINE_END);" $ write foo "LOOP" $ write foo " my_range := SEARCH_QUIETLY (my_pattern, FORWARD);" $ write foo " EXITIF my_range = 0;" $ write foo " ERASE (r);" $ write foo " POSITION (END_OF (my_range));" $ write foo "ENDLOOP;" $ write foo "!" $ write foo "POSITION (BEGINNING_OF (main_buffer));" $ write foo "my_pattern := LINE_BEGIN + ("" ""@r); $ write foo "LOOP" $ write foo " my_range := SEARCH_QUIETLY (my_pattern, FORWARD);" $ write foo " EXITIF my_range = 0;" $ write foo " ERASE (r); POSITION (r); COPY_TEXT (ASCII(9));" $ write foo " POSITION (END_OF (my_range));" $ write foo "ENDLOOP;" $ write foo "!" $ write foo "POSITION (BEGINNING_OF (main_buffer));" $ write foo "my_pattern := ""/ / /""@r;" $ write foo "LOOP" $ write foo " my_range := SEARCH_QUIETLY (my_pattern, FORWARD);" $ write foo " EXITIF my_range = 0;" $ write foo " ERASE (r); POSITION (r); COPY_TEXT (""@"");" $ write foo " POSITION (END_OF (my_range));" $ write foo "ENDLOOP;" $ write foo "!" $ write foo "WRITE_FILE (main_buffer, get_info (command_line, ""output_file""));" $ write foo "QUIT;" $ close foo $ set noon $ save_mesg = f$environment("MESSAGE") $ set message/nofacility/noseverity/noident/notext $ edit/tpu/nosection/command=junk2.tpu/nodisplay/out=descrip.new - 'junkname' $ set message 'save_mesg' $!$ if f$search("descrip.mms") .nes. "" then - $! diff descrip.new descrip.mms/out=nla0: $!$ if $status .eq. %X06c8009 ! code for no change $!$ then $!$ ! The file exists and we would not be changing it. $!$ delete descrip.new.*/nolog $!$ write sys$output "[.src]descrip.mms is unchanged." $!$ else $ if f$search("descrip.mms") .nes. "" then - set file/prot=(s:rwed,o:rwed) descrip.mms.* $ rename descrip.new .mms $ set file/prot=(s:r,o:r,g:r,w:r) descrip.mms $ purge/nolog descrip.mms $!$ endif $ set on $ junknames = junkname+";*" $ delete junk.c.*,junk%.tpu.*,'junknames' $! $ set def [-.vms] $ open/write foo junk3.tpu $ write foo "input_file := GET_INFO (COMMAND_LINE, ""file_name"");" $ write foo "main_buffer := CREATE_BUFFER (""main"", input_file);" $ write foo "p_spcs := (SPAN("" "") | """");" $ write foo "!" $ write foo "POSITION (BEGINNING_OF (main_buffer));" $ write foo "my_range := SEARCH_QUIETLY (LINE_BEGIN + ""! ---- "" + unanchor + """" + LINE_END, FORWARD);" $ write foo "POSITION (END_OF (my_range));" $ write foo "my_pattern := SPAN("" ""+ASCII(9))@r;" $ write foo "LOOP" $ write foo " my_range := SEARCH_QUIETLY (my_pattern, FORWARD);" $ write foo " EXITIF my_range = 0;" $ write foo " ERASE (r); POSITION (r); SPLIT_LINE;" $ write foo " POSITION (END_OF (my_range));" $ write foo "ENDLOOP;" $ write foo "!" $ write foo "WRITE_FILE (main_buffer, get_info (command_line, ""output_file""));" $ write foo "QUIT;" $ close foo $ open/write foo junk4.tpu $ write foo "input_file := GET_INFO (COMMAND_LINE, ""file_name"");" $ write foo "main_buffer := CREATE_BUFFER (""main"", input_file);" $ write foo "p_spcs := (SPAN("" "") | """");" $ write foo "!" $ write foo "POSITION (BEGINNING_OF (main_buffer));" $ write foo "my_pattern := ((LINE_BEGIN + LINE_END)@r) | ((LINE_BEGIN + SPAN("" ""+ASCII(12)+ASCII(9)) + LINE_END)@r) | (((LINE_BEGIN + ""#"" + unanchor + """")@r)+LINE_END);" $ write foo "LOOP" $ write foo " my_range := SEARCH_QUIETLY (my_pattern, FORWARD);" $ write foo " EXITIF my_range = 0;" $ write foo " ERASE (r);" $ write foo " POSITION (END_OF (my_range));" $ write foo "ENDLOOP;" $ write foo "!" $ write foo "WRITE_FILE (main_buffer, get_info (command_line, ""output_file""));" $ write foo "QUIT;" $ close foo $ set noon $ save_mesg = f$environment("MESSAGE") $ set message/nofacility/noseverity/noident/notext $ write sys$output "creating [.vms]def_temacs.opt" $ CPP /include=(sys$disk:[],sys$disk:[-.src],sys$disk:[-.vms],- 'topsrcdir_dev'['topsrcdir_dir'.src],- 'topsrcdir_dev'['topsrcdir_dir'.vms]) - 'CFLAGS' 'c_switch_system' - 'topsrcdir_dev'['topsrcdir_dir'.vms]temacs.opt_in $ junkname := temacs.cpp $ if f$search(junkname) .eqs. "" then junkname := temacs.i $ edit/tpu/nosection/command=junk3.tpu/nodisplay/out=def_temacs.tmp - 'junkname' $ junknames = junkname+";*" $ edit/tpu/nosection/command=junk4.tpu/nodisplay/out=def_temacs.new - def_temacs.tmp $ set message 'save_mesg' $ if f$search("def_temacs.opt") .nes. "" then - diff def_temacs.new def_temacs.opt/out=nla0: $ if $status .eq. %X06c8009 ! code for no change $ then $ ! The file exists and we would not be changing it. $ delete def_temacs.new.*/nolog $ write sys$output "[.vms]def_temacs.opt is unchanged." $ else $ rename def_temacs.new .opt $ purge/nolog def_temacs.opt $ endif $! $ open/write foo junk5.tpu $ write foo "input_file := GET_INFO (COMMAND_LINE, ""file_name"");" $ write foo "main_buffer := CREATE_BUFFER (""main"", input_file);" $ write foo "p_spcs := (SPAN("" "") | """");" $ write foo "!" $ write foo "POSITION (BEGINNING_OF (main_buffer));" $ write foo "my_pattern := LINE_BEGIN + (""# Generated"" | ""/**/#"") + unanchor + """" + LINE_END;" $ write foo "LOOP" $ write foo " my_range := SEARCH_QUIETLY (my_pattern, FORWARD);" $ write foo " EXITIF my_range = 0;" $ write foo " ERASE (my_range);" $ write foo " POSITION (END_OF (my_range));" $ write foo "ENDLOOP;" $ write foo "!" $ write foo "WRITE_FILE (main_buffer, get_info (command_line, ""output_file""));" $ write foo "QUIT;" $ close foo $ save_mesg = f$environment("MESSAGE") $ set message/nofacility/noseverity/noident/notext $ write sys$output "creating [.vms]makedoc.com" $ edit/tpu/nosection/command=junk5.tpu/nodisplay/out=junk.c - makedoc.com_in $ CPP /include=(sys$disk:[],sys$disk:[-.src],sys$disk:[-.vms],- 'topsrcdir_dev'['topsrcdir_dir'.src],- 'topsrcdir_dev'['topsrcdir_dir'.vms]) - 'CFLAGS' 'c_switch_system' junk.c $ junkname := junk.cpp $ if f$search(junkname) .eqs. "" then junkname := junk.i $ edit/tpu/nosection/command=junk4.tpu/nodisplay/out=makedoc.new - 'junkname' $ junknames = junknames + "," + junkname+";*" $ set message 'save_mesg' $ if f$search("makedoc.com") .nes. "" then - diff makedoc.new makedoc.com/out=nla0: $ if $status .eq. %X06c8009 ! code for no change $ then $ ! The file exists and we would not be changing it. $ delete makedoc.new.*/nolog $ write sys$output "[.vms]makedoc.com is unchanged." $ else $ rename makedoc.new .com $ purge/nolog makedoc.com $ endif $! $ delete junk.c;*,junk%.tpu.*,'junknames',def_temacs.tmp;* $ if f$search("build.com") .nes. "" then - diff build.com 'topsrcdir_dev'['topsrcdir_dir'.vms]build.com/out=nla0: $ if $status .ne. %X06c8009 ! code for no change $ then $ write sys$output "copying [.vms]build.com" $ copy 'topsrcdir_dev'['topsrcdir_dir'.vms]build.com sys$disk:[] $ endif $ if f$search("link.com") .nes. "" then - diff link.com 'topsrcdir_dev'['topsrcdir_dir'.vms]link.com/out=nla0: $ if $status .ne. %X06c8009 ! code for no change $ then $ write sys$output "copying [.vms]link.com" $ copy 'topsrcdir_dev'['topsrcdir_dir'.vms]link.com sys$disk:[] $ endif $ if f$search("testemacs.com") .nes. "" then - diff testemacs.com 'topsrcdir_dev'['topsrcdir_dir'.vms]testemacs.com/out=nla0: $ if $status .ne. %X06c8009 ! code for no change $ then $ write sys$output "copying [.vms]testemacs.com" $ copy 'topsrcdir_dev'['topsrcdir_dir'.vms]testemacs.com sys$disk:[] $ endif $ set on $! $ set def [-] $ set def 'save_default' $])dnl AC_OUTPUT([descrip.mms [.lib-src]descrip.mms [.oldXMenu]descrip.mms [.vms]descrip.mms [.src]descrip.mms_in [.vms]makepaths.com [.vms]compXmenu.com [.vms]compvmslib.com [.vms]precomp.com [.vms]compile.com [.vms]complibsrc.com [.vms]makedoc.com_in [.vms]emacs_install.com [.vms]emacs_vue.com])