+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.
#
# 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
-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
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,