# $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.9pl1) 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 AC_TYPE_SIGNAL 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 snprintf vsnprintf]) if test "x$ac_cv_func_snprintf" != "xyes"; then AC_CHECK_FUNCS(__snprintf) if test "x$ac_cv_func___snprintf" != "xyes"; then AC_MSG_ERROR([Required function snprintf is missing. Sorry.]) fi AC_DEFINE(snprintf,__snprintf,[Define to __snprintf if only the latter is provided]) fi if test "x$ac_cv_func_vsnprintf" != "xyes"; then AC_CHECK_FUNCS(_vsnprintf) if test "x$ac_cv_func__vsnprintf" != "xyes"; then AC_CHECK_FUNCS(__vsnprintf) if test "x$ac_cv_func__vsnprintf" != "xyes"; then AC_MSG_ERROR([Required function vsnprintf is missing. Sorry.]) fi AC_DEFINE(vsnprintf,__vsnprintf,[Define to __vsnprintf ot _vsnprintf if only the latter is provided]) else AC_DEFINE(snprintf,_vsnprintf) fi fi # vprintf stat malloc \ for f in 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$ac_cv_func_gethostbyname" != "xyes"; then AC_MSG_WARN([Function gethostbyname() not found; you will need to specify all host names as IP addresses.]) fi # Checks for headers. AC_CHECK_HEADERS(arpa/inet.h) # Optimize. 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])