This file contains diffs from version 3.70 of GNU Make to version 3.71. Changes in files that are generated by etags, TeX, or Makeinfo have been omitted. diff -ruN make-3.70/ChangeLog make-3.71/ChangeLog --- make-3.70/ChangeLog Mon Jan 3 17:50:34 1994 +++ make-3.71/ChangeLog Sat May 21 16:30:42 1994 @@ -1,3 +1,220 @@ +Sat May 21 16:26:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 3.71 released. + + * misc.c [GETLOADAVG_PRIVILEGED] [POSIX]: Don't test [HAVE_SETUID] + and [HAVE_SETGID]. Every system has those, and configure doesn't + check for them. + + * make.h [_POSIX_VERSION]: Don't #define POSIX #ifdef ultrix. + + * compatMakefile (loadavg): Depend on and use loadavg.c instead of + getloadavg.c. + (loadavg.c): Link or copy it from getloadavg.c. + (distclean): Remove loadavg.c. + +Mon May 16 22:59:04 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 3.70.4. + + * misc.c [GETLOADAVG_PRIVILEGED] [! POSIX]: Undefine HAVE_SETEUID + and HAVE_SETEGID. + + * default.c (default_terminal_rules): In SCCS rules, put + $(SCCS_OUTPUT_OPTION) before $<. On some systems -G is grokked + only before the file name. + * configure.in (SCCS_GET_MINUS_G check): Put -G flag before file name. + +Tue May 10 16:27:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * job.c (construct_command_argv_internal): Swallow + backslash-newline combinations inside '' strings too. + +Thu May 5 04:15:10 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * read.c (do_define): Call collapse_continuations on each line + before all else. + +Mon Apr 25 19:32:02 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * job.c (construct_command_argv_internal): Notice newline inside + '' string when RESTP is non-null. + +Fri Apr 22 17:33:30 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * Version 3.70.3. + + * remake.c (update_goal_chain): Reset FILE to G->file after the + double-colon loop so it is never null for following code. + + * read.c (read_makefile): Fix `override define' parsing to skip + whitespace after `define' properly. + + * compatMakefile (srcdir): Define as @srcdir@; don't reference + $(VPATH). + (glob/Makefile): New target. + +Thu Apr 21 16:16:55 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * Version 3.70.2. + + * misc.c (remove_comments): Use find_char_unquote. + * make.h (find_char_unquote): Declare it. + * read.c (find_char_unquote): New function, generalized from + find_percent. + (find_percent, find_semicolon, parse_file_seq): Use that. + +Wed Apr 20 18:42:39 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * implicit.c (pattern_search): Always allocate new storage for + FILE->stem. It is not safe to store STEM's address because it + might be auto storage. + + * configure.in: Check for seteuid and setegid. + * misc.c [HAVE_SETEUID]: Declare seteuid. + [HAVE_SETEGID]: Declare setegid. + (make_access, user_access) [HAVE_SETEUID]: Use seteuid. + [HAVE_SETEGID]: Use setegid. + + * remake.c (update_goal_chain): Set STATUS to FILE->update_status, + to preserve whether it's 2 for error or 1 for -q trigger. When + STATUS gets nonzero and -q is set, always stop immediately. + * main.c (main, decode_switches): Die with 2 for errors. + (main): Accept 2 return from update_goal_chain and die with that. + * misc.c (fatal, makefile_fatal): Die with 2; 1 is reserved for -q + answer. + * job.c (reap_children): Die with 2 for error. + (start_job_command): Set update_status to 2 for error. Set it to + 1 when we would run a command and question_flag is set. + + * read.c (read_makefile): Don't mark makefiles as precious. Just + like other targets, they can be left inconsistent and in need of + remaking by aborted commands. + + * read.c (read_makefile): Write no error msg for -include file. + +Tue Apr 5 05:22:19 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * commands.c (fatal_error_signal): Don't unblock signals. + + * file.h (struct file): Change member `double_colon' from flag to + `struct file *'. + * read.c (record_files): Set double_colon pointer instead of flag. + * main.c (main): When disqualifying makefiles for updating, use + double_colon pointer to find all entries for a file. + * file.c (enter_file): If there is already a double-colon entry + for the file, set NEW->double_colon to that pointer. + (file_hash_enter): Use FILE->double_colon to find all entries to + set name. + * remake.c (update_goal_chain): Do inner loop on double-colon entries. + (update_file): Use FILE->double_colon pointer to find all entries. + (f_mtime): Likewise. + (notice_finished_file): Propagate mtime change to all entries. + + * variable.c (try_variable_definition): Return after abort. + +Fri Apr 1 18:44:15 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * read.c (read_makefile): Remove unused variable. + (parse_file_seq): When removing an elt that is just `)', properly + fix up the previous elt's next pointer. + +Mon Mar 28 18:31:49 1994 Roland McGrath (roland@mole.gnu.ai.mit.edu) + + * configure.in: Do AC_SET_MAKE. + * GNUmakefile (Makefile.in): Edit MAKE assignment into @SET_MAKE@. + +Fri Mar 4 00:02:32 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * function.c (subst_expand): If BY_WORD or SUFFIX_ONLY is set and + the search string is the empty string, find a match at the end of + each word (using end_of_token in place of sindex). + + * misc.c (end_of_token): Don't treat backslashes specially; you + can no longer escape blanks with backslashes in export, unexport, + and vpath. This was never documented anyway. + +Thu Mar 3 23:53:46 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * read.c (read_makefile): Variable name for `define' is not just + first token; use whole rest of line and strip trailing blanks. + +Wed Feb 16 16:03:45 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 3.70.1. + + * read.c (read_makefile): Add -d msg stating args. + + * read.c (read_makefile): Use isspace to skip over leading + whitespace, and explicitly avoid skipping over tabs. Don't want + to skip just spaces though; formfeeds et al should be skipped. + + * default.c (default_variables) [__hpux]: Add f in ARFLAGS. + + * arscan.c (ar_name_equal) [__hpux]: Subtract 2 instead of 1 from + sizeof ar_name for max length to compare. + + * misc.c [GETLOADAVG_PRIVILEGED] [POSIX]: Undefine HAVE_SETREUID + #ifdef HAVE_SETUID; likewise HAVE_SETREGID and HAVE_SETGID. + + * main.c (main): Call user_access after setting `program', in case + it needs to use it in an error message. + + * read.c (read_makefile): Ignore an empty line starting with a tab. + +Thu Feb 10 21:45:31 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * configure.in (AC_SYS_SIGLIST_DECLARED): Use this instead of + AC_COMPILE_CHECK that is now its contents. + +Fri Feb 4 16:28:54 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * make.h: #undef strerror after #include . + [! ANSI_STRING]: Declare strerror. + +Thu Feb 3 02:21:22 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * misc.c (strerror): #undef any macro before function definition. + +Mon Jan 31 19:07:23 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * variable.c (try_variable_definition): Calculate BEG before loop + to strip blanks by decrementing END. Don't decr END to before BEG. + + * read.c (read_makefile): Skip over leading space characters, but + not tabs, after removing continuations and comments (it used to + use isspace). + +Tue Jan 25 16:45:05 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * variable.c (define_automatic_variables): In $(@D) et al, use + patsubst to remove trailing slash. + + * commands.c (delete_target): New function, broken out of + delete_child_targets. Check for archive members and give special msg. + (delete_child_targets): Use delete_target. + +Mon Jan 17 17:03:22 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * default.c (default_suffix_rules): Use $(TEXI2DVI_FLAGS) in + texi2dvi rules. Use $(MAKEINFO_FLAGS) in makeinfo rules. + +Tue Jan 11 19:29:55 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * GNUmakefile (tarfiles): Omit make-doc. + (make-$(version).tar): Include make.info*. + +Fri Jan 7 16:27:00 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * compatMakefile (configure, config.h.in): Comment out rules. + +Thu Jan 6 18:08:08 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * compatMakefile (binprefix, manprefix): New variables. + (instname): Variable removed. + (install): Use $({bin,man}prefix)make in place of $(instname). + File targets likewised renamed. + Mon Jan 3 17:50:25 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * Version 3.70 released. diff -ruN make-3.70/INSTALL make-3.71/INSTALL --- make-3.70/INSTALL Wed Sep 15 19:05:10 1993 +++ make-3.71/INSTALL Mon Apr 18 22:19:55 1994 @@ -18,9 +18,9 @@ version of System V, you might need to type `sh configure' instead to prevent `csh' from trying to execute `configure' itself. - Running `configure' takes a minute or two. While it is running, it + Running `configure' takes awhile. While it is running, it prints some messages that tell what it is doing. If you don't want to -see the messages, run `configure' with its standard output redirected +see any messages, run `configure' with its standard output redirected to `/dev/null'; for example, `./configure >/dev/null'. To compile the package in a different directory from the one @@ -51,12 +51,36 @@ using the same prefix. Some packages pay attention to `--with-PACKAGE' options to -`configure', where PACKAGE is something like `gnu-as' or `x' (for the X -Window System). The README should mention any `--with-' options that -the package recognizes. +`configure', where PACKAGE is something like `gnu-as' or `x' (for the +X Window System). They may also pay attention to `--enable-FEATURE' +options, where FEATURE indicates an optional part of the package. The +README should mention any `--with-' and `--enable-' options that the +package recognizes. - `configure' ignores any other arguments that you give it. + `configure' also recognizes the following options: +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' + Do not print messages saying which checks are being made. + +`--verbose' + Print the results of the checks. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--x-includes=DIR' + X include files are in DIR. + +`--x-libraries=DIR' + X library files are in DIR. + + `configure' also accepts and ignores some other options. + On systems that require unusual options for compilation or linking that the package's `configure' script does not know about, you can give `configure' initial values for variables by setting them in the @@ -64,6 +88,10 @@ command line like this: CC='gcc -traditional' LIBS=-lposix ./configure + +On systems that have the `env' program, you can do it like this: + + env CC='gcc -traditional' LIBS=-lposix ./configure Here are the `make' variables that you might want to override with environment variables when running `configure'. diff -ruN make-3.70/Makefile.in make-3.71/Makefile.in --- make-3.70/Makefile.in Mon Jan 3 18:03:41 1994 +++ make-3.71/Makefile.in Sat May 21 16:48:45 1994 @@ -1,7 +1,7 @@ # NOTE: If you have no `make' program at all to process this makefile, run # `build.sh' instead. # -# Copyright (C) 1988, 1989, 1991, 1992, 1993 Free Software Foundation, Inc. +# Copyright (C) 1988, 1989, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. # This file is part of GNU Make. # # GNU Make is free software; you can redistribute it and/or modify @@ -24,7 +24,8 @@ # Ultrix 2.2 make doesn't expand the value of VPATH. VPATH = @srcdir@ -srcdir = $(VPATH) +# This must repeat the value, because configure will remove `VPATH = .'. +srcdir = @srcdir@ CC = @CC@ @@ -80,8 +81,6 @@ # Common prefix for machine-dependent installed files. exec_prefix = $(prefix) -# Name under which to install GNU make. -instname = make # Directory to install `make' in. bindir = $(exec_prefix)/bin # Directory to find libraries in for `-lXXX'. @@ -94,6 +93,10 @@ mandir = $(prefix)/man/man$(manext) # Number to put on the man page filename. manext = 1 +# Prefix to put on installed `make' binary file name. +binprefix = +# Prefix to put on installed `make' man page file name. +manprefix = $(binprefix) # Whether or not make needs to be installed setgid. # The value should be either `true' or `false'. @@ -167,7 +170,7 @@ # For some losing Unix makes. SHELL = /bin/sh -MAKE = make +@SET_MAKE@ glob/libglob.a: FORCE config.h cd glob; $(MAKE) CC='$(CC)' CFLAGS='$(CFLAGS) -I..' \ @@ -184,13 +187,13 @@ .PHONY: install installdirs install: installdirs \ - $(bindir)/$(instname) $(infodir)/make.info \ - $(mandir)/$(instname).$(manext) + $(bindir)/$(binprefix)make $(infodir)/make.info \ + $(mandir)/$(manprefix)make.$(manext) installdirs: $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(mandir) -$(bindir)/$(instname): make +$(bindir)/$(binprefix)make: make $(INSTALL_PROGRAM) make $@.new @if $(install_setgid); then \ if chgrp $(group) $@.new && chmod g+s $@.new; then \ @@ -222,13 +225,18 @@ install-info --infodir=$(infodir) $$dir/make.info; \ else true; fi -$(mandir)/$(instname).$(manext): make.man +$(mandir)/$(manprefix)make.$(manext): make.man $(INSTALL_DATA) $(srcdir)/make.man $@ -loadavg: getloadavg.c config.h +loadavg: loadavg.c config.h $(CC) $(defines) -DTEST -I. -I$(srcdir) $(CFLAGS) $(LDFLAGS) \ - $(srcdir)/getloadavg.c $(LOADLIBES) -o $@ + loadavg.c $(LOADLIBES) -o $@ +# We copy getloadavg.c into a different file rather than compiling it +# directly because some compilers clobber getloadavg.o in the process. +loadavg.c: getloadavg.c + ln $(srcdir)/getloadavg.c loadavg.c || \ + cp $(srcdir)/getloadavg.c loadavg.c check-loadavg: loadavg @echo The system uptime program believes the load average to be: -uptime @@ -244,6 +252,7 @@ -rm -f Makefile config.h config.status build.sh stamp-config -rm -f TAGS tags -rm -f make.?? make.??s make.log make.toc make.*aux + -rm -f loadavg.c realclean: distclean mostlyclean: clean @@ -253,15 +262,18 @@ Makefile: config.status $(srcdir)/Makefile.in $(SHELL) config.status +glob/Makefile: config.status $(srcdir)/glob/Makefile.in + $(SHELL) config.status config.h: stamp-config ; stamp-config: config.status $(srcdir)/config.h.in $(SHELL) config.status touch stamp-config -configure: configure.in - autoconf $(ACFLAGS) -config.h.in: configure.in - autoheader $(ACFLAGS) +# These rules cause too much trouble. +#configure: configure.in +# autoconf $(ACFLAGS) +#config.h.in: configure.in +# autoheader $(ACFLAGS) # This tells versions [3.59,3.63) of GNU make not to export all variables. .NOEXPORT: @@ -274,26 +286,26 @@ # Automatically generated dependencies will be put at the end of the file. # Automatically generated dependencies. -commands.o : commands.c make.h config.h dep.h commands.h file.h variable.h job.h -job.o : job.c make.h config.h commands.h job.h file.h variable.h +commands.o : commands.c make.h dep.h commands.h file.h variable.h job.h +job.o : job.c make.h commands.h job.h file.h variable.h dir.o : dir.c make.h config.h -file.o : file.c make.h config.h commands.h dep.h file.h variable.h -misc.o : misc.c make.h config.h dep.h -main.o : main.c make.h config.h commands.h dep.h file.h variable.h job.h getopt.h -read.o : read.c make.h config.h commands.h dep.h file.h variable.h glob/glob.h -remake.o : remake.c make.h config.h commands.h job.h dep.h file.h +file.o : file.c make.h commands.h dep.h file.h variable.h +misc.o : misc.c make.h dep.h +main.o : main.c make.h commands.h dep.h file.h variable.h job.h getopt.h +read.o : read.c make.h commands.h dep.h file.h variable.h glob/glob.h +remake.o : remake.c make.h commands.h job.h dep.h file.h rule.o : rule.c make.h config.h commands.h dep.h file.h variable.h rule.h -implicit.o : implicit.c make.h config.h rule.h dep.h file.h -default.o : default.c make.h config.h rule.h dep.h file.h commands.h variable.h -variable.o : variable.c make.h config.h commands.h variable.h dep.h file.h +implicit.o : implicit.c make.h rule.h dep.h file.h +default.o : default.c make.h rule.h dep.h file.h commands.h variable.h +variable.o : variable.c make.h commands.h variable.h dep.h file.h expand.o : expand.c make.h config.h commands.h file.h variable.h -function.o : function.c make.h config.h variable.h dep.h commands.h job.h -vpath.o : vpath.c make.h config.h file.h variable.h +function.o : function.c make.h variable.h dep.h commands.h job.h +vpath.o : vpath.c make.h file.h variable.h version.o : version.c -ar.o : ar.c make.h config.h file.h dep.h -arscan.o : arscan.c make.h config.h +ar.o : ar.c make.h file.h dep.h +arscan.o : arscan.c make.h signame.o : signame.c config.h signame.h -remote-stub.o : remote-stub.c make.h config.h commands.h +remote-stub.o : remote-stub.c make.h commands.h getopt.o : getopt.c config.h getopt.h getopt1.o : getopt1.c config.h getopt.h getloadavg.o : getloadavg.c config.h diff -ruN make-3.70/NEWS make-3.71/NEWS --- make-3.70/NEWS Tue Dec 14 19:26:32 1993 +++ make-3.71/NEWS Wed Apr 20 22:35:23 1994 @@ -1,10 +1,32 @@ -GNU make NEWS -- history of user-visible changes. 14 December 1993 +GNU make NEWS -- history of user-visible changes. 20 April 1994 -Copyright (C) 1992, 1993 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. See the end for copying conditions. Please send GNU make bug reports to bug-gnu-utils@prep.ai.mit.edu. +Version 3.71 + +* The automatic variables `$(@D)', `$(%D)', `$(*D)', `$(precious || file->phony) + return; + +#ifndef NO_ARCHIVES + if (ar_name (file->name)) + { + if (ar_member_date (file->name) != file->last_mtime) + { + if (on_behalf_of) + error ("*** [%s] Archive member `%s' may be bogus; not deleted", + on_behalf_of, file->name); + else + error ("*** Archive member `%s' may be bogus; not deleted", + file->name); + } + return; + } +#endif + + if (stat (file->name, &st) == 0 + && S_ISREG (st.st_mode) + && (time_t) st.st_mtime != file->last_mtime) + { + if (on_behalf_of) + error ("*** [%s] Deleting file `%s'", on_behalf_of, file->name); + else + error ("*** Deleting file `%s'", file->name); + if (unlink (file->name) < 0) + perror_with_name ("unlink: ", file->name); + } +} + + /* Delete all non-precious targets of CHILD unless they were already deleted. Set the flag in CHILD to say they've been deleted. */ @@ -403,36 +437,17 @@ delete_child_targets (child) struct child *child; { - struct stat st; struct dep *d; if (child->deleted) return; - /* Delete the file unless it's precious or not actually a file (phony). */ - if (!child->file->precious && !child->file->phony - && stat (child->file->name, &st) == 0 - && S_ISREG (st.st_mode) - && (time_t) st.st_mtime != child->file->last_mtime) - { - error ("*** Deleting file `%s'", child->file->name); - if (unlink (child->file->name) < 0) - perror_with_name ("unlink: ", child->file->name); - } + /* Delete the target file if it changed. */ + delete_target (child->file, (char *) 0); - /* Also remove any non-precious targets listed - in the `also_make' member. */ + /* Also remove any non-precious targets listed in the `also_make' member. */ for (d = child->file->also_make; d != 0; d = d->next) - if (!d->file->precious && !d->file->phony) - if (stat (d->file->name, &st) == 0 - && S_ISREG (st.st_mode) - && (time_t) st.st_mtime != d->file->last_mtime) - { - error ("*** [%s] Deleting file `%s'", child->file->name, - d->file->name); - if (unlink (d->file->name) < 0) - perror_with_name ("unlink: ", d->file->name); - } + delete_target (d->file, child->file->name); child->deleted = 1; } diff -ruN make-3.70/commands.h make-3.71/commands.h --- make-3.70/commands.h Fri Feb 5 17:31:57 1993 +++ make-3.71/commands.h Wed Mar 23 09:13:01 1994 @@ -1,4 +1,5 @@ -/* Copyright (C) 1988, 1989, 1991, 1993 Free Software Foundation, Inc. +/* Definition of data structures describing shell commands for GNU Make. +Copyright (C) 1988, 1989, 1991, 1993 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify diff -ruN make-3.70/config.h.in make-3.71/config.h.in --- make-3.70/config.h.in Thu Dec 23 18:47:37 1993 +++ make-3.71/config.h.in Wed May 18 20:23:35 1994 @@ -148,6 +148,12 @@ /* Define if you have psignal. */ #undef HAVE_PSIGNAL +/* Define if you have setegid. */ +#undef HAVE_SETEGID + +/* Define if you have seteuid. */ +#undef HAVE_SETEUID + /* Define if you have setlinebuf. */ #undef HAVE_SETLINEBUF @@ -200,22 +206,22 @@ #undef HAVE_UNISTD_H /* Define if you have the dgc library (-ldgc). */ -#undef HAVE_DGC +#undef HAVE_LIBDGC /* Define if you have the elf library (-lelf). */ -#undef HAVE_ELF +#undef HAVE_LIBELF /* Define if you have the getloadavg library (-lgetloadavg). */ -#undef HAVE_GETLOADAVG +#undef HAVE_LIBGETLOADAVG /* Define if you have the kvm library (-lkvm). */ -#undef HAVE_KVM +#undef HAVE_LIBKVM /* Define if you have the seq library (-lseq). */ -#undef HAVE_SEQ +#undef HAVE_LIBSEQ /* Define if you have the sun library (-lsun). */ -#undef HAVE_SUN +#undef HAVE_LIBSUN /* Define if you have the util library (-lutil). */ -#undef HAVE_UTIL +#undef HAVE_LIBUTIL diff -ruN make-3.70/configure make-3.71/configure --- make-3.70/configure Thu Dec 23 18:46:30 1993 +++ make-3.71/configure Sat May 21 16:37:43 1994 @@ -1,7 +1,10 @@ #!/bin/sh +# From configure.in I"cfiguei + +#!/bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 1.7.1 -# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +# Generated automatically using autoconf version 1.11 +# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. # This configure script is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -17,116 +20,303 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] -# [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE[=VALUE]] -# Ignores all args except --srcdir, --prefix, --exec-prefix, and -# --with-PACKAGE[=VALUE] unless this script has special code to handle it. +# Save the original args to write them into config.status later. +configure_args="$*" + +# Only options that might do something get documented. +ac_usage="Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +--build=BUILD configure for building on BUILD [BUILD=HOST] +--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) +--enable-FEATURE[=ARG] include FEATURE [ARG=yes] +--exec-prefix=PREFIX install host dependent files in PREFIX [/usr/local] +--help print this message +--host=HOST configure for HOST [guessed] +--prefix=PREFIX install host independent files in PREFIX [/usr/local] +--quiet, --silent do not print \`checking for...' messages +--srcdir=DIR find the sources in DIR [configure dir or ..] +--target=TARGET configure for TARGET [TARGET=HOST] +--verbose print results of checks +--version print the version of autoconf that created configure +--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) +--x-includes=DIR X include files are in DIR +--x-libraries=DIR X library files are in DIR" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +exec_prefix= +host=NONE +no_create= +nonopt=NONE +norecursion= +prefix= +program_prefix= +program_suffix= +program_transform_name= +silent= +srcdir= +target=NONE +verbose= +x_includes= +x_libraries= -for arg +ac_prev= +for ac_option do - # Handle --exec-prefix with a space before the argument. - if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix= - # Handle --host with a space before the argument. - elif test x$next_host = xyes; then next_host= - # Handle --prefix with a space before the argument. - elif test x$next_prefix = xyes; then prefix=$arg; next_prefix= - # Handle --srcdir with a space before the argument. - elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir= - else - case $arg in - # For backward compatibility, recognize -exec-prefix and --exec_prefix. - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*) - exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;; - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e) - next_exec_prefix=yes ;; - - -gas | --gas | --ga | --g) ;; - - -host=* | --host=* | --hos=* | --ho=* | --h=*) ;; - -host | --host | --hos | --ho | --h) - next_host=yes ;; - - -nfp | --nfp | --nf) ;; - - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;; - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - next_prefix=yes ;; - - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*) - srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s) - next_srcdir=yes ;; - - -with-* | --with-*) - package=`echo $arg|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that aren't valid shell variable names. - if test -n "`echo $package| sed 's/[-a-zA-Z0-9_]//g'`"; then - echo "configure: $package: invalid package name" >&2; exit 1 - fi - package=`echo $package| sed 's/-/_/g'` - case "$arg" in - *=*) val="`echo $arg|sed 's/[^=]*=//'`" ;; - *) val=1 ;; - esac - eval "with_$package='$val'" ;; + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi - -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v) - verbose=yes ;; + # Accept (but ignore some of) the important Cygnus configure + # options, so we can diagnose typos. - *) ;; + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + case "$ac_option" in + + -build | --build | --buil | --bui | --bu | --b) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*) + build="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that aren't valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + echo "configure: $ac_feature: invalid feature name" >&2; exit 1 + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that aren't valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + echo "configure: $ac_feature: invalid feature name" >&2; exit 1 + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; esac - fi + eval "enable_${ac_feature}='$ac_optarg'" ;; + + # For backward compatibility, recognize -exec-prefix and --exec_prefix. + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + with_gas=yes ;; # Obsolete; use --with-gas. + + -help | --help | --hel | --he) + cat << EOF +$ac_usage +EOF + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -nfp | --nfp | --nf) + with_fp=no ;; # Obsolete; use --without-fp. + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -norecursion | --norecursion | --norecursio | --norecursi \ + | --norecurs | --norecur | --norecu | --norec | --nore | --nor) + norecursion=yes ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 1.11" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that aren't valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + echo "configure: $ac_package: invalid package name" >&2; exit 1 + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that aren't valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + echo "configure: $ac_package: invalid package name" >&2; exit 1 + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) with_x=yes ;; # Obsolete; use --with-x. + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) echo "configure: $ac_option: invalid option; use --help to show usage" >&2; exit 1 + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" >&2 + fi + if test "x$nonopt" != xNONE; then + echo "configure: can only configure for one host and one target at a time" >&2; exit 1 + fi + nonopt="$ac_option" + ;; + + esac done -trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 3 15 -trap 'rm -f confdefs* $ac_clean_files' 0 +if test -n "$ac_prev"; then + echo "configure: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" >&2; exit 1 +fi + +trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15 +trap 'rm -fr confdefs* $ac_clean_files' 0 +# Save the original args if we used an alternate arg parser. +ac_configure_temp="${configure_args-$*}" +# Strip out --no-create and --norecursion so they don't pile up. +configure_args= +for ac_arg in $ac_configure_temp; do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -norecursion | --norecursion | --norecursio | --norecursi \ + | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;; + *) configure_args="$configure_args $ac_arg" ;; + esac +done + # NLS nuisances. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = 'set' ; then LC_ALL=C; export LC_ALL; fi -if test "${LANG+set}" = 'set' ; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi +if test "${LANG+set}" = 'set'; then LANG=C; export LANG; fi +# confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo > confdefs.h -compile='${CC-cc} $CFLAGS conftest.c -o conftest $LIBS >/dev/null 2>&1' # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. -unique_file=vpath.c +ac_unique_file=vpath.c # Find the source files, if location was not specified. if test -z "$srcdir"; then - srcdirdefaulted=yes + ac_srcdir_defaulted=yes # Try the directory containing this script, then `..'. - prog=$0 - confdir=`echo $prog|sed 's%/[^/][^/]*$%%'` - test "X$confdir" = "X$prog" && confdir=. - srcdir=$confdir - if test ! -r $srcdir/$unique_file; then + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi fi -if test ! -r $srcdir/$unique_file; then - if test x$srcdirdefaulted = xyes; then - echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2 +if test ! -r $srcdir/$ac_unique_file; then + if test x$ac_srcdir_defaulted = xyes; then + echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1 else - echo "configure: Can not find sources in \`${srcdir}'." 1>&2 + echo "configure: can not find sources in ${srcdir}" >&2; exit 1 fi - exit 1 fi -# Preserve a srcdir of `.' to avoid automounter screwups with pwd. -# But we can't avoid them for `..', to make subdirectories work. -case $srcdir in - .|/*|~*) ;; - *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute. -esac +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='${CPP}' +ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1' - -# Save the original args to write them into config.status later. -configure_args="$*" # We want these before the checks, so the checks can modify their values. @@ -133,19 +323,29 @@ test -z "$CFLAGS" && CFLAGS=-g test -z "$LDFLAGS" && LDFLAGS=-g +cat > conftestmake <<'EOF' +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then SET_MAKE= +else SET_MAKE="MAKE=${MAKE-make}"; fi +rm -f conftestmake + if test -z "$CC"; then # Extract the first word of `gcc', so it can be a program name with args. - set dummy gcc; word=$2 - echo checking for $word - IFS="${IFS= }"; saveifs="$IFS"; IFS="${IFS}:" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/$word; then + set ac_dummy gcc; ac_word=$2 + test -n "$silent" || echo "checking for $ac_word" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then CC="gcc" break fi done - IFS="$saveifs" + IFS="$ac_save_ifs" fi test -z "$CC" && CC="cc" test -n "$CC" && test -n "$verbose" && echo " setting CC to $CC" @@ -167,95 +367,110 @@ # or the SunOS /usr/etc/install directory, or the AIX /bin/install, # or the AFS install, which mishandles nonexistent args, or # /usr/ucb/install on SVR4, which tries to use the nonexistent group -# `staff'. On most BSDish systems install is in /usr/bin, not /usr/ucb -# anyway. Sigh. -if test "z${INSTALL}" = "z" ; then - echo checking for install - IFS="${IFS= }"; saveifs="$IFS"; IFS="${IFS}:" - for dir in $PATH; do - #test -z "$dir" && dir=. - case "$dir" in - ''|.|/etc|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;; +# `staff', or /sbin/install on IRIX which has incompatible command-line +# syntax. Sigh. +# +# On most BSDish systems install is in /usr/bin, not /usr/ucb +# anyway. +# This turns out not to be true, so the mere pathname isn't an indication +# of whether the program works. What we really need is a set of tests for +# the install program to see if it actually works in all the required ways. +# +# Avoid using ./install, which might have been erroneously created +# by make from ./install.sh. +if test -z "${INSTALL}"; then + test -n "$silent" || echo "checking for a BSD compatible install" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + case "$ac_dir" in + ''|.|/etc|/sbin|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;; *) - if test -f $dir/installbsd; then - INSTALL="$dir/installbsd -c" # OSF1 - INSTALL_PROGRAM='$(INSTALL)' - INSTALL_DATA='$(INSTALL) -m 644' - break - fi - if test -f $dir/install; then - if grep dspmsg $dir/install >/dev/null 2>&1; then - : # AIX - else - INSTALL="$dir/install -c" - INSTALL_PROGRAM='$(INSTALL)' - INSTALL_DATA='$(INSTALL) -m 644' - break + # OSF1 and SCO ODT 3.0 have their own names for install. + for ac_prog in installbsd scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + # OSF/1 installbsd also uses dspmsg, but is usable. + : + else + INSTALL="$ac_dir/$ac_prog -c" + break 2 + fi fi - fi + done ;; esac done - IFS="$saveifs" + IFS="$ac_save_ifs" fi + if test -z "$INSTALL"; then - if test -f ${srcdir}/install.sh; then - # As a last resort, use the slow shell script. - # We want the top-level source directory, not the subdir's srcdir, - # so expand srcdir now rather than in the Makefile. - INSTALL="${srcdir}/install.sh -c" - else - echo "warning: ${srcdir}/install.sh not found; using cp" - INSTALL=cp - fi + # As a last resort, use the slow shell script. + for ac_dir in ${srcdir} ${srcdir}/.. ${srcdir}/../..; do + if test -f $ac_dir/install.sh; then + INSTALL="$ac_dir/install.sh -c"; break + fi + done +fi +if test -z "$INSTALL"; then + echo "configure: can not find install.sh in ${srcdir} or ${srcdir}/.. or ${srcdir}/../.." >&2; exit 1 fi test -n "$verbose" && echo " setting INSTALL to $INSTALL" -INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'} + +# Use test -z because SunOS4 sh mishandles ${INSTALL_PROGRAM-'${INSTALL}'}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -n "$verbose" && echo " setting INSTALL_PROGRAM to $INSTALL_PROGRAM" -INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'} + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' test -n "$verbose" && echo " setting INSTALL_DATA to $INSTALL_DATA" if test -z "$RANLIB"; then # Extract the first word of `ranlib', so it can be a program name with args. - set dummy ranlib; word=$2 - echo checking for $word - IFS="${IFS= }"; saveifs="$IFS"; IFS="${IFS}:" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/$word; then + set ac_dummy ranlib; ac_word=$2 + test -n "$silent" || echo "checking for $ac_word" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then RANLIB="ranlib" break fi done - IFS="$saveifs" + IFS="$ac_save_ifs" fi test -z "$RANLIB" && RANLIB=":" test -n "$RANLIB" && test -n "$verbose" && echo " setting RANLIB to $RANLIB" -echo checking how to run the C preprocessor +test -n "$silent" || echo "checking how to run the C preprocessor" if test -z "$CPP"; then # This must be in double quotes, not single quotes, because CPP may get # substituted into the Makefile and ``${CC-cc}'' will simply confuse # make. It must be expanded now. CPP="${CC-cc} -E" - cat > conftest.c < conftest.${ac_ext} < Syntax Error EOF -err=`eval "($CPP conftest.c >/dev/null) 2>&1"` -if test -z "$err"; then +# Some shells (Coherent) do redirections in the wrong order, so need +# the parens. +ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` +if test -z "$ac_err"; then : else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.c < conftest.${ac_ext} < Syntax Error EOF -err=`eval "($CPP conftest.c >/dev/null) 2>&1"` -if test -z "$err"; then +# Some shells (Coherent) do redirections in the wrong order, so need +# the parens. +ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` +if test -z "$ac_err"; then : else rm -rf conftest* @@ -265,9 +480,9 @@ fi rm -f conftest* fi -test ".${verbose}" != "." && echo " setting CPP to $CPP" - echo checking for AIX -cat > conftest.c < conftest.${ac_ext} < conftest.out 2>&1" +eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" if egrep "yes" conftest.out >/dev/null 2>&1; then rm -rf conftest* @@ -281,11 +496,11 @@ { test -n "$verbose" && \ echo " defining _ALL_SOURCE" -echo "#define _ALL_SOURCE 1" >> confdefs.h +echo "#define" _ALL_SOURCE "1" >> confdefs.h DEFS="$DEFS -D_ALL_SOURCE=1" -SEDDEFS="${SEDDEFS}\${SEDdA}_ALL_SOURCE\${SEDdB}_ALL_SOURCE\${SEDdC}1\${SEDdD} -\${SEDuA}_ALL_SOURCE\${SEDuB}_ALL_SOURCE\${SEDuC}1\${SEDuD} -\${SEDeA}_ALL_SOURCE\${SEDeB}_ALL_SOURCE\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}_ALL_SOURCE\${ac_dB}_ALL_SOURCE\${ac_dC}1\${ac_dD} +\${ac_uA}_ALL_SOURCE\${ac_uB}_ALL_SOURCE\${ac_uC}1\${ac_uD} +\${ac_eA}_ALL_SOURCE\${ac_eB}_ALL_SOURCE\${ac_eC}1\${ac_eD} " } @@ -294,7 +509,7 @@ rm -f conftest* -echo checking for POSIXized ISC +test -n "$silent" || echo "checking for POSIXized ISC" if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -303,11 +518,11 @@ { test -n "$verbose" && \ echo " defining _POSIX_SOURCE" -echo "#define _POSIX_SOURCE 1" >> confdefs.h +echo "#define" _POSIX_SOURCE "1" >> confdefs.h DEFS="$DEFS -D_POSIX_SOURCE=1" -SEDDEFS="${SEDDEFS}\${SEDdA}_POSIX_SOURCE\${SEDdB}_POSIX_SOURCE\${SEDdC}1\${SEDdD} -\${SEDuA}_POSIX_SOURCE\${SEDuB}_POSIX_SOURCE\${SEDuC}1\${SEDuD} -\${SEDeA}_POSIX_SOURCE\${SEDeB}_POSIX_SOURCE\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD} +\${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD} +\${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD} " } @@ -318,13 +533,15 @@ fi fi -echo checking for minix/config.h -cat > conftest.c < conftest.${ac_ext} < EOF -err=`eval "($CPP conftest.c >/dev/null) 2>&1"` -if test -z "$err"; then +# Some shells (Coherent) do redirections in the wrong order, so need +# the parens. +ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` +if test -z "$ac_err"; then rm -rf conftest* MINIX=1 @@ -337,11 +554,11 @@ { test -n "$verbose" && \ echo " defining _POSIX_SOURCE" -echo "#define _POSIX_SOURCE 1" >> confdefs.h +echo "#define" _POSIX_SOURCE "1" >> confdefs.h DEFS="$DEFS -D_POSIX_SOURCE=1" -SEDDEFS="${SEDDEFS}\${SEDdA}_POSIX_SOURCE\${SEDdB}_POSIX_SOURCE\${SEDdC}1\${SEDdD} -\${SEDuA}_POSIX_SOURCE\${SEDuB}_POSIX_SOURCE\${SEDuC}1\${SEDuD} -\${SEDeA}_POSIX_SOURCE\${SEDeB}_POSIX_SOURCE\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD} +\${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD} +\${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD} " } @@ -348,12 +565,12 @@ { test -n "$verbose" && \ -echo " defining _POSIX_1_SOURCE to be 2" -echo "#define _POSIX_1_SOURCE 2" >> confdefs.h +echo " defining" _POSIX_1_SOURCE to be "2" +echo "#define" _POSIX_1_SOURCE "2" >> confdefs.h DEFS="$DEFS -D_POSIX_1_SOURCE=2" -SEDDEFS="${SEDDEFS}\${SEDdA}_POSIX_1_SOURCE\${SEDdB}_POSIX_1_SOURCE\${SEDdC}2\${SEDdD} -\${SEDuA}_POSIX_1_SOURCE\${SEDuB}_POSIX_1_SOURCE\${SEDuC}2\${SEDuD} -\${SEDeA}_POSIX_1_SOURCE\${SEDeB}_POSIX_1_SOURCE\${SEDeC}2\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_1_SOURCE\${ac_dB}_POSIX_1_SOURCE\${ac_dC}2\${ac_dD} +\${ac_uA}_POSIX_1_SOURCE\${ac_uB}_POSIX_1_SOURCE\${ac_uC}2\${ac_uD} +\${ac_eA}_POSIX_1_SOURCE\${ac_eB}_POSIX_1_SOURCE\${ac_eC}2\${ac_eD} " } @@ -361,18 +578,18 @@ { test -n "$verbose" && \ echo " defining _MINIX" -echo "#define _MINIX 1" >> confdefs.h +echo "#define" _MINIX "1" >> confdefs.h DEFS="$DEFS -D_MINIX=1" -SEDDEFS="${SEDDEFS}\${SEDdA}_MINIX\${SEDdB}_MINIX\${SEDdC}1\${SEDdD} -\${SEDuA}_MINIX\${SEDuB}_MINIX\${SEDuC}1\${SEDuD} -\${SEDeA}_MINIX\${SEDeB}_MINIX\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}_MINIX\${ac_dB}_MINIX\${ac_dC}1\${ac_dD} +\${ac_uA}_MINIX\${ac_uB}_MINIX\${ac_uC}1\${ac_uD} +\${ac_eA}_MINIX\${ac_eB}_MINIX\${ac_eC}1\${ac_eD} " } fi -echo checking for ANSI C header files -cat > conftest.c < conftest.${ac_ext} < #include @@ -379,17 +596,19 @@ #include #include EOF -err=`eval "($CPP conftest.c >/dev/null) 2>&1"` -if test -z "$err"; then +# Some shells (Coherent) do redirections in the wrong order, so need +# the parens. +ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` +if test -z "$ac_err"; then rm -rf conftest* # SunOS 4.x string.h does not declare mem*, contrary to ANSI. echo '#include "confdefs.h" -#include ' > conftest.c -eval "$CPP conftest.c > conftest.out 2>&1" +#include ' > conftest.${ac_ext} +eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" if egrep "memchr" conftest.out >/dev/null 2>&1; then rm -rf conftest* # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -cat > conftest.c < conftest.${ac_ext} < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -400,12 +619,12 @@ exit (0); } EOF -eval $compile +eval $ac_compile if test -s conftest && (./conftest; exit) 2>/dev/null; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. echo '#include "confdefs.h" -#include ' > conftest.c -eval "$CPP conftest.c > conftest.out 2>&1" +#include ' > conftest.${ac_ext} +eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" if egrep "free" conftest.out >/dev/null 2>&1; then rm -rf conftest* @@ -412,11 +631,11 @@ { test -n "$verbose" && \ echo " defining STDC_HEADERS" -echo "#define STDC_HEADERS 1" >> confdefs.h +echo "#define" STDC_HEADERS "1" >> confdefs.h DEFS="$DEFS -DSTDC_HEADERS=1" -SEDDEFS="${SEDDEFS}\${SEDdA}STDC_HEADERS\${SEDdB}STDC_HEADERS\${SEDdC}1\${SEDdD} -\${SEDuA}STDC_HEADERS\${SEDuB}STDC_HEADERS\${SEDuC}1\${SEDuD} -\${SEDeA}STDC_HEADERS\${SEDeB}STDC_HEADERS\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}STDC_HEADERS\${ac_dB}STDC_HEADERS\${ac_dC}1\${ac_dD} +\${ac_uA}STDC_HEADERS\${ac_uB}STDC_HEADERS\${ac_uC}1\${ac_uD} +\${ac_eA}STDC_HEADERS\${ac_eB}STDC_HEADERS\${ac_eC}1\${ac_eD} " } @@ -435,125 +654,125 @@ fi rm -f conftest* -echo checking for directory library header -dirheader= -if test -z "$dirheader"; then - echo checking for dirent.h -cat > conftest.c < conftest.${ac_ext} < #include -int main() { exit(0); } -int t() { DIR *dirp = 0; } +int main() { return 0; } +int t() { DIR *dirp = 0;; return 0; } EOF -if eval $compile; then +if eval $ac_compile; then rm -rf conftest* { test -n "$verbose" && \ echo " defining DIRENT" -echo "#define DIRENT 1" >> confdefs.h +echo "#define" DIRENT "1" >> confdefs.h DEFS="$DEFS -DDIRENT=1" -SEDDEFS="${SEDDEFS}\${SEDdA}DIRENT\${SEDdB}DIRENT\${SEDdC}1\${SEDdD} -\${SEDuA}DIRENT\${SEDuB}DIRENT\${SEDuC}1\${SEDuD} -\${SEDeA}DIRENT\${SEDeB}DIRENT\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}DIRENT\${ac_dB}DIRENT\${ac_dC}1\${ac_dD} +\${ac_uA}DIRENT\${ac_uB}DIRENT\${ac_uC}1\${ac_uD} +\${ac_eA}DIRENT\${ac_eB}DIRENT\${ac_eC}1\${ac_eD} " } - dirheader=dirent.h + ac_dir_header=dirent.h fi rm -f conftest* fi -if test -z "$dirheader"; then - echo checking for sys/ndir.h -cat > conftest.c < conftest.${ac_ext} < #include -int main() { exit(0); } -int t() { DIR *dirp = 0; } +int main() { return 0; } +int t() { DIR *dirp = 0;; return 0; } EOF -if eval $compile; then +if eval $ac_compile; then rm -rf conftest* { test -n "$verbose" && \ echo " defining SYSNDIR" -echo "#define SYSNDIR 1" >> confdefs.h +echo "#define" SYSNDIR "1" >> confdefs.h DEFS="$DEFS -DSYSNDIR=1" -SEDDEFS="${SEDDEFS}\${SEDdA}SYSNDIR\${SEDdB}SYSNDIR\${SEDdC}1\${SEDdD} -\${SEDuA}SYSNDIR\${SEDuB}SYSNDIR\${SEDuC}1\${SEDuD} -\${SEDeA}SYSNDIR\${SEDeB}SYSNDIR\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSNDIR\${ac_dB}SYSNDIR\${ac_dC}1\${ac_dD} +\${ac_uA}SYSNDIR\${ac_uB}SYSNDIR\${ac_uC}1\${ac_uD} +\${ac_eA}SYSNDIR\${ac_eB}SYSNDIR\${ac_eC}1\${ac_eD} " } - dirheader=sys/ndir.h + ac_dir_header=sys/ndir.h fi rm -f conftest* fi -if test -z "$dirheader"; then - echo checking for sys/dir.h -cat > conftest.c < conftest.${ac_ext} < #include -int main() { exit(0); } -int t() { DIR *dirp = 0; } +int main() { return 0; } +int t() { DIR *dirp = 0;; return 0; } EOF -if eval $compile; then +if eval $ac_compile; then rm -rf conftest* { test -n "$verbose" && \ echo " defining SYSDIR" -echo "#define SYSDIR 1" >> confdefs.h +echo "#define" SYSDIR "1" >> confdefs.h DEFS="$DEFS -DSYSDIR=1" -SEDDEFS="${SEDDEFS}\${SEDdA}SYSDIR\${SEDdB}SYSDIR\${SEDdC}1\${SEDdD} -\${SEDuA}SYSDIR\${SEDuB}SYSDIR\${SEDuC}1\${SEDuD} -\${SEDeA}SYSDIR\${SEDeB}SYSDIR\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSDIR\${ac_dB}SYSDIR\${ac_dC}1\${ac_dD} +\${ac_uA}SYSDIR\${ac_uB}SYSDIR\${ac_uC}1\${ac_uD} +\${ac_eA}SYSDIR\${ac_eB}SYSDIR\${ac_eC}1\${ac_eD} " } - dirheader=sys/dir.h + ac_dir_header=sys/dir.h fi rm -f conftest* fi -if test -z "$dirheader"; then - echo checking for ndir.h -cat > conftest.c < conftest.${ac_ext} < #include -int main() { exit(0); } -int t() { DIR *dirp = 0; } +int main() { return 0; } +int t() { DIR *dirp = 0;; return 0; } EOF -if eval $compile; then +if eval $ac_compile; then rm -rf conftest* { test -n "$verbose" && \ echo " defining NDIR" -echo "#define NDIR 1" >> confdefs.h +echo "#define" NDIR "1" >> confdefs.h DEFS="$DEFS -DNDIR=1" -SEDDEFS="${SEDDEFS}\${SEDdA}NDIR\${SEDdB}NDIR\${SEDdC}1\${SEDdD} -\${SEDuA}NDIR\${SEDuB}NDIR\${SEDuC}1\${SEDuD} -\${SEDeA}NDIR\${SEDeB}NDIR\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}NDIR\${ac_dB}NDIR\${ac_dC}1\${ac_dD} +\${ac_uA}NDIR\${ac_uB}NDIR\${ac_uC}1\${ac_uD} +\${ac_eA}NDIR\${ac_eB}NDIR\${ac_eC}1\${ac_eD} " } - dirheader=ndir.h + ac_dir_header=ndir.h fi rm -f conftest* fi -echo checking for closedir return value -cat > conftest.c < conftest.${ac_ext} < -#include <$dirheader> +#include <$ac_dir_header> int closedir(); main() { exit(closedir(opendir(".")) != 0); } EOF -eval $compile +eval $ac_compile if test -s conftest && (./conftest; exit) 2>/dev/null; then : else @@ -561,11 +780,11 @@ { test -n "$verbose" && \ echo " defining VOID_CLOSEDIR" -echo "#define VOID_CLOSEDIR 1" >> confdefs.h +echo "#define" VOID_CLOSEDIR "1" >> confdefs.h DEFS="$DEFS -DVOID_CLOSEDIR=1" -SEDDEFS="${SEDDEFS}\${SEDdA}VOID_CLOSEDIR\${SEDdB}VOID_CLOSEDIR\${SEDdC}1\${SEDdD} -\${SEDuA}VOID_CLOSEDIR\${SEDuB}VOID_CLOSEDIR\${SEDuC}1\${SEDuD} -\${SEDeA}VOID_CLOSEDIR\${SEDeB}VOID_CLOSEDIR\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}VOID_CLOSEDIR\${ac_dB}VOID_CLOSEDIR\${ac_dC}1\${ac_dD} +\${ac_uA}VOID_CLOSEDIR\${ac_uB}VOID_CLOSEDIR\${ac_uC}1\${ac_uD} +\${ac_eA}VOID_CLOSEDIR\${ac_eB}VOID_CLOSEDIR\${ac_eC}1\${ac_eD} " } @@ -572,10 +791,10 @@ fi rm -fr conftest* -echo checking for uid_t in sys/types.h +test -n "$silent" || echo "checking for uid_t in sys/types.h" echo '#include "confdefs.h" -#include ' > conftest.c -eval "$CPP conftest.c > conftest.out 2>&1" +#include ' > conftest.${ac_ext} +eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" if egrep "uid_t" conftest.out >/dev/null 2>&1; then : else @@ -583,30 +802,30 @@ { test -n "$verbose" && \ -echo " defining uid_t to be int" -echo "#define uid_t int" >> confdefs.h +echo " defining" uid_t to be "int" +echo "#define" uid_t "int" >> confdefs.h DEFS="$DEFS -Duid_t=int" -SEDDEFS="${SEDDEFS}\${SEDdA}uid_t\${SEDdB}uid_t\${SEDdC}int\${SEDdD} -\${SEDuA}uid_t\${SEDuB}uid_t\${SEDuC}int\${SEDuD} -\${SEDeA}uid_t\${SEDeB}uid_t\${SEDeC}int\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}uid_t\${ac_dB}uid_t\${ac_dC}int\${ac_dD} +\${ac_uA}uid_t\${ac_uB}uid_t\${ac_uC}int\${ac_uD} +\${ac_eA}uid_t\${ac_eB}uid_t\${ac_eC}int\${ac_eD} " } { test -n "$verbose" && \ -echo " defining gid_t to be int" -echo "#define gid_t int" >> confdefs.h +echo " defining" gid_t to be "int" +echo "#define" gid_t "int" >> confdefs.h DEFS="$DEFS -Dgid_t=int" -SEDDEFS="${SEDDEFS}\${SEDdA}gid_t\${SEDdB}gid_t\${SEDdC}int\${SEDdD} -\${SEDuA}gid_t\${SEDuB}gid_t\${SEDuC}int\${SEDuD} -\${SEDeA}gid_t\${SEDeB}gid_t\${SEDeC}int\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}gid_t\${ac_dB}gid_t\${ac_dC}int\${ac_dD} +\${ac_uA}gid_t\${ac_uB}gid_t\${ac_uC}int\${ac_uD} +\${ac_eA}gid_t\${ac_eB}gid_t\${ac_eC}int\${ac_eD} " } fi rm -f conftest* - echo checking for type of array argument to getgroups -prog='/* Thanks to Mike Rendell for this test. */ + test -n "$silent" || echo "checking for type of array argument to getgroups" +ac_prog='/* Thanks to Mike Rendell for this test. */ #include #define NGID 256 #undef MAX @@ -626,21 +845,21 @@ happens when gid_t is short but getgroups modifies an array of ints. */ exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); }' -cat > conftest.c < conftest.${ac_ext} </dev/null; then { test -n "$verbose" && \ -echo " defining GETGROUPS_T to be gid_t" -echo "#define GETGROUPS_T gid_t" >> confdefs.h +echo " defining" GETGROUPS_T to be "gid_t" +echo "#define" GETGROUPS_T "gid_t" >> confdefs.h DEFS="$DEFS -DGETGROUPS_T=gid_t" -SEDDEFS="${SEDDEFS}\${SEDdA}GETGROUPS_T\${SEDdB}GETGROUPS_T\${SEDdC}gid_t\${SEDdD} -\${SEDuA}GETGROUPS_T\${SEDuB}GETGROUPS_T\${SEDuC}gid_t\${SEDuD} -\${SEDeA}GETGROUPS_T\${SEDeB}GETGROUPS_T\${SEDeC}gid_t\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}GETGROUPS_T\${ac_dB}GETGROUPS_T\${ac_dC}gid_t\${ac_dD} +\${ac_uA}GETGROUPS_T\${ac_uB}GETGROUPS_T\${ac_uC}gid_t\${ac_uD} +\${ac_eA}GETGROUPS_T\${ac_eB}GETGROUPS_T\${ac_eC}gid_t\${ac_eD} " } @@ -649,12 +868,12 @@ { test -n "$verbose" && \ -echo " defining GETGROUPS_T to be int" -echo "#define GETGROUPS_T int" >> confdefs.h +echo " defining" GETGROUPS_T to be "int" +echo "#define" GETGROUPS_T "int" >> confdefs.h DEFS="$DEFS -DGETGROUPS_T=int" -SEDDEFS="${SEDDEFS}\${SEDdA}GETGROUPS_T\${SEDdB}GETGROUPS_T\${SEDdC}int\${SEDdD} -\${SEDuA}GETGROUPS_T\${SEDuB}GETGROUPS_T\${SEDuC}int\${SEDuD} -\${SEDeA}GETGROUPS_T\${SEDeB}GETGROUPS_T\${SEDeC}int\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}GETGROUPS_T\${ac_dB}GETGROUPS_T\${ac_dC}int\${ac_dD} +\${ac_uA}GETGROUPS_T\${ac_uB}GETGROUPS_T\${ac_uC}int\${ac_uD} +\${ac_eA}GETGROUPS_T\${ac_eB}GETGROUPS_T\${ac_eC}int\${ac_eD} " } @@ -661,10 +880,10 @@ fi rm -fr conftest* -echo checking for pid_t in sys/types.h +test -n "$silent" || echo "checking for pid_t in sys/types.h" echo '#include "confdefs.h" -#include ' > conftest.c -eval "$CPP conftest.c > conftest.out 2>&1" +#include ' > conftest.${ac_ext} +eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" if egrep "pid_t" conftest.out >/dev/null 2>&1; then : else @@ -672,12 +891,12 @@ { test -n "$verbose" && \ -echo " defining pid_t to be int" -echo "#define pid_t int" >> confdefs.h +echo " defining" pid_t to be "int" +echo "#define" pid_t "int" >> confdefs.h DEFS="$DEFS -Dpid_t=int" -SEDDEFS="${SEDDEFS}\${SEDdA}pid_t\${SEDdB}pid_t\${SEDdC}int\${SEDdD} -\${SEDuA}pid_t\${SEDuB}pid_t\${SEDuC}int\${SEDuD} -\${SEDeA}pid_t\${SEDeB}pid_t\${SEDeC}int\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}pid_t\${ac_dB}pid_t\${ac_dC}int\${ac_dD} +\${ac_uA}pid_t\${ac_uB}pid_t\${ac_uC}int\${ac_uD} +\${ac_eA}pid_t\${ac_eB}pid_t\${ac_eC}int\${ac_eD} " } @@ -684,8 +903,8 @@ fi rm -f conftest* -echo checking for return type of signal handlers -cat > conftest.c < conftest.${ac_ext} < #include @@ -693,20 +912,20 @@ #undef signal #endif extern void (*signal ()) (); -int main() { exit(0); } -int t() { int i; } +int main() { return 0; } +int t() { int i;; return 0; } EOF -if eval $compile; then +if eval $ac_compile; then rm -rf conftest* { test -n "$verbose" && \ -echo " defining RETSIGTYPE to be void" -echo "#define RETSIGTYPE void" >> confdefs.h +echo " defining" RETSIGTYPE to be "void" +echo "#define" RETSIGTYPE "void" >> confdefs.h DEFS="$DEFS -DRETSIGTYPE=void" -SEDDEFS="${SEDDEFS}\${SEDdA}RETSIGTYPE\${SEDdB}RETSIGTYPE\${SEDdC}void\${SEDdD} -\${SEDuA}RETSIGTYPE\${SEDuB}RETSIGTYPE\${SEDuC}void\${SEDuD} -\${SEDeA}RETSIGTYPE\${SEDeB}RETSIGTYPE\${SEDeC}void\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}void\${ac_dD} +\${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}void\${ac_uD} +\${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}void\${ac_eD} " } @@ -716,12 +935,12 @@ { test -n "$verbose" && \ -echo " defining RETSIGTYPE to be int" -echo "#define RETSIGTYPE int" >> confdefs.h +echo " defining" RETSIGTYPE to be "int" +echo "#define" RETSIGTYPE "int" >> confdefs.h DEFS="$DEFS -DRETSIGTYPE=int" -SEDDEFS="${SEDDEFS}\${SEDdA}RETSIGTYPE\${SEDdB}RETSIGTYPE\${SEDdC}int\${SEDdD} -\${SEDuA}RETSIGTYPE\${SEDuB}RETSIGTYPE\${SEDuC}int\${SEDuD} -\${SEDeA}RETSIGTYPE\${SEDeB}RETSIGTYPE\${SEDeC}int\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}int\${ac_dD} +\${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}int\${ac_uD} +\${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}int\${ac_eD} " } @@ -729,27 +948,29 @@ rm -f conftest* -for hdr in unistd.h limits.h sys/param.h fcntl.h string.h memory.h \ +for ac_hdr in unistd.h limits.h sys/param.h fcntl.h string.h memory.h \ sys/timeb.h do -trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'` -echo checking for ${hdr} -cat > conftest.c < conftest.${ac_ext} < +#include <${ac_hdr}> EOF -err=`eval "($CPP conftest.c >/dev/null) 2>&1"` -if test -z "$err"; then +# Some shells (Coherent) do redirections in the wrong order, so need +# the parens. +ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` +if test -z "$ac_err"; then rm -rf conftest* { test -n "$verbose" && \ -echo " defining ${trhdr}" -echo "#define ${trhdr} 1" >> confdefs.h -DEFS="$DEFS -D${trhdr}=1" -SEDDEFS="${SEDDEFS}\${SEDdA}${trhdr}\${SEDdB}${trhdr}\${SEDdC}1\${SEDdD} -\${SEDuA}${trhdr}\${SEDuB}${trhdr}\${SEDuC}1\${SEDuD} -\${SEDeA}${trhdr}\${SEDeB}${trhdr}\${SEDeC}1\${SEDeD} +echo " defining ${ac_tr_hdr}" +echo "#define" ${ac_tr_hdr} "1" >> confdefs.h +DEFS="$DEFS -D${ac_tr_hdr}=1" +ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD} +\${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD} +\${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD} " } @@ -758,7 +979,7 @@ rm -f conftest* done -echo checking whether $CC and cc understand -c and -o together +test -n "$silent" || echo "checking whether $CC and cc understand -c and -o together" echo 'foo(){}' > conftest.c # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an @@ -778,11 +999,11 @@ { test -n "$verbose" && \ echo " defining NO_MINUS_C_MINUS_O" -echo "#define NO_MINUS_C_MINUS_O 1" >> confdefs.h +echo "#define" NO_MINUS_C_MINUS_O "1" >> confdefs.h DEFS="$DEFS -DNO_MINUS_C_MINUS_O=1" -SEDDEFS="${SEDDEFS}\${SEDdA}NO_MINUS_C_MINUS_O\${SEDdB}NO_MINUS_C_MINUS_O\${SEDdC}1\${SEDdD} -\${SEDuA}NO_MINUS_C_MINUS_O\${SEDuB}NO_MINUS_C_MINUS_O\${SEDuC}1\${SEDuD} -\${SEDeA}NO_MINUS_C_MINUS_O\${SEDeB}NO_MINUS_C_MINUS_O\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_MINUS_C_MINUS_O\${ac_dB}NO_MINUS_C_MINUS_O\${ac_dC}1\${ac_dD} +\${ac_uA}NO_MINUS_C_MINUS_O\${ac_uB}NO_MINUS_C_MINUS_O\${ac_uC}1\${ac_uD} +\${ac_eA}NO_MINUS_C_MINUS_O\${ac_eB}NO_MINUS_C_MINUS_O\${ac_eC}1\${ac_eD} " } @@ -793,11 +1014,11 @@ { test -n "$verbose" && \ echo " defining NO_MINUS_C_MINUS_O" -echo "#define NO_MINUS_C_MINUS_O 1" >> confdefs.h +echo "#define" NO_MINUS_C_MINUS_O "1" >> confdefs.h DEFS="$DEFS -DNO_MINUS_C_MINUS_O=1" -SEDDEFS="${SEDDEFS}\${SEDdA}NO_MINUS_C_MINUS_O\${SEDdB}NO_MINUS_C_MINUS_O\${SEDdC}1\${SEDdD} -\${SEDuA}NO_MINUS_C_MINUS_O\${SEDuB}NO_MINUS_C_MINUS_O\${SEDuC}1\${SEDuD} -\${SEDeA}NO_MINUS_C_MINUS_O\${SEDeB}NO_MINUS_C_MINUS_O\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_MINUS_C_MINUS_O\${ac_dB}NO_MINUS_C_MINUS_O\${ac_dC}1\${ac_dD} +\${ac_uA}NO_MINUS_C_MINUS_O\${ac_uB}NO_MINUS_C_MINUS_O\${ac_uC}1\${ac_uD} +\${ac_eA}NO_MINUS_C_MINUS_O\${ac_eB}NO_MINUS_C_MINUS_O\${ac_eC}1\${ac_eD} " } @@ -804,7 +1025,7 @@ fi rm -f conftest* -prog='/* Ultrix mips cc rejects this. */ +ac_prog='/* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; @@ -842,14 +1063,14 @@ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; }' -echo checking for lack of working const -cat > conftest.c < conftest.${ac_ext} <> confdefs.h +echo " defining" const to be empty +echo "#define" const "" >> confdefs.h DEFS="$DEFS -Dconst=" -SEDDEFS="${SEDDEFS}\${SEDdA}const\${SEDdB}const\${SEDdC}\${SEDdD} -\${SEDuA}const\${SEDuB}const\${SEDuC}\${SEDuD} -\${SEDeA}const\${SEDeB}const\${SEDeC}\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}const\${ac_dB}const\${ac_dC}\${ac_dD} +\${ac_uA}const\${ac_uB}const\${ac_uC}\${ac_uD} +\${ac_eA}const\${ac_eB}const\${ac_eC}\${ac_eD} " } fi rm -f conftest* - echo checking for broken stat file mode macros -cat > conftest.c < conftest.${ac_ext} < #include @@ -894,7 +1115,7 @@ #endif /* S_ISSOCK */ EOF -eval "$CPP conftest.c > conftest.out 2>&1" +eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" if egrep "You lose" conftest.out >/dev/null 2>&1; then rm -rf conftest* @@ -901,11 +1122,11 @@ { test -n "$verbose" && \ echo " defining STAT_MACROS_BROKEN" -echo "#define STAT_MACROS_BROKEN 1" >> confdefs.h +echo "#define" STAT_MACROS_BROKEN "1" >> confdefs.h DEFS="$DEFS -DSTAT_MACROS_BROKEN=1" -SEDDEFS="${SEDDEFS}\${SEDdA}STAT_MACROS_BROKEN\${SEDdB}STAT_MACROS_BROKEN\${SEDdC}1\${SEDdD} -\${SEDuA}STAT_MACROS_BROKEN\${SEDuB}STAT_MACROS_BROKEN\${SEDuC}1\${SEDuD} -\${SEDeA}STAT_MACROS_BROKEN\${SEDeB}STAT_MACROS_BROKEN\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_MACROS_BROKEN\${ac_dB}STAT_MACROS_BROKEN\${ac_dC}1\${ac_dD} +\${ac_uA}STAT_MACROS_BROKEN\${ac_uB}STAT_MACROS_BROKEN\${ac_uC}1\${ac_uD} +\${ac_eA}STAT_MACROS_BROKEN\${ac_eB}STAT_MACROS_BROKEN\${ac_eC}1\${ac_eD} " } @@ -916,38 +1137,38 @@ -for func in getdtablesize sys_siglist _sys_siglist psignal \ +for ac_func in getdtablesize sys_siglist _sys_siglist psignal \ dup2 getcwd sigsetmask getgroups setlinebuf \ - setreuid setregid strerror + seteuid setegid setreuid setregid strerror do -trfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'` -echo checking for ${func} -cat > conftest.c < conftest.${ac_ext} < -int main() { exit(0); } +int main() { return 0; } int t() { /* 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_${func}) || defined (__stub___${func}) +#if defined (__stub_${ac_func}) || defined (__stub___${ac_func}) choke me #else /* Override any gcc2 internal prototype to avoid an error. */ -extern char ${func}(); ${func}(); +extern char ${ac_func}(); ${ac_func}(); #endif - } +; return 0; } EOF -if eval $compile; then +if eval $ac_compile; then rm -rf conftest* { test -n "$verbose" && \ -echo " defining ${trfunc}" -echo "#define ${trfunc} 1" >> confdefs.h -DEFS="$DEFS -D${trfunc}=1" -SEDDEFS="${SEDDEFS}\${SEDdA}${trfunc}\${SEDdB}${trfunc}\${SEDdC}1\${SEDdD} -\${SEDuA}${trfunc}\${SEDuB}${trfunc}\${SEDuC}1\${SEDuD} -\${SEDeA}${trfunc}\${SEDeB}${trfunc}\${SEDeC}1\${SEDeD} +echo " defining ${ac_tr_func}" +echo "#define" ${ac_tr_func} "1" >> confdefs.h +DEFS="$DEFS -D${ac_tr_func}=1" +ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD} +\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD} +\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD} " } @@ -958,24 +1179,24 @@ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! -echo checking for working alloca.h -cat > conftest.c < conftest.${ac_ext} < -int main() { exit(0); } -int t() { char *p = alloca(2 * sizeof(int)); } +int main() { return 0; } +int t() { char *p = alloca(2 * sizeof(int));; return 0; } EOF -if eval $compile; then +if eval $ac_compile; then rm -rf conftest* { test -n "$verbose" && \ echo " defining HAVE_ALLOCA_H" -echo "#define HAVE_ALLOCA_H 1" >> confdefs.h +echo "#define" HAVE_ALLOCA_H "1" >> confdefs.h DEFS="$DEFS -DHAVE_ALLOCA_H=1" -SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_ALLOCA_H\${SEDdB}HAVE_ALLOCA_H\${SEDdC}1\${SEDdD} -\${SEDuA}HAVE_ALLOCA_H\${SEDuB}HAVE_ALLOCA_H\${SEDuC}1\${SEDuD} -\${SEDeA}HAVE_ALLOCA_H\${SEDeB}HAVE_ALLOCA_H\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA_H\${ac_dB}HAVE_ALLOCA_H\${ac_dC}1\${ac_dD} +\${ac_uA}HAVE_ALLOCA_H\${ac_uB}HAVE_ALLOCA_H\${ac_uC}1\${ac_uD} +\${ac_eA}HAVE_ALLOCA_H\${ac_eB}HAVE_ALLOCA_H\${ac_eC}1\${ac_eD} " } @@ -983,7 +1204,7 @@ fi rm -f conftest* -decl="#ifdef __GNUC__ +ac_decl="#ifdef __GNUC__ #define alloca __builtin_alloca #else #if HAVE_ALLOCA_H @@ -997,24 +1218,24 @@ #endif #endif " -echo checking for alloca -cat > conftest.c < conftest.${ac_ext} <> confdefs.h +echo "#define" HAVE_ALLOCA "1" >> confdefs.h DEFS="$DEFS -DHAVE_ALLOCA=1" -SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_ALLOCA\${SEDdB}HAVE_ALLOCA\${SEDdC}1\${SEDdD} -\${SEDuA}HAVE_ALLOCA\${SEDuB}HAVE_ALLOCA\${SEDuC}1\${SEDuD} -\${SEDeA}HAVE_ALLOCA\${SEDeB}HAVE_ALLOCA\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA\${ac_dB}HAVE_ALLOCA\${ac_dC}1\${ac_dD} +\${ac_uA}HAVE_ALLOCA\${ac_uB}HAVE_ALLOCA\${ac_uC}1\${ac_uD} +\${ac_eA}HAVE_ALLOCA\${ac_eB}HAVE_ALLOCA\${ac_eC}1\${ac_eD} " } @@ -1021,8 +1242,8 @@ else rm -rf conftest* - alloca_missing=1 -cat > conftest.c < conftest.${ac_ext} < conftest.out 2>&1" +eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" if egrep "winnitude" conftest.out >/dev/null 2>&1; then rm -rf conftest* - echo checking for _getb67 -cat > conftest.c < conftest.${ac_ext} < -int main() { exit(0); } +int main() { return 0; } int t() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named @@ -1050,18 +1271,18 @@ /* Override any gcc2 internal prototype to avoid an error. */ extern char _getb67(); _getb67(); #endif - } +; return 0; } EOF -if eval $compile; then +if eval $ac_compile; then rm -rf conftest* { test -n "$verbose" && \ -echo " defining CRAY_STACKSEG_END to be _getb67" -echo "#define CRAY_STACKSEG_END _getb67" >> confdefs.h +echo " defining" CRAY_STACKSEG_END to be "_getb67" +echo "#define" CRAY_STACKSEG_END "_getb67" >> confdefs.h DEFS="$DEFS -DCRAY_STACKSEG_END=_getb67" -SEDDEFS="${SEDDEFS}\${SEDdA}CRAY_STACKSEG_END\${SEDdB}CRAY_STACKSEG_END\${SEDdC}_getb67\${SEDdD} -\${SEDuA}CRAY_STACKSEG_END\${SEDuB}CRAY_STACKSEG_END\${SEDuC}_getb67\${SEDuD} -\${SEDeA}CRAY_STACKSEG_END\${SEDeB}CRAY_STACKSEG_END\${SEDeC}_getb67\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}_getb67\${ac_dD} +\${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}_getb67\${ac_uD} +\${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}_getb67\${ac_eD} " } @@ -1068,11 +1289,11 @@ else rm -rf conftest* - echo checking for GETB67 -cat > conftest.c < conftest.${ac_ext} < -int main() { exit(0); } +int main() { return 0; } int t() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named @@ -1083,18 +1304,18 @@ /* Override any gcc2 internal prototype to avoid an error. */ extern char GETB67(); GETB67(); #endif - } +; return 0; } EOF -if eval $compile; then +if eval $ac_compile; then rm -rf conftest* { test -n "$verbose" && \ -echo " defining CRAY_STACKSEG_END to be GETB67" -echo "#define CRAY_STACKSEG_END GETB67" >> confdefs.h +echo " defining" CRAY_STACKSEG_END to be "GETB67" +echo "#define" CRAY_STACKSEG_END "GETB67" >> confdefs.h DEFS="$DEFS -DCRAY_STACKSEG_END=GETB67" -SEDDEFS="${SEDDEFS}\${SEDdA}CRAY_STACKSEG_END\${SEDdB}CRAY_STACKSEG_END\${SEDdC}GETB67\${SEDdD} -\${SEDuA}CRAY_STACKSEG_END\${SEDuB}CRAY_STACKSEG_END\${SEDuC}GETB67\${SEDuD} -\${SEDeA}CRAY_STACKSEG_END\${SEDeB}CRAY_STACKSEG_END\${SEDeC}GETB67\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}GETB67\${ac_dD} +\${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}GETB67\${ac_uD} +\${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}GETB67\${ac_eD} " } @@ -1101,11 +1322,11 @@ else rm -rf conftest* - echo checking for getb67 -cat > conftest.c < conftest.${ac_ext} < -int main() { exit(0); } +int main() { return 0; } int t() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named @@ -1116,18 +1337,18 @@ /* Override any gcc2 internal prototype to avoid an error. */ extern char getb67(); getb67(); #endif - } +; return 0; } EOF -if eval $compile; then +if eval $ac_compile; then rm -rf conftest* { test -n "$verbose" && \ -echo " defining CRAY_STACKSEG_END to be getb67" -echo "#define CRAY_STACKSEG_END getb67" >> confdefs.h +echo " defining" CRAY_STACKSEG_END to be "getb67" +echo "#define" CRAY_STACKSEG_END "getb67" >> confdefs.h DEFS="$DEFS -DCRAY_STACKSEG_END=getb67" -SEDDEFS="${SEDDEFS}\${SEDdA}CRAY_STACKSEG_END\${SEDdB}CRAY_STACKSEG_END\${SEDdC}getb67\${SEDdD} -\${SEDuA}CRAY_STACKSEG_END\${SEDuB}CRAY_STACKSEG_END\${SEDuC}getb67\${SEDuD} -\${SEDeA}CRAY_STACKSEG_END\${SEDeB}CRAY_STACKSEG_END\${SEDeC}getb67\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}getb67\${ac_dD} +\${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}getb67\${ac_uD} +\${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}getb67\${ac_eD} " } @@ -1149,7 +1370,7 @@ fi rm -f conftest* -if test -n "$alloca_missing"; then +if test -n "$ac_alloca_missing"; then # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, @@ -1159,23 +1380,23 @@ { test -n "$verbose" && \ echo " defining C_ALLOCA" -echo "#define C_ALLOCA 1" >> confdefs.h +echo "#define" C_ALLOCA "1" >> confdefs.h DEFS="$DEFS -DC_ALLOCA=1" -SEDDEFS="${SEDDEFS}\${SEDdA}C_ALLOCA\${SEDdB}C_ALLOCA\${SEDdC}1\${SEDdD} -\${SEDuA}C_ALLOCA\${SEDuB}C_ALLOCA\${SEDuC}1\${SEDuD} -\${SEDeA}C_ALLOCA\${SEDeB}C_ALLOCA\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}C_ALLOCA\${ac_dB}C_ALLOCA\${ac_dC}1\${ac_dD} +\${ac_uA}C_ALLOCA\${ac_uB}C_ALLOCA\${ac_uC}1\${ac_uD} +\${ac_eA}C_ALLOCA\${ac_eB}C_ALLOCA\${ac_eC}1\${ac_eD} " } - echo 'checking stack direction for C alloca' - echo checking whether cross-compiling + test -n "$silent" || echo "checking stack direction for C alloca" + test -n "$silent" || echo "checking whether cross-compiling" # If we cannot run a trivial program, we must be cross compiling. -cat > conftest.c < conftest.${ac_ext} </dev/null; then : else @@ -1188,17 +1409,17 @@ { test -n "$verbose" && \ -echo " defining STACK_DIRECTION to be 0" -echo "#define STACK_DIRECTION 0" >> confdefs.h +echo " defining" STACK_DIRECTION to be "0" +echo "#define" STACK_DIRECTION "0" >> confdefs.h DEFS="$DEFS -DSTACK_DIRECTION=0" -SEDDEFS="${SEDDEFS}\${SEDdA}STACK_DIRECTION\${SEDdB}STACK_DIRECTION\${SEDdC}0\${SEDdD} -\${SEDuA}STACK_DIRECTION\${SEDuB}STACK_DIRECTION\${SEDuC}0\${SEDuD} -\${SEDeA}STACK_DIRECTION\${SEDeB}STACK_DIRECTION\${SEDeC}0\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}0\${ac_dD} +\${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}0\${ac_uD} +\${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}0\${ac_eD} " } else -cat > conftest.c < conftest.${ac_ext} </dev/null; then { test -n "$verbose" && \ -echo " defining STACK_DIRECTION to be 1" -echo "#define STACK_DIRECTION 1" >> confdefs.h +echo " defining" STACK_DIRECTION to be "1" +echo "#define" STACK_DIRECTION "1" >> confdefs.h DEFS="$DEFS -DSTACK_DIRECTION=1" -SEDDEFS="${SEDDEFS}\${SEDdA}STACK_DIRECTION\${SEDdB}STACK_DIRECTION\${SEDdC}1\${SEDdD} -\${SEDuA}STACK_DIRECTION\${SEDuB}STACK_DIRECTION\${SEDuC}1\${SEDuD} -\${SEDeA}STACK_DIRECTION\${SEDeB}STACK_DIRECTION\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}1\${ac_dD} +\${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}1\${ac_uD} +\${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}1\${ac_eD} " } @@ -1236,12 +1457,12 @@ { test -n "$verbose" && \ -echo " defining STACK_DIRECTION to be -1" -echo "#define STACK_DIRECTION -1" >> confdefs.h +echo " defining" STACK_DIRECTION to be "-1" +echo "#define" STACK_DIRECTION "-1" >> confdefs.h DEFS="$DEFS -DSTACK_DIRECTION=-1" -SEDDEFS="${SEDDEFS}\${SEDdA}STACK_DIRECTION\${SEDdB}STACK_DIRECTION\${SEDdC}-1\${SEDdD} -\${SEDuA}STACK_DIRECTION\${SEDuB}STACK_DIRECTION\${SEDuC}-1\${SEDuD} -\${SEDeA}STACK_DIRECTION\${SEDeB}STACK_DIRECTION\${SEDeC}-1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}-1\${ac_dD} +\${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}-1\${ac_uD} +\${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}-1\${ac_eD} " } @@ -1250,23 +1471,25 @@ rm -fr conftest* fi -echo checking for vfork.h -cat > conftest.c < conftest.${ac_ext} < EOF -err=`eval "($CPP conftest.c >/dev/null) 2>&1"` -if test -z "$err"; then +# Some shells (Coherent) do redirections in the wrong order, so need +# the parens. +ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` +if test -z "$ac_err"; then rm -rf conftest* { test -n "$verbose" && \ echo " defining HAVE_VFORK_H" -echo "#define HAVE_VFORK_H 1" >> confdefs.h +echo "#define" HAVE_VFORK_H "1" >> confdefs.h DEFS="$DEFS -DHAVE_VFORK_H=1" -SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_VFORK_H\${SEDdB}HAVE_VFORK_H\${SEDdC}1\${SEDdD} -\${SEDuA}HAVE_VFORK_H\${SEDuB}HAVE_VFORK_H\${SEDuC}1\${SEDuD} -\${SEDeA}HAVE_VFORK_H\${SEDeB}HAVE_VFORK_H\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_VFORK_H\${ac_dB}HAVE_VFORK_H\${ac_dC}1\${ac_dD} +\${ac_uA}HAVE_VFORK_H\${ac_uB}HAVE_VFORK_H\${ac_uC}1\${ac_uD} +\${ac_eA}HAVE_VFORK_H\${ac_eB}HAVE_VFORK_H\${ac_eC}1\${ac_eD} " } @@ -1274,9 +1497,9 @@ fi rm -f conftest* -echo checking for working vfork +test -n "$silent" || echo "checking for working vfork" -cat > conftest.c < conftest.${ac_ext} < @@ -1360,7 +1583,7 @@ } } EOF -eval $compile +eval $ac_compile if test -s conftest && (./conftest; exit) 2>/dev/null; then : else @@ -1367,12 +1590,12 @@ { test -n "$verbose" && \ -echo " defining vfork to be fork" -echo "#define vfork fork" >> confdefs.h +echo " defining" vfork to be "fork" +echo "#define" vfork "fork" >> confdefs.h DEFS="$DEFS -Dvfork=fork" -SEDDEFS="${SEDDEFS}\${SEDdA}vfork\${SEDdB}vfork\${SEDdC}fork\${SEDdD} -\${SEDuA}vfork\${SEDuB}vfork\${SEDuC}fork\${SEDuD} -\${SEDeA}vfork\${SEDeB}vfork\${SEDeC}fork\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}vfork\${ac_dB}vfork\${ac_dC}fork\${ac_dD} +\${ac_uA}vfork\${ac_uB}vfork\${ac_uC}fork\${ac_uD} +\${ac_eA}vfork\${ac_eB}vfork\${ac_eC}fork\${ac_eD} " } @@ -1379,7 +1602,7 @@ fi rm -fr conftest* -cat > conftest.c < conftest.${ac_ext} < /* If setvbuf has the reversed format, exit 0. */ @@ -1393,17 +1616,17 @@ exit(0); /* Non-reversed systems segv here. */ } EOF -eval $compile +eval $ac_compile if test -s conftest && (./conftest; exit) 2>/dev/null; then { test -n "$verbose" && \ echo " defining SETVBUF_REVERSED" -echo "#define SETVBUF_REVERSED 1" >> confdefs.h +echo "#define" SETVBUF_REVERSED "1" >> confdefs.h DEFS="$DEFS -DSETVBUF_REVERSED=1" -SEDDEFS="${SEDDEFS}\${SEDdA}SETVBUF_REVERSED\${SEDdB}SETVBUF_REVERSED\${SEDdC}1\${SEDdD} -\${SEDuA}SETVBUF_REVERSED\${SEDuB}SETVBUF_REVERSED\${SEDuC}1\${SEDuD} -\${SEDeA}SETVBUF_REVERSED\${SEDeB}SETVBUF_REVERSED\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}SETVBUF_REVERSED\${ac_dB}SETVBUF_REVERSED\${ac_dC}1\${ac_dD} +\${ac_uA}SETVBUF_REVERSED\${ac_uB}SETVBUF_REVERSED\${ac_uC}1\${ac_uD} +\${ac_eA}SETVBUF_REVERSED\${ac_eB}SETVBUF_REVERSED\${ac_eC}1\${ac_eD} " } @@ -1414,79 +1637,81 @@ # Some definitions of getloadavg require that the program be installed setgid. NEED_SETGID=false -need_func=true +ac_need_func=true # Check for the 4.4BSD definition of getloadavg. -LIBS_save="${LIBS}" +ac_save_LIBS="${LIBS}" LIBS="${LIBS} -lutil" -have_lib="" -echo checking for -lutil -cat > conftest.c < conftest.${ac_ext} < conftest.c < conftest.${ac_ext} < conftest.c < conftest.${ac_ext} < conftest.c < conftest.${ac_ext} < -int main() { exit(0); } +int main() { return 0; } int t() { /* 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_${func}) || defined (__stub___${func}) +#if defined (__stub_${ac_func}) || defined (__stub___${ac_func}) choke me #else /* Override any gcc2 internal prototype to avoid an error. */ -extern char ${func}(); ${func}(); +extern char ${ac_func}(); ${ac_func}(); #endif - } +; return 0; } EOF -if eval $compile; then +if eval $ac_compile; then : else rm -rf conftest* - LIBOBJS="$LIBOBJS ${func}.o" -test -n "$verbose" && echo " using ${func}.o instead" + LIBOBJS="$LIBOBJS ${ac_func}.o" +test -n "$verbose" && echo " using ${ac_func}.o instead" fi rm -f conftest* @@ -1527,55 +1752,57 @@ case "$LIBOBJS" in *getloadavg*) -need_func=true -echo checking for sys/dg_sys_info.h -cat > conftest.c < conftest.${ac_ext} < EOF -err=`eval "($CPP conftest.c >/dev/null) 2>&1"` -if test -z "$err"; then +# Some shells (Coherent) do redirections in the wrong order, so need +# the parens. +ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` +if test -z "$ac_err"; then rm -rf conftest* { test -n "$verbose" && \ echo " defining DGUX" -echo "#define DGUX 1" >> confdefs.h +echo "#define" DGUX "1" >> confdefs.h DEFS="$DEFS -DDGUX=1" -SEDDEFS="${SEDDEFS}\${SEDdA}DGUX\${SEDdB}DGUX\${SEDdC}1\${SEDdD} -\${SEDuA}DGUX\${SEDuB}DGUX\${SEDuC}1\${SEDuD} -\${SEDeA}DGUX\${SEDeB}DGUX\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}DGUX\${ac_dB}DGUX\${ac_dC}1\${ac_dD} +\${ac_uA}DGUX\${ac_uB}DGUX\${ac_uC}1\${ac_uD} +\${ac_eA}DGUX\${ac_eB}DGUX\${ac_eC}1\${ac_eD} " } - need_func=false + ac_need_func=false # Some versions of DGUX need -ldgc for dg_sys_info. -LIBS_save="${LIBS}" +ac_save_LIBS="${LIBS}" LIBS="${LIBS} -ldgc" -have_lib="" -echo checking for -ldgc -cat > conftest.c < conftest.${ac_ext} <> confdefs.h +echo "#define" HAVE_LIBDGC "1" >> confdefs.h DEFS="$DEFS -DHAVE_LIBDGC=1" -SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_LIBDGC\${SEDdB}HAVE_LIBDGC\${SEDdC}1\${SEDdD} -\${SEDuA}HAVE_LIBDGC\${SEDuB}HAVE_LIBDGC\${SEDuC}1\${SEDuD} -\${SEDeA}HAVE_LIBDGC\${SEDeB}HAVE_LIBDGC\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBDGC\${ac_dB}HAVE_LIBDGC\${ac_dC}1\${ac_dD} +\${ac_uA}HAVE_LIBDGC\${ac_uB}HAVE_LIBDGC\${ac_uC}1\${ac_uD} +\${ac_eA}HAVE_LIBDGC\${ac_eB}HAVE_LIBDGC\${ac_eC}1\${ac_eD} " } @@ -1586,58 +1813,58 @@ fi rm -f conftest* -if $need_func; then +if $ac_need_func; then # We cannot check for , because Solaris 2 does not use dwarf (it # uses stabs), but it's still SVR4. We cannot check for because # Irix 4.0.5F has the header but not the library. -LIBS_save="${LIBS}" +ac_save_LIBS="${LIBS}" LIBS="${LIBS} -lelf" -have_lib="" -echo checking for -lelf -cat > conftest.c < conftest.${ac_ext} <> confdefs.h +echo "#define" SVR4 "1" >> confdefs.h DEFS="$DEFS -DSVR4=1" -SEDDEFS="${SEDDEFS}\${SEDdA}SVR4\${SEDdB}SVR4\${SEDdC}1\${SEDdD} -\${SEDuA}SVR4\${SEDuB}SVR4\${SEDuC}1\${SEDuD} -\${SEDeA}SVR4\${SEDeB}SVR4\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}SVR4\${ac_dB}SVR4\${ac_dC}1\${ac_dD} +\${ac_uA}SVR4\${ac_uB}SVR4\${ac_uC}1\${ac_uD} +\${ac_eA}SVR4\${ac_eB}SVR4\${ac_eC}1\${ac_eD} " } - LIBS="$LIBS -lelf" need_func=false - LIBS_save="${LIBS}" + LIBS="$LIBS -lelf" ac_need_func=false + ac_save_LIBS="${LIBS}" LIBS="${LIBS} -lkvm" -have_lib="" -echo checking for -lkvm -cat > conftest.c < conftest.${ac_ext} < conftest.c < conftest.${ac_ext} < EOF -err=`eval "($CPP conftest.c >/dev/null) 2>&1"` -if test -z "$err"; then +# Some shells (Coherent) do redirections in the wrong order, so need +# the parens. +ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` +if test -z "$ac_err"; then rm -rf conftest* { test -n "$verbose" && \ echo " defining UMAX4_3" -echo "#define UMAX4_3 1" >> confdefs.h +echo "#define" UMAX4_3 "1" >> confdefs.h DEFS="$DEFS -DUMAX4_3=1" -SEDDEFS="${SEDDEFS}\${SEDdA}UMAX4_3\${SEDdB}UMAX4_3\${SEDdC}1\${SEDdD} -\${SEDuA}UMAX4_3\${SEDuB}UMAX4_3\${SEDuC}1\${SEDuD} -\${SEDeA}UMAX4_3\${SEDeB}UMAX4_3\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}UMAX4_3\${ac_dB}UMAX4_3\${ac_dC}1\${ac_dD} +\${ac_uA}UMAX4_3\${ac_uB}UMAX4_3\${ac_uC}1\${ac_uD} +\${ac_eA}UMAX4_3\${ac_eB}UMAX4_3\${ac_eC}1\${ac_eD} " } @@ -1672,67 +1901,71 @@ { test -n "$verbose" && \ echo " defining UMAX" -echo "#define UMAX 1" >> confdefs.h +echo "#define" UMAX "1" >> confdefs.h DEFS="$DEFS -DUMAX=1" -SEDDEFS="${SEDDEFS}\${SEDdA}UMAX\${SEDdB}UMAX\${SEDdC}1\${SEDdD} -\${SEDuA}UMAX\${SEDuB}UMAX\${SEDuC}1\${SEDuD} -\${SEDeA}UMAX\${SEDeB}UMAX\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}UMAX\${ac_dB}UMAX\${ac_dC}1\${ac_dD} +\${ac_uA}UMAX\${ac_uB}UMAX\${ac_uC}1\${ac_uD} +\${ac_eA}UMAX\${ac_eB}UMAX\${ac_eC}1\${ac_eD} " } - need_func=false + ac_need_func=false fi rm -f conftest* fi -if $need_func; then -echo checking for sys/cpustats.h -cat > conftest.c < conftest.${ac_ext} < EOF -err=`eval "($CPP conftest.c >/dev/null) 2>&1"` -if test -z "$err"; then +# Some shells (Coherent) do redirections in the wrong order, so need +# the parens. +ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` +if test -z "$ac_err"; then rm -rf conftest* { test -n "$verbose" && \ echo " defining UMAX" -echo "#define UMAX 1" >> confdefs.h +echo "#define" UMAX "1" >> confdefs.h DEFS="$DEFS -DUMAX=1" -SEDDEFS="${SEDDEFS}\${SEDdA}UMAX\${SEDdB}UMAX\${SEDdC}1\${SEDdD} -\${SEDuA}UMAX\${SEDuB}UMAX\${SEDuC}1\${SEDuD} -\${SEDeA}UMAX\${SEDeB}UMAX\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}UMAX\${ac_dB}UMAX\${ac_dC}1\${ac_dD} +\${ac_uA}UMAX\${ac_uB}UMAX\${ac_uC}1\${ac_uD} +\${ac_eA}UMAX\${ac_eB}UMAX\${ac_eC}1\${ac_eD} " } - need_func=false + ac_need_func=false fi rm -f conftest* fi -if $need_func; then -for hdr in mach/mach.h +if $ac_need_func; then +for ac_hdr in mach/mach.h do -trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'` -echo checking for ${hdr} -cat > conftest.c < conftest.${ac_ext} < +#include <${ac_hdr}> EOF -err=`eval "($CPP conftest.c >/dev/null) 2>&1"` -if test -z "$err"; then +# Some shells (Coherent) do redirections in the wrong order, so need +# the parens. +ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` +if test -z "$ac_err"; then rm -rf conftest* { test -n "$verbose" && \ -echo " defining ${trhdr}" -echo "#define ${trhdr} 1" >> confdefs.h -DEFS="$DEFS -D${trhdr}=1" -SEDDEFS="${SEDDEFS}\${SEDdA}${trhdr}\${SEDdB}${trhdr}\${SEDdC}1\${SEDdD} -\${SEDuA}${trhdr}\${SEDuB}${trhdr}\${SEDuC}1\${SEDuD} -\${SEDeA}${trhdr}\${SEDeB}${trhdr}\${SEDeC}1\${SEDeD} +echo " defining ${ac_tr_hdr}" +echo "#define" ${ac_tr_hdr} "1" >> confdefs.h +DEFS="$DEFS -D${ac_tr_hdr}=1" +ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD} +\${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD} +\${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD} " } @@ -1743,44 +1976,46 @@ fi -echo checking for nlist.h -cat > conftest.c < conftest.${ac_ext} < EOF -err=`eval "($CPP conftest.c >/dev/null) 2>&1"` -if test -z "$err"; then +# Some shells (Coherent) do redirections in the wrong order, so need +# the parens. +ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` +if test -z "$ac_err"; then rm -rf conftest* { test -n "$verbose" && \ echo " defining NLIST_STRUCT" -echo "#define NLIST_STRUCT 1" >> confdefs.h +echo "#define" NLIST_STRUCT "1" >> confdefs.h DEFS="$DEFS -DNLIST_STRUCT=1" -SEDDEFS="${SEDDEFS}\${SEDdA}NLIST_STRUCT\${SEDdB}NLIST_STRUCT\${SEDdC}1\${SEDdD} -\${SEDuA}NLIST_STRUCT\${SEDuB}NLIST_STRUCT\${SEDuC}1\${SEDuD} -\${SEDeA}NLIST_STRUCT\${SEDeB}NLIST_STRUCT\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}NLIST_STRUCT\${ac_dB}NLIST_STRUCT\${ac_dC}1\${ac_dD} +\${ac_uA}NLIST_STRUCT\${ac_uB}NLIST_STRUCT\${ac_uC}1\${ac_uD} +\${ac_eA}NLIST_STRUCT\${ac_eB}NLIST_STRUCT\${ac_eC}1\${ac_eD} " } -echo checking for n_un in struct nlist -cat > conftest.c < conftest.${ac_ext} < -int main() { exit(0); } -int t() { struct nlist n; n.n_un.n_name = 0; } +int main() { return 0; } +int t() { struct nlist n; n.n_un.n_name = 0;; return 0; } EOF -if eval $compile; then +if eval $ac_compile; then rm -rf conftest* { test -n "$verbose" && \ echo " defining NLIST_NAME_UNION" -echo "#define NLIST_NAME_UNION 1" >> confdefs.h +echo "#define" NLIST_NAME_UNION "1" >> confdefs.h DEFS="$DEFS -DNLIST_NAME_UNION=1" -SEDDEFS="${SEDDEFS}\${SEDdA}NLIST_NAME_UNION\${SEDdB}NLIST_NAME_UNION\${SEDdC}1\${SEDdD} -\${SEDuA}NLIST_NAME_UNION\${SEDuB}NLIST_NAME_UNION\${SEDuC}1\${SEDuD} -\${SEDeA}NLIST_NAME_UNION\${SEDeB}NLIST_NAME_UNION\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}NLIST_NAME_UNION\${ac_dB}NLIST_NAME_UNION\${ac_dC}1\${ac_dD} +\${ac_uA}NLIST_NAME_UNION\${ac_uB}NLIST_NAME_UNION\${ac_uC}1\${ac_uD} +\${ac_eA}NLIST_NAME_UNION\${ac_eB}NLIST_NAME_UNION\${ac_eC}1\${ac_eD} " } @@ -1793,7 +2028,7 @@ rm -f conftest* # Figure out whether we will need to install setgid. -cat > conftest.c < conftest.${ac_ext} < conftest.out 2>&1" +eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" if egrep "Yowza Am I SETGID yet" conftest.out >/dev/null 2>&1; then rm -rf conftest* @@ -1808,11 +2043,11 @@ { test -n "$verbose" && \ echo " defining GETLOADAVG_PRIVILEGED" -echo "#define GETLOADAVG_PRIVILEGED 1" >> confdefs.h +echo "#define" GETLOADAVG_PRIVILEGED "1" >> confdefs.h DEFS="$DEFS -DGETLOADAVG_PRIVILEGED=1" -SEDDEFS="${SEDDEFS}\${SEDdA}GETLOADAVG_PRIVILEGED\${SEDdB}GETLOADAVG_PRIVILEGED\${SEDdC}1\${SEDdD} -\${SEDuA}GETLOADAVG_PRIVILEGED\${SEDuB}GETLOADAVG_PRIVILEGED\${SEDuC}1\${SEDuD} -\${SEDeA}GETLOADAVG_PRIVILEGED\${SEDeB}GETLOADAVG_PRIVILEGED\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}GETLOADAVG_PRIVILEGED\${ac_dB}GETLOADAVG_PRIVILEGED\${ac_dC}1\${ac_dD} +\${ac_uA}GETLOADAVG_PRIVILEGED\${ac_uB}GETLOADAVG_PRIVILEGED\${ac_uC}1\${ac_uD} +\${ac_eA}GETLOADAVG_PRIVILEGED\${ac_eB}GETLOADAVG_PRIVILEGED\${ac_eC}1\${ac_eD} " } NEED_SETGID=true @@ -1825,11 +2060,11 @@ { test -n "$verbose" && \ echo " defining HAVE_GETLOADAVG" -echo "#define HAVE_GETLOADAVG 1" >> confdefs.h +echo "#define" HAVE_GETLOADAVG "1" >> confdefs.h DEFS="$DEFS -DHAVE_GETLOADAVG=1" -SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_GETLOADAVG\${SEDdB}HAVE_GETLOADAVG\${SEDdC}1\${SEDdD} -\${SEDuA}HAVE_GETLOADAVG\${SEDuB}HAVE_GETLOADAVG\${SEDuC}1\${SEDuD} -\${SEDeA}HAVE_GETLOADAVG\${SEDeB}HAVE_GETLOADAVG\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_GETLOADAVG\${ac_dB}HAVE_GETLOADAVG\${ac_dC}1\${ac_dD} +\${ac_uA}HAVE_GETLOADAVG\${ac_uB}HAVE_GETLOADAVG\${ac_uC}1\${ac_uD} +\${ac_eA}HAVE_GETLOADAVG\${ac_eB}HAVE_GETLOADAVG\${ac_eC}1\${ac_eD} " } ;; @@ -1839,17 +2074,17 @@ # Figure out what group owns /dev/kmem. # The installed program will need to be setgid and owned by that group. # On Solaris, /dev/kmem is a symlink. Get info on the real file. - ls_output=`ls -lgL /dev/kmem 2>/dev/null` + ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null` # If we got an error (system does not support symlinks), try without -L. - test -z "$ls_output" && ls_output=`ls -lg /dev/kmem` - KMEM_GROUP=`echo $ls_output \ + test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem` + KMEM_GROUP=`echo $ac_ls_output \ | sed -ne 's/[ ][ ]*/ /g; s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/; / /s/.* //;p;'` fi -echo checking for strcoll -cat > conftest.c < conftest.${ac_ext} < main () @@ -1859,17 +2094,17 @@ strcoll ("123", "456") >= 0); } EOF -eval $compile +eval $ac_compile if test -s conftest && (./conftest; exit) 2>/dev/null; then { test -n "$verbose" && \ echo " defining HAVE_STRCOLL" -echo "#define HAVE_STRCOLL 1" >> confdefs.h +echo "#define" HAVE_STRCOLL "1" >> confdefs.h DEFS="$DEFS -DHAVE_STRCOLL=1" -SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_STRCOLL\${SEDdB}HAVE_STRCOLL\${SEDdC}1\${SEDdD} -\${SEDuA}HAVE_STRCOLL\${SEDuB}HAVE_STRCOLL\${SEDuC}1\${SEDuD} -\${SEDeA}HAVE_STRCOLL\${SEDeB}HAVE_STRCOLL\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_STRCOLL\${ac_dB}HAVE_STRCOLL\${ac_dC}1\${ac_dD} +\${ac_uA}HAVE_STRCOLL\${ac_uB}HAVE_STRCOLL\${ac_uC}1\${ac_uD} +\${ac_eA}HAVE_STRCOLL\${ac_eB}HAVE_STRCOLL\${ac_eC}1\${ac_eD} " } @@ -1877,26 +2112,28 @@ fi rm -fr conftest* -for hdr in sys/wait.h +for ac_hdr in sys/wait.h do -trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'` -echo checking for ${hdr} -cat > conftest.c < conftest.${ac_ext} < +#include <${ac_hdr}> EOF -err=`eval "($CPP conftest.c >/dev/null) 2>&1"` -if test -z "$err"; then +# Some shells (Coherent) do redirections in the wrong order, so need +# the parens. +ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` +if test -z "$ac_err"; then rm -rf conftest* { test -n "$verbose" && \ -echo " defining ${trhdr}" -echo "#define ${trhdr} 1" >> confdefs.h -DEFS="$DEFS -D${trhdr}=1" -SEDDEFS="${SEDDEFS}\${SEDdA}${trhdr}\${SEDdB}${trhdr}\${SEDdC}1\${SEDdD} -\${SEDuA}${trhdr}\${SEDuB}${trhdr}\${SEDuC}1\${SEDuD} -\${SEDeA}${trhdr}\${SEDeB}${trhdr}\${SEDeC}1\${SEDeD} +echo " defining ${ac_tr_hdr}" +echo "#define" ${ac_tr_hdr} "1" >> confdefs.h +DEFS="$DEFS -D${ac_tr_hdr}=1" +ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD} +\${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD} +\${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD} " } @@ -1904,36 +2141,36 @@ fi rm -f conftest* done - for func in waitpid wait3 + for ac_func in waitpid wait3 do -trfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'` -echo checking for ${func} -cat > conftest.c < conftest.${ac_ext} < -int main() { exit(0); } +int main() { return 0; } int t() { /* 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_${func}) || defined (__stub___${func}) +#if defined (__stub_${ac_func}) || defined (__stub___${ac_func}) choke me #else /* Override any gcc2 internal prototype to avoid an error. */ -extern char ${func}(); ${func}(); +extern char ${ac_func}(); ${ac_func}(); #endif - } +; return 0; } EOF -if eval $compile; then +if eval $ac_compile; then rm -rf conftest* { test -n "$verbose" && \ -echo " defining ${trfunc}" -echo "#define ${trfunc} 1" >> confdefs.h -DEFS="$DEFS -D${trfunc}=1" -SEDDEFS="${SEDDEFS}\${SEDdA}${trfunc}\${SEDdB}${trfunc}\${SEDdC}1\${SEDdD} -\${SEDuA}${trfunc}\${SEDuB}${trfunc}\${SEDuC}1\${SEDuD} -\${SEDeA}${trfunc}\${SEDeB}${trfunc}\${SEDeC}1\${SEDeD} +echo " defining ${ac_tr_func}" +echo "#define" ${ac_tr_func} "1" >> confdefs.h +DEFS="$DEFS -D${ac_tr_func}=1" +ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD} +\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD} +\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD} " } @@ -1942,12 +2179,12 @@ rm -f conftest* done -echo checking for union wait -cat > conftest.c < conftest.${ac_ext} < #include -int main() { exit(0); } +int main() { return 0; } int t() { union wait status; int pid; pid = wait (&status); #ifdef WEXITSTATUS /* Some POSIXoid systems have both the new-style macros and the old @@ -1959,19 +2196,19 @@ /* Make sure union wait works with waitpid. */ pid = waitpid (-1, &status, 0); #endif - } +; return 0; } EOF -if eval $compile; then +if eval $ac_compile; then rm -rf conftest* { test -n "$verbose" && \ echo " defining HAVE_UNION_WAIT" -echo "#define HAVE_UNION_WAIT 1" >> confdefs.h +echo "#define" HAVE_UNION_WAIT "1" >> confdefs.h DEFS="$DEFS -DHAVE_UNION_WAIT=1" -SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_UNION_WAIT\${SEDdB}HAVE_UNION_WAIT\${SEDdC}1\${SEDdD} -\${SEDuA}HAVE_UNION_WAIT\${SEDuB}HAVE_UNION_WAIT\${SEDuC}1\${SEDuD} -\${SEDeA}HAVE_UNION_WAIT\${SEDeB}HAVE_UNION_WAIT\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_UNION_WAIT\${ac_dB}HAVE_UNION_WAIT\${ac_dC}1\${ac_dD} +\${ac_uA}HAVE_UNION_WAIT\${ac_uB}HAVE_UNION_WAIT\${ac_uC}1\${ac_uD} +\${ac_eA}HAVE_UNION_WAIT\${ac_eB}HAVE_UNION_WAIT\${ac_eC}1\${ac_eD} " } @@ -1980,8 +2217,8 @@ rm -f conftest* -echo checking for sys_siglist declaration in signal.h or unistd.h -cat > conftest.c < conftest.${ac_ext} < /* NetBSD declares sys_siglist in . */ @@ -1988,20 +2225,20 @@ #ifdef HAVE_UNISTD_H #include #endif -int main() { exit(0); } -int t() { char *msg = *(sys_siglist + 1); } +int main() { return 0; } +int t() { char *msg = *(sys_siglist + 1);; return 0; } EOF -if eval $compile; then +if eval $ac_compile; then rm -rf conftest* { test -n "$verbose" && \ echo " defining SYS_SIGLIST_DECLARED" -echo "#define SYS_SIGLIST_DECLARED 1" >> confdefs.h +echo "#define" SYS_SIGLIST_DECLARED "1" >> confdefs.h DEFS="$DEFS -DSYS_SIGLIST_DECLARED=1" -SEDDEFS="${SEDDEFS}\${SEDdA}SYS_SIGLIST_DECLARED\${SEDdB}SYS_SIGLIST_DECLARED\${SEDdC}1\${SEDdD} -\${SEDuA}SYS_SIGLIST_DECLARED\${SEDuB}SYS_SIGLIST_DECLARED\${SEDuC}1\${SEDuD} -\${SEDeA}SYS_SIGLIST_DECLARED\${SEDeB}SYS_SIGLIST_DECLARED\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}SYS_SIGLIST_DECLARED\${ac_dB}SYS_SIGLIST_DECLARED\${ac_dC}1\${ac_dD} +\${ac_uA}SYS_SIGLIST_DECLARED\${ac_uB}SYS_SIGLIST_DECLARED\${ac_uC}1\${ac_uD} +\${ac_eA}SYS_SIGLIST_DECLARED\${ac_eB}SYS_SIGLIST_DECLARED\${ac_eC}1\${ac_eD} " } @@ -2012,24 +2249,24 @@ # The presence of the following is not meant to imply # that make necessarily works on those systems. -LIBS_save="${LIBS}" +ac_save_LIBS="${LIBS}" LIBS="${LIBS} -lseq" -have_lib="" -echo checking for -lseq -cat > conftest.c < conftest.${ac_ext} < conftest.c < conftest.${ac_ext} < conftest.out 2>&1" +eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" if egrep "yes" conftest.out >/dev/null 2>&1; then rm -rf conftest* XENIX=1 @@ -2060,24 +2297,24 @@ esac fi -LIBS_save="${LIBS}" +ac_save_LIBS="${LIBS}" LIBS="${LIBS} -lsun" -have_lib="" -echo checking for -lsun -cat > conftest.c < conftest.${ac_ext} <> confdefs.h -DEFS="$DEFS -DSCCS_GET=\"/usr/sccs/get\"" -SEDDEFS="${SEDDEFS}\${SEDdA}SCCS_GET\${SEDdB}SCCS_GET\${SEDdC}\"/usr/sccs/get\"\${SEDdD} -\${SEDuA}SCCS_GET\${SEDuB}SCCS_GET\${SEDuC}\"/usr/sccs/get\"\${SEDuD} -\${SEDeA}SCCS_GET\${SEDeB}SCCS_GET\${SEDeC}\"/usr/sccs/get\"\${SEDeD} +echo " defining" SCCS_GET to be ""/usr/sccs/get"" +echo "#define" SCCS_GET ""/usr/sccs/get"" >> confdefs.h +DEFS="$DEFS -DSCCS_GET="/usr/sccs/get"" +ac_sed_defs="${ac_sed_defs}\${ac_dA}SCCS_GET\${ac_dB}SCCS_GET\${ac_dC}\"/usr/sccs/get\"\${ac_dD} +\${ac_uA}SCCS_GET\${ac_uB}SCCS_GET\${ac_uC}\"/usr/sccs/get\"\${ac_uD} +\${ac_eA}SCCS_GET\${ac_eB}SCCS_GET\${ac_eC}\"/usr/sccs/get\"\${ac_eD} " } @@ -2114,12 +2351,12 @@ { test -n "$verbose" && \ -echo " defining SCCS_GET to be \"get\"" -echo "#define SCCS_GET \"get\"" >> confdefs.h -DEFS="$DEFS -DSCCS_GET=\"get\"" -SEDDEFS="${SEDDEFS}\${SEDdA}SCCS_GET\${SEDdB}SCCS_GET\${SEDdC}\"get\"\${SEDdD} -\${SEDuA}SCCS_GET\${SEDuB}SCCS_GET\${SEDuC}\"get\"\${SEDuD} -\${SEDeA}SCCS_GET\${SEDeB}SCCS_GET\${SEDeC}\"get\"\${SEDeD} +echo " defining" SCCS_GET to be ""get"" +echo "#define" SCCS_GET ""get"" >> confdefs.h +DEFS="$DEFS -DSCCS_GET="get"" +ac_sed_defs="${ac_sed_defs}\${ac_dA}SCCS_GET\${ac_dB}SCCS_GET\${ac_dC}\"get\"\${ac_dD} +\${ac_uA}SCCS_GET\${ac_uB}SCCS_GET\${ac_uC}\"get\"\${ac_uD} +\${ac_eA}SCCS_GET\${ac_eB}SCCS_GET\${ac_eC}\"get\"\${ac_eD} " } @@ -2129,17 +2366,17 @@ test -f s.conftest; then # We successfully created an SCCS file. echo checking if SCCS get command understands -G - if $SCCS_GET s.conftest -Gconftoast >/dev/null 2>&1 && + if $SCCS_GET -Gconftoast s.conftest >/dev/null 2>&1 && test -f conftoast; then { test -n "$verbose" && \ echo " defining SCCS_GET_MINUS_G" -echo "#define SCCS_GET_MINUS_G 1" >> confdefs.h +echo "#define" SCCS_GET_MINUS_G "1" >> confdefs.h DEFS="$DEFS -DSCCS_GET_MINUS_G=1" -SEDDEFS="${SEDDEFS}\${SEDdA}SCCS_GET_MINUS_G\${SEDdB}SCCS_GET_MINUS_G\${SEDdC}1\${SEDdD} -\${SEDuA}SCCS_GET_MINUS_G\${SEDuB}SCCS_GET_MINUS_G\${SEDuC}1\${SEDuD} -\${SEDeA}SCCS_GET_MINUS_G\${SEDeB}SCCS_GET_MINUS_G\${SEDeC}1\${SEDeD} +ac_sed_defs="${ac_sed_defs}\${ac_dA}SCCS_GET_MINUS_G\${ac_dB}SCCS_GET_MINUS_G\${ac_dC}1\${ac_dD} +\${ac_uA}SCCS_GET_MINUS_G\${ac_uB}SCCS_GET_MINUS_G\${ac_uC}1\${ac_uD} +\${ac_eA}SCCS_GET_MINUS_G\${ac_eB}SCCS_GET_MINUS_G\${ac_eC}1\${ac_eD} " } @@ -2147,25 +2384,37 @@ fi rm -f s.conftest conftoast -# Set default prefixes. -if test "z$prefix" != 'z' ; then - test "z$exec_prefix" = 'z' && exec_prefix='${prefix}' - prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%" + +# The preferred way to propogate these variables is regular @ substitutions. +if test -n "$prefix"; then + ac_prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%" +else + prefix=/usr/local fi if test -n "$exec_prefix"; then - prsub="$prsub + ac_prsub="$ac_prsub s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%" +else + exec_prefix='${prefix}' # Let make expand it. +fi + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi + # Quote sed substitution magic chars in DEFS. cat >conftest.def < config.status <&1; exit 1 ;; + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create + exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "config.status generated by autoconf version 1.11" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; esac done -trap 'rm -fr Makefile build.sh glob/Makefile config.h conftest*; exit 1' 1 3 15 +trap 'rm -fr Makefile build.sh glob/Makefile config.h conftest*; exit 1' 1 2 15 CFLAGS='$CFLAGS' LDFLAGS='$LDFLAGS' +SET_MAKE='$SET_MAKE' CC='$CC' INSTALL='$INSTALL' INSTALL_PROGRAM='$INSTALL_PROGRAM' @@ -2203,36 +2459,55 @@ REMOTE='$REMOTE' LIBS='$LIBS' srcdir='$srcdir' +top_srcdir='$top_srcdir' prefix='$prefix' exec_prefix='$exec_prefix' -prsub='$prsub' +ac_prsub='$ac_prsub' +ac_vpsub='$ac_vpsub' extrasub='$extrasub' EOF cat >> config.status <<\EOF -top_srcdir=$srcdir +ac_given_srcdir=$srcdir CONFIG_FILES=${CONFIG_FILES-"Makefile build.sh glob/Makefile"} -for file in .. ${CONFIG_FILES}; do if test "x$file" != x..; then - srcdir=$top_srcdir +for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then # Remove last slash and all that follows it. Not all systems have dirname. - dir=`echo $file|sed 's%/[^/][^/]*$%%'` - if test "$dir" != "$file"; then - test "$top_srcdir" != . && srcdir=$top_srcdir/$dir - test ! -d "$dir" && mkdir "$dir" + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/$ac_dir" + else + ac_dir_suffix= fi - echo creating "$file" - rm -f "$file" - comment_str="Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." - case "$file" in - *.c | *.h | *.C | *.cc | *.m ) echo "/* $comment_str */" > "$file" ;; - * ) echo "# $comment_str" > "$file" ;; + + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dir_suffix"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; esac + + echo creating "$ac_file" + rm -f "$ac_file" + comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure." + case "$ac_file" in + *.c | *.h | *.C | *.cc | *.m ) echo "/* $comment_str */" > "$ac_file" ;; + * ) echo "# $comment_str" > "$ac_file" ;; + esac sed -e " -$prsub +$ac_prsub +$ac_vpsub $extrasub s%@CFLAGS@%$CFLAGS%g s%@LDFLAGS@%$LDFLAGS%g +s%@SET_MAKE@%$SET_MAKE%g s%@CC@%$CC%g s%@INSTALL@%$INSTALL%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g @@ -2246,14 +2521,13 @@ s%@REMOTE@%$REMOTE%g s%@LIBS@%$LIBS%g s%@srcdir@%$srcdir%g -s%@DEFS@%-DHAVE_CONFIG_H%" $top_srcdir/${file}.in >> $file +s%@top_srcdir@%$top_srcdir%g +s%@prefix@%$prefix%g +s%@exec_prefix@%$exec_prefix%g +s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file fi; done -CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"} -for file in .. ${CONFIG_HEADERS}; do if test "x$file" != x..; then -echo creating $file - -# These sed commands are put into SEDDEFS when defining a macro. +# These sed commands are put into ac_sed_defs when defining a macro. # They are broken into pieces to make the sed script easier to manage. # They are passed to sed as "A NAME B NAME C VALUE D", where NAME # is the cpp macro being defined and VALUE is the value it is being given. @@ -2261,43 +2535,43 @@ # Hopefully no one uses "!" as a variable value. # Other candidates for the sed separators, like , and @, do get used. # -# SEDd sets the value in "#define NAME VALUE" lines. -SEDdA='s!^\([ ]*\)#\([ ]*define[ ][ ]*\)' -SEDdB='\([ ][ ]*\)[^ ]*!\1#\2' -SEDdC='\3' -SEDdD='!g' -# SEDu turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -SEDuA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -SEDuB='\([ ]\)!\1#\2define\3' -SEDuC=' ' -SEDuD='\4!g' -# SEDe turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -SEDeA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -SEDeB='$!\1#\2define\3' -SEDeC=' ' -SEDeD='!g' +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s!^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*!\1#\2' +ac_dC='\3' +ac_dD='!g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)!\1#\2define\3' +ac_uC=' ' +ac_uD='\4!g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$!\1#\2define\3' +ac_eC=' ' +ac_eD='!g' rm -f conftest.sed EOF # Turn off quoting long enough to insert the sed commands. rm -f conftest.sh cat > conftest.sh < conftest.s1 # Like head -20. - sed 1,${maxshlines}d conftest.sh > conftest.s2 # Like tail +21. + sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -9. + sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +10. # Write a limited-size here document to append to conftest.sed. echo 'cat >> conftest.sed <> config.status cat conftest.s1 >> config.status @@ -2318,33 +2592,40 @@ CONFEOF rm -f conftest.h # Break up the sed commands because old seds have small limits. -maxsedlines=20 -cp $top_srcdir/$file.in conftest.h1 -while : -do - lines=`grep -c . conftest.sed` - if test -z "$lines" || test "$lines" -eq 0; then break; fi - rm -f conftest.s1 conftest.s2 conftest.h2 - sed ${maxsedlines}q conftest.sed > conftest.s1 # Like head -20. - sed 1,${maxsedlines}d conftest.sed > conftest.s2 # Like tail +21. - sed -f conftest.s1 < conftest.h1 > conftest.h2 - rm -f conftest.s1 conftest.h1 conftest.sed - mv conftest.h2 conftest.h1 - mv conftest.s2 conftest.sed -done -rm -f conftest.sed conftest.h -echo "/* $file. Generated automatically by configure. */" > conftest.h -cat conftest.h1 >> conftest.h -rm -f conftest.h1 -if cmp -s $file conftest.h 2>/dev/null; then - # The file exists and we would not be changing it. - echo "$file is unchanged" - rm -f conftest.h -else - rm -f $file - mv conftest.h $file -fi +ac_max_sed_lines=20 + +CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"} +for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then + echo creating $ac_file + + cp $ac_given_srcdir/$ac_file.in conftest.h1 + cp conftest.sed conftest.stm + while : + do + ac_lines=`grep -c . conftest.stm` + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + rm -f conftest.s1 conftest.s2 conftest.h2 + sed ${ac_max_sed_lines}q conftest.stm > conftest.s1 # Like head -20. + sed 1,${ac_max_sed_lines}d conftest.stm > conftest.s2 # Like tail +21. + sed -f conftest.s1 < conftest.h1 > conftest.h2 + rm -f conftest.s1 conftest.h1 conftest.stm + mv conftest.h2 conftest.h1 + mv conftest.s2 conftest.stm + done + rm -f conftest.stm conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.h1 >> conftest.h + rm -f conftest.h1 + if cmp -s $ac_file conftest.h 2>/dev/null; then + # The file exists and we would not be changing it. + echo "$ac_file is unchanged" + rm -f conftest.h + else + rm -f $ac_file + mv conftest.h $ac_file + fi fi; done +rm -f conftest.sed @@ -2354,6 +2635,7 @@ exit 0 EOF chmod +x config.status -${CONFIG_SHELL-/bin/sh} config.status +# Some shells look in PATH for config.status without the "./". +test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} ./config.status diff -ruN make-3.70/configure.in make-3.71/configure.in --- make-3.70/configure.in Thu Dec 23 14:46:50 1993 +++ make-3.71/configure.in Mon May 16 23:00:07 1994 @@ -1,4 +1,5 @@ dnl Process this file with autoconf to produce a configure script. +AC_REVISION([$Id: configure.in,v 1.36 1994/05/17 02:59:57 roland Exp $]) AC_INIT(vpath.c) dnl A distinctive file to look for in srcdir. AC_CONFIG_HEADER(config.h) @@ -6,6 +7,7 @@ test -z "$CFLAGS" && CFLAGS=-g AC_SUBST(CFLAGS) test -z "$LDFLAGS" && LDFLAGS=-g AC_SUBST(LDFLAGS) +AC_SET_MAKE AC_PROG_CC AC_PROG_INSTALL AC_PROG_RANLIB @@ -29,7 +31,7 @@ AC_HAVE_FUNCS(getdtablesize sys_siglist _sys_siglist psignal \ dup2 getcwd sigsetmask getgroups setlinebuf \ - setreuid setregid strerror) + seteuid setegid setreuid setregid strerror) AC_ALLOCA AC_VFORK AC_SETVBUF_REVERSED @@ -54,13 +56,7 @@ ], AC_DEFINE(HAVE_UNION_WAIT)) -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)) +AC_SYS_SIGLIST_DECLARED # The presence of the following is not meant to imply # that make necessarily works on those systems. @@ -85,7 +81,7 @@ test -f s.conftest; then # We successfully created an SCCS file. echo checking if SCCS get command understands -G - if $SCCS_GET s.conftest -Gconftoast >/dev/null 2>&1 && + if $SCCS_GET -Gconftoast s.conftest >/dev/null 2>&1 && test -f conftoast; then AC_DEFINE(SCCS_GET_MINUS_G) fi diff -ruN make-3.70/default.c make-3.71/default.c --- make-3.70/default.c Tue Dec 14 16:59:57 1993 +++ make-3.71/default.c Mon May 16 22:58:34 1994 @@ -1,5 +1,5 @@ /* Data base of default implicit rules for GNU Make. -Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. +Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -63,9 +63,9 @@ /* SCCS. */ { "%", "s.%", - "$(GET) $(GFLAGS) $< $(SCCS_OUTPUT_OPTION)" }, + "$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" }, { "%", "SCCS/s.%", - "$(GET) $(GFLAGS) $< $(SCCS_OUTPUT_OPTION)" }, + "$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" }, { 0, 0, 0 } }; @@ -157,25 +157,25 @@ "$(PREPROCESS.S) $< > $@", ".texinfo.info", - "$(MAKEINFO) $< -o $@", + "$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@", ".texi.info", - "$(MAKEINFO) $< -o $@", + "$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@", ".txinfo.info", - "$(MAKEINFO) $< -o $@", + "$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@", ".tex.dvi", "$(TEX) $<", ".texinfo.dvi", - "$(TEXI2DVI) $<", + "$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<", ".texi.dvi", - "$(TEXI2DVI) $<", + "$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<", ".txinfo.dvi", - "$(TEXI2DVI) $<", + "$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<", ".w.c", "$(CTANGLE) $< - $@", /* The `-' says there is no `.ch' file. */ @@ -195,7 +195,13 @@ static char *default_variables[] = { "AR", "ar", +#ifndef __hpux "ARFLAGS", "rv", +#else + /* HPUX ar's f flag says to truncate the file names to archive member + name length in comparisons, so replacement notices the equality. */ + "ARFLAGS", "rfv", +#endif "AS", "as", "CC", "cc", "CXX", "g++", diff -ruN make-3.70/dep.h make-3.71/dep.h --- make-3.70/dep.h Tue Aug 3 00:18:56 1993 +++ make-3.71/dep.h Wed Mar 23 09:13:05 1994 @@ -1,4 +1,5 @@ -/* Copyright (C) 1988, 1989, 1991, 1992, 1993 Free Software Foundation, Inc. +/* Definitions of dependency data structures for GNU Make. +Copyright (C) 1988, 1989, 1991, 1992, 1993 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify diff -ruN make-3.70/file.c make-3.71/file.c --- make-3.70/file.c Tue Dec 14 14:36:43 1993 +++ make-3.71/file.c Tue Apr 5 06:04:40 1994 @@ -1,5 +1,5 @@ -/* Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 - Free Software Foundation, Inc. +/* Target file hash table management for GNU Make. +Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -114,6 +114,7 @@ else { /* There is already a double-colon entry for this file. */ + new->double_colon = f; while (f->prev != 0) f = f->prev; f->prev = new; @@ -188,7 +189,8 @@ /* Give FILE its new name. */ - for (f = file; f != 0; f = f->prev) + file->name = name; + for (f = file->double_colon; f != 0; f = f->prev) f->name = name; if (oldfile == 0) diff -ruN make-3.70/file.h make-3.71/file.h --- make-3.70/file.h Wed Oct 27 18:23:18 1993 +++ make-3.71/file.h Tue Apr 5 05:22:07 1994 @@ -1,5 +1,5 @@ -/* Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 - Free Software Foundation, Inc. +/* Definition of target file data structures for GNU Make. +Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -45,6 +45,10 @@ or nil if there isn't one. */ struct file *parent; + /* For a double-colon entry, this is the first double-colon entry for + the same file. Otherwise this is null. */ + struct file *double_colon; + short int update_status; /* Status of the last attempt to update, or -1 if none has been made. */ @@ -56,7 +60,6 @@ cs_finished /* Commands finished. */ } command_state ENUM_BITFIELD (2); - unsigned int double_colon:1;/* Nonzero for double-colon entry */ unsigned int precious:1; /* Non-0 means don't delete file on quit */ unsigned int tried_implicit:1; /* Nonzero if have searched for implicit rule for making diff -ruN make-3.70/function.c make-3.71/function.c --- make-3.70/function.c Fri Oct 29 17:50:48 1993 +++ make-3.71/function.c Fri Mar 4 00:36:26 1994 @@ -1,5 +1,5 @@ /* Variable function expansion for GNU Make. -Copyright (C) 1988, 1989, 1991, 1992, 1993 Free Software Foundation, Inc. +Copyright (C) 1988, 1989, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -51,8 +51,23 @@ return o; } - while ((p = sindex (t, 0, subst, slen)) != 0) + do { + if ((by_word | suffix_only) && slen == 0) + /* When matching by words, the empty string should match + the end of each word, rather than the end of the whole text. */ + p = end_of_token (next_token (t)); + else + { + p = sindex (t, 0, subst, slen); + if (p == 0) + { + /* No more matches. Output everything left on the end. */ + o = variable_buffer_output (o, t, strlen (t)); + return o; + } + } + /* Output everything before this occurrence of the string to replace. */ if (p > t) o = variable_buffer_output (o, t, p - t); @@ -73,11 +88,7 @@ /* Advance T past the string to be replaced. */ t = p + slen; - } - - /* Output everything left on the end. */ - if (*t != '\0') - o = variable_buffer_output (o, t, strlen (t)); + } while (*t != '\0'); return o; } diff -ruN make-3.70/getopt.c make-3.71/getopt.c --- make-3.70/getopt.c Fri Dec 24 19:42:52 1993 +++ make-3.71/getopt.c Mon May 9 22:11:02 1994 @@ -3,7 +3,7 @@ "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu before changing it! - Copyright (C) 1987, 88, 89, 90, 91, 92, 1993 + Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it @@ -20,10 +20,8 @@ along with this program; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* - * This tells Alpha OSF/1 not to define a getopt prototype in . - * Ditto for AIX 3.2 and . - */ +/* This tells Alpha OSF/1 not to define a getopt prototype in . + Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO #define _NO_PROTO #endif @@ -68,11 +66,6 @@ #include #endif /* GNU C library. */ -/* If GETOPT_COMPAT is defined, `+' as well as `--' can introduce a - long-named option. Because this is not POSIX.2 compliant, it is - being phased out. */ -/* #define GETOPT_COMPAT */ - /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. @@ -95,7 +88,7 @@ Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ -char *optarg = 0; +char *optarg = NULL; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller @@ -195,19 +188,18 @@ } /* If using GCC, we can safely declare strlen this way. - If not using GCC, it is ok not to declare it. - (Supposedly there are some machines where it might get a warning, - but changing this conditional to __STDC__ is too risky.) */ + If not using GCC, it is ok not to declare it. */ #ifdef __GNUC__ -#ifdef IN_GCC -#include "gstddef.h" -#else -#include -#endif -extern size_t strlen (const char *); -#endif +/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. + That was relevant to code that was here before. */ +#ifndef __STDC__ +/* gcc with -traditional declares the built-in strlen to return int, + and has done so at least since version 2.4.5. -- rms. */ +extern int strlen (const char *); +#endif /* not __STDC__ */ +#endif /* __GNUC__ */ -#endif /* GNU C library. */ +#endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ @@ -282,6 +274,40 @@ first_nonopt += (optind - last_nonopt); last_nonopt = optind; } + +/* Initialize the internal data when the first call is made. */ + +static const char * +_getopt_initialize (optstring) + const char *optstring; +{ + /* Start processing options with ARGV-element 1 (since ARGV-element 0 + is the program name); the sequence of previously skipped + non-option ARGV-elements is empty. */ + + first_nonopt = last_nonopt = optind = 1; + + nextchar = NULL; + + /* Determine how to handle the ordering of options and nonoptions. */ + + if (optstring[0] == '-') + { + ordering = RETURN_IN_ORDER; + ++optstring; + } + else if (optstring[0] == '+') + { + ordering = REQUIRE_ORDER; + ++optstring; + } + else if (getenv ("POSIXLY_CORRECT") != NULL) + ordering = REQUIRE_ORDER; + else + ordering = PERMUTE; + + return optstring; +} /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. @@ -348,41 +374,15 @@ int *longind; int long_only; { - int option_index; - - optarg = 0; - - /* Initialize the internal data when the first call is made. - Start processing options with ARGV-element 1 (since ARGV-element 0 - is the program name); the sequence of previously skipped - non-option ARGV-elements is empty. */ + optarg = NULL; if (optind == 0) - { - first_nonopt = last_nonopt = optind = 1; - - nextchar = NULL; - - /* Determine how to handle the ordering of options and nonoptions. */ - - if (optstring[0] == '-') - { - ordering = RETURN_IN_ORDER; - ++optstring; - } - else if (optstring[0] == '+') - { - ordering = REQUIRE_ORDER; - ++optstring; - } - else if (getenv ("POSIXLY_CORRECT") != NULL) - ordering = REQUIRE_ORDER; - else - ordering = PERMUTE; - } + optstring = _getopt_initialize (optstring); if (nextchar == NULL || *nextchar == '\0') { + /* Advance to the next ARGV-element. */ + if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, @@ -393,21 +393,16 @@ else if (last_nonopt != optind) first_nonopt = optind; - /* Now skip any additional non-options + /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < argc - && (argv[optind][0] != '-' || argv[optind][1] == '\0') -#ifdef GETOPT_COMPAT - && (longopts == NULL - || argv[optind][0] != '+' || argv[optind][1] == '\0') -#endif /* GETOPT_COMPAT */ - ) + && (argv[optind][0] != '-' || argv[optind][1] == '\0')) optind++; last_nonopt = optind; } - /* Special ARGV-element `--' means premature end of options. + /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ @@ -440,12 +435,7 @@ /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ - if ((argv[optind][0] != '-' || argv[optind][1] == '\0') -#ifdef GETOPT_COMPAT - && (longopts == NULL - || argv[optind][0] != '+' || argv[optind][1] == '\0') -#endif /* GETOPT_COMPAT */ - ) + if ((argv[optind][0] != '-' || argv[optind][1] == '\0')) { if (ordering == REQUIRE_ORDER) return EOF; @@ -454,36 +444,48 @@ } /* We have found another option-ARGV-element. - Start decoding its characters. */ + Skip the initial punctuation. */ nextchar = (argv[optind] + 1 + (longopts != NULL && argv[optind][1] == '-')); } + /* Decode the current option-ARGV-element. */ + + /* Check whether the ARGV-element is a long option. + + If long_only and the ARGV-element has the form "-f", where f is + a valid short option, don't consider it an abbreviated form of + a long option that starts with f. Otherwise there would be no + way to give the -f short option. + + On the other hand, if there's a long option "fubar" and + the ARGV-element is "-fu", do consider that an abbreviation of + the long option, just like "--fu", and not "-f" with arg "u". + + This distinction seems to be the most useful approach. */ + if (longopts != NULL - && ((argv[optind][0] == '-' - && (argv[optind][1] == '-' || long_only)) -#ifdef GETOPT_COMPAT - || argv[optind][0] == '+' -#endif /* GETOPT_COMPAT */ - )) + && (argv[optind][1] == '-' + || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) { + char *nameend; const struct option *p; - char *s = nextchar; + const struct option *pfound = NULL; int exact = 0; int ambig = 0; - const struct option *pfound = NULL; int indfound; + int option_index; - while (*s && *s != '=') - s++; + for (nameend = nextchar; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; - /* Test all options for either exact match or abbreviated matches. */ - for (p = longopts, option_index = 0; p->name; - p++, option_index++) - if (!strncmp (p->name, nextchar, s - nextchar)) + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, nextchar, nameend - nextchar)) { - if (s - nextchar == strlen (p->name)) + if (nameend - nextchar == strlen (p->name)) { /* Exact match found. */ pfound = p; @@ -498,7 +500,7 @@ indfound = option_index; } else - /* Second nonexact match found. */ + /* Second or later nonexact match found. */ ambig = 1; } @@ -516,12 +518,12 @@ { option_index = indfound; optind++; - if (*s) + if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) - optarg = s + 1; + optarg = nameend + 1; else { if (opterr) @@ -564,14 +566,12 @@ } return pfound->val; } + /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' -#ifdef GETOPT_COMPAT - || argv[optind][0] == '+' -#endif /* GETOPT_COMPAT */ || my_index (optstring, *nextchar) == NULL) { if (opterr) @@ -591,7 +591,7 @@ } } - /* Look at and handle the next option-character. */ + /* Look at and handle the next short option-character. */ { char c = *nextchar++; @@ -605,16 +605,8 @@ { if (opterr) { -#if 0 - if (c < 040 || c >= 0177) - fprintf (stderr, "%s: unrecognized option, character code 0%o\n", - argv[0], c); - else - fprintf (stderr, "%s: unrecognized option `-%c'\n", argv[0], c); -#else /* 1003.2 specifies the format of this message. */ fprintf (stderr, "%s: illegal option -- %c\n", argv[0], c); -#endif } optopt = c; return '?'; @@ -630,7 +622,7 @@ optind++; } else - optarg = 0; + optarg = NULL; nextchar = NULL; } else @@ -647,14 +639,9 @@ { if (opterr) { -#if 0 - fprintf (stderr, "%s: option `-%c' requires an argument\n", - argv[0], c); -#else /* 1003.2 specifies the format of this message. */ fprintf (stderr, "%s: option requires an argument -- %c\n", argv[0], c); -#endif } optopt = c; if (optstring[0] == ':') diff -ruN make-3.70/glob/Makefile.in make-3.71/glob/Makefile.in --- make-3.70/glob/Makefile.in Thu Apr 22 17:41:40 1993 +++ make-3.71/glob/Makefile.in Fri Apr 22 17:34:16 1994 @@ -1,6 +1,6 @@ # Makefile for standalone distribution of libglob.a (fnmatch, glob). -# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. # This file is part of the GNU C Library. # This library is free software; you can redistribute it and/or @@ -20,7 +20,8 @@ # Ultrix 2.2 make doesn't expand the value of VPATH. VPATH = @srcdir@ -srcdir = $(VPATH) +# This must repeat the value, because configure will remove `VPATH = .'. +srcdir = @srcdir@ CPPFLAGS = @DEFS@ diff -ruN make-3.70/implicit.c make-3.71/implicit.c --- make-3.70/implicit.c Wed Nov 3 06:56:26 1993 +++ make-3.71/implicit.c Wed Apr 20 23:46:03 1994 @@ -1,5 +1,5 @@ /* Implicit rule searching for GNU Make. -Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. +Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -547,7 +547,9 @@ } if (!checked_lastslash[foundrule]) - file->stem = stem[stemlen] == '\0' ? stem : savestring (stem, stemlen); + /* Always allocate new storage, since STEM might be + on the stack for an intermediate file. */ + file->stem = savestring (stem, stemlen); else { /* We want to prepend the directory from diff -ruN make-3.70/install.sh make-3.71/install.sh --- make-3.70/install.sh Mon Oct 26 22:42:49 1992 +++ make-3.71/install.sh Wed Apr 27 15:12:14 1994 @@ -1,8 +1,7 @@ #!/bin/sh - # # install - install a program, script, or datafile -# This comes from X11R5; it is not part of GNU. +# This comes from X11R5. # # $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ # @@ -26,9 +25,12 @@ chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" +tranformbasename="" +transform_arg="" instcmd="$mvprog" -chmodcmd="" +chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" @@ -36,6 +38,7 @@ mvcmd="$mvprog" src="" dst="" +dir_arg="" while [ x"$1" != x ]; do case $1 in @@ -43,6 +46,10 @@ shift continue;; + -d) dir_arg=true + shift + continue;; + -m) chmodcmd="$chmodprog $2" shift shift @@ -62,10 +69,20 @@ shift continue;; + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + *) if [ x"$src" = x ] then src=$1 else + # this colon is to work around a 386BSD /bin/sh bug + : dst=$1 fi shift @@ -75,45 +92,145 @@ if [ x"$src" = x ] then - echo "install: no input file specified" - exit 1 -fi - -if [ x"$dst" = x ] -then - echo "install: no destination specified" + echo "install: no input file specified" exit 1 +else + true fi +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic -if [ -d $dst ] -then - dst="$dst"/`basename $src` + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done fi +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + # Make a temp file name in the proper directory. -dstdir=`dirname $dst` -dsttmp=$dstdir/#inst.$$# + dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name -$doit $instcmd $src $dsttmp + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits -if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi -if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi -if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi -if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. -$doit $rmcmd $dst -$doit $mvcmd $dsttmp $dst + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && exit 0 diff -ruN make-3.70/job.c make-3.71/job.c --- make-3.70/job.c Thu Oct 14 15:08:36 1993 +++ make-3.71/job.c Tue May 10 16:00:40 1994 @@ -1,5 +1,5 @@ /* Job execution and handling for GNU Make. -Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. +Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -441,7 +441,7 @@ /* If the job failed, and the -k flag was not given, die, unless we are already in the process of dying. */ if (!err && child_failed && !keep_going_flag) - die (1); + die (2); } /* Only block for one child. */ @@ -513,9 +513,15 @@ ++p; } - /* If -q was given, just say that updating `failed'. */ + /* If -q was given, just say that updating `failed'. The exit status of + 1 tells the user that -q is saying `something to do'; the exit status + for a random error is 2. */ if (question_flag && !(flags & COMMANDS_RECURSE)) - goto error; + { + child->file->update_status = 1; + child->file->command_state = cs_finished; + return; + } /* There may be some preceding whitespace left if there was nothing but a backslash on the first line. */ @@ -673,8 +679,8 @@ return; - error:; - child->file->update_status = 1; + error: + child->file->update_status = 2; child->file->command_state = cs_finished; } @@ -1235,9 +1241,18 @@ if (instring) { - /* Inside a string, just copy any char except a closing quote. */ + /* Inside a string, just copy any char except a closing quote + or a backslash-newline combination. */ if (*p == '\'') instring = 0; + else if (*p == '\\' && p[1] == '\n') + goto swallow_escaped_newline; + else if (*p == '\n' && restp != NULL) + { + /* End of the command line. */ + *restp = p; + goto end_of_line; + } else *ap++ = *p; } @@ -1263,6 +1278,8 @@ /* Backslash-newline combinations are eaten. */ if (p[1] == '\n') { + swallow_escaped_newline: + /* Eat the backslash, the newline, and following whitespace, replacing it all with a single space. */ p += 2; @@ -1274,13 +1291,18 @@ if (*p == '\t') strcpy (p, p + 1); - if (ap != new_argv[i]) - /* Treat this as a space, ending the arg. - But if it's at the beginning of the arg, it should - just get eaten, rather than becoming an empty arg. */ - goto end_of_arg; + if (instring) + *ap++ = *p; else - p = next_token (p) - 1; + { + if (ap != new_argv[i]) + /* Treat this as a space, ending the arg. + But if it's at the beginning of the arg, it should + just get eaten, rather than becoming an empty arg. */ + goto end_of_arg; + else + p = next_token (p) - 1; + } } else if (p[1] != '\0') /* Copy and skip the following char. */ diff -ruN make-3.70/job.h make-3.71/job.h --- make-3.70/job.h Thu Oct 14 17:27:29 1993 +++ make-3.71/job.h Wed Mar 23 09:13:32 1994 @@ -1,4 +1,5 @@ -/* Copyright (C) 1992, 1993 Free Software Foundation, Inc. +/* Definitions for managing subprocesses in GNU Make. +Copyright (C) 1992, 1993 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify diff -ruN make-3.70/main.c make-3.71/main.c --- make-3.70/main.c Thu Dec 16 15:10:36 1993 +++ make-3.71/main.c Wed Apr 20 22:08:24 1994 @@ -1,4 +1,5 @@ -/* Copyright (C) 1988, 1989, 1990, 1991 Free Software Foundation, Inc. +/* Argument parsing and main program of GNU Make. +Copyright (C) 1988, 89, 90, 91, 94 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -454,9 +455,6 @@ /* Initialize the directory hashing code. */ init_dir (); - /* Set up to access user data (files). */ - user_access (); - /* Figure out where this program lives. */ if (argv[0] == 0) @@ -472,6 +470,9 @@ ++program; } + /* Set up to access user data (files). */ + user_access (); + /* Figure out where we are. */ if (getcwd (current_directory, GET_PATH_MAX) == 0) @@ -861,7 +862,7 @@ { register struct file *f = d->file; if (f->double_colon) - do + for (f = f->double_colon; f != NULL; f = f->prev) { if (f->deps == 0 && f->cmds != 0) { @@ -889,9 +890,7 @@ break; } - f = f->prev; } - while (f != NULL); if (f == NULL || !f->double_colon) { if (makefile_mtimes == 0) @@ -978,7 +977,7 @@ if (any_remade) goto re_exec; else if (any_failed) - die (1); + die (2); else break; } @@ -1095,8 +1094,12 @@ /* Updated successfully. */ status = 0; break; - case 1: + case 2: /* Updating failed. */ + status = 2; + break; + case 1: + /* We are under -q and would run some commands. */ status = 1; break; default: @@ -1419,7 +1422,7 @@ buf, cs->description); } - die (bad); + die (bad ? 2 : 0); } } @@ -1705,7 +1708,7 @@ printf ("-%s", remote_description); printf (", by Richard Stallman and Roland McGrath.\n\ -%sCopyright (C) 1988, 89, 90, 91, 92, 93 Free Software Foundation, Inc.\n\ +%sCopyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc.\n\ %sThis is free software; see the source for copying conditions.\n\ %sThere is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\ %sPARTICULAR PURPOSE.\n\n", precede, precede, precede, precede); diff -ruN make-3.70/make.h make-3.71/make.h --- make-3.70/make.h Wed Oct 27 20:09:14 1993 +++ make-3.71/make.h Sat May 21 16:23:48 1994 @@ -1,5 +1,5 @@ -/* Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 - Free Software Foundation, Inc. +/* Miscellaneous global declarations and portability cruft for GNU Make. +Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -59,7 +59,9 @@ #ifdef HAVE_UNISTD_H #include -#ifdef _POSIX_VERSION +/* Ultrix's unistd.h always defines _POSIX_VERSION, but you only get + POSIX.1 behavior with `cc -YPOSIX', which predefines POSIX itself! */ +#if defined (_POSIX_VERSION) && !defined (ultrix) #define POSIX #endif #endif @@ -210,7 +212,14 @@ #endif /* ANSI_STRING. */ #undef ANSI_STRING +/* SCO Xenix has a buggy macro definition in . */ +#undef strerror +#ifndef ANSI_STRING +extern char *strerror (); +#endif + + #ifdef __GNUC__ #undef alloca #define alloca(n) __builtin_alloca (n) @@ -255,7 +264,7 @@ extern int alpha_compare (); extern void print_spaces (); extern struct dep *copy_dep_chain (); -extern char *find_percent (); +extern char *find_char_unquote (), *find_percent (); #ifndef NO_ARCHIVES extern int ar_name (); diff -ruN make-3.70/make.texinfo make-3.71/make.texinfo --- make-3.70/make.texinfo Tue Dec 14 19:33:30 1993 +++ make-3.71/make.texinfo Mon May 16 23:52:07 1994 @@ -7,10 +7,11 @@ @c FSF publishers: format makebook.texi instead of using this file directly. +@set RCSID $Id: make.texinfo,v 2.139 1994/05/17 03:50:09 roland Alpha $ @set EDITION 0.45 -@set VERSION 3.70 Beta -@set UPDATED 14 December 1993 -@set UPDATE-MONTH December 1993 +@set VERSION 3.71 Beta +@set UPDATED 11 May 1994 +@set UPDATE-MONTH May 1994 @c finalout @@ -29,7 +30,7 @@ This is Edition @value{EDITION}, last updated @value{UPDATED}, of @cite{The GNU Make Manual}, for @code{make}, Version @value{VERSION}. -Copyright (C) 1988, '89, '90, '91, '92, '93 Free Software Foundation, Inc. +Copyright (C) 1988, '89, '90, '91, '92, '93, '94 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -64,7 +65,7 @@ @author Richard M. Stallman and Roland McGrath @page @vskip 0pt plus 1filll -Copyright @copyright{} 1988, '89, '90, '91, '92, '93 Free Software Foundation, Inc. +Copyright @copyright{} 1988, '89, '90, '91, '92, '93, '94 Free Software Foundation, Inc. @sp 2 Published by the Free Software Foundation @* 675 Massachusetts Avenue, @* @@ -434,21 +435,11 @@ Non-bug suggestions are always welcome as well. If you have questions about things that are unclear in the documentation or are just obscure -features, contact Roland McGrath; he will try to help you out, although -he may not have time to fix the problem.@refill - -You can send electronic mail to Roland McGrath either through the -@w{Internet} or via UUCP: - -@example -@group -@r{Internet address:} - roland@@prep.ai.mit.edu - -@r{UUCP path:} - mit-eddie!prep.ai.mit.edu!roland -@end group -@end example +features, send a message to the bug reporting address. We cannot +guarantee you'll get help with your problem, but many seasoned +@code{make} users read the mailing list and they will probably try to +help you out. The maintainers sometimes answer such questions as well, +when time permits. @node Introduction, Makefiles, Overview, Top @comment node-name, next, previous, up @@ -1256,13 +1247,12 @@ However, if the two makefiles give different commands for the same target, @code{make} will not let you just do this. But there is another way. -@cindex @code{.DEFAULT}, used to override +@cindex match-anything rule, used to override In the containing makefile (the one that wants to include the other), -you can use the @code{.DEFAULT} special target to say that to remake -any target that cannot be made from the information in the containing -makefile, @code{make} should look in another makefile. -@xref{Last Resort, , Defining Last-Resort Default Rules}, -for more information on @code{.DEFAULT}. +you can use a match-anything pattern rule to say that to remake any +target that cannot be made from the information in the containing +makefile, @code{make} should look in another makefile. +@xref{Pattern Rules}, for more information on pattern rules. For example, if you have a makefile called @file{Makefile} that says how to make the target @samp{foo} (and other targets), you can write a @@ -1272,8 +1262,9 @@ foo: frobnicate > foo -.DEFAULT: +%: force @@$(MAKE) -f Makefile $@@ +force: ; @end example If you say @samp{make foo}, @code{make} will find @file{GNUmakefile}, @@ -1280,10 +1271,18 @@ read it, and see that to make @file{foo}, it needs to run the command @samp{frobnicate > foo}. If you say @samp{make bar}, @code{make} will find no way to make @file{bar} in @file{GNUmakefile}, so it will use the -commands from @code{.DEFAULT}: @samp{make -f Makefile bar}. If +commands from the pattern rule: @samp{make -f Makefile bar}. If @file{Makefile} provides a rule for updating @file{bar}, @code{make} will apply the rule. And likewise for any other target that -@file{GNUmakefile} does not say how to make.@refill +@file{GNUmakefile} does not say how to make. + +The way this works is that the pattern rule has a pattern of just +@samp{%}, so it matches any target whatever. The rule specifies a +dependency @file{force}, to guarantee that the commands will be run even +if the target file already exists. We give @file{force} target empty +commands to prevent @code{make} from searching for an implicit rule to +build it---otherwise it would apply the same match-anything rule to +@file{force} itself and create a dependency loop! @node Rules, Commands, Makefiles, Top @chapter Writing Rules @@ -1560,7 +1559,7 @@ But what if you delete all the @samp{.o} files? When a wildcard matches no files, it is left as it is, so then @file{foo} will depend on the -oddly-named file @file{*.o}. Since so such file is likely to exist, +oddly-named file @file{*.o}. Since no such file is likely to exist, @code{make} will give you an error saying it cannot figure out how to make @file{*.o}. This is not what you want! @@ -1675,9 +1674,9 @@ current directory. @xref{Commands/Search, ,Writing Shell Commands with Directory Search}. -In the @code{VPATH} variable, directory names are separated by colons. -The order in which directories are listed is the order followed by -@code{make} in its search. +In the @code{VPATH} variable, directory names are separated by colons or +blanks. The order in which directories are listed is the order followed +by @code{make} in its search. For example, @@ -1723,9 +1722,9 @@ Specify the search path @var{directories} for file names that match @var{pattern}. -The search path, @var{directories}, is a colon-separated list of -directories to be searched, just like the search path used in the -@code{VPATH} variable. +The search path, @var{directories}, is a list of directories to be +searched, separated by colons or blanks, just like the search path used +in the @code{VPATH} variable. @item vpath @var{pattern} Clear out the search path associated with @var{pattern}. @@ -2552,6 +2551,11 @@ Thus you no longer have to write all those rules yourself. The compiler will do it for you. +Note that such a dependency constitutes mentioning @file{main.o} in a +makefile, so it can never be considered an intermediate file by implicit +rule search. This means that @code{make} won't ever remove the file +after using it; @pxref{Chained Rules, ,Chains of Implicit Rules}. + @cindex @code{make depend} With old @code{make} programs, it was traditional practice to use this compiler feature to generate dependencies on demand with a command like @@ -3323,34 +3327,37 @@ @end example @noindent -but now @code{MAKEFLAGS} makes this usage redundant. +but now @code{MAKEFLAGS} makes this usage redundant. If you want your +makefiles to be compatible with old @code{make} programs, use this +technique; it will work fine with more modern @code{make} versions too. @cindex setting options from environment @cindex options, setting from environment @cindex setting options in makefiles @cindex options, setting in makefiles -The @code{MAKEFLAGS} and @code{MFLAGS} variables can also be useful if you -want to have certain options, such as @samp{-k} (@pxref{Options Summary, -,Summary of Options}), set each time you run @code{make}. You simply put a -value for @code{MAKEFLAGS} or @code{MFLAGS} in your environment. These -variables may also be set in makefiles, so a makefile can specify additional -flags that should also be in effect for that makefile. - -When @code{make} interprets the value of @code{MAKEFLAGS} or @code{MFLAGS} -(either from the environment or from a makefile), it first prepends a hyphen -if the value does not already begin with one. Then it chops the value into -words separated by blanks, and parses these words as if they were options -given on the command line (except that @samp{-C}, @samp{-f}, @samp{-h}, +The @code{MAKEFLAGS} variable can also be useful if you want to have +certain options, such as @samp{-k} (@pxref{Options Summary, ,Summary of +Options}), set each time you run @code{make}. You simply put a value for +@code{MAKEFLAGS} in your environment. You can also set @code{MAKEFLAGS} in +a makefile, to specify additional flags that should also be in effect for +that makefile. (Note that you cannot use @code{MFLAGS} this way. That +variable is set only for compatibility; @code{make} does not interpret a +value you set for it in any way.) + +When @code{make} interprets the value of @code{MAKEFLAGS} (either from the +environment or from a makefile), it first prepends a hyphen if the value +does not already begin with one. Then it chops the value into words +separated by blanks, and parses these words as if they were options given +on the command line (except that @samp{-C}, @samp{-f}, @samp{-h}, @samp{-o}, @samp{-W}, and their long-named versions are ignored; and there is no error for an invalid option). -If you do put @code{MAKEFLAGS} or @code{MFLAGS} in your environment, you -should be sure not to include any options that will drastically affect -the actions of @code{make} and undermine the purpose of makefiles and of -@code{make} itself. For instance, the @samp{-t}, @samp{-n}, and -@samp{-q} options, if put in one of these variables, could have -disastrous consequences and would certainly have at least surprising and -probably annoying effects.@refill +If you do put @code{MAKEFLAGS} in your environment, you should be sure not +to include any options that will drastically affect the actions of +@code{make} and undermine the purpose of makefiles and of @code{make} +itself. For instance, the @samp{-t}, @samp{-n}, and @samp{-q} options, if +put in one of these variables, could have disastrous consequences and would +certainly have at least surprising and probably annoying effects.@refill @node -w Option, , Options/Recursion, Recursion @subsection The @samp{--print-directory} Option @@ -3559,6 +3566,10 @@ control implicit rules or for parameters that the user should override with command options (@pxref{Overriding, ,Overriding Variables}). +A few variables have names that are a single punctuation character or +just a few characters. These are the @dfn{automatic variables}, and +they have particular specialized uses. @xref{Automatic, ,Automatic Variables}. + @menu * Reference:: How to use the value of a variable. * Flavors:: Variables come in two flavors. @@ -3572,6 +3583,8 @@ * Defining:: An alternate way to set a variable to a verbatim string. * Environment:: Variable values can come from the environment. +* Automatic:: Some special variables have predefined + meanings for use with implicit rules. @end menu @node Reference, Flavors, , Using Variables @@ -5509,6 +5522,19 @@ By giving arguments when you run @code{make}, you can do any of these things and many others. +The exit status of @code{make} is always one of three values: +@table @code +@item 0 +The exit status is zero if @code{make} is successful. +@item 2 +The exit status is two if @code{make} encounters any errors. +It will print messages describing the particular errors. +@item 1 +The exit status is one if you use the @samp{-q} flag and @code{make} +determines that some target is not already up to date. +@xref{Instead of Execution, ,Instead of Executing the Commands}. +@end table + @menu * Makefile Arguments:: How to specify which makefile to use. * Goals:: How to use goal arguments to specify which @@ -5729,7 +5755,10 @@ With the @samp{-q} flag, @code{make} prints nothing and executes no commands, but the exit status code it returns is zero if and only if the -targets to be considered are already up to date. +targets to be considered are already up to date. If the exit status is +one, then some updating needs to be done. If @code{make} encounters an +error, the exit status is two, so you can distinguish an error from a +target that is not up to date. It is an error to use more than one of these three flags in the same invocation of @code{make}. @@ -6059,8 +6088,9 @@ @cindex @code{--question} ``Question mode''. Do not run any commands, or print anything; just return an exit status that is zero if the specified targets are already -up to date, nonzero otherwise. @xref{Instead of Execution, ,Instead of -Executing the Commands}.@refill +up to date, one if any remaking is required, or two if an error is +encountered. @xref{Instead of Execution, ,Instead of Executing the +Commands}.@refill @item -r @cindex @code{-r} @@ -6095,7 +6125,8 @@ Cancel the effect of the @samp{-k} option. This is never necessary except in a recursive @code{make} where @samp{-k} might be inherited -from the top-level @code{make} via @code{MAKEFLAGS} (@pxref{Recursion, ,Recursive Use of @code{make}}) +from the top-level @code{make} via @code{MAKEFLAGS} +(@pxref{Recursion, ,Recursive Use of @code{make}}) or if you set @samp{-k} in @code{MAKEFLAGS} in your environment.@refill @item -t @@ -6528,10 +6559,11 @@ @pindex .info @pindex .texi @pindex .txinfo -@file{@var{n}.dvi} is made from @file{@var{n}.texinfo}, @file{@var{n}.texi}, -or @file{@var{n}.txinfo}, with the @samp{$(TEXI2DVI)} command. -@file{@var{n}.info} is made from @file{@var{n}.texinfo}, @file{@var{n}.texi}, -or @file{@var{n}.txinfo}, with the @samp{$(MAKEINFO)} command.@refill +@file{@var{n}.dvi} is made from @file{@var{n}.texinfo}, +@file{@var{n}.texi}, or @file{@var{n}.txinfo}, with the command +@w{@samp{$(TEXI2DVI) $(TEXI2DVI_FLAGS)}}. @file{@var{n}.info} is made from +@file{@var{n}.texinfo}, @file{@var{n}.texi}, or @file{@var{n}.txinfo}, with +the command @w{@samp{$(MAKEINFO) $(MAKEINFO_FLAGS)}}. @item RCS @cindex RCS, rule to extract from @@ -7067,7 +7099,10 @@ @item $^ The names of all the dependencies, with spaces between them. For dependencies which are archive members, only the member named is used -(@pxref{Archives}). +(@pxref{Archives}). A target has only one dependency on each other file +it depends on, no matter how many times each file is listed as a +dependency. So if you list a dependency more than once for a target, +the value of @code{$^} contains just one copy of the name. @cindex dependencies, list of all @cindex list of all dependencies @@ -7109,23 +7144,24 @@ @end example Of the variables listed above, four have values that are single file -names, and two have values that are lists of file names. These six -have variants that get just the file's directory name or just the file -name within the directory. The variant variables' names are formed by +names, and two have values that are lists of file names. These six have +variants that get just the file's directory name or just the file name +within the directory. The variant variables' names are formed by appending @samp{D} or @samp{F}, respectively. These variants are semi-obsolete in GNU @code{make} since the functions @code{dir} and -@code{notdir} can be used to get an equivalent effect (@pxref{Filename -Functions, , Functions for File Names}). Here is a table of the -variants:@refill +@code{notdir} can be used to get a similar effect (@pxref{Filename +Functions, , Functions for File Names}). Note, however, that the +@samp{F} variants all omit the trailing slash which always appears in +the output of the @code{dir} function. Here is a table of the variants: @table @samp @vindex $(@@D) @vindex @@D @r{(automatic variable)} @item $(@@D) -The directory part of the file name of the target. If the value of -@samp{$@@} is @file{dir/foo.o} then @samp{$(@@D)} is @file{dir/}. -This value is @file{./} if @samp{$@@} does not contain a slash. -@samp{$(@@D)} is equivalent to @w{@samp{$(dir $@@)}}.@refill +The directory part of the file name of the target, with the trailing +slash removed. If the value of @samp{$@@} is @file{dir/foo.o} then +@samp{$(@@D)} is @file{dir}. This value is @file{.} if @samp{$@@} does +not contain a slash. @vindex $(@@F) @vindex @@F @r{(automatic variable)} @@ -7141,7 +7177,7 @@ @vindex *F @r{(automatic variable)} @itemx $(*F) The directory part and the file-within-directory -part of the stem; @file{dir/} and @file{foo} in this example. +part of the stem; @file{dir} and @file{foo} in this example. @vindex $(%D) @vindex %D @r{(automatic variable)} @@ -7593,8 +7629,7 @@ @cindex archive member targets An individual member of an archive file can be used as a target or -dependency in @code{make}. The archive file must already exist, but the -member need not exist. You specify the member named @var{member} in +dependency in @code{make}. You specify the member named @var{member} in archive file @var{archive} as follows: @example @@ -7612,11 +7647,13 @@ @example foolib(hack.o) : hack.o - ar r foolib hack.o + ar cr foolib hack.o @end example In fact, nearly all archive member targets are updated in just this way -and there is an implicit rule to do it for you. +and there is an implicit rule to do it for you. @strong{Note:} The +@samp{c} flag to @code{ar} is required if the archive file does not +already exist. To specify several members in the same archive, you can write all the member names together between the parentheses. For example: @@ -7684,8 +7721,8 @@ @end example @noindent -which has the effect of copying the file @file{dir/foo.o} into a member -named @file{foo.o}. In connection with such usage, the automatic variables +which has the effect of copying the file @file{dir/file.o} into a member +named @file{file.o}. In connection with such usage, the automatic variables @code{%D} and @code{%F} may be useful. @menu @@ -8408,7 +8445,6 @@ @xref{Variables/Recursion}. @item MAKEFLAGS -@itemx MFLAGS The flags given to @code{make}. You can set this in the environment or a makefile to set flags.@* diff -ruN make-3.70/misc.c make-3.71/misc.c --- make-3.70/misc.c Thu Dec 2 15:37:46 1993 +++ make-3.71/misc.c Sat May 21 16:27:33 1994 @@ -1,4 +1,5 @@ -/* Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. +/* Miscellaneous generic support functions for GNU Make. +Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -123,36 +124,13 @@ remove_comments (line) char *line; { - register char *p, *p2; - register int backslash; - register unsigned int bs_write; - - while (1) - { - p = index (line, '#'); - if (p == 0) - break; - - backslash = 0; - bs_write = 0; - for (p2 = p - 1; p2 >= line && *p2 == '\\'; --p2) - { - if (backslash) - ++bs_write; - backslash = !backslash; - } + char *comment; - if (!backslash) - { - /* Cut off the line at the #. */ - *p = '\0'; - break; - } + comment = find_char_unquote (line, '#', 0); - /* strcpy better copy left to right. */ - line = p; - strcpy (p2 + 1 + bs_write, line); - } + if (comment != 0) + /* Cut off the line at the #. */ + *comment = '\0'; } /* Print N spaces (used by DEBUGPR for target-depth). */ @@ -222,7 +200,7 @@ fprintf (stderr, s1, s2, s3, s4, s5, s6); fputs (". Stop.\n", stderr); - die (1); + die (2); } /* Print error message. `s1' is printf control string, `s2' is arg for it. */ @@ -264,10 +242,13 @@ fprintf (stderr, s1, s2, s3, s4, s5, s6); fputs (". Stop.\n", stderr); - die (1); + die (2); } #ifndef HAVE_STRERROR + +#undef strerror + char * strerror (errnum) int errnum; @@ -392,25 +373,9 @@ end_of_token (s) char *s; { - register char *p = s; - register int backslash = 0; - - while (*p != '\0' && (backslash || !isblank (*p))) - { - if (*p++ == '\\') - { - backslash = !backslash; - while (*p == '\\') - { - backslash = !backslash; - ++p; - } - } - else - backslash = 0; - } - - return p; + while (*s != '\0' && !isblank (*s)) + ++s; + return s; } /* Return the address of the first nonwhitespace or null in the string S. */ @@ -488,15 +453,50 @@ #ifdef GETLOADAVG_PRIVILEGED +#ifdef POSIX + +/* Hopefully if a system says it's POSIX.1 and has the setuid and setgid + functions, they work as POSIX.1 says. Some systems (Alpha OSF/1 1.2, + for example) which claim to be POSIX.1 also have the BSD setreuid and + setregid functions, but they don't work as in BSD and only the POSIX.1 + way works. */ + +#ifndef HAVE_SETREUID +#undef HAVE_SETREUID +#endif +#ifndef HAVE_SETREGID +#undef HAVE_SETREGID +#endif + +#else /* Not POSIX. */ + +/* Some POSIX.1 systems have the seteuid and setegid functions. In a + POSIX-like system, they are the best thing to use. However, some + non-POSIX systems have them too but they do not work in the POSIX style + and we must use setreuid and setregid instead. */ + +#undef HAVE_SETEUID +#undef HAVE_SETEGID + +#endif /* POSIX. */ + #ifndef HAVE_UNISTD_H extern int getuid (), getgid (), geteuid (), getegid (); extern int setuid (), setgid (); +#ifdef HAVE_SETEUID +extern int seteuid (); +#else #ifdef HAVE_SETREUID extern int setreuid (); #endif /* Have setreuid. */ +#endif /* Have seteuid. */ +#ifdef HAVE_SETEGID +extern int setegid (); +#else #ifdef HAVE_SETREGID extern int setregid (); #endif /* Have setregid. */ +#endif /* Have setegid. */ #endif /* No . */ /* Keep track of the user and group IDs for user- and make- access. */ @@ -562,6 +562,16 @@ We now want to set the effective user and group IDs to the real IDs, which are the IDs of the process that exec'd make. */ +#ifdef HAVE_SETEUID + + /* Modern systems have the seteuid/setegid calls which set only the + effective IDs, which is ideal. */ + + if (seteuid (user_uid) < 0) + pfatal_with_name ("user_access: seteuid"); + +#else /* Not HAVE_SETEUID. */ + #ifndef HAVE_SETREUID /* System V has only the setuid/setgid calls to set user/group IDs. @@ -575,7 +585,7 @@ if (setuid (user_uid) < 0) pfatal_with_name ("user_access: setuid"); -#else +#else /* HAVE_SETREUID. */ /* In 4BSD, the setreuid/setregid calls set both the real and effective IDs. They may be set to themselves or each other. So you have two alternatives @@ -587,8 +597,13 @@ if (setreuid (make_uid, user_uid) < 0) pfatal_with_name ("user_access: setreuid"); -#endif +#endif /* Not HAVE_SETREUID. */ +#endif /* HAVE_SETEUID. */ +#ifdef HAVE_SETEGID + if (setegid (user_gid) < 0) + pfatal_with_name ("user_access: setegid"); +#else #ifndef HAVE_SETREGID if (setgid (user_gid) < 0) pfatal_with_name ("user_access: setgid"); @@ -596,6 +611,7 @@ if (setregid (make_gid, user_gid) < 0) pfatal_with_name ("user_access: setregid"); #endif +#endif current_access = user; @@ -619,6 +635,10 @@ /* See comments in user_access, above. */ +#ifdef HAVE_SETEUID + if (seteuid (make_uid) < 0) + pfatal_with_name ("make_access: seteuid"); +#else #ifndef HAVE_SETREUID if (setuid (make_uid) < 0) pfatal_with_name ("make_access: setuid"); @@ -626,7 +646,12 @@ if (setreuid (user_uid, make_uid) < 0) pfatal_with_name ("make_access: setreuid"); #endif +#endif +#ifdef HAVE_SETEGID + if (setegid (make_gid) < 0) + pfatal_with_name ("make_access: setegid"); +#else #ifndef HAVE_SETREGID if (setgid (make_gid) < 0) pfatal_with_name ("make_access: setgid"); @@ -633,6 +658,7 @@ #else if (setregid (user_gid, make_gid) < 0) pfatal_with_name ("make_access: setregid"); +#endif #endif current_access = make; diff -ruN make-3.70/mkinstalldirs make-3.71/mkinstalldirs --- make-3.70/mkinstalldirs Fri Aug 13 11:07:14 1993 +++ make-3.71/mkinstalldirs Fri Mar 25 23:01:14 1994 @@ -1,35 +1,32 @@ #!/bin/sh -# Make directory hierarchy. -# Written by Noah Friedman -# Public domain. - -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Last modified: 1994-03-25 +# Public domain errstatus=0 for file in ${1+"$@"} ; do - oIFS="${IFS}" - # Some sh's can't handle IFS=/ for some reason. - IFS='%' - set - `echo ${file} | sed -e 's@/@%@g' -e 's@^%@/@'` - IFS="${oIFS}" + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift - pathcomp='' - + pathcomp= for d in ${1+"$@"} ; do - pathcomp="${pathcomp}${d}" + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac - if test ! -d "${pathcomp}"; then + if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" 1>&2 - mkdir "${pathcomp}" || errstatus=$? + mkdir "$pathcomp" || errstatus=$? fi - pathcomp="${pathcomp}/" + pathcomp="$pathcomp/" done done exit $errstatus -# eof +# mkinstalldirs ends here diff -ruN make-3.70/read.c make-3.71/read.c --- make-3.70/read.c Thu Dec 23 17:56:05 1993 +++ make-3.71/read.c Mon May 2 18:35:24 1994 @@ -1,5 +1,5 @@ -/* Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 - Free Software Foundation, Inc. +/* Reading and parsing of makefiles for GNU Make. +Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -267,6 +267,20 @@ two_colon = 0; #endif + if (debug_flag) + { + printf ("Reading makefile `%s'", filename); + if (flags & RM_NO_DEFAULT_GOAL) + printf (" (no default goal)"); + if (flags & RM_INCLUDED) + printf (" (search path)"); + if (flags & RM_DONTCARE) + printf (" (don't care)"); + if (flags & RM_NO_TILDE) + printf (" (no ~ expansion)"); + puts ("..."); + } + /* First, get a stream to read. */ /* Expand ~ in FILENAME unless it came from `include', @@ -317,7 +331,6 @@ deps->file->dontcare = 1; } filename = deps->file->name; - deps->file->precious = 1; deps->changed = flags; deps = 0; @@ -360,7 +373,7 @@ remove_comments (collapsed); p = collapsed; - while (isspace (*p)) + while (isspace (*p) && *p != '\t') ++p; /* We cannot consider a line containing just a tab to be empty because it might constitute an empty command for a target. */ @@ -398,7 +411,13 @@ else { p2 = next_token (p + 6); - p = end_of_token (p2); + /* Let the variable name be the whole rest of the line, + with trailing blanks stripped (comments have already been + removed), so it could be a complex variable/function + reference that might contain blanks. */ + p = index (p2, '\0'); + while (isblank (p[-1])) + --p; lineno = do_define (p2, p - p2, o_file, lineno, infile, filename); } @@ -415,10 +434,15 @@ in_ignored_define = 1; else { - unsigned int len; - p2 = end_of_token (p2); - p = find_next_token (&p2, &len); - lineno = do_define (p, len, o_override, + p2 = next_token (p2 + 6); + /* Let the variable name be the whole rest of the line, + with trailing blanks stripped (comments have already been + removed), so it could be a complex variable/function + reference that might contain blanks. */ + p = index (p2, '\0'); + while (isblank (p[-1])) + --p; + lineno = do_define (p2, p - p2, o_override, lineno, infile, filename); } } @@ -430,7 +454,6 @@ continue; } - if (ignoring) /* Ignore the line. We continue here so conditionals can appear in the middle of a rule. */ @@ -552,7 +575,8 @@ files = next; if (! read_makefile (name, (RM_INCLUDED | RM_NO_TILDE - | (noerror ? RM_DONTCARE : 0)))) + | (noerror ? RM_DONTCARE : 0))) + && ! noerror) makefile_error (filename, lineno, "%s: %s", name, strerror (errno)); } @@ -593,12 +617,20 @@ /* This line has been dealt with. */ ; else if (lb.buffer[0] == '\t') - /* This line starts with a tab but was not caught above - because there was no preceding target, and the line - might have been usable as a variable definition. - But now it is definitely lossage. */ - makefile_fatal (filename, lineno, - "commands commence before first target"); + { + p = lb.buffer; + while (isblank (*p)) + ++p; + if (*p == '\0') + /* The line is completely blank; that is harmless. */ + continue; + /* This line starts with a tab but was not caught above + because there was no preceding target, and the line + might have been usable as a variable definition. + But now it is definitely lossage. */ + makefile_fatal (filename, lineno, + "commands commence before first target"); + } else { /* This line describes some target files. */ @@ -779,12 +811,13 @@ { lineno += nlines; nlines = readline (&lb, infile, filename, lineno); - p = next_token (lb.buffer); + collapse_continuations (lb.buffer); + + p = next_token (lb.buffer); if ((p[5] == '\0' || isblank (p[5])) && !strncmp (p, "endef", 5)) { p += 5; - collapse_continuations (p); remove_comments (p); if (*next_token (p) != '\0') makefile_error (filename, lineno, @@ -801,7 +834,7 @@ } else { - unsigned int len = strlen (p); + unsigned int len = strlen (lb.buffer); /* Increase the buffer size if necessary. */ if (idx + len + 1 > length) @@ -810,7 +843,7 @@ definition = (char *) xrealloc (definition, length + 1); } - bcopy (p, &definition[idx], len); + bcopy (lb.buffer, &definition[idx], len); idx += len; /* Separate lines with a newline. */ definition[idx++] = '\n'; @@ -1311,11 +1344,15 @@ "target file `%s' has both : and :: entries", f->name); f = enter_file (name); - /* If there was an existing entry and it was a - double-colon entry, enter_file will have returned a - new one, making it the prev pointer of the old one. */ + /* If there was an existing entry and it was a double-colon + entry, enter_file will have returned a new one, making it the + prev pointer of the old one, and setting its double_colon + pointer to the first one. */ + if (f->double_colon == 0) + /* This is the first entry for this name, so we must + set its double_colon pointer to itself. */ + f->double_colon = f; f->is_target = 1; - f->double_colon = 1; f->deps = this; f->cmds = cmds; } @@ -1375,83 +1412,80 @@ } } -/* Search STRING for an unquoted ; that is not after an unquoted #. */ +/* Search STRING for an unquoted STOPCHAR or blank (if BLANK is nonzero). + Backslashes quote STOPCHAR, blanks if BLANK is nonzero, and backslash. + Quoting backslashes are removed from STRING by compacting it into + itself. Returns a pointer to the first unquoted STOPCHAR if there is + one, or nil if there are none. */ -static char * -find_semicolon (string) +char * +find_char_unquote (string, stopchar, blank) char *string; + int stopchar; + int blank; { - char *found, *p; + unsigned int string_len = strlen (string); + register char *p = string; - found = index (string, ';'); - while (found != 0 && found[-1] == '\\') + while (1) { - register char *q = &found[-1]; - register int backslash = 0; - while (*q-- == '\\') - backslash = !backslash; - if (backslash) - found = index (found + 1, ';'); + if (blank) + { + while (*p != '\0' && *p != stopchar && !isblank (*p)) + ++p; + if (*p == '\0') + break; + } else - break; - } - if (found == 0) - return 0; + { + p = index (p, stopchar); + if (p == 0) + break; + } + if (p > string && p[-1] == '\\') + { + /* Search for more backslashes. */ + register int i = -2; + while (&p[i] >= string && p[i] == '\\') + --i; + ++i; + /* The number of backslashes is now -I. + Copy P over itself to swallow half of them. */ + bcopy (&p[i / 2], &p[i], (string_len - (p - string)) - (i / 2) + 1); + p += i / 2; + if (i % 2 == 0) + /* All the backslashes quoted each other; the STOPCHAR was + unquoted. */ + return p; - /* Look for a comment character (#) before the ; we found. */ - p = lindex (string, found, '#'); - while (p != 0 && p[-1] == '\\') - { - register char *q = &p[-1]; - register int backslash = 0; - while (*q-- == '\\') - backslash = !backslash; - if (backslash) - p = lindex (p + 1, found, '#'); + /* The STOPCHAR was quoted by a backslash. Look for another. */ + } else - break; + /* No backslash in sight. */ + return p; } - if (p == 0) - return found; + + /* Never hit a STOPCHAR or blank (with BLANK nonzero). */ return 0; } - -/* Search PATTERN for an unquoted %. Backslashes quote % and backslash. - Quoting backslashes are removed from PATTERN by compacting it into - itself. Returns a pointer to the first unquoted % if there is one, - or nil if there are none. */ + +/* Search PATTERN for an unquoted %. */ char * find_percent (pattern) char *pattern; { - unsigned int pattern_len = strlen (pattern); - register char *p = pattern; - - while ((p = index (p, '%')) != 0) - if (p > pattern && p[-1] == '\\') - { - /* Search for more backslashes. */ - register int i = -2; - while (&p[i] >= pattern && p[i] == '\\') - --i; - ++i; - /* The number of backslashes is now -I. - Copy P over itself to swallow half of them. */ - bcopy (&p[i / 2], &p[i], (pattern_len - (p - pattern)) - (i / 2) + 1); - p += i / 2; - if (i % 2 == 0) - /* All the backslashes quoted each other; the % was unquoted. */ - return p; + return find_char_unquote (pattern, '%', 0); +} - /* The % was quoted by a backslash. Look for another. */ - } - else - /* No backslash in sight. */ - return p; +/* Search STRING for an unquoted ; that is not after an unquoted #. */ - /* Never hit a %. */ - return 0; +static char * +find_semicolon (string) + char *string; +{ + return (find_char_unquote (string, '#', 0) == 0 + ? find_char_unquote (string, ';', 0) : 0); } /* Parse a string into a sequence of filenames represented as a @@ -1475,11 +1509,10 @@ int strip; { register struct nameseq *new = 0; - register struct nameseq *new1; + register struct nameseq *new1, *lastnew1; register char *p = *stringp; char *q; char *name; - register int c; while (1) { @@ -1491,18 +1524,9 @@ break; /* Yes, find end of next name. */ q = p; - while (1) - { - c = *p++; - if (c == '\0') - break; - else if (c == '\\' && - (*p == '\\' || isblank (*p) || *p == stopchar)) - ++p; - else if (isblank (c) || c == stopchar) - break; - } - p--; + p = find_char_unquote (q, stopchar, 1); + if (p == 0) + p = q + strlen (q); if (strip) /* Skip leading `./'s. */ @@ -1536,7 +1560,7 @@ an elt further down the chain (i.e., previous in the file list) with an unmatched `(' (e.g., "lib(mem"). */ - for (new1 = new; new1 != 0; new1 = new1->next) + for (new1 = new, lastnew1 = 0; new1 != 0; lastnew1 = new1, new1 = new1->next) if (new1->name[0] != '(' /* Don't catch "(%)" and suchlike. */ && new1->name[strlen (new1->name) - 1] == ')' && index (new1->name, '(') == 0) @@ -1590,10 +1614,12 @@ { /* NEW1 is just ")", part of something like "lib(a b )". Omit it from the chain and free its storage. */ + if (lastnew1 == 0) + new = new1->next; + else + lastnew1->next = new1->next; lastn = new1; new1 = new1->next; - if (new == lastn) - new = new1; free (lastn->name); free ((char *) lastn); } diff -ruN make-3.70/remake.c make-3.71/remake.c --- make-3.70/remake.c Wed Oct 27 18:14:26 1993 +++ make-3.71/remake.c Fri Apr 22 17:53:53 1994 @@ -1,5 +1,5 @@ -/* Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 - Free Software Foundation, Inc. +/* Basic dependency engine for GNU Make. +Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -96,109 +96,124 @@ g = goals; while (g != 0) { - unsigned int ocommands_started; - int x; - time_t mtime = MTIME (g->file); - check_renamed (g->file); + /* Iterate over all double-colon entries for this file. */ + struct file *file = g->file; + int stop, any_not_updated = 0; + for (file = g->file->double_colon ? g->file->double_colon : g->file; + file != NULL; + file = file->prev) + { + unsigned int ocommands_started; + int x; + time_t mtime = MTIME (file); + check_renamed (file); - if (makefiles) - { - if (g->file->cmd_target) + if (makefiles) { - touch_flag = t; - question_flag = q; - just_print_flag = n; + if (file->cmd_target) + { + touch_flag = t; + question_flag = q; + just_print_flag = n; + } + else + touch_flag = question_flag = just_print_flag = 0; } - else - touch_flag = question_flag = just_print_flag = 0; - } - - /* Save the old value of `commands_started' so we can compare later. - It will be incremented when any commands are actually run. */ - ocommands_started = commands_started; - x = update_file (g->file, makefiles ? 1 : 0); - check_renamed (g->file); + /* Save the old value of `commands_started' so we can compare + later. It will be incremented when any commands are + actually run. */ + ocommands_started = commands_started; - /* Set the goal's `changed' flag if any commands were started - by calling update_file above. We check this flag below to - decide when to give an "up to date" diagnostic. */ - g->changed += commands_started - ocommands_started; - - if (x != 0 || g->file->updated) - { - int stop = 0; - - /* If STATUS was not already 1, set it to 1 if - updating failed, or to 0 if updating succeeded. - Leave STATUS as it is if no updating was done. */ + x = update_file (file, makefiles ? 1 : 0); + check_renamed (file); - if (status < 1) + /* Set the goal's `changed' flag if any commands were started + by calling update_file above. We check this flag below to + decide when to give an "up to date" diagnostic. */ + g->changed += commands_started - ocommands_started; + + stop = 0; + if (x != 0 || file->updated) { - if (g->file->update_status != 0) - { - /* Updating failed. */ - status = 1; - stop = !keep_going_flag && !makefiles; - } - else if (MTIME (g->file) != mtime) + /* If STATUS was not already 1, set it to 1 if + updating failed, or to 0 if updating succeeded. + Leave STATUS as it is if no updating was done. */ + + if (status < 1) { - /* Updating was done. - If this is a makefile and just_print_flag or - question_flag is set (meaning -n or -q was given - and this file was specified as a command-line target), - don't change STATUS. If STATUS is changed, we will - get re-exec'd, and fall into an infinite loop. */ - if (!makefiles || (!just_print_flag && !question_flag)) - status = 0; - if (makefiles && g->file->dontcare) - /* This is a default makefile. Stop remaking. */ - stop = 1; + if (file->update_status != 0) + { + /* Updating failed, or -q triggered. + The STATUS value tells our caller which. */ + status = file->update_status; + /* If -q just triggered, stop immediately. + It doesn't matter how much more we run, + since we already know the answer to return. */ + stop = (!keep_going_flag && !question_flag + && !makefiles); + } + else if (MTIME (file) != mtime) + { + /* Updating was done. If this is a makefile and + just_print_flag or question_flag is set + (meaning -n or -q was given and this file was + specified as a command-line target), don't + change STATUS. If STATUS is changed, we will + get re-exec'd, and fall into an infinite loop. */ + if (!makefiles + || (!just_print_flag && !question_flag)) + status = 0; + if (makefiles && file->dontcare) + /* This is a default makefile. Stop remaking. */ + stop = 1; + } } } - if (stop || g->file->prev == 0) - { - /* If we have found nothing whatever to do for the goal, - print a message saying nothing needs doing. */ + /* Keep track if any double-colon entry is not finished. + When they are all finished, the goal is finished. */ + any_not_updated |= !file->updated; - if (!makefiles - /* If the update_status is zero, we updated successfully - or not at all. G->changed will have been set above if - any commands were actually started for this goal. */ - && g->file->update_status == 0 && !g->changed - /* Never give a message under -s or -q. */ - && !silent_flag && !question_flag) - { - if (g->file->phony || g->file->cmds == 0) - message ("Nothing to be done for `%s'.", - g->file->name); - else - message ("`%s' is up to date.", g->file->name); - fflush (stdout); - } + if (stop) + break; + } - /* This goal is finished. Remove it from the chain. */ - if (lastgoal == 0) - goals = g->next; - else - lastgoal->next = g->next; + /* Reset FILE since it is null at the end of the loop. */ + file = g->file; - /* Free the storage. */ - free ((char *) g); + if (stop || !any_not_updated) + { + /* If we have found nothing whatever to do for the goal, + print a message saying nothing needs doing. */ - g = lastgoal == 0 ? goals : lastgoal->next; + if (!makefiles + /* If the update_status is zero, we updated successfully + or not at all. G->changed will have been set above if + any commands were actually started for this goal. */ + && file->update_status == 0 && !g->changed + /* Never give a message under -s or -q. */ + && !silent_flag && !question_flag) + { + if (file->phony || file->cmds == 0) + message ("Nothing to be done for `%s'.", + file->name); + else + message ("`%s' is up to date.", file->name); + fflush (stdout); } - else if (g->file->updated) - /* This instance of the target is done being updated. - Go to the next instance (:: rule). - update_file cycles through all instances, but under -j, - update_file can return while the file is running, - then reap_children can change its command state and - updated flag, leaving G->file done, but some of its - other instances needing work. */ - g->file = g->file->prev; + + /* This goal is finished. Remove it from the chain. */ + if (lastgoal == 0) + goals = g->next; + else + lastgoal->next = g->next; + + /* Free the storage. */ + free ((char *) g); + g = lastgoal == 0 ? goals : lastgoal->next; + if (stop) break; } @@ -241,7 +256,7 @@ register int status = 0; register struct file *f; - for (f = file; f != 0; f = f->prev) + for (f = file->double_colon ? file->double_colon : file; f != 0; f = f->prev) { status |= update_file_1 (f, depth); check_renamed (f); @@ -390,6 +405,8 @@ { register struct file *f = d->file; + if (f->double_colon) + f = f->double_colon; do { running |= (f->command_state == cs_running @@ -425,6 +442,8 @@ { register struct file *f = d->file; + if (f->double_colon) + f = f->double_colon; do { running |= (f->command_state == cs_running @@ -612,11 +631,18 @@ if (!file->phony) { + struct file *f; + if (just_print_flag || question_flag || (file->is_target && file->cmds == 0)) file->last_mtime = NEW_MTIME; else file->last_mtime = 0; + + /* Propagate the change of modification time to all the double-colon + entries for this file. */ + for (f = file->double_colon; f != 0; f = f->next) + f->last_mtime = file->last_mtime; } if (file->update_status != -1) @@ -925,6 +951,8 @@ } /* Store the mtime into all the entries for this file. */ + if (file->double_colon) + file = file->double_colon; do { file->last_mtime = mtime; diff -ruN make-3.70/remote-cstms.c make-3.71/remote-cstms.c --- make-3.70/remote-cstms.c Thu Feb 4 13:31:53 1993 +++ make-3.71/remote-cstms.c Wed Mar 23 09:14:17 1994 @@ -1,5 +1,4 @@ -/* This file implements an interface to the Customs daemon to do - remote execution of commands under GNU make. +/* GNU Make remote job exportation interface to the Customs daemon. THIS CODE IS NOT SUPPORTED BY THE GNU PROJECT. Please do not send bug reports or questions about it to the Make maintainers. diff -ruN make-3.70/remote-stub.c make-3.71/remote-stub.c --- make-3.70/remote-stub.c Mon Aug 9 18:21:56 1993 +++ make-3.71/remote-stub.c Wed Mar 23 09:14:29 1994 @@ -1,4 +1,5 @@ -/* Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc. +/* Template for the remote job exportation interface to GNU Make. +Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify diff -ruN make-3.70/rule.h make-3.71/rule.h --- make-3.70/rule.h Wed Jun 30 18:42:37 1993 +++ make-3.71/rule.h Wed Mar 23 09:14:37 1994 @@ -1,4 +1,5 @@ -/* Copyright (C) 1988, 1989, 1991, 1992, 1993 Free Software Foundation, Inc. +/* Definitions for using pattern rules in GNU Make. +Copyright (C) 1988, 1989, 1991, 1992, 1993 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify diff -ruN make-3.70/texinfo.tex make-3.71/texinfo.tex --- make-3.70/texinfo.tex Sat Dec 25 22:32:06 1993 +++ make-3.71/texinfo.tex Tue May 10 02:30:20 1994 @@ -1,6 +1,6 @@ %% TeX macros to handle texinfo files -% Copyright (C) 1985, 86, 88, 90, 91, 92, 1993 Free Software Foundation, Inc. +% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 1994 Free Software Foundation, Inc. %This texinfo.tex file is free software; you can redistribute it and/or %modify it under the terms of the GNU General Public License as @@ -22,7 +22,9 @@ %You are forbidden to forbid anyone else to use, share and improve %what you give them. Help stamp out software-hoarding! -\def\texinfoversion{2.118} +% This automatically updates the version number based on RCS. +\def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} +\deftexinfoversion$Revision: 2.126 $ \message{Loading texinfo package [Version \texinfoversion]:} % Print the version number if in a .fmt file. @@ -30,6 +32,7 @@ % Save some parts of plain tex whose names we will redefine. +\let\ptextilde=\~ \let\ptexlbrace=\{ \let\ptexrbrace=\} \let\ptexdots=\dots @@ -45,6 +48,7 @@ \let\ptexL=\L \def\tie{\penalty 10000\ } % Save plain tex definition of ~. +\let\~ = \tie % And make it available as @~. \message{Basics,} \chardef\other=12 @@ -53,6 +57,19 @@ % starts a new line in the output. \newlinechar = `^^J +% Set up fixed words for English. +\ifx\putwordChapter\undefined{\gdef\putwordChapter{Chapter}}\fi% +\def\putwordInfo{Info}% +\ifx\putwordSee\undefined{\gdef\putwordSee{See}}\fi% +\ifx\putwordsee\undefined{\gdef\putwordsee{see}}\fi% +\ifx\putwordfile\undefined{\gdef\putwordfile{file}}\fi% +\ifx\putwordpage\undefined{\gdef\putwordpage{page}}\fi% +\ifx\putwordsection\undefined{\gdef\putwordsection{section}}\fi% +\ifx\putwordSection\undefined{\gdef\putwordSection{Section}}\fi% +\ifx\putwordTableofContents\undefined{\gdef\putwordTableofContents{Table of Contents}}\fi% +\ifx\putwordShortContents\undefined{\gdef\putwordShortContents{Short Contents}}\fi% +\ifx\putwordAppendix\undefined{\gdef\putwordAppendix{Appendix}}\fi% + % Ignore a token. % \def\gobble#1{} @@ -297,13 +314,13 @@ % Single-spacing is done by various environments (specifically, in % \nonfillstart and \quotations). -\newskip\singlespaceskip \singlespaceskip = \baselineskip +\newskip\singlespaceskip \singlespaceskip = 12.5pt \def\singlespace{% -% Why was this kern here? It messes up equalizing space above and below -% environments. --karl, 6may93 -%{\advance \baselineskip by -\singlespaceskip -%\kern \baselineskip}% -\baselineskip=\singlespaceskip + % Why was this kern here? It messes up equalizing space above and below + % environments. --karl, 6may93 + %{\advance \baselineskip by -\singlespaceskip + %\kern \baselineskip}% + \setleading \singlespaceskip } %% Simple single-character @ commands @@ -389,8 +406,8 @@ \obeylines \fi % - % We do @comment here in case we are called inside an environment, - % such as @example, where each end-of-line in the input causes an + % Do @comment since we are called inside an environment such as + % @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after % the `@group' to put extra space in the output. Since @group % should appear on a line by itself (according to the Texinfo @@ -460,7 +477,7 @@ % @dots{} output some dots -\def\dots{.$\,$.$\,$.\:} +\def\dots{$\ldots$} % @page forces the start of a new page @@ -584,6 +601,8 @@ \let\up = \relax \let\set = \relax \let\clear = \relax + \let\item = \relax + \let\message = \relax } % Ignore @ignore ... @end ignore. @@ -819,15 +838,15 @@ \def\donoderef{\ifx\lastnode\relax\else \expandafter\expandafter\expandafter\setref{\lastnode}\fi -\let\lastnode=\relax} +\global\let\lastnode=\relax} \def\unnumbnoderef{\ifx\lastnode\relax\else \expandafter\expandafter\expandafter\unnumbsetref{\lastnode}\fi -\let\lastnode=\relax} +\global\let\lastnode=\relax} \def\appendixnoderef{\ifx\lastnode\relax\else \expandafter\expandafter\expandafter\appendixsetref{\lastnode}\fi -\let\lastnode=\relax} +\global\let\lastnode=\relax} \let\refill=\relax @@ -846,7 +865,7 @@ \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} \def\inforef #1{\inforefzzz #1,,,,**} -\def\inforefzzz #1,#2,#3,#4**{See Info file \file{\ignorespaces #3{}}, +\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} \message{fonts,} @@ -1504,7 +1523,7 @@ \def\itemize{\parsearg\itemizezzz} \def\itemizezzz #1{% - \begingroup % ended by the @end itemize + \begingroup % ended by the @end itemsize \itemizey {#1}{\Eitemize} } @@ -1712,6 +1731,32 @@ \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} \def\indexdummies{% +% Take care of the plain tex accent commands. +\def\"{\realbackslash "}% +\def\`{\realbackslash `}% +\def\'{\realbackslash '}% +\def\^{\realbackslash ^}% +\def\~{\realbackslash ~}% +\def\={\realbackslash =}% +\def\b{\realbackslash b}% +\def\c{\realbackslash c}% +\def\d{\realbackslash d}% +\def\u{\realbackslash u}% +\def\v{\realbackslash v}% +\def\H{\realbackslash H}% +% Take care of the plain tex special European modified letters. +\def\oe{\realbackslash oe}% +\def\ae{\realbackslash ae}% +\def\aa{\realbackslash aa}% +\def\OE{\realbackslash OE}% +\def\AE{\realbackslash AE}% +\def\AA{\realbackslash AA}% +\def\o{\realbackslash o}% +\def\O{\realbackslash O}% +\def\l{\realbackslash l}% +\def\L{\realbackslash L}% +\def\ss{\realbackslash ss}% +% Take care of texinfo commands likely to appear in an index entry. \def\_{{\realbackslash _}}% \def\w{\realbackslash w }% \def\bf{\realbackslash bf }% @@ -1749,6 +1794,31 @@ \def\indexdummydots{...} \def\indexnofonts{% +% Just ignore accents. +\let\"=\indexdummyfont +\let\`=\indexdummyfont +\let\'=\indexdummyfont +\let\^=\indexdummyfont +\let\~=\indexdummyfont +\let\==\indexdummyfont +\let\b=\indexdummyfont +\let\c=\indexdummyfont +\let\d=\indexdummyfont +\let\u=\indexdummyfont +\let\v=\indexdummyfont +\let\H=\indexdummyfont +% Take care of the plain tex special European modified letters. +\def\oe{oe}% +\def\ae{ae}% +\def\aa{aa}% +\def\OE{OE}% +\def\AE{AE}% +\def\AA{AA}% +\def\o{o}% +\def\O{O}% +\def\l{l}% +\def\L{L}% +\def\ss{ss}% \let\w=\indexdummyfont \let\t=\indexdummyfont \let\r=\indexdummyfont @@ -2223,7 +2293,7 @@ \gdef\thischaptername{#1}% % We don't substitute the actual chapter name into \thischapter % because we don't want its macros evaluated now. -\xdef\thischapter{Chapter \the\chapno: \noexpand\thischaptername}% +\xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% {\chapternofonts% \edef\temp{{\realbackslash chapentry {#1}{\the\chapno}{\noexpand\folio}}}% \escapechar=`\\% @@ -2239,13 +2309,13 @@ \def\appendixzzz #1{\seccheck{appendix}% \secno=0 \subsecno=0 \subsubsecno=0 \global\advance \appendixno by 1 \message{Appendix \appendixletter}% -\chapmacro {#1}{Appendix \appendixletter}% +\chapmacro {#1}{\putwordAppendix{} \appendixletter}% \gdef\thissection{#1}% \gdef\thischaptername{#1}% -\xdef\thischapter{Appendix \appendixletter: \noexpand\thischaptername}% +\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% {\chapternofonts% \edef\temp{{\realbackslash chapentry - {#1}{Appendix \appendixletter}{\noexpand\folio}}}% + {#1}{\putwordAppendix{} \appendixletter}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \appendixnoderef % @@ -2611,7 +2681,7 @@ % Normal (long) toc. \outer\def\contents{% - \startcontents{Table of Contents}% + \startcontents{\putwordTableofContents}% \input \jobname.toc \endgroup \vfill \eject @@ -2619,7 +2689,7 @@ % And just the chapters. \outer\def\summarycontents{% - \startcontents{Short Contents}% + \startcontents{\putwordShortContents}% % \let\chapentry = \shortchapentry \let\unnumbchapentry = \shortunnumberedentry @@ -2658,7 +2728,7 @@ % We could simplify the code here by writing out an \appendixentry % command in the toc file for appendices, instead of using \chapentry % for both, but it doesn't seem worth it. -\setbox0 = \hbox{\shortcontrm Appendix } +\setbox0 = \hbox{\shortcontrm \putwordAppendix } \newdimen\shortappendixwidth \shortappendixwidth = \wd0 \def\shortchaplabel#1{% @@ -2812,6 +2882,7 @@ \catcode`\>=12 \escapechar=`\\ % +\let\~=\ptextilde \let\{=\ptexlbrace \let\}=\ptexrbrace \let\.=\ptexdot @@ -2986,9 +3057,9 @@ \let\Esmallexample = \nonfillfinish % % Smaller interline space and fonts for small examples. - \baselineskip 10pt + \setleading{10pt}% \indexfonts \tt - \rawbackslash % output the \ character from the current font + \rawbackslash % make \ output the \ character from the current font (tt) \gobble } @@ -3533,13 +3604,13 @@ % file, #5 the name of the printed manual. All but the node name can be % omitted. % -\def\pxref#1{see \xrefX[#1,,,,,,,]} -\def\xref#1{See \xrefX[#1,,,,,,,]} +\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} +\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup% \def\printedmanual{\ignorespaces #5}% \def\printednodename{\ignorespaces #3}% -% +\def\correctnodename{{\normalturnoffactive\printednodename}}% \setbox1=\hbox{\printedmanual}% \setbox0=\hbox{\printednodename}% \ifdim \wd0=0pt% @@ -3569,10 +3640,10 @@ % the node name again, so it is as if TeX is seeing it for the first % time. \ifdim \wd1>0pt -section ``\printednodename'' in \cite{\printedmanual}% +\putwordsection{} ``\correctnodename'' in \cite{\printedmanual}% \else% \turnoffactive% -\refx{#1-snt}{} [\printednodename], page\tie\refx{#1-pg}{}% +\refx{#1-snt}{} [\correctnodename], \putwordpage\tie\refx{#1-pg}{}% \fi \endgroup} @@ -3599,21 +3670,21 @@ \def\Ynothing{} \def\Ysectionnumberandtype{% -\ifnum\secno=0 Chapter\xreftie\the\chapno % -\else \ifnum \subsecno=0 Section\xreftie\the\chapno.\the\secno % +\ifnum\secno=0 \putwordChapter\xreftie\the\chapno % +\else \ifnum \subsecno=0 \putwordSection\xreftie\the\chapno.\the\secno % \else \ifnum \subsubsecno=0 % -Section\xreftie\the\chapno.\the\secno.\the\subsecno % +\putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno % \else % -Section\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno % +\putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno % \fi \fi \fi } \def\Yappendixletterandtype{% -\ifnum\secno=0 Appendix\xreftie'char\the\appendixno{}% -\else \ifnum \subsecno=0 Section\xreftie'char\the\appendixno.\the\secno % +\ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}% +\else \ifnum \subsecno=0 \putwordSection\xreftie'char\the\appendixno.\the\secno % \else \ifnum \subsubsecno=0 % -Section\xreftie'char\the\appendixno.\the\secno.\the\subsecno % +\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno % \else % -Section\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno % +\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno % \fi \fi \fi } \gdef\xreftie{'tie} @@ -3896,6 +3967,8 @@ \global\tolerance=700 \global\hfuzz=1pt \global\contentsrightmargin=0pt +\global\deftypemargin=0pt +\global\defbodyindent=.5cm \global\pagewidth=\hsize \global\pageheight=\vsize @@ -3993,17 +4066,6 @@ %\catcode 27=\active %\def^^[{$\diamondsuit$} -% Used sometimes to turn off (effectively) the active characters -% even after parsing them. -\def\turnoffactive{\let"=\normaldoublequote -\let~=\normaltilde -\let^=\normalcaret -\let_=\normalunderscore -\let|=\normalverticalbar -\let<=\normalless -\let>=\normalgreater -\let+=\normalplus} - % Set up an active definition for =, but don't enable it most of the time. {\catcode`\==\active \global\def={{\tt \char 61}}} @@ -4027,6 +4089,28 @@ % \catcode 17=0 % Define control-q \catcode`\\=\active + +% Used sometimes to turn off (effectively) the active characters +% even after parsing them. +@def@turnoffactive{@let"=@normaldoublequote +@let\=@realbackslash +@let~=@normaltilde +@let^=@normalcaret +@let_=@normalunderscore +@let|=@normalverticalbar +@let<=@normalless +@let>=@normalgreater +@let+=@normalplus} + +@def@normalturnoffactive{@let"=@normaldoublequote +@let\=@normalbackslash +@let~=@normaltilde +@let^=@normalcaret +@let_=@normalunderscore +@let|=@normalverticalbar +@let<=@normalless +@let>=@normalgreater +@let+=@normalplus} % If a .fmt file is being used, we don't want the `\input texinfo' to show up. % That is what \eatinput is for; after that, the `\' should revert to printing diff -ruN make-3.70/variable.c make-3.71/variable.c --- make-3.70/variable.c Thu Aug 19 16:36:05 1993 +++ make-3.71/variable.c Tue Apr 5 06:09:14 1994 @@ -1,5 +1,5 @@ /* Internals of variables for GNU Make. -Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. +Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -381,12 +381,12 @@ /* Define the magic D and F variables in terms of the automatic variables they are variations of. */ - define_variable ("@D", 2, "$(dir $@)", o_automatic, 1); - define_variable ("%D", 2, "$(dir $%)", o_automatic, 1); - define_variable ("*D", 2, "$(dir $*)", o_automatic, 1); - define_variable (" beg && isblank (end[-1])) + --end; p = next_token (p); /* Expand the name, so "$(foo)bar = baz" works. */ @@ -631,7 +631,7 @@ case bogus: /* Should not be possible. */ abort (); - break; + return 0; case simple: /* A simple variable definition "var := value". Expand the value. */ value = variable_expand (p); diff -ruN make-3.70/variable.h make-3.71/variable.h --- make-3.70/variable.h Tue Dec 22 18:44:09 1992 +++ make-3.71/variable.h Wed Mar 23 09:14:49 1994 @@ -1,4 +1,5 @@ -/* Copyright (C) 1988, 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Definitions for using variables in GNU Make. +Copyright (C) 1988, 1989, 1990, 1991, 1992 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify diff -ruN make-3.70/version.c make-3.71/version.c --- make-3.70/version.c Mon Jan 3 17:50:25 1994 +++ make-3.71/version.c Sat May 21 16:30:28 1994 @@ -1,4 +1,4 @@ -char *version_string = "3.70"; +char *version_string = "3.71"; /* Local variables: diff -ruN make-3.70/vpath.c make-3.71/vpath.c --- make-3.70/vpath.c Wed Dec 22 23:42:29 1993 +++ make-3.71/vpath.c Wed Mar 23 09:14:56 1994 @@ -1,4 +1,5 @@ -/* Copyright (C) 1988, 1989, 1991, 1992, 1993 Free Software Foundation, Inc. +/* Implementation of pattern-matching file search paths for GNU Make. +Copyright (C) 1988, 1989, 1991, 1992, 1993 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify