1# Process this file with autoconf to produce a configure script. 2AC_INIT(main.c) 3 4AC_LANG_C 5 6AC_CONFIG_HEADER(config.h) 7 8VERSION=`cat $srcdir/VERSION` 9AC_SUBST(VERSION) 10AC_DEFINE_UNQUOTED(VERSION, "$VERSION") 11 12AC_ARG_WITH(openssl, [ --with-openssl use OpenSSL]) 13 14AC_ARG_WITH(mysql, [ --with-mysql use MySQL]) 15 16AC_ARG_ENABLE(rfc2449, [ --enable-rfc2449 enable RFC 2449 support]) 17 18# Checks for programs. 19CFLAGS=${CFLAGS-"-O2 -Wall -pipe"} 20AC_PROG_CC 21AC_PROG_INSTALL 22 23# Checks for libraries. 24 25if test "$with_openssl" != "no" ; then 26AC_CHECK_LIB(crypto,BIO_new) 27AC_CHECK_LIB(ssl,SSL_new) 28fi 29AC_CHECK_LIB(crypt,crypt) 30 31if test "$with_mysql" != "no" ; then 32AC_CHECK_LIB( mysqlclient, mysql_init,,,-lz) 33fi 34 35if test x`uname -s` = "xDarwin" ; then 36 AC_DEFINE_UNQUOTED(HAVE_DARWIN,1) 37fi 38 39if test "$enable_rfc2449" != "no" ; then 40 AC_DEFINE_UNQUOTED(ENABLE_RFC2449,1) 41else 42 AC_DEFINE_UNQUOTED(ENABLE_RFC2499,0) 43fi 44 45dnl this is for Solaris 46AC_CHECK_LIB(socket,socket) 47 48# Checks for header files. 49AC_HEADER_STDC 50AC_HEADER_SYS_WAIT 51AC_CHECK_HEADERS([crypt.h time.h sys/time.h sys/wait.h sys/resource.h ctype.h errno.h fcntl.h netdb.h pwd.h sys/types.h sys/stat.h netinet/in.h shadow.h stdlib.h string.h sys/file.h sys/socket.h syslog.h unistd.h]) 52 53# Checks for typedefs, structures, and compiler characteristics. 54AC_C_CONST 55AC_TYPE_UID_T 56AC_TYPE_PID_T 57AC_TYPE_SIZE_T 58 59# Checks for library functions. 60AC_CHECK_FUNCS([realloc atexit memset socket strncasecmp lockf]) 61 62AC_OUTPUT(Makefile redhat/akpop3d.spec) 63