| 1 | dnl Process this file with autoconf to produce a configure script. |
|---|
| 2 | AC_INIT(src/console.h) |
|---|
| 3 | AC_CONFIG_HEADER(config.h) |
|---|
| 4 | |
|---|
| 5 | dnl All versioning is done via these defines |
|---|
| 6 | PACKAGE="Licq-Console" |
|---|
| 7 | VERSION=0.01 |
|---|
| 8 | |
|---|
| 9 | dnl Chuck #defines for PACKAGE and VERSION into config.h |
|---|
| 10 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") |
|---|
| 11 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION") |
|---|
| 12 | AC_DEFINE_UNQUOTED(INT_VERSION,$INT_VERSION) |
|---|
| 13 | |
|---|
| 14 | dnl Also substitute PACKAGE and VERSION in the AC_OUTPUT files |
|---|
| 15 | AC_SUBST(PACKAGE) |
|---|
| 16 | AC_SUBST(VERSION) |
|---|
| 17 | |
|---|
| 18 | dnl Checks for programs. |
|---|
| 19 | AC_PROG_CC |
|---|
| 20 | AC_PROG_CPP |
|---|
| 21 | AC_PROG_CXX |
|---|
| 22 | AC_PROG_CXXCPP |
|---|
| 23 | AC_ISC_POSIX |
|---|
| 24 | AC_PROG_MAKE_SET |
|---|
| 25 | AC_PROG_INSTALL |
|---|
| 26 | AC_PATH_PROG(PROG_STRIP,strip,:) |
|---|
| 27 | AC_PATH_PROG(PROG_SIZE,size,:) |
|---|
| 28 | |
|---|
| 29 | dnl Checks for header files. |
|---|
| 30 | AC_HEADER_STDC |
|---|
| 31 | AC_CHECK_HEADERS(errno.h dirent.h getopt.h malloc.h pwd.h sys/time.h) |
|---|
| 32 | AC_HEADER_TIME |
|---|
| 33 | AC_SYS_ERRLIST |
|---|
| 34 | AC_CHECK_LICQ |
|---|
| 35 | |
|---|
| 36 | if test "$have_licq_inc" = no; then |
|---|
| 37 | AC_MSG_ERROR([ |
|---|
| 38 | |
|---|
| 39 | I can't find the Licq header files. |
|---|
| 40 | You must unpack this archive into the plugins/ directory off of the |
|---|
| 41 | main Licq source tree. In other words, we should be in |
|---|
| 42 | /some/dir/licq-0.xx/plugins/console-0.xx right now. |
|---|
| 43 | ]) |
|---|
| 44 | fi |
|---|
| 45 | |
|---|
| 46 | |
|---|
| 47 | dnl Checks for library functions. |
|---|
| 48 | #AC_CHECK_LIB(xnet,inet_addr) |
|---|
| 49 | #AC_CHECK_LIB(socket, socket) |
|---|
| 50 | #AC_CHECK_LIB(nsl, gethostbyname) |
|---|
| 51 | AC_CHECK_FUNCS(inet_addr inet_aton strerror) |
|---|
| 52 | |
|---|
| 53 | dnl Switch to C++ mode and check for needed C++ headers |
|---|
| 54 | AC_LANG_SAVE |
|---|
| 55 | AC_LANG_CPLUSPLUS |
|---|
| 56 | |
|---|
| 57 | AC_CHECK_LIB(stdc++, getc,, |
|---|
| 58 | AC_MSG_ERROR(You need to have libstdc++ installed)) |
|---|
| 59 | AC_CHECK_HEADER(vector.h,, |
|---|
| 60 | AC_MSG_ERROR(You need to have the libstdc++ headers installed)) |
|---|
| 61 | |
|---|
| 62 | AC_LANG_RESTORE |
|---|
| 63 | |
|---|
| 64 | dnl Checks for typedefs, structures, and compiler characteristics. |
|---|
| 65 | AC_C_CONST |
|---|
| 66 | |
|---|
| 67 | AC_OUTPUT( |
|---|
| 68 | src/Makefile |
|---|
| 69 | Makefile) |
|---|