]> arthur.barton.de Git - ngircd-alex.git/blob - configure.in
- Signal-Handler fuer SIGCHLD: so sollten Zombies nicht mehr vorkommen.
[ngircd-alex.git] / configure.in
1 #
2 # ngIRCd -- The Next Generation IRC Daemon
3 # Copyright (c)2001 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.14 2001/12/31 16:11:13 alex Exp $
13 #
14 # $Log: configure.in,v $
15 # Revision 1.14  2001/12/31 16:11:13  alex
16 # - CVS-Version auf "0.0.2-pre" angehoben.
17 #
18 # Revision 1.13  2001/12/31 16:02:30  alex
19 # - Version 0.0.1
20 #
21 # Revision 1.12  2001/12/31 02:21:00  alex
22 # - "doc"-Unterverzeichnis aufgenommen.
23 #
24 # Revision 1.11  2001/12/29 03:04:06  alex
25 # - neue configure-Option "--enable-strict-rfc".
26 #
27 # Revision 1.10  2001/12/27 16:25:36  alex
28 # - neue configure-Option "--with-portab=DIR".
29 #
30 # Revision 1.9  2001/12/27 02:08:38  alex
31 # - da fehlte an zwei Stellen ein AC_MSG_ERROR ... ups!
32 #
33 # Revision 1.8  2001/12/27 01:44:49  alex
34 # - die Verwendung von syslog kann nun abgeschaltet werden.
35 #
36 # Revision 1.7  2001/12/27 00:37:07  alex
37 # - Erkennung der "portab header" geaendert, CFLAGS werden nun anders gesetzt.
38 #
39 # Revision 1.6  2001/12/25 22:01:47  alex
40 # - neue configure-Option "--enable-sniffer".
41 #
42 # Revision 1.5  2001/12/21 23:54:26  alex
43 # - zusaetzliche Debug-Ausgaben koennen eingeschaltet werden.
44 #
45 # Revision 1.4  2001/12/12 17:21:58  alex
46 # - Projektdatei fuer den Mac OS X Project Builder erstellt.
47 #
48 # Revision 1.3  2001/12/12 01:58:53  alex
49 # - Test auf socklen_t verbessert.
50 #
51 # Revision 1.2  2001/12/11 22:04:21  alex
52 # - Test auf stdint.h (HAVE_STDINT_H) hinzugefuegt.
53 #
54 # Revision 1.1.1.1  2001/12/11 21:53:04  alex
55 # Imported sources to CVS.
56 #
57
58 # -- Initialisierung --
59
60 AC_INIT
61 AC_CONFIG_SRCDIR(src/ngircd/ngircd.c)
62 AM_INIT_AUTOMAKE(ngircd,0.0.2-pre)
63 AM_CONFIG_HEADER(src/config.h)
64
65 # -- Variablen --
66
67 CFLAGS="-Wall -g $CFLAGS"
68
69 # -- C Compiler --
70
71 AC_PROG_CC
72 AC_LANG_C
73
74 # -- Hilfsprogramme --
75
76 AC_PROG_AWK
77 AC_PROG_INSTALL
78 AC_PROG_LN_S
79 AC_PROG_MAKE_SET
80 AC_PROG_RANLIB
81
82 # -- Header --
83
84 AC_HEADER_STDC
85
86 AC_HEADER_TIME
87
88 AC_ARG_WITH(portab,
89         [  --with-portab=DIR       search the "portab headers" in DIR],
90         [       if test "x$withval" != "xno"; then
91                         CFLAGS="$CFLAGS -I${withval}"
92                         if test -f ${withval}/portab.h; then
93                                 AC_MSG_RESULT([searching "portab headers" in ${withval}...])
94                         else
95                                 AC_MSG_ERROR([${withval}/portab.h not found!])
96                         fi
97                 else
98                         AC_MSG_ERROR([Can't disable Alex \"portability headers\"!])
99                 fi
100         ],
101         [       AC_CHECK_HEADER(portab.h,[
102                         AC_CHECK_HEADER(imp.h,,AC_MSG_ERROR([Alex \"portability headers\" (portab.h an friends) not found!]))
103                         AC_CHECK_HEADER(exp.h,,AC_MSG_ERROR([Alex \"portability headers\" (portab.h an friends) not found!]))
104                 ],[
105                         AC_CHECK_HEADER(/usr/local/include/portab.h,,AC_MSG_ERROR([Alex \"portability headers\" (portab.h an friends) not found!]))
106                         AC_CHECK_HEADER(/usr/local/include/imp.h,,AC_MSG_ERROR([Alex \"portability headers\" (portab.h an friends) not found!]))
107                         AC_CHECK_HEADER(/usr/local/include/exp.h,,AC_MSG_ERROR([Alex \"portability headers\" (portab.h an friends) not found!]))
108                         CFLAGS="$CFLAGS -I/usr/local/include"
109                 ])
110         ]
111 )
112
113 AC_CHECK_HEADERS([ \
114         arpa/inet.h errno.h fcntl.h netinet/in.h string.h \
115         sys/socket.h sys/time.h unistd.h \
116         ],,AC_MSG_ERROR([required C header missing!]))
117
118 # -- Datentypen --
119
120 AC_MSG_CHECKING(whether socklen_t exists)
121 AC_TRY_COMPILE([
122         #include <sys/socket.h>
123         #include <sys/types.h>
124         ],[
125         socklen_t a, b;
126         a = 2; b = 4; a += b;
127         ],[
128         AC_DEFINE(HAVE_socklen_t) AC_MSG_RESULT(yes)
129         ],[
130         AC_MSG_RESULT(no)
131 ])
132
133 # -- Funktionen --
134
135 AC_FUNC_MALLOC
136
137 AC_CHECK_FUNCS([ \
138         gethostname inet_ntoa memmove memset select \
139         socket strcasecmp strchr strerror strstr \
140         ],,AC_MSG_ERROR([required function missing!]))
141
142 # -- Libraries --
143
144 # -- Konfigurationsoptionen --
145
146 AC_ARG_ENABLE(syslog,
147         [  --disable-syslog        disable syslog (autodetected by default)],
148         [       if test "$enableval" = "yes"; then
149                         AC_CHECK_HEADER(syslog.h,AC_DEFINE(USE_SYSLOG, 1),AC_MSG_ERROR([Can't enable syslog: syslog.h not found!]))
150                 else
151                         AC_MSG_RESULT([disabling syslog])
152                 fi
153         ],
154         [       AC_CHECK_HEADER(syslog.h,AC_DEFINE(USE_SYSLOG, 1))
155         ]
156 )
157
158 AC_ARG_ENABLE(strict-rfc,
159         [  --enable-strict-rfc     strict RFC conformance, may break clients],
160         if test "$enableval" = "yes"; then
161                 AC_DEFINE(STRICT_RFC, 1)
162                 AC_MSG_RESULT([enabling strict RFC conformance])
163         fi
164 )
165
166 AC_ARG_ENABLE(debug,
167         [  --enable-debug          show additional debug output],
168         if test "$enableval" = "yes"; then
169                 AC_DEFINE(DEBUG, 1)
170                 AC_MSG_RESULT([enabling additional debug output])
171         fi
172 )
173
174 AC_ARG_ENABLE(sniffer,
175         [  --enable-sniffer        enable network traffic monitor (enables debug mode!)],
176         if test "$enableval" = "yes"; then
177                 AC_DEFINE(DEBUG, 1)
178                 AC_MSG_RESULT([enabling additional debug output])
179                 AC_DEFINE(SNIFFER, 1)
180                 AC_MSG_RESULT([enabling network traffic monitor])
181         fi
182 )
183
184 # -- Ausgabe --
185
186 AC_OUTPUT([ \
187         Makefile \
188         doc/Makefile \
189         MacOSX/Makefile \
190         MacOSX/ngircd.pbproj/Makefile \
191         src/Makefile \
192         src/ngircd/Makefile \
193 ])
194
195 # -eof-