source: trunk/third/jwgc/configure.in @ 22412

Revision 22412, 7.6 KB checked in by ghudson, 19 years ago (diff)
Stop using autoconf internal variables for the result of AC_PATH_X. It doesn't work when x_includes/x_libraries is already set in the environment. Use the documented output variables instead.
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(Jabber Windowgram Client,
3        beta5,
4        jadestorm@users.sourceforge.net,
5        jwgc)
6AC_CONFIG_SRCDIR([config.h.in])
7AM_CONFIG_HEADER([config.h])
8AC_CANONICAL_HOST
9AM_INIT_AUTOMAKE
10
11dnl OS specific options.
12case "$host" in
13*-*-netbsd*)
14        need_dash_r=1
15        ;;
16*-*-solaris*)
17        need_dash_r=1
18        ;;
19esac
20
21dnl Custom args we care about.
22AC_ARG_WITH(default-server,
23[  --with-default-server=SERVER          change default server (jabber.org)],
24[
25        AC_DEFINE_UNQUOTED([DEFSERVER], "$withval",
26                [Default server (other than jabber.org)])
27]
28)
29AC_ARG_WITH(default-port,
30[  --with-default-port=PORT              change default port (5222)],
31[
32        AC_DEFINE_UNQUOTED([DEFPORT], "$withval",
33                [Default port (other than 5222)])
34]
35)
36AC_ARG_WITH(default-sslport,
37[  --with-default-sslport=PORT           change default ssl port (5223)],
38[
39        AC_DEFINE_UNQUOTED([DEFSSLPORT], "$withval",
40                [Default ssl port (other than 5223)])
41]
42)
43AC_ARG_WITH(default-resource,
44[  --with-default-resource=RESOURCE      change default resource (jwgc)],
45[
46        AC_DEFINE_UNQUOTED([DEFRESOURCE], "$withval",
47                [Default resource (other than jwgc)])
48]
49)
50AC_ARG_WITH(default-presence,
51[  --with-default-presence=PRESENCE      change default presence (available)],
52[
53        AC_DEFINE_UNQUOTED([DEFPRESENCE], "$withval",
54                [Default presence (other than available)])
55]
56)
57AC_ARG_WITH(default-priority,
58[  --with-default-priority=PRIORITY      change default priority (0)],
59[
60        AC_DEFINE_UNQUOTED([DEFPRIORITY], "$withval",
61                [Default priority (other than 0)])
62]
63)
64AC_ARG_WITH(default-usessl,
65[  --with-default-usessl=BOOL            default ssl usage (false)],
66[
67        AC_DEFINE_UNQUOTED([DEFUSESSL], "$withval",
68                [Default ssl usage (other than false)])
69]
70)
71AC_ARG_WITH(default-usegpg,
72[  --with-default-usegpg=BOOL            default gpg usage (false)],
73[
74        AC_DEFINE_UNQUOTED([DEFUSEGPG], "$withval",
75                [Default gpg usage (other than false)])
76]
77)
78AC_ARG_WITH(desc-user,
79[  --with-desc-user=FILENAME             user desc filename (.jwgc.desc)],
80[
81        AC_DEFINE_UNQUOTED([USRDESC], "$withval",
82                [User desc filename (other than .jwgc.desc)])
83]
84)
85AC_ARG_WITH(desc-default,
86[  --with-desc-default=FILENAME          default desc filename (jwgc.desc)],
87[
88        AC_DEFINE_UNQUOTED([DEFDESC], "$withval",
89                [Default desc filename (other than jwgc.desc)])
90]
91)
92AC_ARG_WITH(vars-default,
93[  --with-vars-default=FILENAME          default vars filename (jwgc.vars)],
94[
95        AC_DEFINE_UNQUOTED([DEFVARS], "$withval",
96                [Default vars filename (other than jwgc.vars)])
97]
98)
99AC_ARG_WITH(vars-user,
100[  --with-vars-user=FILENAME             user vars filename (.jwgc.vars)],
101[
102        AC_DEFINE_UNQUOTED([USRVARS], "$withval",
103                [User vars filename (other than .jwgc.vars)])
104]
105)
106AC_ARG_WITH(vars-fixed,
107[  --with-vars-fixed=FILENAME            fixed vars filename (jwgc.vars.fixed)],
108[
109        AC_DEFINE_UNQUOTED([FIXEDVARS], "$withval",
110                [Fixed vars filename (other than jwgc.vars.fixed)])
111]
112)
113AC_ARG_WITH(ssl-dir,
114[  --with-ssl-dir=PATH                   path to OpenSSL installation],
115[
116        CFLAGS="$CFLAGS -I${withval}/include"
117        CPPFLAGS="$CPPFLAGS -I${withval}/include"
118        LDFLAGS="$LDFLAGS -L${withval}/lib"
119        if test -n "${need_dash_r}"; then
120                LDFLAGS="$LDFLAGS -R${withval}/lib"
121        fi
122]
123)
124AC_ARG_WITH(ssl-include,
125[    --with-ssl-include=PATH               path to OpenSSL header files],
126[
127        CFLAGS="$CFLAGS -I${withval}"
128        CPPFLAGS="$CPPFLAGS -I${withval}"
129]
130)
131AC_ARG_WITH(ssl-lib,
132[    --with-ssl-lib=PATH                   path to OpenSSL libraries],
133[
134        LDFLAGS="$LDFLAGS -L${withval}"
135        if test -n "${need_dash_r}"; then
136                LDFLAGS="$LDFLAGS -R${withval}"
137        fi
138]
139)
140AC_ARG_WITH(gpgme-dir,
141[  --with-gpgme-dir=PATH                   path to GPGME installation],
142[
143        CFLAGS="$CFLAGS -I${withval}/include"
144        CPPFLAGS="$CPPFLAGS -I${withval}/include"
145        LDFLAGS="$LDFLAGS -L${withval}/lib"
146        if test -n "${need_dash_r}"; then
147                LDFLAGS="$LDFLAGS -R${withval}/lib"
148        fi
149]
150)
151AC_ARG_WITH(gpgme-include,
152[    --with-gpgme-include=PATH               path to GPGME header files],
153[
154        CFLAGS="$CFLAGS -I${withval}"
155        CPPFLAGS="$CPPFLAGS -I${withval}"
156]
157)
158AC_ARG_WITH(gpgme-lib,
159[    --with-gpgme-lib=PATH                   path to GPGME libraries],
160[
161        LDFLAGS="$LDFLAGS -L${withval}"
162        if test -n "${need_dash_r}"; then
163                LDFLAGS="$LDFLAGS -R${withval}"
164        fi
165]
166)
167AC_ARG_WITH(iconv-dir,
168[  --with-iconv-dir=PATH                   path to iconv installation],
169[
170        CFLAGS="$CFLAGS -I${withval}/include"
171        CPPFLAGS="$CPPFLAGS -I${withval}/include"
172        LDFLAGS="$LDFLAGS -L${withval}/lib"
173        if test -n "${need_dash_r}"; then
174                LDFLAGS="$LDFLAGS -R${withval}/lib"
175        fi
176]
177)
178AC_ARG_WITH(iconv-include,
179[    --with-iconv-include=PATH               path to iconv header files],
180[
181        CFLAGS="$CFLAGS -I${withval}"
182        CPPFLAGS="$CPPFLAGS -I${withval}"
183]
184)
185AC_ARG_WITH(iconv-lib,
186[    --with-iconv-lib=PATH                   path to iconv libraries],
187[
188        LDFLAGS="$LDFLAGS -L${withval}"
189        if test -n "${need_dash_r}"; then
190                LDFLAGS="$LDFLAGS -R${withval}"
191        fi
192]
193)
194AC_ARG_ENABLE(nodebug,
195[  --enable-nodebug                      disable debugging functionality],
196[
197        AC_DEFINE([NODEBUG], 1,
198                [Disable debugging functionality])
199]
200)
201
202dnl Checks for programs.
203AC_PROG_CC
204AC_PROG_INSTALL
205AC_PROG_AWK
206AC_PROG_YACC
207AC_PROG_RANLIB
208AC_PROG_MAKE_SET
209
210dnl Check some initial paths and such.
211AC_PATH_X
212CFLAGS="$CFLAGS -I${x_includes}"
213CPPFLAGS="$CPPFLAGS -I${x_includes}"
214LDFLAGS="$LDFLAGS -L${x_libraries}"
215if test -n "${need_dash_r}"; then
216        LDFLAGS="$LDFLAGS -R${x_libraries}"
217fi
218
219dnl Checks for libraries.
220AC_CHECK_LIB(X11, XrmInitialize)
221AC_CHECK_LIB(termcap, tgetent)
222AC_FUNC_CHECK(connect, :, [AC_CHECK_LIB(socket, socket)
223                           AC_CHECK_LIB(nsl, gethostbyname)])
224AC_CHECK_LIB(resolv, res_send)
225AC_CHECK_LIB(curses, tgetstr, [TLIB=-lcurses], [TLIB=-ltermcap])
226AC_CHECK_LIB(gen, regcmp, [RLIB=-lgen])
227AC_CHECK_LIB(ssl, kssl_krb5_free_data_contents, [CFLAGS="$CFLAGS -DOPENSSL_NO_KRB5" CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_KRB5" LDFLAGS="$LDFLAGS"])
228AC_CHECK_LIB(ssl, SSL_new)
229AC_CHECK_LIB(crypto, SSLeay)
230AC_CHECK_LIB(gpgme, gpgme_new)
231AC_CHECK_LIB(iconv, libiconv)
232AC_CHECK_LIB(iconv, locale_charset, :, [AC_CHECK_LIB(charset, locale_charset)])
233
234dnl Checks for header files.
235AC_HEADER_STDC
236AC_HEADER_TIME
237AC_HEADER_DIRENT
238AC_HEADER_SYS_WAIT
239AC_CHECK_HEADERS([ \
240        gpgme.h \
241        arpa/inet.h \
242        ctype.h \
243        errno.h \
244        fcntl.h \
245        libgen.h \
246        math.h \
247        netdb.h \
248        netinet/in.h \
249        nameser.h \
250        resolv.h \
251        openssl/ssl.h \
252        pwd.h \
253        regex.h \
254        regexp.h \
255        setjmp.h \
256        signal.h \
257        stdarg.h \
258        stddef.h \
259        stdio.h \
260        stdlib.h \
261        string.h \
262        strings.h \
263        syslog.h \
264        sys/param.h \
265        sys/socket.h \
266        sys/stat.h \
267        sys/time.h \
268        sys/types.h \
269        sys/un.h \
270        termio.h \
271        termios.h \
272        time.h \
273        unistd.h \
274        varargs.h \
275        wait.h \
276        windows.h \
277        iconv.h \
278        libcharset.h \
279])
280
281dnl Checks for typedefs, structures, and compiler characteristics.
282AC_C_CONST
283AC_STRUCT_TM
284AC_TYPE_SIZE_T
285AC_DEFINE_UNQUOTED([MACHINE_TYPE], "$host", [Canonical machine type.])
286
287dnl Checks for library functions.
288AC_FUNC_ERROR_AT_LINE
289AC_FUNC_FORK
290AC_FUNC_GETPGRP
291AC_PROG_GCC_TRADITIONAL
292AC_FUNC_MALLOC
293AC_FUNC_MEMCMP
294AC_FUNC_SETPGRP
295AC_TYPE_SIGNAL
296AC_FUNC_STRFTIME
297AC_FUNC_WAIT3
298AC_CHECK_FUNCS([ \
299        bzero \
300        dup2 \
301        gethostbyname \
302        gethostname \
303        getpass \
304        getpassphrase \
305        gettimeofday \
306        isascii \
307        memmove \
308        memset \
309        modf \
310        re_comp \
311        regcmp \
312        regcomp \
313        select \
314        socket \
315        strcasecmp \
316        strchr \
317        strdup \
318        strerror \
319        strncasecmp \
320        strrchr \
321        strstr \
322        usleep \
323        waitpid \
324])
325
326dnl Create files necessary to compile jwgc.
327AC_CONFIG_FILES([
328        Makefile
329        lib/Makefile
330        lib/libxode/Makefile
331        lib/libjabber/Makefile
332        lib/libjwgc/Makefile
333        clients/Makefile
334        clients/jwgc/Makefile
335        clients/jlocate/Makefile
336        clients/jwrite/Makefile
337        clients/jctl/Makefile
338        clients/jstat/Makefile
339])
340AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.