############################################################################# # Copyright (c) 2002 Pelle Johansson. # # All rights reserved. # # # # This file is part of the moftpd package. Use and distribution of # # this software is governed by the terms in the file LICENCE, which # # should have come with this package. # ############################################################################# # $moftpd: configure.ac 1264 2005-04-06 13:32:27Z morth $ # Process this file with autoconf to produce a configure script. AC_INIT(moftpd, 1.2.3, moftpd-bugs@lists.morth.org) AC_CONFIG_SRCDIR([main.c]) AC_CONFIG_HEADER([autoconf.h]) # Checks for programs. AC_PROG_CC AC_PROG_YACC AC_PROG_INSTALL AC_PROG_RANLIB AC_PATH_TOOL(STRIP, strip) # Check for compiler flags. AC_CC_FLAG(-Wall) #AC_CC_FLAG(-Werror) AC_CC_FLAG(-Wwrite-strings) #AC_CC_FLAG(-Wshadow) Can warn in system headers. AC_CC_FLAG(-Wpadding) # gcc only warns, so don't check non-gcc flags if using gcc. if test x$ac_compiler_gnu != xyes; then AC_CC_FLAG(-qro) AC_CC_FLAG(-qroconst) fi AC_SYS_LARGEFILE AC_CHECK_FUNC(kqueue, [ events_obj=events_kqueue.o ehandler=kqueue AC_CHECK_HEADERS(sys/event.h) ], [ AC_CHECK_EPOLL( [ events_obj=events_epoll.o ehandler=epoll AC_CHECK_HEADERS(sys/epoll.h) ], [ AC_CHECK_FUNC(select,[events_obj=events_select.o;ehandler=select],[AC_ERROR([No supported events handler])]) ]) ]) AC_SUBST(events_obj) # Checks for libraries. AC_SEARCH_LIBS([socket], [socket]) AC_SEARCH_LIBS(inet_aton, [nsl]) if test "$ac_cv_search_inet_aton" = "no"; then AC_SEARCH_LIBS([inet_addr], [nsl]) fi AC_SEARCH_LIBS(crypt, crypt) AC_CHECK_TLS AC_CHECK_LIBPAM( [ AC_CHECK_FUNCS(getspnam) ]) AC_CHECK_SQL # Checks for header files. AC_CHECK_HEADERS(signal.h crypt.h shadow.h sys/resource.h arpa/inet.h) # Checks for typedefs, structures, and compiler characteristics. AC_CHECK_MEMBERS([struct sockaddr_in.sin_len],[],[],[ #include #include ]) AC_CHECK_MEMBERS([struct dirent.d_type],[],[],[ #include #include ]) AC_CHECK_MEMBERS([struct tm.tm_zone],,,[ #include #include ]) AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[ #include #include ]) # Checks for library functions. AC_FUNC_MMAP AC_CHECK_FUNCS(getprogname setprogname strmode vasprintf setenv stpcpy) AC_CHECK_FUNCS(setrlimit setproctitle timegm) AC_PRECOMPILE(system.h, system) AC_NATIVE_CHARSET AC_CONFIG_FILES([Makefile utf8fs/Makefile docs/moftpd.8 .depend:empty utf8fs/.depend:empty]) AC_OUTPUT echo =========================================================== echo Configuration of $PACKAGE_NAME done. echo Options are as follows: echo Event handler: $ehandler echo TLS Support: $tlshandler echo PAM Support: $pam_enabled echo SQL Support: $sqlhandlers echo Native charset: $native_charset echo Precompiler: $precompiler echo =========================================================== if test "$warn_gnutls" = yes; then echo "Warning: Your version of gnutls may not extract the common name correctly." echo " Consider upgrading to at least 1.0.23 or disable gnutls if you plan to" echo " login users by certificate." echo "This warning is also given if I couldn't determine what version you have." fi