# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) AC_INIT(mad, 0.1, matthias@gamezock.de) AC_CONFIG_AUX_DIR([config]) AC_CONFIG_SRCDIR([src/mad.cpp]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE(mad, 0.1) AM_MAINTAINER_MODE # Checks for programs. AC_PROG_CXX AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET ORIG_LIBS=$LIBS LT_CONFIG_LTDL_DIR([libltdl]) LT_INIT([dlopen]) LTDL_INIT([recursive]) AC_SUBST(LIBLTDL) AM_CONDITIONAL(INCLUDED_LTDL, test "x$with_included_ltdl" = xyes) # Checks for libraries. PKG_CHECK_MODULES(GnuTLS, gnutls, , AC_MSG_ERROR(Test for GnuTLS failed.)) PKG_CHECK_MODULES(sigc, sigc++-2.0, , AC_MSG_ERROR(Test for SigC++ 2.0 failed.)) AX_LIB_MYSQL CPPFLAGS='-I${top_srcdir}'"/src $GnuTLS_CFLAGS $sigc_CFLAGS $MYSQL_CFLAGS $INCLTDL $CPPFLAGS" AC_CHECK_LIB(gssapi_krb5, gss_init_sec_context, AC_SUBST(GSSAPI_LIBS, -lgssapi_krb5), AC_CHECK_LIB(gssapi, gss_init_sec_context, GSSAPI_LIBS=-lgssapi, AC_MSG_ERROR(Test for GSSAPI library failed.))) AC_CHECK_LIB(readline, readline, AC_SUBST(READLINE_LIBS, -lreadline), AC_MSG_ERROR(Test for GNU readline library failed.)) LIBS=$ORIG_LIBS # Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([argz.h arpa/inet.h fcntl.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/socket.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_CONST AC_TYPE_PID_T AC_TYPE_SIZE_T AC_TYPE_SSIZE_T AC_TYPE_UINT16_T AC_TYPE_UINT32_T AC_TYPE_UINT64_T AC_TYPE_UINT8_T # Checks for library functions. AC_FUNC_MALLOC AC_HEADER_STDC AC_FUNC_REALLOC AC_TYPE_SIGNAL AC_CHECK_FUNCS([dup2 gethostname memmove memset socket strcasecmp strchr strdup strerror strrchr strtol]) AC_CONFIG_FILES([ Makefile libltdl/Makefile src/Makefile src/Client/Makefile src/Client/Requests/Makefile src/Common/Makefile src/Common/Backends/Makefile src/Common/Requests/Makefile src/Common/RequestHandlers/Makefile src/Core/Makefile src/Core/Backends/Makefile src/Core/Requests/Makefile src/Core/RequestHandlers/Makefile src/Daemon/Makefile src/Daemon/Backends/Makefile src/Daemon/Requests/Makefile src/Daemon/RequestHandlers/Makefile src/Net/Makefile src/Net/Packets/Makefile src/modules/Makefile ]) AC_OUTPUT