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