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. [$! This is the VMS version of configure.in $!#### Configuration script for GNU Emacs $!#### Copyright (C) 1992, 1994 Free Software Foundation, Inc. $!#### This script requires autoconf for VMS version 1.9 or later. $ $!### 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. $ $!### 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 2, 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. $ $ set symbol/verb/scope=(noglobal,nolocal) $ $ progname = f$element(0,";",f$environment("procedure")) $ say := write sys$output $ sayerr := write sys$error $ $ silent := no ! For autoconf 1.11 $ no_create := no ! For autoconf 1.11 $ $!### Establish some default values $ run_in_place="NO" $ single_tree="NO" $ force="NO" $ verbose="NO" $ with_debug_hack="NO" $ with_tcpip="YES" $ startupdir_dev:=sys$common: $ startupdir_dir:=sys$startup $ startupdir:=sys$common:[sys$startup] $ vuelibdir_dev:=sys$common: $ vuelibdir_dir:=vue$library.user $ 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 = "" $ exec_prefix_dev = "" $ exec_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_us'" $ archlibdir="'archlibdir_dev'['archlibdir_dir']" $ docdir_dev="'datadir_dev'" $ docdir_dir="'datadir_dir'.emacs.'version_us'.etc" $ docdir="'docdir_dev'['docdir_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+" | DOCDIR" $ 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-X-TOOLKIT Use an X toolkit." $ say "--WITH-X-TOOLKIT=NO Don't use an X toolkit." $ say "--WITH-GCC Use GCC to compile Emacs." $ say "--WITH-GCC=NO Don't use GCC to compile Emacs." $ say "--X-INCLUDES=dev:[dir] Search for X header files in dev:[dir]." $ say "--X-LIBRARIES=dev:[dir] Search for X libraries in dev:[dir]." $ say "--WITH-NETLIB Use the NETLIB library (requires SOCKETSHR)." $ say "--WITH-NETLIB=NO Don't use the NETLIB library." $ say "--WITH-UCX Use the Digital UCX TCP/IP kit." $ say "--WITH-UCX=NO Don't use the Digital UCX TCP/IP kit." $ say "--WITH-MULTINET Use the MultiNet TCP/IP kit." $ say "--WITH-MULTINET=NO Don't use the MultiNet TCP/IP kit." $ say "--WITH-TCPIP Use the TCP/IP package which can be found." $ say "--WITH-TCPIP=NO Don't use any TCP/IP package." $ 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 descrip.mms_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. $ configure_args = p1+" "+p2+" "+p3+" "+p4+" "+p5+" "+p6+" "+p7+" "+p8+" " $ 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" .and. opt .nes. "WITH-X10" - .and. opt .nes. "WITH_X11" 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_X_TOOLKIT" then - goto NOT_WITH_X_TOOLKIT $ if f$extract(0,f$length(valu),"YES") .eqs. valu $ then $ val = "athena" $ else $ if f$extract(0,f$length(valu),"NO") .eqs. valu $ then $ val = "no" $ else $ if f$extract(0,f$length(valu),"LUCID") .eqs. valu $ then $ val = "lucid" $ else $ if f$extract(0,f$length(valu),"ATHENA") .eqs. valu $ then $ val = "athena" $ else $! if f$extract(0,f$length(valu),"MOTIF") .eqs. valu $! then $! val = "motif" $! else $! if f$extract(0,f$length(valu),"OPEN-LOOK") .eqs. valu $! then $! val = "open-look" $ else $! sayerr "''progname': the `--''opt'' option is supposed to have a value." $! sayerr "which is `yes', `no', `lucid', `athena', `motif' or `open-look'. $ sayerr "''progname': the `--''opt'' option is supposed to have a value." $ sayerr "which is `yes', `no', `lucid' or `athena'. $ sayerr "Currently, `yes', `athena' and `lucid' are synonyms.' $ gosub short_usage $ exit 0 $! endif $! endif $ endif $ endif $ endif $ endif $ with_x_toolkit=val $ goto while $ NOT_WITH_X_TOOLKIT: $ 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_NETLIB" then goto NOT_WITH_NETLIB $ if f$extract(0,f$length(valu),"YES") .eqs. valu $ then $ val = "YES" $ with_ucx = "NO" $ with_multinet = "NO" $ with_tcpip = "YES" $ else $ if f$extract(0,f$length(valu),"NO") .eqs. valu $ then $ val = "NO" $ with_ucx = "" $ with_multinet = "" $ with_tcpip = "YES" $ 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_NETLIB: $ if opt .nes. "WITH_UCX" then goto NOT_WITH_UCX $ if f$extract(0,f$length(valu),"YES") .eqs. valu $ then $ val = "YES" $ with_netlib = "NO" $ with_multinet = "NO" $ with_tcpip = "YES" $ else $ if f$extract(0,f$length(valu),"NO") .eqs. valu $ then $ val = "NO" $ with_netlib = "" $ with_multinet = "" $ with_tcpip = "YES" $ 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" $ with_netlib = "NO" $ with_ucx = "NO" $ with_tcpip = "YES" $ else $ if f$extract(0,f$length(valu),"NO") .eqs. valu $ then $ val = "NO" $ with_netlib = "" $ with_ucx = "" $ with_tcpip = "YES" $ 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_TCPIP" then goto NOT_WITH_TCPIP $ if f$extract(0,f$length(valu),"YES") .eqs. valu $ then $ val = "YES" $ with_netlib = "" $ with_ucx = "" $ with_multinet = "" $ else $ if f$extract(0,f$length(valu),"NO") .eqs. valu $ then $ val = "NO" $ with_netlib = "NO" $ with_ucx = "NO" $ with_multinet = "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_TCPIP: $ 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: $! ## Should this use the "development" file organization? $ 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: $! ## Should this use the "single tree" file organization? $ 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-vms" $ if f$getsyi("HW_MODEL") .lt. 1024 then - configuration = "vax-dec-vms" $ configuration = configuration + f$extract(1,3,f$getsyi("version")) !! from V5.5-2 we have 5.5 $ endif $ vms_version = f$extract(3,3,f$element(2,"-",configuration)) $ 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_us = configuration $loop_configuration: $ p = f$locate(".",configuration_us) $ if p .nes. f$length(configuration_us) $ then $ configuration_us = - f$extract(0,p,configuration_us)+"_"+f$extract(p+1,999,configuration_us) $ goto loop_configuration $ endif $ 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 $ $!#### 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] [.lwlib] [.lisp] [.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. $ $ machfile_dir = "M" $ opsysfile_dir = "S" $ mdir = srcdir - "]" + ".SRC." + machfile_dir + "]" $ sdir = srcdir - "]" + ".SRC." + opsysfile_dir + "]" $ !! 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) $ dummy := 'tmp ! tmp $ dummy := 'vms_version_tmp ! vms_version_tmp $ dummy := 'max_tmp ! max_tmp $ dummy := 'test_major ! test_major $ dummy := 'test_minor ! test_minor $ if tmp .les. vms_version_tmp .and. tmp .ges. max_tmp $ then $ max_tmp = tmp $ machine = f$element(0,"-",configuration) $ opsys = "''opsystmp'''tmp'" $ dummy := 'max_tmp ! max_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_specified := NO $ if f$type(CC) .nes. "" then cc_specified := YES $ $ if "''WITH_GCC'" .eqs. "YES" $ then $ cc := gcc $ use_gcc := yes $ else $ if "''WITH_GCC'" .eqs. "NO" $ then $ if f$type(CC) .eqs. "" $ then $ cc := cc $ endif $ endif $ endif ] AC_PROG_CC [ $ $!#### 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 .NOT. (f$type(NON_GNU_CPP) .eqs. "" .or "''GCC'" .nes. "" - .or. f$type(CPP) .nes. "") then CPP = NON_GNU_CPP $ $!#### 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 .NOT. (f$type(NON_GNU_CPP) .eqs. "" .or "''GCC'" .nes. "" - .or. cc_specified) then CPP = NON_GNU_CC $ $ if "''GCC'" .nes. "" .and. f$type(GCC_TEST_OPTIONS) .nes. "" then - CC = CC + " " + GCC_TEST_OPTIONS $ $ if "''GCC'" .eqs. "" .and. f$type(NON_GCC_TEST_OPTIONS) .nes. "" then - CC = CC + " " + NON_GCC_TEST_OPTIONS $ $!#### 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_WARN([perversion allert!]) changequote(<<,>>)dnl <<$! A VMS hack $ tmp_quotes = """" $ tmp_quotes = tmp_quotes + tmp_quotes $ tmp_quotes = tmp_quotes + tmp_quotes $ tmp_quotes = tmp_quotes + tmp_quotes $ tmp_quotes = tmp_quotes + tmp_quotes $ tmp_quotes2 = tmp_quotes + tmp_quotes + tmp_quotes + tmp_quotes + tmp_quotes $ tmp_quotes = tmp_quotes + tmp_quotes + tmp_quotes $! tmp_quotes = tmp_quotes + tmp_quotes $! tmp_quotes = tmp_quotes + tmp_quotes $! tmp_quotes = tmp_quotes + tmp_quotes $ INSTALL="@"+(srcdir - "]") + ".VMS]COPY "+tmp_quotes+"/PROT=(S:RWED,O:RWED,G:RE,W:RE)"+tmp_quotes $ INSTALL_PROGRAM="@"+(srcdir - "]") + ".VMS]COPY "+tmp_quotes+"/PROT=(S:RWED,O:RWED,G:RE,W:RE)"+tmp_quotes $ INSTALL_DATA="@"+(srcdir - "]") + ".VMS]COPY "+tmp_quotes+"/PROT=(S:RWED,O:RWED,G:RE,W:RE)"+tmp_quotes $ $ INSTALL_QUOTED="@"+(srcdir - "]") + ".VMS]COPY "+tmp_quotes2+"/PROT=(S:RWED,O:RWED,G:RE,W:RE)"+tmp_quotes2 $ INSTALL_PROGRAM_QUOTED="@"+(srcdir - "]") + ".VMS]COPY "+tmp_quotes2+"/PROT=(S:RWED,O:RWED,G:RE,W:RE)"+tmp_quotes2 $ INSTALL_DATA_QUOTED="@"+(srcdir - "]") + ".VMS]COPY "+tmp_quotes2+"/PROT=(S:RWED,O:RWED,G:RE,W:RE)"+tmp_quotes2 $>> changequote([,])dnl AC_PROG_INSTALL AC_PROG_INSTALL_QUOTED AC_WARN([perversion is over now (pfewwww...)]) 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 In Autoconf 1.8 use AC_SYS_SIGLIST_DECLARED instead of this. AC_COMPILE_CHECK(sys_siglist declaration in signal.h or unistd.h, [#include /* NetBSD declares sys_siglist in . */ #ifdef HAVE_UNISTD_H #include #endif], [char *msg = *(sys_siglist + 1);], [AC_DEFINE(SYS_SIGLIST_DECLARED)]) $ dnl checks for typedefs AC_RETSIGTYPE $ dnl checks for structure members AC_STRUCT_TM AC_TIMEZONE $ dnl checks for compiler characteristics AC_CONST $ dnl check for Make feature AC_SET_MAKE $ 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. "NO" - .and. "''with_netlib'" .eqs. "NO"- .and. "''with_multinet'" .eqs. "NO" then - with_tcpip = "NO" $ if "''with_tcpip'" .eqs. "YES" $ then $ if "''with_netlib'" .eqs. "YES" $ then tcpip_package = "NETLIB" $ else 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." $ tcpip_package = "" AC_HEADER_CHECK(socketshr.h,[$ tcpip_package = "SOCKETSHR"]) $ if tcpip_package .eqs. "SOCKETSHR" - .and. f$search(f$parse("NETLIB_SHR","SYS$SHARE:.EXE")) .nes. "" - .and. f$search(f$parse("SOCKETSHR","SYS$SHARE:.EXE")) .nes. "" $ then tcpip_package = "NETLIB" $ else $ tcpip_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 $ 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. "NETLIB" $ 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 $ 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 for specified 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 "''with_x11'" .eqs. "YES" $ then window_system = "x11" $ else if "''with_x11'" .eqs. "NO" then window_system = "none" $ endif $ if "''with_x10'" .eqs. "YES" $ then $ say " There is no such thing as X10 on VMS!" $ window_system = "none" $ else if "''with_x10'" .eqs. "NO" then window_system = "" $ 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." $ USE_X_TOOLKIT:= $ if "''with_x_toolkit'" .eqs. "athena" - .or. "''with_x_toolkit'" .eqs. "lucid" $ then $ USE_X_TOOLKIT:=LUCID $ say " Using Xt toolkit." $ endif $ if "''with_x_toolkit'" .eqs. "motif" $ then $ USE_X_TOOLKIT:=MOTIF $ say " Using Motif toolkit." $ endif $ if "''with_x_toolkit'" .eqs. "open-look" $ then $ USE_X_TOOLKIT:=OPEN_LOOK $ say " Using Open-Look toolkit." $ endif $ if USE_X_TOOLKIT .eqs. "" $ then $ USE_X_TOOLKIT:=none $ say " Using Xlib directly." $ endif $ else $ have_x_windows = "NO" $ have_x11 = "NO" $ USE_X_TOOLKIT:=none $ say " Using no window system." $ endif $ X_TOOLKIT_TYPE=USE_X_TOOLKIT $ $!### 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" $ $!### First figure out CFLAGS (which we use for running the compiler here) $!### and REAL_CFLAGS (which we use for real compilation). $!### The two are the same except on a few systems, where they are made $!### different to work around various lossages. For example, $!### GCC 2.5 on Linux needs them to be different because it treats -g $!### as implying static linking. $ $!### If the CFLAGS env var is specified, we use that value $!### instead of the default. $ $!### 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 $ if "''tcpip_package'" .nes. "" then - sout "#define ",f$edit(tcpip_package, "UPCASE") changequote(,)dnl $ sout "#include ""''srcdir_dev'[''srcdir_dir'.src.''opsysfile_dir']''opsysfile'""" $ sout "#include ""''srcdir_dev'[''srcdir_dir'.src.''machfile_dir']''machfile'""" changequote([,])dnl $ type sys$input/output=out !This is a piece of dark DCL magic #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 #ifndef C_SWITCH_MACHINE #define C_SWITCH_MACHINE #endif configure___ libsrc_libs:=LIBS_MACHINE LIBS_SYSTEM configure___ c_switch_system:=C_SWITCH_SYSTEM configure___ c_switch_machine:=C_SWITCH_MACHINE #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 configure___ __tmp2:= configure___ if f$type(CFLAGS) .nes. "" then __tmp2 = CFLAGS #ifdef __GNUC__ configure___ __tmp1:=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH #else configure___ __tmp1:=C_DEBUG_SWITCH #endif configure___ __tmp=__tmp1+" "+__tmp2 #ifdef THIS_IS_CONFIGURE /* Get the CFLAGS for tests in configure. */ configure___ CFLAGS = __tmp #else /* not THIS_IS_CONFIGURE */ /* Get the CFLAGS for real compilation. */ configure___ REAL_CFLAGS = __tmp #endif /* not THIS_IS_CONFIGURE */ $ close out $ $ set noon $ __tmp:= $ if f$type(CFLAGS) .nes. "" then __tmp = CFLAGS $ __compiler := cc $ if f$type(ac_cc) .nes. "" then __compiler := 'ac_cc' $ if f$type(CC) .nes. "" then __compiler := 'CC' $ '__compiler' '__tmp'/preprocess='tempcname'-i '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'*.* $ if f$type(CFLAGS) .eqs. "" $ then $ '__compiler' /preprocess='tempcname'-i /include=('mdir','sdir') - 'tempcname' /define=THIS_IS_CONFIGURE $ search/nohead/output='tempcname'-stripped 'tempcname'-i "configure___" $ open/read in 'tempcname'-stripped $ read_loop2: $ read/end=stop_reading2 in foo $ foo = f$extract(12,999,foo) ! Get rid of "configure___" $ 'foo' $ goto read_loop2 $ stop_reading2: $ close in $ delete/nolog 'tempcname'*.* $ else $ REAL_CFLAGS = CFLAGS $ endif $ set on $ $!### 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 + " " + C_SWITCH_MACHINE $ 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 This causes -lresolv to get used in subsequent tests, dnl which causes failures on some systems such as HPUX 9. dnl AC_HAVE_LIBRARY(-lresolv) $ 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 $ $!# We change CFLAGS temporarily so that C_SWITCH_X_SITE gets used $!# for the tests that follow. $! $ if "''HAVE_X11'" .eqs. "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 XSetWMProtocols]) $ endif $ $ if "''HAVE_X11'" .eqs. "YES" $ then AC_COMPILE_CHECK(X11 version, [#include ], [ #if XlibSpecificationRelease < 6 fail; #endif ], [AC_DEFINE(HAVE_X11R6)]) $ endif $ $ if "''USE_X_TOOLKIT'" .nes. "NONE" $ then AC_COMPILE_CHECK([X11 toolkit version >= 6], [#include ], [ #if XtSpecificationRelease < 6 fail; #endif ], [AC_DEFINE(HAVE_X11XTR6)]) $ ! The following may be added for the X11XTR6 case in the near future. $ ! Right now, there's no R6 library for VMS, and I have no idea how $ ! DEC will name it. $ type sys$input:/output=conftest2.opt SYS$SHARE:DECW$XtLIBSHRR5.EXE/SHARE $ ac_opts = "" $ if f$type(OPTS) then ac_opts = OPTS $ OPTS := conftest2.opt/opt AC_COMPILE_CHECK([X11 toolkit version == 5], [#include ], [ #if XtSpecificationRelease != 5 fail; #endif ], [AC_DEFINE(HAVE_X11XTR5)]) $ OPTS = ac_opts $ endif $ $!# If netdb.h doesn't declare h_errno, we must declare it by hand. AC_COMPILE_CHECK(declaration of h_errno in netdb.h, [#include ], [ int foo () { return h_errno; } ], [AC_DEFINE(HAVE_H_ERRNO)]) $ 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 lrand48 bcopy bcmp logb frexp fmod drem ftime res_init setsid strerror fpathconf]) 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 $ $ $!# Set up the CFLAGS for real compilation, so we can substitute it. $ CFLAGS=REAL_CFLAGS $ 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 descrip.mms and $!#### config.h. $!#### Use configuration here uncanonicalized to avoid exceeding size limits. $ AC_SUBST(version)dnl AC_SUBST(version_us)dnl AC_SUBST(configuration)dnl AC_SUBST(configuration_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 It IS usefull!!! Richard Levitte 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(X_TOOLKIT_TYPE)dnl AC_SUBST(startupdir_dev)dnl AC_SUBST(startupdir_dir)dnl AC_SUBST(startupdir)dnl AC_SUBST(vuelibdir_dev)dnl AC_SUBST(vuelibdir_dir)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(docdir_dev)dnl AC_SUBST(docdir_dir)dnl AC_SUBST(docdir)dnl AC_SUBST(vmslibdir_dev)dnl AC_SUBST(vmslibdir_dir)dnl AC_SUBST(vmslibdir)dnl AC_SUBST(machfile) AC_SUBST(machfile_dir) AC_SUBST(opsysfile) AC_SUBST(opsysfile_dir) $ AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "''configuration'") AC_DEFINE_UNQUOTED(config_machfile, ["''srcdir_dev'[''srcdir_dir'.src.''machfile_dir']''machfile'"]) AC_DEFINE_UNQUOTED(config_opsysfile, ["''srcdir_dev'[''srcdir_dir'.src.''opsysfile_dir']''opsysfile'"]) AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ''LD_SWITCH_X_SITE') AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, ''LD_SWITCH_X_SITE_AUX') 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 "''USE_X_TOOLKIT'" .nes. "NONE" $ then ] AC_DEFINE(USE_X_TOOLKIT) [ $ 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. "''docdir_specified'" $ then $ docdir_dev="'srcdir_dev'" $ docdir_dir="'srcdir_dir'.etc" $ docdir="'docdir_dev'['docdir_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_us'" $ 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. "''docdir_specified'" $ then $ docdir_dev="'prefix_dev'" $ docdir_dir="'prefix_dir'.common.data" $ docdir="'docdir_dev'['docdir_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'.vms" $ 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'" $ say " What toolkit should Emacs use? ''USE_X_TOOLKIT'" $ 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,'` $] dnl debugmode(V) AC_OUTPUT([descrip.mms [.lib-src]descrip.mms_in [.oldXMenu]descrip.mms [.lwlib]descrip.mms [.src]descrip.mms_in [.vms]descrip.mms [.vms]emacs_vue.com], [$ $!# Build [.src]descrip.mms from 'srcdir_dev:['srcdir_dir'.src]descrip.mms_in. $!# This must be done after [.src]config.h is built, since we rely on that $!# file. $ $! changequote(,)dnl The horror, the horror. $! # Now get this: Some word that is part of the ${srcdir} directory name $! # or the ${configuration} value might, just might, happen to be an $! # identifier like `sun4' or `i386' or something, and be predefined by $! # the C preprocessor to some helpful value like 1, or maybe the empty $! # string. Needless to say consequent macro substitutions are less $! # than conducive to the makefile finding the correct directory. $! undefs="`echo $top_srcdir $configuration $canonical | $! sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \ $! -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \ $! `" $! changequote([,])dnl $ $ save_default = f$environment("DEFAULT") $! $!------------------------------------------------------- $ write sys$output "creating [.lib-src]descrip.mms" $ set default [.lib-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 "!" $ write foo "POSITION (BEGINNING_OF (main_buffer));" $ write foo "my_range := SEARCH_QUIETLY (""start of cpp stuff"", FORWARD);" $ write foo "IF my_range <> 0 $ write foo " THEN $ write foo " POSITION (BEGINNING_OF (my_range));" $ write foo " MOVE_VERTICAL (1);" $ write foo " POSITION (LINE_BEGIN); $ write foo " mark1 := MARK (NONE);" $ write foo " POSITION (END_OF (main_buffer));" $ write foo " mark2 := MARK (NONE);" $ write foo " range1 := CREATE_RANGE (mark1, mark2, NONE);" $ write foo " ERASE (range1);" $ write foo " ENDIF; $ write foo "WRITE_FILE (main_buffer, get_info (command_line, ""output_file""));" $ write foo "QUIT;" $ close foo $ set noon $ save_mesg = f$environment("MESSAGE") $ if .not. f$trnlnm("DEBUG_CONFIGURE") then set message/nofacility/noseverity/noident/notext $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$output nl: $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$error nl: $ edit/tpu/nosection/command=junk1.tpu/nodisplay/out=junk1.c - descrip.mms_in $ set message 'save_mesg' $! $ open/write foo junk.tpu $ write foo "input_file := GET_INFO (COMMAND_LINE, ""file_name"");" $ write foo "main_buffer := CREATE_BUFFER (""main"", input_file);" $ write foo "!" $ write foo "POSITION (BEGINNING_OF (main_buffer));" $ write foo "mark1 := MARK (NONE);" $ write foo "my_range := SEARCH_QUIETLY (""start of cpp stuff"", FORWARD);" $ write foo "IF my_range <> 0 $ write foo " THEN $ write foo " POSITION (BEGINNING_OF (my_range));" $ write foo " POSITION (LINE_END); $ write foo " mark2 := MARK (NONE);" $ write foo " range1 := CREATE_RANGE (mark1, mark2, NONE);" $ write foo " ERASE (range1);" $ write foo " ENDIF; $ write foo "!" $ write foo "POSITION (BEGINNING_OF (main_buffer));" $ write foo "LOOP" $ write foo " my_range := SEARCH_QUIETLY (((""/**/#"" + ((unanchor + """")@r1))@r2) + LINE_END, FORWARD);" $ write foo " EXITIF my_range = 0;" $ write foo " repl := ""/* "" + SUB"+"STR (r1, 1) + "" */"";" $ write foo " ERASE (r2);" $ write foo " POSITION (r2);" $ write foo " COPY_TEXT (repl);" $ 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") $ if .not. f$trnlnm("DEBUG_CONFIGURE") then set message/nofacility/noseverity/noident/notext $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$output nl: $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$error nl: $ edit/tpu/nosection/command=junk.tpu/nodisplay/out=junk.c - descrip.mms_in $ set message 'save_mesg' $! $ save_mesg = f$environment("MESSAGE") $ if .not. f$trnlnm("DEBUG_CONFIGURE") then set message/nofacility/noseverity/noident/notext $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$output nl: $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$error nl: $ CPP junk.i /include=(sys$disk:[],sys$disk:[-.src],'srcdir_dev'['srcdir_dir'.src]) - 'CPPFLAGS' 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 + ("" ""@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 := LINE_BEGIN + (""#""@r); $ write foo "LOOP" $ write foo " my_range := SEARCH_QUIETLY (my_pattern, FORWARD);" $ write foo " EXITIF my_range = 0;" $ write foo " POSITION (r); ERASE_LINE; $ 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 + ("""" | ANY ("" ""))@r + LINE_END;" $ write foo "LOOP" $ write foo " my_range := SEARCH_QUIETLY (my_pattern, FORWARD);" $ write foo " EXITIF my_range = 0;" $ write foo " POSITION (r); ERASE_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 $ set noon $ save_mesg = f$environment("MESSAGE") $ if .not. f$trnlnm("DEBUG_CONFIGURE") then set message/nofacility/noseverity/noident/notext $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$output nl: $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$error nl: $ edit/tpu/nosection/command=junk2.tpu/nodisplay/out=junk2.c - 'junkname' $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$output nl: $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$error nl: $ copy junk1.c+junk2.c descrip.new $ set message 'save_mesg' $ 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 $ set on $ junknames = junkname+";*" $ delete junk*.c.*,junk%.tpu.*,junk.tpu.*,'junknames' $! $!------------------------------------------------------- $ write sys$output "creating [.src]descrip.mms" $ 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 "!" $ write foo "POSITION (BEGINNING_OF (main_buffer));" $ write foo "my_range := SEARCH_QUIETLY (""start of cpp stuff"", FORWARD);" $ write foo "IF my_range <> 0 $ write foo " THEN $ write foo " POSITION (BEGINNING_OF (my_range));" $ write foo " MOVE_VERTICAL (1);" $ write foo " POSITION (LINE_BEGIN); $ write foo " mark1 := MARK (NONE);" $ write foo " POSITION (END_OF (main_buffer));" $ write foo " mark2 := MARK (NONE);" $ write foo " range1 := CREATE_RANGE (mark1, mark2, NONE);" $ write foo " ERASE (range1);" $ write foo " ENDIF; $ write foo "WRITE_FILE (main_buffer, get_info (command_line, ""output_file""));" $ write foo "QUIT;" $ close foo $ set noon $ save_mesg = f$environment("MESSAGE") $ if .not. f$trnlnm("DEBUG_CONFIGURE") then set message/nofacility/noseverity/noident/notext $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$output nl: $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$error nl: $ edit/tpu/nosection/command=junk1.tpu/nodisplay/out=junk1.c - descrip.mms_in $ set message 'save_mesg' $! $ open/write foo junk.tpu $ write foo "input_file := GET_INFO (COMMAND_LINE, ""file_name"");" $ write foo "main_buffer := CREATE_BUFFER (""main"", input_file);" $ write foo "!" $ write foo "POSITION (BEGINNING_OF (main_buffer));" $ write foo "mark1 := MARK (NONE);" $ write foo "my_range := SEARCH_QUIETLY (""start of cpp stuff"", FORWARD);" $ write foo "IF my_range <> 0 $ write foo " THEN $ write foo " POSITION (BEGINNING_OF (my_range));" $ write foo " POSITION (LINE_END); $ write foo " mark2 := MARK (NONE);" $ write foo " range1 := CREATE_RANGE (mark1, mark2, NONE);" $ write foo " ERASE (range1);" $ write foo " ENDIF; $ write foo "!" $ write foo "POSITION (BEGINNING_OF (main_buffer));" $ write foo "LOOP" $ write foo " my_range := SEARCH_QUIETLY (((""/**/#"" + ((unanchor + """")@r1))@r2) + LINE_END, FORWARD);" $ write foo " EXITIF my_range = 0;" $ write foo " repl := ""/* "" + SUB"+"STR (r1, 1) + "" */"";" $ write foo " ERASE (r2);" $ write foo " POSITION (r2);" $ write foo " COPY_TEXT (repl);" $ 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") $ if .not. f$trnlnm("DEBUG_CONFIGURE") then set message/nofacility/noseverity/noident/notext $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$output nl: $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$error nl: $ edit/tpu/nosection/command=junk.tpu/nodisplay/out=junk.c - descrip.mms_in $ set message 'save_mesg' $! $ save_mesg = f$environment("MESSAGE") $ if .not. f$trnlnm("DEBUG_CONFIGURE") then set message/nofacility/noseverity/noident/notext $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$output nl: $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$error nl: $ CPP junk.i /include=(sys$disk:[],sys$disk:[-.src],'srcdir_dev'['srcdir_dir'.src]) - 'CPPFLAGS' 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 + ("" ""@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 := LINE_BEGIN + (""#""@r); $ write foo "LOOP" $ write foo " my_range := SEARCH_QUIETLY (my_pattern, FORWARD);" $ write foo " EXITIF my_range = 0;" $ write foo " POSITION (r); ERASE_LINE; $ 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 + ("""" | ANY ("" ""))@r + LINE_END;" $ write foo "LOOP" $ write foo " my_range := SEARCH_QUIETLY (my_pattern, FORWARD);" $ write foo " EXITIF my_range = 0;" $ write foo " POSITION (r); ERASE_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 $ set noon $ save_mesg = f$environment("MESSAGE") $ if .not. f$trnlnm("DEBUG_CONFIGURE") then set message/nofacility/noseverity/noident/notext $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$output nl: $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$error nl: $ edit/tpu/nosection/command=junk2.tpu/nodisplay/out=junk2.c - 'junkname' $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$output nl: $ if .not. f$trnlnm("DEBUG_CONFIGURE") then define/user sys$error nl: $ copy junk1.c+junk2.c descrip.new $ set message 'save_mesg' $ 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 $ set on $ junknames = junkname+";*" $ delete junk*.c.*,junk%.tpu.*,junk.tpu.*,'junknames' $! $!------------------------------------------------------- $ set default [-.vms] $ files_to_copy := testemacs.com $ set noon $ file_i = 0 $ac_emacs_loop_files_to_copy: $ file_e = f$element(file_i,",",files_to_copy) $ file_i = file_i + 1 $ if file_e .eqs. "" then goto ac_emacs_loop_files_to_copy $ if file_e .nes. "," $ then $ if f$search(file_e) .nes. "" then - diff 'file_e' 'srcdir_dev'['srcdir_dir'.vms]'file_e'/out=nla0: $ if $status .ne. %X06c8009 ! code for no change $ then $ write sys$output "copying [.vms]",file_e $ copy 'srcdir_dev'['srcdir_dir'.vms]'file_e' sys$disk:[] $ endif $ goto ac_emacs_loop_files_to_copy $ endif $ set on $! $ set def [-] $ set def 'save_default' $])dnl