d758333b066f6fa7490212ea567f139e77a72f3b
[silc.git] / apps / silcd / configure.ad
1 #ifdef SILC_DIST_SERVER
2 #
3 #  silcd/configure.ad
4 #
5 #  Author: Pekka Riikonen <priikone@silcnet.org>
6 #
7 #  Copyright (C) 2000 - 2005 Pekka Riikonen
8 #
9 #  This program is free software; you can redistribute it and/or modify
10 #  it under the terms of the GNU General Public License as published by
11 #  the Free Software Foundation; version 2 of the License.
12 #
13 #  This program is distributed in the hope that it will be useful,
14 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 #  GNU General Public License for more details.
17 #
18
19 # Logs directory
20 #
21 LOGSDIR="$silc_prefix/logs"
22 AC_ARG_WITH(logsdir,
23   [[  --with-logsdir=DIR      directory for SILC Server logs [PREFIX/logs]]],
24   [
25     case "$withval" in
26       no|yes)
27         ;;
28       *)
29         LOGSDIR="$withval"
30         ;;
31     esac
32   ])
33 AC_SUBST(LOGSDIR)
34 AC_DEFINE_UNQUOTED([SILC_LOGSDIR], "$LOGSDIR", [SILC_LOGSDIR])
35
36 # silcd config file checking
37 #
38 summary_silcd_configfile="/etc/silc/silcd.conf"
39 AC_ARG_WITH(silcd-config-file,
40   [[  --with-silcd-config-file=FILE  use FILE as default configuration file
41                                  for SILC Server [/etc/silc/silcd.conf]]],
42     AC_DEFINE_UNQUOTED([SILC_SERVER_CONFIG_FILE], "$withval", [SILC_SERVER_CONFIG_FILE])
43     summary_silcd_configfile="$withval"
44   )
45
46 # silcd pid file checking
47 #
48 if test "x$localstatedir" != 'x${prefix}/var'; then
49   PIDFILE="$localstatedir/silcd.pid"
50 else
51   PIDFILE="$silc_prefix/var/silcd.pid"
52 fi
53
54 AC_ARG_WITH(silcd-pid-file,
55   [[  --with-silcd-pid-file=FILE     use FILE as default pid file for SILC
56                                  Server [/var/run/silcd.pid]]],
57   [
58     case "$withval" in
59       no|yes)
60         ;;
61       *)
62         PIDFILE="$withval"
63         ;;
64     esac
65   ])
66 AC_SUBST(PIDFILE)
67
68 #ifdef SILC_DIST_TOOLKIT
69 if test x$without_silcd = xfalse ; then
70 #endif SILC_DIST_TOOLKIT
71   AC_CONFIG_FILES(
72 silcd/Makefile
73 doc/example_silcd.conf
74 )
75 #ifdef SILC_DIST_TOOLKIT
76 fi
77 #endif SILC_DIST_TOOLKIT
78
79 silcd="yes"
80 #endif SILC_DIST_SERVER