From f41998ac9327b6faa20c29796cd57d5498ab405d Mon Sep 17 00:00:00 2001 From: Nathan Bryant Date: Wed, 28 Oct 1998 22:25:31 +0000 Subject: [PATCH] * aclocal.m4, missing: new files, also swiped from automake * citadel.c: don't mung the terminal if we can't find citadel.rc * Makefile.in: added `install' target, `clean' removes *.mo, rebuild configure when configure.in changes. * configure.in: check for install and autoconf --- citadel/ChangeLog | 5 ++ citadel/Makefile.in | 47 +++++++++-- citadel/aclocal.m4 | 28 +++++++ citadel/citadel.c | 2 +- citadel/configure.in | 3 + citadel/missing | 188 +++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 264 insertions(+), 9 deletions(-) create mode 100644 citadel/aclocal.m4 create mode 100755 citadel/missing diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 7f1efcd95..f6800a06d 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,6 +1,11 @@ 1998-10-28 Nathan Bryant * configure.in: added comments * mkinstalldirs: new file to be used for `make install' + * aclocal.m4, missing: new files, also swiped from automake + * citadel.c: don't mung the terminal if we can't find citadel.rc + * Makefile.in: added `install' target, `clean' removes + *.mo, rebuild configure when configure.in changes. + * configure.in: check for install and autoconf Tue Oct 27 22:25:42 EST 1998 Art Cancro * Unified the "unpacked database" format for both upgrades and diff --git a/citadel/Makefile.in b/citadel/Makefile.in index 312b356da..d116f7372 100644 --- a/citadel/Makefile.in +++ b/citadel/Makefile.in @@ -22,8 +22,11 @@ SERV_MODULES=modules/serv_chat.so modules/serv_test.so UTIL_TARGETS=aidepost netmailer netproc netsetup msgform \ readlog rcit stats citmail netpoll mailinglist userlist PROXY_TARGETS=proxy -DEFS=@DEFS@ + +prefix=@prefix@ srcdir=@srcdir@ + +DEFS=@DEFS@ CPPFLAGS=@CPPFLAGS@ -I. CFLAGS=@CFLAGS@ CC=@CC@ @@ -32,9 +35,15 @@ LDFLAGS=@LDFLAGS@ SERVER_LDFLAGS=@SERVER_LDFLAGS@ CURSES=@CURSES@ SNPRINTF=@SNPRINTF@ -VPATH=$(srcdir) - PTHREAD_DEFS=-D_REENTRANT +INSTALL=@INSTALL@ +INSTALL_DATA=@INSTALL_DATA@ +SHELL=/bin/sh +AUTOCONF=@AUTOCONF@ + +# End configuration section + +VPATH=$(srcdir) SOURCES=aidepost.c citadel.c citmail.c citserver.c client_chat.c commands.c \ config.c control.c cux2ascii.c database.c dynloader.c file_ops.c \ @@ -108,7 +117,6 @@ aidepost: aidepost.o config.o # netmailer: netmailer.o internetmail.o config.o $(CC) netmailer.o config.o internetmail.o $(LDFLAGS) -o netmailer - chmod 4755 netmailer netproc: netproc.o config.o ipc_c_tcp.o $(CC) netproc.o config.o ipc_c_tcp.o $(LDFLAGS) -o netproc @@ -120,7 +128,6 @@ citmail: citmail.o config.o internetmail.o @echo "* set this program to be your local mail delivery agent." @echo "*" $(CC) citmail.o config.o internetmail.o $(LDFLAGS) -o citmail - chmod 4755 citmail mailinglist: mailinglist.o config.o internetmail.o $(CC) mailinglist.o config.o internetmail.o $(LDFLAGS) -o mailinglist @@ -157,8 +164,26 @@ rcit: rcit.o config.o stats: stats.o config.o $(CC) stats.o config.o $(LDFLAGS) -o stats +install: all + for i in modules techdoc bio bitbucket files help images info \ + messages network/spoolin network/spoolout network/systems \ + userpics; do \ + ./mkinstalldirs $(prefix)/$$i; \ + done + for i in $(CLIENT_TARGETS) $(SERVER_TARGETS) $(UTIL_TARGETS) \ + $(PROXY_TARGETS) $(SERV_MODULES) utilsmenu weekly \ + dnetsetup; do \ + test -f $$i && $(INSTALL) $$i $(prefix)/$$i; \ + done + test -f netmailer && chmod 4755 $(prefix)/netmailer $(prefix)/citmail + for i in *.txt citadel.rc public_clients \ + `find help messages network techdoc -type f | \ + grep -v CVS`; do \ + $(INSTALL_DATA) $$i $(prefix)/$$i; \ + done + clean: - rm -f *.o *.ro + rm -f *.o *.ro *.mo cleaner: clean rm -f $(CLIENT_TARGETS) $(SERVER_TARGETS) $(UTIL_TARGETS) \ @@ -171,7 +196,13 @@ distclean: cleaner $(CC) -M $(CPPFLAGS) $< | sed -e 's!$*.o!$*.o $*.ro $*.mo $@!' > $@ test -s $@ || rm -f $@ -Makefile: Makefile.in - CONFIG_FILES=Makefile CONFIG_HEADERS= ./config.status +Makefile: $(srcdir)/Makefile.in config.status + CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status + +config.status: $(srcdir)/configure + $(SHELL) ./config.status --recheck + +$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/aclocal.m4 + cd $(srcdir) && $(AUTOCONF) -include $(DEP_FILES) diff --git a/citadel/aclocal.m4 b/citadel/aclocal.m4 new file mode 100644 index 000000000..365b96881 --- /dev/null +++ b/citadel/aclocal.m4 @@ -0,0 +1,28 @@ +dnl aclocal.m4 generated automatically by aclocal 1.3b + +dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without +dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A +dnl PARTICULAR PURPOSE. + +dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) +dnl The program must properly implement --version. +AC_DEFUN(AM_MISSING_PROG, +[AC_MSG_CHECKING(for working $2) +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if ($2 --version) < /dev/null > /dev/null 2>&1; then + $1=$2 + AC_MSG_RESULT(found) +else + $1="$3/missing $2" + AC_MSG_RESULT(missing) +fi +AC_SUBST($1)]) + diff --git a/citadel/citadel.c b/citadel/citadel.c index f0ee93036..51a00e6e8 100644 --- a/citadel/citadel.c +++ b/citadel/citadel.c @@ -799,8 +799,8 @@ char aaa[100],bbb[100],ccc[100],eee[100]; /* general purpose variables */ char argbuf[32]; /* command line buf */ -load_command_set(); /* parse the citadel.rc file */ sttybbs(SB_SAVE); /* Store the old terminal parameters */ +load_command_set(); /* parse the citadel.rc file */ sttybbs(SB_NO_INTR); /* Install the new ones */ signal(SIGINT,SIG_IGN); signal(SIGQUIT,SIG_IGN); diff --git a/citadel/configure.in b/citadel/configure.in index 5c8e1a9d4..f22898b12 100644 --- a/citadel/configure.in +++ b/citadel/configure.in @@ -40,6 +40,9 @@ if test "$GCC" = yes; then SERVER_LDFLAGS=-rdynamic fi AC_PROG_RANLIB +AC_PROG_INSTALL +missing_dir=`cd $ac_aux_dir && pwd` +AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) dnl Checks for libraries. diff --git a/citadel/missing b/citadel/missing new file mode 100755 index 000000000..cbe2b0ef0 --- /dev/null +++ b/citadel/missing @@ -0,0 +1,188 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. +# Copyright (C) 1996, 1997 Free Software Foundation, Inc. +# Franc,ois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +case "$1" in + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + yacc create \`y.tab.[ch]', if possible, from existing .[ch]" + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing - GNU libit 0.0" + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + + aclocal) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acinclude.m4' or \`configure.in'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`configure.in'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acconfig.h' or \`configure.in'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in` + if test -z "$files"; then + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in` + test -z "$files" || files="$files.in" + else + files=`echo "$files" | sed -e 's/:/ /g'` + fi + test -z "$files" && files="config.h.in" + touch $files + ;; + + automake) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print \ + | sed 's/^\(.*\).am$/touch \1.in/' \ + | sh + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if [ ! -f y.tab.h ]; then + echo >y.tab.h + fi + if [ ! -f y.tab.c ]; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if [ ! -f lex.yy.c ]; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` + fi + touch $file + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and you do not seem to have it handy on your + system. You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequirements for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 -- 2.39.2