# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.63]) AC_INIT([zpoll], [0.6.0], [dev@zentific.com]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) PACKAGE=zpoll VERSION=0.6.0 AM_INIT_AUTOMAKE($PACKAGE, $VERSION) AC_PROG_MAKE_SET # Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_PROG_LN_S AC_LIBLTDL_INSTALLABLE AC_SUBST(INCLTDL) AC_SUBST(LIBLTDL) AC_LIBTOOL_DLOPEN AC_PROG_LIBTOOL AC_CONFIG_SUBDIRS(libltdl) PKG_CHECK_MODULES([OPENSSL], [libssl >= 0.9.8]) AC_SUBST(OPENSSL_CFLAGS) AC_SUBST(OPENSSL_LIBS) EXTRA_LIBS= AC_SUBST(EXTRA_LIBS) # Checks for libraries. # AC_CHECK_LIB([kstat], [kstat_open], [EXTRA_LIBS+="-lkstat "]) AC_CHECK_LIB([xenctrl], [lock_pages], [EXTRA_LIBS+="-lxenctrl "], AC_ERROR(Unable to find xenctrl)) AC_CHECK_MEMBER([struct sockets_per_node.xc_physinfo_t], [CFLAGS+=-DLEGACY_XEN],,[xenctrl.h]) AC_CHECK_LIB([xenstore], [xs_read], [EXTRA_LIBS+="-lxenstore "], AC_ERROR(Unable to find xenstore)) AC_CHECK_LIB([uuid], [uuid_generate], [EXTRA_LIBS+="-luuid "], AC_ERROR(Unable to find libuuid)) PKG_CHECK_MODULES([OPENSSL], [libssl >= 0.9.8]) AC_SUBST(OPENSSL_LIBS) # Checks for header files. AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdint.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_INLINE AC_TYPE_MODE_T AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_TYPE_SSIZE_T AC_TYPE_UINT64_T case $host_os in solaris*) solaris=true;; *) solaris=false;; esac AM_CONDITIONAL(SOLARIS, $solaris) AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging]) AM_CONDITIONAL(DEBUG, test x$enable_debug = xyes) if test x$enable_debug = xyes; then CFLAGS+="-ggdb " fi # Checks for library functions. AC_FUNC_ERROR_AT_LINE AC_FUNC_FORK AC_FUNC_MALLOC AC_FUNC_MMAP AC_FUNC_REALLOC AC_CHECK_FUNCS([bzero dup2 gethostbyname gethostname getpagesize gettimeofday inet_ntoa memmove memset munmap regcomp strcasecmp strchr strdup strerror strrchr strstr sysinfo uname]) AC_CONFIG_FILES([Makefile src/Makefile]) AC_OUTPUT