# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) AC_INIT(libmsn, 3.2, bdash@users.sourceforge.net) AM_INIT_AUTOMAKE(libmsn, 3.2) AC_CONFIG_SRCDIR([msn/md5.c]) AM_CONFIG_HEADER([config.h]) AM_MAINTAINER_MODE # Checks for programs. AC_PROG_CXX AC_PROG_CC AC_PROG_LIBTOOL AC_LANG([C++]) # Checks for libraries. CURL_CONFIG= curl_CFLAGS="" curl_LIBS="" AC_ARG_WITH(curl, AC_HELP_STRING([--with-curl=PATH], [path to curl-config]), [ CURL_CONFIG=$with_curl ], [ AC_PATH_PROG(CURL_CONFIG, curl-config, AC_MSG_ERROR(curl-config not found))]) curl_LIBS="$curl_LIBS `$CURL_CONFIG --libs`" curl_CFLAGS="$curl_CFLAGS `$CURL_CONFIG --cflags`" LDFLAGS="$LDFLAGS `$CURL_CONFIG --libs`" AC_SUBST(curl_LIBS) AC_SUBST(curl_CFLAGS) AC_CHECK_LIB([curl], [curl_easy_init], , [AC_ERROR([curl not found])]) # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sstream]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_CONST AC_TYPE_SIZE_T AC_HEADER_TIME # Checks for library functions. AC_FUNC_SELECT_ARGTYPES AC_FUNC_STAT AC_CHECK_FUNCS([gethostbyname gethostname getpass inet_ntoa memset select socket strerror strtol]) AC_CHECK_HEADERS(sstream,, [AC_CHECK_HEADERS(strstream,, AC_MSG_ERROR([Your libstdc++ doesn't have the sstream or strstream classes]))]) AC_OUTPUT(Makefile msn/Makefile doc/Makefile)