Repository navigation
Expand file tree
/
Copy pathconfigure.in
More file actions
210 lines (174 loc) · 6.55 KB
/
Copy pathconfigure.in
File metadata and controls
210 lines (174 loc) · 6.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_INIT(IRC Gateway, 1.0, evilnet-devel@lists.sourceforge.net)
AC_CONFIG_SRCDIR([src/gw_webirc.c])
AC_PREFIX_DEFAULT([$HOME])
# Set the default prefix
AC_MSG_CHECKING([for installation prefix])
AC_CACHE_VAL(unet_cv_prefix, [unet_cv_prefix=$HOME])
if test x"$prefix" != xNONE; then
unet_cv_prefix=$prefix
fi
AC_MSG_RESULT([$unet_cv_prefix])
# HACK WARNING: We are referencing an autoconf internal variable. This is
# the only way to force the prefix to be retrieved from the config.cache
# file!
ac_default_prefix=$unet_cv_prefix
AC_PREREQ(2.61)
AC_CONFIG_HEADER([config.h])
# Determine some default directory names
#
# HACK WARNING: We are referencing an autoconf internal variable. This is
# the only way to figure out what value $prefix will have when we go to do
# the install--and the only way we can stick that value in our definitions
# of SPATH, etc.
# Deal with the annoying value "NONE" here
unet_save_prefix=$prefix
if test x"$prefix" = xNONE; then
prefix=$ac_default_prefix
else
prefix=$prefix
fi
unet_save_exec_prefix=$exec_prefix
if test x"$exec_prefix" = xNONE; then
exec_prefix=$prefix
else
exec_prefix=$exec_prefix
fi
# Obtain the actual interesting directories
unet_bindir=`eval echo "$bindir"`
unet_libdir=`eval echo "$libdir"`
# Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_AWK
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_PATH_PROGS(RMPROG, rm, /bin/rm)
AC_PATH_PROGS(SHPROG, sh, /bin/sh)
AC_MSG_CHECKING([for donuts])
AC_MSG_RESULT([yes])
dnl --with-mode lets us set the permissions on the binary
AC_MSG_CHECKING([what permissions to set on the installed binary])
AC_ARG_WITH([mode],
[ --with-mode=mode Permissions (in octal) to give the binary],
[unet_cv_with_mode=$with_mode],
[AC_CACHE_VAL(unet_cv_with_mode,
[unet_cv_with_mode=711])])
if test x"$unet_cv_with_mode" = xyes -o x"$unet_cv_with_mode" = xno; then
unet_cv_with_mode=711
fi
AC_MSG_RESULT([$unet_cv_with_mode])
IRCMODE=$unet_cv_with_mode
AC_SUBST(IRCMODE)
dnl --with-owner lets us set the owner of the binary
changequote(,)dnl
unet_uid=`id | sed -e 's/.*uid=[0-9]*(//' -e 's/).*//' 2> /dev/null`
changequote([,])dnl
AC_MSG_CHECKING([which user should own the installed binary])
AC_ARG_WITH([owner],
[ --with-owner=owner Specify owner of the installed binary],
[unet_cv_with_owner=$with_owner],
[AC_CACHE_VAL(unet_cv_with_owner,
[unet_cv_with_owner=$unet_uid])])
if test x"$unet_cv_with_owner" = xyes -o x"$unet_cv_with_owner" = xno; then
unet_cv_with_owner=$unet_uid
fi
AC_MSG_RESULT([$unet_cv_with_owner])
IRCOWN=$unet_cv_with_owner
AC_SUBST(IRCOWN)
dnl --with-group lets us set the group owner of the binary
changequote(,)dnl
unet_gid=`id | sed -e 's/.*gid=[0-9]*(//' -e 's/).*//' 2> /dev/null`
changequote([,])dnl
AC_MSG_CHECKING([which group should own the installed binary])
AC_ARG_WITH([group],
[ --with-group=group Specify group owner of the installed binary],
[unet_cv_with_group=$with_group],
[AC_CACHE_VAL(unet_cv_with_group,
[unet_cv_with_group=$unet_gid])])
if test x"$unet_cv_with_group" = xyes -o x"$unet_cv_with_group" = xno; then
unet_cv_with_group=$unet_gid
fi
AC_MSG_RESULT([$unet_cv_with_group])
IRCGRP=$unet_cv_with_group
AC_SUBST(IRCGRP)
# Checks for libraries.
AC_MSG_CHECKING([for OpenSSL includes])
AC_ARG_WITH([openssl-includes],
AS_HELP_STRING([--with-openssl-includes=dir], [Specify location of OpenSSL header files (default: /usr/include)]),
[base_ssl_inc=$withval],
[base_ssl_inc=/usr/include])
[unet_cv_with_openssl_inc_prefix=$base_ssl_inc]
AC_MSG_RESULT([$unet_cv_with_openssl_inc_prefix])
AC_DEFINE_UNQUOTED(SSL_INCLUDES_PATH, "$base_ssl_inc", [Path name used as a base for the ssl include files.])
AC_MSG_CHECKING([for OpenSSL libraries])
AC_ARG_WITH([openssl-libs],
AS_HELP_STRING([--with-openssl-libs=dir], [Specify location of OpenSSL libs (default: /usr/lib)]),
[unet_cv_with_openssl_prefix=$withval],
[unet_cv_with_openssl_prefix=/usr/lib])
AC_MSG_RESULT([$unet_cv_with_openssl_prefix])
AC_DEFINE_UNQUOTED(SSL_LIBS_PATH, "$unet_cv_with_openssl_prefix", [Path name used as a base for the ssl lib files.])
AC_MSG_CHECKING([for Kerberos includes])
AC_ARG_WITH([kerberos-includes],
AS_HELP_STRING([--with-kerb-includes=dir], [Specify location of Kerberos includes (default: /usr/kerberos/include)]),
[unet_cv_with_kerberos_prefix=$withval],
[unet_cv_with_kerberos_prefix=/usr/kerberos/include])
AC_MSG_RESULT([$unet_cv_with_kerberos_prefix])
AC_CHECK_LIB(ssl, SSL_read, [
AC_CHECK_LIB(crypto, X509_new, [
AC_CHECK_HEADERS($base_ssl_inc/openssl/ssl.h $base_ssl_inc/openssl/err.h, [
no_ssl="yes";
])
])
])
if test "x$no_ssl" = yes; then
AC_MSG_ERROR([Unable to find OpenSSL, Maybe you need to install the openssl and libssl-dev package, or use --with-openssl-includes and --with-openssl-libs if you have openssl installed in an odd location])
fi
dnl --with-dpath sets the all-important DPATH
AC_MSG_CHECKING([what the data directory should be])
AC_ARG_WITH([dpath],
[ --with-dpath=dir Directory for all server data files],
[unet_cv_with_dpath=$with_dpath],
[AC_CACHE_VAL(unet_cv_with_dpath,
[unet_cv_with_dpath=$unet_libdir])])
if test x"$unet_cv_with_dpath" = xyes -o x"$unet_cv_with_dpath" = xno; then
unet_cv_with_dpath=$unet_libdir
fi
# Ensure there are no trailing /'s to mess us up
unet_cv_with_dpath=`echo "$unet_cv_with_dpath" | sed 's%/*$%%'`
AC_MSG_RESULT([$unet_cv_with_dpath])
if test x"$unet_cv_with_chroot" != xno; then
if echo "$unet_cv_with_dpath" | grep "^$unet_cv_with_chroot" > /dev/null 2>&1; then
unet_dpath=`echo "$unet_cv_with_dpath" | sed "s%^$unet_cv_with_chroot%%"`
else
AC_MSG_ERROR([Data directory $unet_cv_with_dpath not relative to root directory $unet_cv_with_chroot])
fi
else
unet_dpath=$unet_cv_with_dpath
fi
AC_DEFINE_UNQUOTED(DPATH, "$unet_dpath", [Path to data directory])
DPATH=$unet_cv_with_dpath
AC_SUBST(DPATH)
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_PID_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([bzero gethostbyaddr memset select socket strcasecmp strdup strerror strstr])
AC_CONFIG_FILES([Makefile
src/Makefile])
AC_CONFIG_COMMANDS([default],[[echo timestamp > stamp-h]],[[]])
AC_OUTPUT