# $Id$ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) AC_INIT AC_CONFIG_SRCDIR([include/micq.h]) AC_CANONICAL_HOST AM_INIT_AUTOMAKE(micq, 0.4.9) AM_CONFIG_HEADER(include/config.h) AC_DEFINE(MICQ_VERSION,VERSION,[mICQ's current version]) # prefer 2.50 auto{conf,header} AM_MISSING_PROG(AUTOCONFNG, autoconf-2.50, $missing_dir) AM_MISSING_PROG(AUTOHEADERNG, autoheader-2.50, $missing_dir) test "x$AUTOCONFNG" = "xautoconf-2.50" && AUTOCONF="$AUTOCONFNG"; test "x$AUTOHEADERNG" = "xautoheader-2.50" && AUTOHEADER="$AUTOHEADERNG"; # Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_PROG_LN_S # Checks for libraries. AC_CHECK_FUNCS([inet_ntoa getpeername]) if test "x$ac_cv_func_inet_ntoa" = "xno"; then AC_CHECK_LIB(nsl, inet_ntoa) fi if test "x$ac_cv_func_getpeername" = "xno"; then AC_CHECK_LIB(socket, getpeername) fi # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([arpa/inet.h errno.h fcntl.h limits.h netdb.h netinet/in.h sys/ioctl.h sys/socket.h sys/time.h sys/wait.h termios.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM AC_C_BIGENDIAN # Checks for library functions. AC_PROG_GCC_TRADITIONAL dnl AC_FUNC_MALLOC AC_TYPE_SIGNAL dnl AC_FUNC_STAT AC_FUNC_VPRINTF AC_CHECK_FUNCS([atexit gethostbyname memmove memset mkdir select socket strcasecmp \ strchr strdup strncasecmp strpbrk strrchr strstr strtol \ symlink chmod tcgetattr hstrerror]) # vprintf stat malloc \ for f in gethostbyname memset memmove mkdir select socket atexit \ strcasecmp strchr strdup strncasecmp strpbrk strrchr strstr strtol; do if eval test "x\$ac_cv_func_$f" != "xyes"; then AC_MSG_ERROR([Required function $f is missing. Sorry.]) fi done if test "x$GCC" = xyes; then CFLAGS="$CFLAGS -Wall" fi # autoconf 2.50 uses this syntax, but automake uses the vars in AC_OUTPUT # so this is commented out until automake is updated. # A C _CONFIG_FILES([doc/Makefile # src/Makefile # Makefile # lang/Makefile]) AC_OUTPUT([doc/Makefile src/Makefile Makefile lang/Makefile])