Mercurial > noffle
comparison configure.in @ 43:2842f50feb55 noffle
[svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
control.c, control.h, database.c, database.h, dynamicstring.c,
dynamicstring.h, fetch.c, fetch.h, fetchlist.c, fetchlist.h, group.c,
group.h, itemlist.c, itemlist.h, lock.c, lock.h, log.c, log.h, noffle.c,
online.c, online.h, outgoing.c, outgoing.h, over.c, over.h, post.c, post.h,
protocol.c, protocol.h, pseudo.c, pseudo.h, request.c, request.h, server.c,
server.h, util.c, util.h, wildmat.c, wildmat.h: Moved files to the
subdirectory src/
* Makefile.am, acconfig.h, configure.in, docs/Makefile.am, src/Makefile.am,
Makefile.in, aclocal.m4, config.h.in, configure, install-sh, missing,
mkinstalldirs, stamp-h.in, docs/Makefile.in, src/Makefile.in: Added files.
They are used by aclocal, autoheader, autoconf and automake.
* src/config.c, src/config.h: Renamed to configfile.c and configfile.h,
because configure will generate a config.h file itself.
* src/client.c, src/content.c, src/database.c, src/fetch.c, src/fetchlist.c,
src/group.c, src/lock.c, src/noffle.c, src/online.c, src/outgoing.c,
src/over.c, src/pseudo.c, src/request.c, src/server.c, src/util.c:
Changed '#include "config.h"' to '#include "configfile.h"'.
* src/client.c, src/content.c, src/database.c, src/fetch.c, src/fetchlist.c,
src/group.c, src/lock.c, src/online.c, src/outgoing.c, src/post.c,
src/protocol.c, src/request.c, src/server.c: Files now #include <config.h>.
Added missing <stdio.h>. This removes the warnings about snprintf() not
being declared.
* Makefile: Removed. This is now generated by configure.
author | uh1763 |
---|---|
date | Fri, 05 May 2000 22:45:56 +0100 |
parents | |
children | 32ba1198c6fa |
comparison
equal
deleted
inserted
replaced
42:2467ff423c15 | 43:2842f50feb55 |
---|---|
1 dnl --------------------------------------------------------------------------- | |
2 dnl Process this file with autoconf to produce a configure script. | |
3 dnl --------------------------------------------------------------------------- | |
4 | |
5 AC_INIT(src/noffle.c) | |
6 | |
7 AC_PREREQ(2.13) | |
8 | |
9 PACKAGE=noffle | |
10 VERSION=1.0pre6 | |
11 | |
12 AM_CONFIG_HEADER(config.h) | |
13 AM_INIT_AUTOMAKE($PACKAGE,$VERSION) | |
14 | |
15 dnl AM_MAINTAINER_MODE | |
16 | |
17 AC_DEFINE(_GNU_SOURCE) | |
18 | |
19 AC_LANG_C | |
20 | |
21 | |
22 dnl --------------------------------------------------------------------------- | |
23 dnl Checks for programs. | |
24 dnl --------------------------------------------------------------------------- | |
25 | |
26 AC_PROG_CC | |
27 AC_PROG_GCC_TRADITIONAL | |
28 AC_PROG_INSTALL | |
29 AC_PROG_MAKE_SET | |
30 | |
31 | |
32 dnl --------------------------------------------------------------------------- | |
33 dnl System checks. | |
34 dnl --------------------------------------------------------------------------- | |
35 | |
36 AC_AIX | |
37 AC_ISC_POSIX | |
38 AC_MINIX | |
39 | |
40 | |
41 dnl --------------------------------------------------------------------------- | |
42 dnl Checks for libraries. | |
43 dnl --------------------------------------------------------------------------- | |
44 | |
45 # Whenever both -lsocket and -lnsl are needed, it seems to be always the | |
46 # case that gethostbyname requires -lnsl. So, check -lnsl first, for it | |
47 # to be in LIBS before the setsockopt checks are performed. *However*, | |
48 # on SINIX-N 5.43, this is false, and gethostent seems to be a better | |
49 # candidate. So, let's use it below instead of gethostbyname, and see. | |
50 | |
51 # [ This is ripped from GNU tar. ] | |
52 | |
53 AC_CHECK_FUNC(gethostent) | |
54 if test $ac_cv_func_gethostent = no; then | |
55 AC_CHECK_LIB(nsl, gethostent) | |
56 fi | |
57 AC_CHECK_FUNC(setsockopt) | |
58 if test $ac_cv_func_setsockopt = no; then | |
59 AC_CHECK_LIB(socket, setsockopt) | |
60 fi | |
61 | |
62 | |
63 AC_CHECK_LIB(gdbm, gdbm_open) | |
64 | |
65 | |
66 dnl --------------------------------------------------------------------------- | |
67 dnl Checks for header files. | |
68 dnl --------------------------------------------------------------------------- | |
69 | |
70 AC_HEADER_STDC | |
71 AC_HEADER_DIRENT | |
72 AC_CHECK_HEADERS(gdbm.h syslog.h sys/resource.h sys/utsname.h) | |
73 AC_CHECK_HEADERS(fnmatch.h errno.h getopt.h time.h sys/time.h signal.h) | |
74 AC_CHECK_HEADERS(netdb.h sys/socket.h fcntl.h limits.h unistd.h) | |
75 | |
76 | |
77 dnl --------------------------------------------------------------------------- | |
78 dnl Checks for typedefs, structures, and compiler characteristics. | |
79 dnl --------------------------------------------------------------------------- | |
80 | |
81 AC_C_CONST | |
82 AC_TYPE_SIZE_T | |
83 AC_HEADER_TIME | |
84 AC_STRUCT_TM | |
85 | |
86 AC_CACHE_CHECK(socklen_t, noffle_cv_type_socklen_t, | |
87 AC_TRY_COMPILE([ | |
88 #include <sys/types.h> | |
89 #include <sys/socket.h> | |
90 ], [ socklen_t s; ], | |
91 noffle_cv_type_socklen_t=yes, noffle_cv_type_socklen_t=no) | |
92 ) | |
93 | |
94 if test "x$noffle_cv_type_socklen_t" = "xno" | |
95 then | |
96 AC_DEFINE_UNQUOTED(socklen_t, unsigned int) | |
97 fi | |
98 | |
99 | |
100 dnl --------------------------------------------------------------------------- | |
101 dnl Checks for library functions. | |
102 dnl --------------------------------------------------------------------------- | |
103 | |
104 AC_TYPE_SIGNAL | |
105 AC_FUNC_STRFTIME | |
106 AC_FUNC_FNMATCH | |
107 AC_CHECK_FUNCS(fdopen vsnprintf snprintf __vsnprintf __snprintf) | |
108 AC_CHECK_FUNCS(gethostname mkdir mktime select socket strerror strstr uname) | |
109 | |
110 | |
111 dnl --------------------------------------------------------------------------- | |
112 dnl Checks for system services. | |
113 dnl --------------------------------------------------------------------------- | |
114 | |
115 | |
116 dnl --------------------------------------------------------------------------- | |
117 dnl Handle user-specified configure options | |
118 dnl --------------------------------------------------------------------------- | |
119 | |
120 AC_ARG_ENABLE(debug, [ | |
121 NOFFLE options: | |
122 --enable-debug turn on debugging (default=yes)], , | |
123 enable_debug=yes) | |
124 | |
125 if test "x$enable_debug" = "xyes" | |
126 then | |
127 CFLAGS="$CFLAGS \ | |
128 -Wall -O2 -g -pedantic -ansi -W -Wtraditional -Wshadow -Wpointer-arith \ | |
129 -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion \ | |
130 -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes \ | |
131 -Wmissing-declarations -Wnested-externs -Winline \ | |
132 -D__USE_BSD -D__USE_XOPEN_EXTENDED -D__USE_POSIX -DDEBUG" | |
133 fi | |
134 | |
135 | |
136 # [ This is adapted from mutt. ] | |
137 AC_ARG_WITH(docdir, | |
138 [ --with-docdir=PATH specify where to put the documentation | |
139 ], [noffle_cv_docdir=$withval], | |
140 [ AC_CACHE_CHECK(where to put the documentation, noffle_cv_docdir, | |
141 [if test x$prefix = xNONE; then | |
142 noffle_cv_prefix=$ac_default_prefix | |
143 else | |
144 noffle_cv_prefix=$prefix | |
145 fi | |
146 noffle_cv_docdir=$noffle_cv_prefix/doc/noffle | |
147 ]) | |
148 ]) | |
149 | |
150 | |
151 dnl --------------------------------------------------------------------------- | |
152 dnl Unquoted defines and substituted variables. | |
153 dnl --------------------------------------------------------------------------- | |
154 | |
155 CONFIGFILE="/etc/noffle.conf" | |
156 AC_DEFINE_UNQUOTED(CONFIGFILE,"$CONFIGFILE") | |
157 AC_SUBST(CONFIGFILE) | |
158 | |
159 dnl NOFFLE_EXPAND_DIR(VARNAME, DIR) | |
160 dnl expands occurrences of ${prefix} and ${exec_prefix} in the given DIR, | |
161 dnl and assigns the resulting string to VARNAME | |
162 dnl example: NOFFLE_EXPAND_DIR(LOCALEDIR, "$datadir/locale") | |
163 dnl eg, then: AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR") | |
164 dnl by Alexandre Oliva | |
165 dnl from http://www.cygnus.com/ml/automake/1998-Aug/0040.html | |
166 AC_DEFUN(NOFFLE_EXPAND_DIR, [ | |
167 $1=$2 | |
168 $1=`( | |
169 test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
170 test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" | |
171 eval echo \""[$]$1"\" | |
172 )` | |
173 ]) | |
174 | |
175 SPOOLDIR="/var/spool/$PACKAGE" | |
176 AC_DEFINE_UNQUOTED(SPOOLDIR, "$SPOOLDIR") | |
177 AC_SUBST(SPOOLDIR) | |
178 | |
179 DOCDIR=$noffle_cv_docdir | |
180 AC_SUBST(DOCDIR) | |
181 | |
182 | |
183 dnl --------------------------------------------------------------------------- | |
184 dnl Output files. | |
185 dnl --------------------------------------------------------------------------- | |
186 | |
187 AC_OUTPUT(Makefile src/Makefile docs/Makefile) | |
188 |