]>
Commit | Line | Data |
---|---|---|
dd60ff8b | 1 | dnl Process this file with autoconf to produce a configure script. |
2 | AC_INIT(src/login.c) | |
fe214d24 | 3 | AM_INIT_AUTOMAKE(libfaim, 0.99.2) |
dd60ff8b | 4 | |
60c74d0f | 5 | AC_PREFIX_DEFAULT(/usr) |
dd60ff8b | 6 | AM_CONFIG_HEADER(include/libfaim_config.h) |
7 | ||
8 | dnl Checks for programs. | |
9 | AC_PROG_CC | |
10 | AC_PROG_CXX | |
11 | AC_PROG_INSTALL | |
12 | AC_PROG_LN_S | |
13 | AC_PROG_MAKE_SET | |
14 | AC_PROG_RANLIB | |
15 | AM_PROG_LIBTOOL | |
16 | ||
17 | dnl Checks for libraries. | |
18 | dnl Replace `main' with a function in -lfaim: | |
19 | AC_CHECK_LIB(faim, aim_sessioninit) | |
20 | dnl Replace `main' with a function in -lpcap: | |
21 | dnl AC_CHECK_LIB(pcap, main) | |
22 | ||
7daf4a38 | 23 | LIBTOOL="$LIBTOOL --silent" |
24 | ||
646c6b52 | 25 | AC_ARG_ENABLE(debug, [ --disable-debug compile without debugging options],enable_debug=no,enable_debug=yes) |
26 | ||
27 | if test "$enable_debug" = yes ; then | |
28 | CFLAGS="$CFLAGS -Wall -g" | |
29 | fi | |
30 | ||
dd60ff8b | 31 | dnl Checks for header files. |
32 | AC_HEADER_STDC | |
33 | AC_HEADER_SYS_WAIT | |
34 | AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h) | |
35 | ||
36 | dnl Checks for typedefs, structures, and compiler characteristics. | |
37 | AC_C_CONST | |
38 | AC_C_INLINE | |
39 | AC_TYPE_PID_T | |
40 | AC_TYPE_SIZE_T | |
41 | AC_HEADER_TIME | |
42 | AC_STRUCT_TM | |
43 | ||
44 | dnl Checks for library functions. | |
45 | AC_FUNC_MEMCMP | |
46 | AC_TYPE_SIGNAL | |
47 | AC_FUNC_STRFTIME | |
48 | AC_FUNC_VPRINTF | |
49 | AC_CHECK_FUNCS(gethostname gettimeofday select socket strdup strstr strtol uname) | |
50 | ||
b562f484 | 51 | AC_CHECK_LIB(readline, rl_callback_handler_install, |
01836aac | 52 | READLINELIB="-lreadline -lcurses", |
66413340 | 53 | AC_MSG_ERROR(unable to find GNU readline), |
54 | "-lcurses" | |
b562f484 | 55 | ) |
56 | ||
57 | AC_SUBST(CFLAGS) | |
58 | AC_SUBST(READLINELIB) | |
59 | ||
dd60ff8b | 60 | AC_OUTPUT([ |
61 | Makefile | |
62 | include/Makefile | |
63 | src/Makefile | |
64 | utils/Makefile | |
65 | utils/faimtest/Makefile | |
66 | ]) | |
67 |