* aclocal.m4, missing: new files, also swiped from automake
authorNathan Bryant <loanshark@uncensored.citadel.org>
Wed, 28 Oct 1998 22:25:31 +0000 (22:25 +0000)
committerNathan Bryant <loanshark@uncensored.citadel.org>
Wed, 28 Oct 1998 22:25:31 +0000 (22:25 +0000)
        * 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
citadel/Makefile.in
citadel/aclocal.m4 [new file with mode: 0644]
citadel/citadel.c
citadel/configure.in
citadel/missing [new file with mode: 0755]

index 7f1efcd955d047ab8237bb7c02bcdfb0289f4ad1..f6800a06d944d2c0b7a6822c24eeeab6e999d9dd 100644 (file)
@@ -1,6 +1,11 @@
 1998-10-28 Nathan Bryant <bryant@cs.usm.maine.edu>
        * 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 <ajc@uncnsrd.mt-kisco.ny.us>
        * Unified the "unpacked database" format for both upgrades and
index 312b356da34b427edaf11613a005ea31e2204e37..d116f7372b27a60045d8d98ae0d48047d0fbd23b 100644 (file)
@@ -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 (file)
index 0000000..365b968
--- /dev/null
@@ -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)])
+
index f0ee9303644b938e1eb0a63e83ad3d1caa336140..51a00e6e87ca1fb2f3de1b4d8c155d43e0000b1c 100644 (file)
@@ -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);
index 5c8e1a9d4f5a0cc1d9dfb9c64216d193017f52c7..f22898b1283ecc1e920cd68da7f6dd9ca5de2c6e 100644 (file)
@@ -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 (executable)
index 0000000..cbe2b0e
--- /dev/null
@@ -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 <pinard@iro.umontreal.ca>, 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