Merged silc_1_0_branch to trunk.
[silc.git] / apps / silcd / configure.ad
1 #ifdef SILC_DIST_SERVER
2 #
3 #  apps/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 SILCD_SUBDIR=
20
21 #ifdef SILC_DIST_TOOLKIT
22 if test x$without_silcd = xfalse; then
23 #endif SILC_DIST_TOOLKIT
24
25 SILCD_SUBDIR=silcd
26
27 # Logs directory
28 #
29 LOGSDIR="$silc_prefix/logs"
30 AC_ARG_WITH(logsdir,
31   [[  --with-logsdir=DIR      directory for SILC Server logs [PREFIX/logs]]],
32   [
33     case "$withval" in
34       no|yes)
35         ;;
36       *)
37         LOGSDIR="$withval"
38         ;;
39     esac
40   ])
41 AC_SUBST(LOGSDIR)
42 AC_DEFINE_UNQUOTED([SILC_LOGSDIR], "$LOGSDIR", [SILC_LOGSDIR])
43
44 # silcd config file checking
45 #
46 summary_silcd_configfile="/etc/silc/silcd.conf"
47 AC_ARG_WITH(silcd-config-file,
48   [[  --with-silcd-config-file=FILE  use FILE as default configuration file
49                                  for SILC Server [/etc/silc/silcd.conf]]],
50     AC_DEFINE_UNQUOTED([SILC_SERVER_CONFIG_FILE], "$withval", [SILC_SERVER_CONFIG_FILE])
51     summary_silcd_configfile="$withval"
52   )
53
54 # silcd pid file checking
55 #
56 if test "x$localstatedir" != 'x${prefix}/var'; then
57   PIDFILE="$localstatedir/silcd.pid"
58 else
59   PIDFILE="$silc_prefix/var/silcd.pid"
60 fi
61
62 AC_ARG_WITH(silcd-pid-file,
63   [[  --with-silcd-pid-file=FILE     use FILE as default pid file for SILC
64                                  Server [/var/run/silcd.pid]]],
65   [
66     case "$withval" in
67       no|yes)
68         ;;
69       *)
70         PIDFILE="$withval"
71         ;;
72     esac
73   ])
74 AC_SUBST(PIDFILE)
75
76 AC_CONFIG_FILES(
77 apps/silcd/Makefile
78 doc/example_silcd.conf
79 )
80
81 silcd="yes"
82 #ifdef SILC_DIST_TOOLKIT
83 fi      # without_silcd = false
84 #endif SILC_DIST_TOOLKIT
85
86 AC_SUBST(SILCD_SUBDIR)
87 #endif SILC_DIST_SERVER