configure.in
来自「这是一个完全开放的」· IN 代码 · 共 723 行 · 第 1/2 页
IN
723 行
dnl jabberd2 configure scriptdnl $Id: configure.in,v 1.79.2.24 2004/12/09 15:03:19 zion Exp $dnldnl autoconf setupdnlAC_PREREQ(2.57)dnl startupAC_INIT(jabberd, 2.0s6)AM_INIT_AUTOMAKEdnl copyrightAC_COPYRIGHT([Copyright (c) 2002-2004 Robert NorrisThis configure script may be copied, distributed and modified under theterms of the jabberd license; see COPYING for more details.])dnl identify the source treeAC_CONFIG_SRCDIR(sx/sx.h)dnl output config headerAM_CONFIG_HEADER(config.h)dnldnl build environment setupdnldnl developer flagsAC_ARG_ENABLE(developer, AC_HELP_STRING([--enable-developer], [Compile with warnings and debugging symbols]), CFLAGS="-Wall -g $CFLAGS")dnl basic toolsAC_PROG_CCAC_PROG_MAKE_SETdnl need libtool for internal linkingAC_DISABLE_STATICAC_PROG_LIBTOOLdnl use libtool to compile checksac_link="${SHELL} ${srcdir}/libtool --mode=link $ac_link"dnldnl extra pathsdnlAC_ARG_WITH(extra_include_path, AC_HELP_STRING([--with-extra-include-path], [use additional include paths]), extra_include_path=$withval)split_includes="`echo $extra_include_path | sed -e 's/:/ /g'`"for incpath in $split_includes ; do CPPFLAGS="-I$incpath $CPPFLAGS"doneAC_ARG_WITH(extra_library_path, AC_HELP_STRING([--with-extra-library-path], [use additional library paths]), extra_library_path=$withval)split_libs="`echo $extra_library_path | sed -e 's/:/ /g'`"for libpath in $split_libs ; do LDFLAGS="-L$libpath $LDFLAGS"donednldnl external packagesdnldnl find libidn >= 0.3.0AC_ARG_ENABLE(idn, AC_HELP_STRING([--enable-idn], [enable IDN support (yes)]), want_idn=$enableval, want_idn=yes)if test "x-$want_idn" = "x-yes" ; then AC_CHECK_HEADERS(stringprep.h) if test "x-$ac_cv_header_stringprep_h" = "x-yes" ; then AC_CHECK_LIB(idn, stringprep_check_version) fi if test "x-$ac_cv_lib_idn_stringprep_check_version" = "x-yes" ; then AC_MSG_CHECKING(for Libidn version >= 0.3.0) AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stringprep.h>]], [[return !(stringprep_check_version("0.3.0"))]])], [AC_MSG_RESULT(yes) have_idn=yes], AC_MSG_RESULT(no)) fi if test "x-$have_idn" = "x-" ; then AC_MSG_ERROR([Libidn >= 0.3.0 not found]) fi AC_DEFINE(HAVE_IDN,1,[Define to 1 if Libidn is available.])fidnl find openssl >= 0.9.6bAC_ARG_ENABLE(ssl, AC_HELP_STRING([--enable-ssl], [enable SSL/TLS support (yes)]), want_ssl=$enableval, want_ssl=yes)if test "x-$want_ssl" = "x-yes" ; then AC_CHECK_HEADERS(openssl/crypto.h) if test "x-$ac_cv_header_openssl_crypto_h" = "x-yes" ; then AC_CHECK_LIB(crypto, CRYPTO_lock) fi if test "x-$ac_cv_lib_crypto_CRYPTO_lock" = "x-yes" ; then AC_CHECK_HEADERS(openssl/ssl.h) fi if test "x-$ac_cv_header_openssl_ssl_h" = "x-yes" ; then AC_CHECK_LIB(ssl, SSL_connect) fi if test "x-$ac_cv_lib_ssl_SSL_connect" = "x-yes" ; then AC_MSG_CHECKING(for OpenSSL version >= 0.9.6b) AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <openssl/opensslv.h>]], [[return !(SSLeay() >= 0x000906020L)]])], [AC_MSG_RESULT(yes) have_openssl=yes], AC_MSG_RESULT(no)) fi if test "x-$have_openssl" = "x-" ; then AC_MSG_ERROR([OpenSSL >= 0.9.6b not found]) fi AC_DEFINE(HAVE_SSL,1,[Define to 1 if OpenSSL is available.])fidnldnl optional libsdnldnl mysqlAC_ARG_ENABLE(mysql, AC_HELP_STRING([--enable-mysql], [enable MySQL auth/reg/storage support (yes)]), want_mysql=$enableval, want_mysql=yes)if test "x-$want_mysql" = "x-yes" ; then AC_CHECK_HEADERS(mysql.h) if test "x-$ac_cv_header_mysql_h" != "x-yes" ; then for incpath in /usr/include/mysql /usr/local/include/mysql; do if test "x-$ac_cv_header_mysql_h" != "x-yes" ; then AC_MSG_CHECKING([for mysql.h in $incpath]) save_cppflags="$CPPFLAGS" CPPFLAGS="-I$incpath $CPPFLAGS" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <mysql.h>]])], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_MYSQL_H,,[Define if you have mysql.h]) ac_cv_header_mysql_h=yes], AC_MSG_RESULT(no)) if test "x-$ac_cv_header_mysql_h" != "x-yes" ; then CPPFLAGS="$save_cppflags" fi fi done fi if test "x-$ac_cv_header_mysql_h" = "x-yes" ; then AC_CHECK_LIB(mysqlclient, mysql_init) fi if test "x-$ac_cv_lib_mysqlclient_mysql_init" != "x-yes" ; then AC_MSG_ERROR([MySQL client libraries not found]) else AC_DEFINE(STORAGE_MYSQL,1,[Define to 1 if you want to use MySQL for auth/reg/storage.]) fifidnl postgresqlAC_ARG_ENABLE(pgsql, AC_HELP_STRING([--enable-pgsql], [enable PostgreSQL auth/reg/storage support (no)]), want_pgsql=$enableval, want_pgsql=no)if test "x-$want_pgsql" = "x-yes" ; then AC_CHECK_HEADERS(libpq-fe.h) if test "x-$ac_cv_header_libpq_fe_h" != "x-yes" ; then for incpath in /usr/include/postgresql /usr/local/include/postgresql; do if test "x-$ac_cv_header_libpq_fe_h" != "x-yes" ; then AC_MSG_CHECKING([for libpq-fe.h in $incpath]) save_cppflags="$CPPFLAGS" CPPFLAGS="-I$incpath $CPPFLAGS" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libpq-fe.h>]])], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LIBPQ_FE_H,,[Define if you have libpq_fe.h]) ac_cv_header_libpq_fe_h=yes], AC_MSG_RESULT(no)) if test "x-$ac_cv_header_libpq_fe_h" != "x-yes" ; then CPPFLAGS="$save_cppflags" fi fi done fi if test "x-$ac_cv_header_libpq_fe_h" = "x-yes" ; then AC_CHECK_LIB(pq, PQsetdbLogin) fi if test "x-$ac_cv_lib_pq_PQsetdbLogin" != "x-yes" ; then AC_MSG_ERROR([PostgreSQL client libraries not found]) else AC_DEFINE(STORAGE_PGSQL,1,[Define to 1 if you want to use PostgreSQL for auth/reg/storage.]) fifidnl berkeley dbAC_ARG_ENABLE(db, AC_HELP_STRING([--enable-db], [enable Berkeley DB auth/reg/storage support (no)]), want_db=$enableval, want_db=no)if test "x-$want_db" = "x-yes" ; then AC_CHECK_HEADERS(db.h) if test "x-$ac_cv_header_db_h" = "x-yes" ; then for lib in db-4.2 db-4.1 db-4 db4 db ; do if test "x-$have_db_version" != "x-yes" ; then AC_MSG_CHECKING([for db_create in -l$lib]) save_libs="$LIBS" LIBS="-l$lib $LIBS" AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <db.h>]], [[db_create(0,0,0)]])], [AC_MSG_RESULT(yes) AC_MSG_CHECKING(for Berkeley DB version >= 4.1.25) AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <db.h>]], [[do { int major, minor, patch; db_version(&major, &minor, &patch); if(major < 4 || (major == 4 && minor < 1) || (major == 4 && minor == 1 && patch < 24)) return 1; } while(0)]])], [AC_MSG_RESULT(yes) have_db_version=yes], AC_MSG_RESULT(no))], AC_MSG_RESULT(no)) if test "x-$have_db_version" = "x-" ; then LIBS="$save_libs" fi fi done fi if test "x-$have_db_version" != "x-yes" ; then AC_MSG_ERROR([Berkeley DB >= 4.1.24 not found]) else AC_DEFINE(STORAGE_DB,1,[Define to 1 if you want to use Berkeley DB for auth/reg/storage.]) fifidnl openldapAC_ARG_ENABLE(ldap, AC_HELP_STRING([--enable-ldap], [enable OpenLDAP auth/reg support (no)]), want_ldap=$enableval, want_ldap=no)if test "x-$want_ldap" = "x-yes" ; then AC_CHECK_HEADERS(lber.h ldap.h) if test "x-$ac_cv_header_ldap_h" = "x-yes" -a "x-$ac_cv_header_lber_h" = "x-yes" ; then AC_CHECK_LIB(lber, ber_alloc) AC_CHECK_LIB(ldap, ldap_init) fi if test "x-$ac_cv_lib_lber_ber_alloc" = "x-yes" -a "x-$ac_cv_lib_ldap_ldap_init" = "x-yes" ; then AC_MSG_CHECKING(for OpenLDAP version >= 2.1.0) AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <lber.h> #include <ldap.h>]], [[do { LDAPAPIInfo info; info.ldapai_info_version = LDAP_API_INFO_VERSION; ldap_get_option(0, LDAP_OPT_API_INFO, &info); if(info.ldapai_vendor_version != LDAP_VENDOR_VERSION || LDAP_VENDOR_VERSION < 2004) return 1; } while(0)]])], [AC_MSG_RESULT(yes) have_ldap_version=yes], AC_MSG_RESULT(no)) fi if test "x-$want_ldap" = "x-yes" -a "x-$have_ldap_version" = "x-" ; then AC_MSG_ERROR([OpenLDAP client libraries >= 2.1.0 not found]) else AC_DEFINE(STORAGE_LDAP,1,[Define to 1 if you want to use OpenLDAP for auth/reg.]) fifidnl pamAC_ARG_ENABLE(pam, AC_HELP_STRING([--enable-pam], [enable PAM auth/reg support (no)]), want_pam=$enableval, want_pam=no)if test "x-$want_pam" = "x-yes" ; then AC_CHECK_HEADERS(security/pam_appl.h) if test "x-$ac_cv_header_security_pam_appl_h" = "x-yes" ; then AC_CHECK_LIB(pam, pam_start) fi if test "x-$ac_cv_lib_pam_pam_start" != "x-yes" ; then AC_MSG_ERROR([PAM application libraries not found]) else AC_DEFINE(STORAGE_PAM,1,[Define to 1 if you want to use PAM for auth/reg.]) fifidnl pipe (not really an external package, but does need some checks)AC_ARG_ENABLE(pipe, AC_HELP_STRING([--enable-pipe], [enable pipe auth/reg support (no)]), want_pipe=$enableval, want_pipe=no)if test "x-$want_pipe" = "x-yes" ; then AC_CHECK_HEADERS(sys/wait.h) AC_FUNC_FORK AC_CHECK_FUNCS(pipe wait) if test "x-$ac_cv_header_sys_wait_h" != "x-yes" -o \ "x-$ac_cv_func_fork" != "x-yes" -o \ "x-$ac_cv_func_pipe" != "x-yes" -o \ "x-$ac_cv_func_wait" != "x-yes" ; then AC_MSG_ERROR([Pipe auth/reg requirements (sys/wait.h, fork(), pipe(), wait()) not found]) else AC_DEFINE(STORAGE_PIPE,1,[Define to 1 if you want to use pipes for auth/reg.]) fifidnl anonAC_ARG_ENABLE(anon, AC_HELP_STRING([--enable-anon], [enable anonymous auth/reg support (no)]), want_anon=$enableval, want_anon=no)if test "x-$want_anon" = "x-yes" ; then AC_DEFINE(STORAGE_ANON,1,[Define to 1 if you want anonymous auth.])fidnl filesystem storageAC_ARG_ENABLE(fs, AC_HELP_STRING([--enable-fs], [enable filesystem storage support (no)]), want_fs=$enableval, want_fs=no)if test "x-$want_fs" = "x-yes" ; then AC_DEFINE(STORAGE_FS,1,[Define to 1 if you want to use the filesystem for storage.])fidnldnl generic system typesdnlAC_CREATE_STDINT_H(ac-stdint.h)dnldnl header checksdnlAC_HEADER_DIRENTAC_HEADER_STDCAC_HEADER_SYS_WAITAC_HEADER_TIME# Two-step header checking. First check for headers which don't# require any other headers.AC_CHECK_HEADERS( \ arpa/inet.h \ arpa/nameser.h \ fcntl.h \ netinet/in.h \ signal.h \ sys/filio.h \ sys/ioctl.h \ sys/types.h \ sys/socket.h \ sys/stat.h \ sys/time.h \ sys/timeb.h \ sys/utsname.h \ syslog.h \ unistd.h \ windows.h \ winsock2.h)# Now check for those headers that do, including all the required# headers.AC_CHECK_HEADERS(resolv.h windns.h,,,[#ifdef HAVE_SYS_TYPES_H# include <sys/types.h>#endif#ifdef HAVE_WINSOCK2_H# include <winsock2.h>#endif#ifdef HAVE_NETINET_IN_H# include <netinet/in.h>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?