]> arthur.barton.de Git - ngircd-alex.git/blob - configure.in
- Version auf 0.1.1-pre im CVS angehoben.
[ngircd-alex.git] / configure.in
1 #
2 # ngIRCd -- The Next Generation IRC Daemon
3 # Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
4 #
5 # Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen
6 # der GNU General Public License (GPL), wie von der Free Software Foundation
7 # herausgegeben, weitergeben und/oder modifizieren, entweder unter Version 2
8 # der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version.
9 # Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
10 # der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
11 #
12 # $Id: configure.in,v 1.23 2002/01/29 01:07:15 alex Exp $
13 #
14 # $Log: configure.in,v $
15 # Revision 1.23  2002/01/29 01:07:15  alex
16 # - Version auf 0.1.1-pre im CVS angehoben.
17 #
18 # Revision 1.22  2002/01/29 00:24:17  alex
19 # - Version 0.0.1
20 #
21 # Revision 1.21  2002/01/16 23:06:16  alex
22 # - Version auf 0.0.4-pre im CVS angehoben.
23 #
24 # Revision 1.20  2002/01/16 22:55:45  alex
25 # - Version 0.0.3
26 #
27 # Revision 1.19  2002/01/06 16:21:09  alex
28 # - CVS-Version auf "0.0.3-pre" angehoben.
29 #
30 # Revision 1.18  2002/01/06 16:09:37  alex
31 # - Version 0.0.2
32 #
33 # Revision 1.17  2002/01/05 15:53:20  alex
34 # - Test auf Header "arpa/inet.h" und Funktion inet_aton() hinzugefuegt (BeOS).
35 #
36 # Revision 1.16  2002/01/02 13:41:36  alex
37 # - CFLAGS wird nur noch gesetzt, wenn der GCC verwendet wird.
38 #
39 # Revision 1.15  2002/01/02 02:52:09  alex
40 # - Copyright-Texte angepasst ;-)
41 #
42 # Revision 1.14  2001/12/31 16:11:13  alex
43 # - CVS-Version auf "0.0.2-pre" angehoben.
44 #
45 # Revision 1.13  2001/12/31 16:02:30  alex
46 # - Version 0.0.1
47 #
48 # Revision 1.12  2001/12/31 02:21:00  alex
49 # - "doc"-Unterverzeichnis aufgenommen.
50 #
51 # Revision 1.11  2001/12/29 03:04:06  alex
52 # - neue configure-Option "--enable-strict-rfc".
53 #
54 # Revision 1.10  2001/12/27 16:25:36  alex
55 # - neue configure-Option "--with-portab=DIR".
56 #
57 # Revision 1.9  2001/12/27 02:08:38  alex
58 # - da fehlte an zwei Stellen ein AC_MSG_ERROR ... ups!
59 #
60 # Revision 1.8  2001/12/27 01:44:49  alex
61 # - die Verwendung von syslog kann nun abgeschaltet werden.
62 #
63 # Revision 1.7  2001/12/27 00:37:07  alex
64 # - Erkennung der "portab header" geaendert, CFLAGS werden nun anders gesetzt.
65 #
66 # Revision 1.6  2001/12/25 22:01:47  alex
67 # - neue configure-Option "--enable-sniffer".
68 #
69 # Revision 1.5  2001/12/21 23:54:26  alex
70 # - zusaetzliche Debug-Ausgaben koennen eingeschaltet werden.
71 #
72 # Revision 1.4  2001/12/12 17:21:58  alex
73 # - Projektdatei fuer den Mac OS X Project Builder erstellt.
74 #
75 # Revision 1.3  2001/12/12 01:58:53  alex
76 # - Test auf socklen_t verbessert.
77 #
78 # Revision 1.2  2001/12/11 22:04:21  alex
79 # - Test auf stdint.h (HAVE_STDINT_H) hinzugefuegt.
80 #
81 # Revision 1.1.1.1  2001/12/11 21:53:04  alex
82 # Imported sources to CVS.
83 #
84
85 # -- Initialisierung --
86
87 AC_INIT
88 AC_CONFIG_SRCDIR(src/ngircd/ngircd.c)
89 AM_INIT_AUTOMAKE(ngircd,0.1.1-pre)
90 AM_CONFIG_HEADER(src/config.h)
91
92 # -- Variablen --
93
94 # -- C Compiler --
95
96 AC_PROG_CC
97 AC_LANG_C
98
99 # -- Hilfsprogramme --
100
101 AC_PROG_AWK
102 AC_PROG_INSTALL
103 AC_PROG_LN_S
104 AC_PROG_MAKE_SET
105 AC_PROG_RANLIB
106
107 # -- Header --
108
109 AC_HEADER_STDC
110
111 AC_HEADER_TIME
112
113 AC_ARG_WITH(portab,
114         [  --with-portab=DIR       search the "portab headers" in DIR],
115         [       if test "x$withval" != "xno"; then
116                         CFLAGS="$CFLAGS -I${withval}"
117                         if test -f ${withval}/portab.h; then
118                                 AC_MSG_RESULT([searching "portab headers" in ${withval}...])
119                         else
120                                 AC_MSG_ERROR([${withval}/portab.h not found!])
121                         fi
122                 else
123                         AC_MSG_ERROR([Can't disable Alex \"portability headers\"!])
124                 fi
125         ],
126         [       AC_CHECK_HEADER(portab.h,[
127                         AC_CHECK_HEADER(imp.h,,AC_MSG_ERROR([Alex \"portability headers\" (portab.h an friends) not found!]))
128                         AC_CHECK_HEADER(exp.h,,AC_MSG_ERROR([Alex \"portability headers\" (portab.h an friends) not found!]))
129                 ],[
130                         AC_CHECK_HEADER(/usr/local/include/portab.h,,AC_MSG_ERROR([Alex \"portability headers\" (portab.h an friends) not found!]))
131                         AC_CHECK_HEADER(/usr/local/include/imp.h,,AC_MSG_ERROR([Alex \"portability headers\" (portab.h an friends) not found!]))
132                         AC_CHECK_HEADER(/usr/local/include/exp.h,,AC_MSG_ERROR([Alex \"portability headers\" (portab.h an friends) not found!]))
133                         CFLAGS="$CFLAGS -I/usr/local/include"
134                 ])
135         ]
136 )
137
138 AC_CHECK_HEADERS([ \
139         errno.h fcntl.h netinet/in.h string.h \
140         sys/socket.h sys/time.h unistd.h \
141         ],,AC_MSG_ERROR([required C header missing!]))
142
143 AC_CHECK_HEADERS(arpa/inet.h)
144
145 # -- Datentypen --
146
147 AC_MSG_CHECKING(whether socklen_t exists)
148 AC_TRY_COMPILE([
149         #include <sys/socket.h>
150         #include <sys/types.h>
151         ],[
152         socklen_t a, b;
153         a = 2; b = 4; a += b;
154         ],[
155         AC_DEFINE(HAVE_socklen_t) AC_MSG_RESULT(yes)
156         ],[
157         AC_MSG_RESULT(no)
158 ])
159
160 # -- Funktionen --
161
162 AC_FUNC_MALLOC
163
164 AC_CHECK_FUNCS([ \
165         gethostname inet_ntoa memmove memset select \
166         socket strcasecmp strchr strerror strstr waitpid \
167         ],,AC_MSG_ERROR([required function missing!]))
168
169 AC_CHECK_FUNCS(inet_aton)
170
171 # -- Libraries --
172
173 # -- Konfigurationsoptionen --
174
175 AC_ARG_ENABLE(syslog,
176         [  --disable-syslog        disable syslog (autodetected by default)],
177         [       if test "$enableval" = "yes"; then
178                         AC_CHECK_HEADER(syslog.h,AC_DEFINE(USE_SYSLOG, 1),AC_MSG_ERROR([Can't enable syslog: syslog.h not found!]))
179                 else
180                         AC_MSG_RESULT([disabling syslog])
181                 fi
182         ],
183         [       AC_CHECK_HEADER(syslog.h,AC_DEFINE(USE_SYSLOG, 1))
184         ]
185 )
186
187 AC_ARG_ENABLE(strict-rfc,
188         [  --enable-strict-rfc     strict RFC conformance, may break clients],
189         if test "$enableval" = "yes"; then
190                 AC_DEFINE(STRICT_RFC, 1)
191                 AC_MSG_RESULT([enabling strict RFC conformance])
192         fi
193 )
194
195 AC_ARG_ENABLE(sniffer,
196         [  --enable-sniffer        enable network traffic monitor (enables debug mode!)],
197         if test "$enableval" = "yes"; then
198                 AC_DEFINE(SNIFFER, 1)
199                 AC_MSG_RESULT([enabling network traffic monitor])
200                 x_debug_on=yes
201         fi
202 )
203
204 AC_ARG_ENABLE(debug,
205         [  --enable-debug          show additional debug output],
206         if test "$enableval" = "yes"; then x_debug_on=yes; fi
207 )
208 if test "$x_debug_on" = "yes"; then
209         AC_DEFINE(DEBUG, 1)
210         AC_MSG_RESULT([enabling additional debug output])
211 fi
212
213 # -- Variablen II --
214
215 if test "$GCC" = "yes"; then
216         CFLAGS="-Wall $CFLAGS"
217 fi
218
219 # -- Ausgabe --
220
221 AC_OUTPUT([ \
222         Makefile \
223         doc/Makefile \
224         MacOSX/Makefile \
225         MacOSX/ngircd.pbproj/Makefile \
226         src/Makefile \
227         src/ngircd/Makefile \
228 ])
229
230 # -eof-