updates.
authorPekka Riikonen <priikone@silcnet.org>
Sat, 7 Apr 2001 22:52:30 +0000 (22:52 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 7 Apr 2001 22:52:30 +0000 (22:52 +0000)
CHANGES
Makefile.am
apps/silcd/Makefile.am
configure.in.pre

diff --git a/CHANGES b/CHANGES
index de5661dd0ef80f5668c07d462d67c4f39854f25f..05f1a0c92c4d454132814a51d31bee54198035e0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+Sun Apr  8 01:37:21 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+       * Made preliminary `make install' work.
+
 Thu Apr  5 17:42:30 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
 
        * Added SilcServerRekey context into silcd/idlist.h.
index 2b898b92b1e5e40a01394ba285438958e7498644..e51b999f00bab8d2a5ec351198f8e5e59f1d7aec 100644 (file)
@@ -3,7 +3,7 @@
 #
 #  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
 #
-#  Copyright (C) 2000 Pekka Riikonen
+#  Copyright (C) 2000 - 2001 Pekka Riikonen
 #
 #  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
@@ -27,3 +27,36 @@ dist-bzip: distdir
        -rm -rf $(distdir)
 
 EXTRA_DIST = CHANGES CREDITS
+
+#
+# Installing of SILC into the system
+#
+
+modulesdir = $(prefix)/@MODULESDIR@
+helpdir = $(prefix)/@HELPDIR@
+docdir = $(prefix)/@DOCDIR@
+etcdir = @ETCDIR@
+
+install-dirs:
+       -mkdir -p $(etcdir)
+       -mkdir -p $(modulesdir)
+       -mkdir -p $(helpdir)
+       -mkdir -p $(docdir)
+
+generate-server-key:
+       -umask 022;
+       -echo Generating SILC Server key into $(etcdir)
+       -$(sbindir)/silcd -k $(etcdir)
+
+sim-install:
+       -echo Installing SIM modules into $(modulesdir)
+       -cp -fR $(srcdir)/lib/silcsim/modules/*.so $(modulesdir)/
+
+doc-install:
+       -cp -fR $(srcdir)/doc/* $(docdir)/
+
+etc-install:
+       -cp -fR $(srcdir)/doc/example_silcd.conf $(etcdir)/silcd.conf
+       -cp -fR $(srcdir)/doc/example_silc.conf $(etcdir)/silc.conf
+
+install-data-hook: install-dirs generate-server-key sim-install doc-install
index b3ca5ab1399f5f3a8d13eb0a4440ae5355c9c50c..ea704ecae753d7bfe57d0b5ff71a8333eb9965de 100644 (file)
@@ -18,7 +18,7 @@
 
 AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign
 
-bin_PROGRAMS = silcd
+sbin_PROGRAMS = silcd
 
 silcd_SOURCES = \
        protocol.c \
index ef6b11a0a4d4165b73c4dc69ad874016d9299186..2f764855f29a778bc79e3dae5fb2fe658799a0f2 100644 (file)
@@ -116,6 +116,77 @@ AC_CHECK_HEADERS(dlfcn.h,
     AC_MSG_RESULT(no SIM support found)),
   AC_MSG_RESULT(no SIM support found))
 
+#
+# Installation
+#
+
+# Default installation destination
+AC_PREFIX_DEFAULT(/usr/local/silc/)
+
+# etc directory
+ETCDIR="/etc/silc"
+AC_ARG_WITH(etcdir,
+[  --with-etcdir[=PATH]    Directory for system files [/etc/silc]],
+[ case "$withval" in
+  no)
+    ;;
+  yes)
+    ;;
+  *)
+    ETCDIR="$withwal"
+    ;;
+  esac ],
+)
+AC_SUBST(ETCDIR)
+
+# help directory
+HELPDIR="help"
+AC_ARG_WITH(helpdir,
+[  --with-helpdir[=PATH]   Directory for SILC help files [PREFIX/help]],
+[ case "$withval" in
+  no)
+    ;;
+  yes)
+    ;;
+  *)
+    HELPDIR="$withwal"
+    ;;
+  esac ],
+)
+AC_SUBST(HELPDIR)
+
+# doc directory
+DOCDIR="doc"
+AC_ARG_WITH(docdir,
+[  --with-docdir[=PATH]    Directory for SILC documentation [PREFIX/doc]],
+[ case "$withval" in
+  no)
+    ;;
+  yes)
+    ;;
+  *)
+    DOCDIR="$withwal"
+    ;;
+  esac ],
+)
+AC_SUBST(DOCDIR)
+
+# SIM modules directory
+MODULESDIR="modules"
+AC_ARG_WITH(simdir,
+[  --with-simdir[=PATH]    Directory for SIM modules [PREFIX/modules]],
+[ case "$withval" in
+  no)
+    ;;
+  yes)
+    ;;
+  *)
+    MODULESDIR="$withwal"
+    ;;
+  esac ],
+)
+AC_SUBST(MODULESDIR)
+
 # Debug checking
 AC_MSG_CHECKING(for enabled debugging)
 AC_ARG_ENABLE(debug,