From: Badlop Date: Wed, 24 Dec 2008 12:03:13 +0000 (+0000) Subject: * src/aclocal.m4: Fixes in configure script: fix X-Git-Tag: v2.1.0~18^2~503 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=594bc36ce5ec61ffe299af11d3f6d723180a37a2;p=ejabberd * src/aclocal.m4: Fixes in configure script: fix disable-disable_zlib and disable-pam; in case of problems, PAM verification aborts with error instead of warning. (EJAB-787) * src/configure.ac: Likewise * src/configure: Likewise SVN Revision: 1754 --- diff --git a/ChangeLog b/ChangeLog index 14ecfa565..27125049c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-12-24 Badlop + + * src/aclocal.m4: Fixes in configure script: fix + disable-disable_zlib and disable-pam; in case of problems, PAM + verification aborts with error instead of warning. (EJAB-787) + * src/configure.ac: Likewise + * src/configure: Likewise + 2008-12-23 Badlop * src/acl.erl: New ACL: shared_group (thanks to Maxim Ryazanov) diff --git a/src/aclocal.m4 b/src/aclocal.m4 index a1c9416ba..79b0e3ec7 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -15,7 +15,7 @@ AC_DEFUN(AM_WITH_EXPAT, [ expat_found=no ], "$EXPAT_LIBS") if test $expat_found = no; then - AC_MSG_ERROR([Could not find the Expat library]) + AC_MSG_ERROR([Could not find development files of Expat library]) fi expat_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $EXPAT_CFLAGS" @@ -36,6 +36,7 @@ AC_DEFUN(AM_WITH_ZLIB, [ AC_ARG_WITH(zlib, [AC_HELP_STRING([--with-zlib=PREFIX], [prefix where zlib is installed])]) +if test x"$ejabberd_zlib" != x; then ZLIB_CFLAGS= ZLIB_LIBS= if test x"$with_zlib" != x; then @@ -49,7 +50,7 @@ AC_DEFUN(AM_WITH_ZLIB, [ zlib_found=no ], "$ZLIB_LIBS") if test $zlib_found = no; then - AC_MSG_ERROR([Could not find the zlib library]) + AC_MSG_ERROR([Could not find development files of zlib library. Install them or disable `ejabberd_zlib' with: --disable-ejabberd_zlib]) fi zlib_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $ZLIB_CFLAGS" @@ -57,19 +58,20 @@ AC_DEFUN(AM_WITH_ZLIB, CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS" AC_CHECK_HEADERS(zlib.h, , zlib_found=no) if test $zlib_found = no; then - AC_MSG_ERROR([Could not find zlib.h]) + AC_MSG_ERROR([Could not find zlib.h. Install it or disable `ejabberd_zlib' with: --disable-ejabberd_zlib]) fi CFLAGS="$zlib_save_CFLAGS" CPPFLAGS="$zlib_save_CPPFLAGS" AC_SUBST(ZLIB_CFLAGS) AC_SUBST(ZLIB_LIBS) +fi ]) AC_DEFUN(AM_WITH_PAM, [ AC_ARG_WITH(pam, [AC_HELP_STRING([--with-pam=PREFIX], [prefix where PAM is installed])]) - +if test x"$pam" != x; then PAM_CFLAGS= PAM_LIBS= if test x"$with_pam" != x; then @@ -83,7 +85,7 @@ AC_DEFUN(AM_WITH_PAM, [ pam_found=no ], "$PAM_LIBS") if test $pam_found = no; then - AC_MSG_WARN([Could not find the PAM library]) + AC_MSG_ERROR([Could not find development files of PAM library. Install them or disable `pam' with: --disable-pam]) fi pam_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PAM_CFLAGS" @@ -91,13 +93,14 @@ AC_DEFUN(AM_WITH_PAM, CPPFLAGS="$CPPFLAGS $PAM_CFLAGS" AC_CHECK_HEADERS(security/pam_appl.h, , pam_found=no) if test $pam_found = no; then - AC_MSG_WARN([Could not find security/pam_appl.h]) + AC_MSG_ERROR([Could not find security/pam_appl.h. Install it or disable `pam' with: --disable-pam]) fi CFLAGS="$pam_save_CFLAGS" CPPFLAGS="$pam_save_CPPFLAGS" AC_SUBST(PAM_CFLAGS) AC_SUBST(PAM_LIBS) +fi ]) AC_DEFUN(AM_WITH_ERLANG, @@ -337,7 +340,7 @@ if test x"$tls" != x; then fi done if test x${have_openssl} != xyes; then - AC_MSG_ERROR([openssl library cannot be found. Install openssl or disable `tls' module (--disable-tls).]) + AC_MSG_ERROR([Could not find development files of OpenSSL library. Install them or disable `tls' with: --disable-tls]) fi AC_SUBST(SSL_LIBS) AC_SUBST(SSL_CFLAGS) diff --git a/src/configure b/src/configure index 6ce0e31fd..9f45e3d39 100755 --- a/src/configure +++ b/src/configure @@ -671,31 +671,31 @@ GREP EGREP EXPAT_CFLAGS EXPAT_LIBS -ZLIB_CFLAGS -ZLIB_LIBS -PAM_CFLAGS -PAM_LIBS LIBOBJS -mod_pubsub -make_mod_pubsub mod_irc make_mod_irc mod_muc make_mod_muc mod_proxy65 make_mod_proxy65 +mod_pubsub +make_mod_pubsub eldap make_eldap -pam -make_pam -web -make_web -tls -make_tls odbc make_odbc +tls +make_tls +web +make_web ejabberd_zlib make_ejabberd_zlib +ZLIB_CFLAGS +ZLIB_LIBS +pam +make_pam +PAM_CFLAGS +PAM_LIBS hipe roster_gateway_workaround db_type @@ -1285,16 +1285,16 @@ if test -n "$ac_init_help"; then Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-mod_pubsub enable mod_pubsub (default: yes) --enable-mod_irc enable mod_irc (default: yes) --enable-mod_muc enable mod_muc (default: yes) --enable-mod_proxy65 enable mod_proxy65 (default: yes) + --enable-mod_pubsub enable mod_pubsub (default: yes) --enable-eldap enable eldap (default: yes) - --enable-pam enable pam (default: no) - --enable-web enable web (default: yes) - --enable-tls enable tls (default: yes) --enable-odbc enable odbc (default: no) + --enable-tls enable tls (default: yes) + --enable-web enable web (default: yes) --enable-ejabberd_zlib enable ejabberd_zlib (default: yes) + --enable-pam enable pam (default: no) --enable-hipe compile natively with HiPE, not recommended (default: no) --enable-roster-gateway-workaround @@ -4020,8 +4020,8 @@ else fi if test $expat_found = no; then - { { echo "$as_me:$LINENO: error: Could not find the Expat library" >&5 -echo "$as_me: error: Could not find the Expat library" >&2;} + { { echo "$as_me:$LINENO: error: Could not find development files of Expat library" >&5 +echo "$as_me: error: Could not find development files of Expat library" >&2;} { (exit 1); exit 1; }; } fi expat_save_CFLAGS="$CFLAGS" @@ -4186,58 +4186,85 @@ echo "$as_me: error: Could not find expat.h" >&2;} -#locating zlib - -# Check whether --with-zlib was given. -if test "${with_zlib+set}" = set; then - withval=$with_zlib; -fi - - - ZLIB_CFLAGS= - ZLIB_LIBS= - if test x"$with_zlib" != x; then - ZLIB_CFLAGS="-I$with_zlib/include" - ZLIB_LIBS="-L$with_zlib/lib" - fi - { echo "$as_me:$LINENO: checking for gzgets in -lz" >&5 -echo $ECHO_N "checking for gzgets in -lz... $ECHO_C" >&6; } -if test "${ac_cv_lib_z_gzgets+set}" = set; then +# Checks for typedefs, structures, and compiler characteristics. +{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } +if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz "$ZLIB_LIBS" $LIBS" -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gzgets (); int main () { -return gzgets (); +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -4246,40 +4273,37 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_z_gzgets=yes + } && test -s conftest.$ac_objext; then + ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_z_gzgets=no + ac_cv_c_const=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_gzgets" >&5 -echo "${ECHO_T}$ac_cv_lib_z_gzgets" >&6; } -if test $ac_cv_lib_z_gzgets = yes; then - ZLIB_LIBS="$ZLIB_LIBS -lz" - zlib_found=yes -else - zlib_found=no +{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + fi - if test $zlib_found = no; then - { { echo "$as_me:$LINENO: error: Could not find the zlib library" >&5 -echo "$as_me: error: Could not find the zlib library" >&2;} - { (exit 1); exit 1; }; } - fi - zlib_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $ZLIB_CFLAGS" - zlib_save_CPPFLAGS="$CFLAGS" - CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS" -for ac_header in zlib.h +# Check Erlang headers are installed +#AC_CHECK_HEADER(erl_driver.h,,[AC_MSG_ERROR([cannot find Erlang header files])]) + +# Change default prefix + + +# Checks for library functions. + +for ac_header in stdlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then @@ -4419,139 +4443,123 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -else - zlib_found=no fi done - if test $zlib_found = no; then - { { echo "$as_me:$LINENO: error: Could not find zlib.h" >&5 -echo "$as_me: error: Could not find zlib.h" >&2;} - { (exit 1); exit 1; }; } - fi - CFLAGS="$zlib_save_CFLAGS" - CPPFLAGS="$zlib_save_CPPFLAGS" - - - - -#locating PAM - -# Check whether --with-pam was given. -if test "${with_pam+set}" = set; then - withval=$with_pam; -fi - - - PAM_CFLAGS= - PAM_LIBS= - if test x"$with_pam" != x; then - PAM_CFLAGS="-I$with_pam/include" - PAM_LIBS="-L$with_pam/lib" - fi - - { echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5 -echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6; } -if test "${ac_cv_lib_pam_pam_start+set}" = set; then +{ echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 +echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6; } +if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpam "$PAM_LIBS" $LIBS" -cat >conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then + ac_cv_func_malloc_0_nonnull=no +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *malloc (); #endif -char pam_start (); + int main () { -return pam_start (); +return ! malloc (0); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_pam_pam_start=yes + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_malloc_0_nonnull=yes else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pam_pam_start=no +( exit $ac_status ) +ac_cv_func_malloc_0_nonnull=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5 -echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6; } -if test $ac_cv_lib_pam_pam_start = yes; then - PAM_LIBS="$PAM_LIBS -lpam" - pam_found=yes +{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 +echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6; } +if test $ac_cv_func_malloc_0_nonnull = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MALLOC 1 +_ACEOF + else - pam_found=no + cat >>confdefs.h <<\_ACEOF +#define HAVE_MALLOC 0 +_ACEOF + + case " $LIBOBJS " in + *" malloc.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS malloc.$ac_objext" + ;; +esac + + +cat >>confdefs.h <<\_ACEOF +#define malloc rpl_malloc +_ACEOF + fi - if test $pam_found = no; then - { echo "$as_me:$LINENO: WARNING: Could not find the PAM library" >&5 -echo "$as_me: WARNING: Could not find the PAM library" >&2;} - fi - pam_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PAM_CFLAGS" - pam_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $PAM_CFLAGS" -for ac_header in security/pam_appl.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -4570,494 +4578,457 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no + ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$ac_header> +#include + _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## --------------------------------------- ## -## Report this to ejabberd@process-one.net ## -## --------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 _ACEOF -else - pam_found=no fi -done - if test $pam_found = no; then - { echo "$as_me:$LINENO: WARNING: Could not find security/pam_appl.h" >&5 -echo "$as_me: WARNING: Could not find security/pam_appl.h" >&2;} - fi - CFLAGS="$pam_save_CFLAGS" - CPPFLAGS="$pam_save_CPPFLAGS" +mod_irc= +make_mod_irc= +{ echo "$as_me:$LINENO: checking whether build mod_irc" >&5 +echo $ECHO_N "checking whether build mod_irc... $ECHO_C" >&6; } +# Check whether --enable-mod_irc was given. +if test "${enable_mod_irc+set}" = set; then + enableval=$enable_mod_irc; mr_enable_mod_irc="$enableval" +else + mr_enable_mod_irc=yes +fi +if test "$mr_enable_mod_irc" = "yes"; then +mod_irc=mod_irc +make_mod_irc=mod_irc/Makefile +fi +{ echo "$as_me:$LINENO: result: $mr_enable_mod_irc" >&5 +echo "${ECHO_T}$mr_enable_mod_irc" >&6; } -# Checks for typedefs, structures, and compiler characteristics. -{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } -if test "${ac_cv_c_const+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + + +mod_muc= +make_mod_muc= +{ echo "$as_me:$LINENO: checking whether build mod_muc" >&5 +echo $ECHO_N "checking whether build mod_muc... $ECHO_C" >&6; } +# Check whether --enable-mod_muc was given. +if test "${enable_mod_muc+set}" = set; then + enableval=$enable_mod_muc; mr_enable_mod_muc="$enableval" else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + mr_enable_mod_muc=yes +fi -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; +if test "$mr_enable_mod_muc" = "yes"; then +mod_muc=mod_muc +make_mod_muc=mod_muc/Makefile +fi +{ echo "$as_me:$LINENO: result: $mr_enable_mod_muc" >&5 +echo "${ECHO_T}$mr_enable_mod_muc" >&6; } - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_const=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_const=no + + +mod_proxy65= +make_mod_proxy65= +{ echo "$as_me:$LINENO: checking whether build mod_proxy65" >&5 +echo $ECHO_N "checking whether build mod_proxy65... $ECHO_C" >&6; } +# Check whether --enable-mod_proxy65 was given. +if test "${enable_mod_proxy65+set}" = set; then + enableval=$enable_mod_proxy65; mr_enable_mod_proxy65="$enableval" +else + mr_enable_mod_proxy65=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if test "$mr_enable_mod_proxy65" = "yes"; then +mod_proxy65=mod_proxy65 +make_mod_proxy65=mod_proxy65/Makefile fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -echo "${ECHO_T}$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then +{ echo "$as_me:$LINENO: result: $mr_enable_mod_proxy65" >&5 +echo "${ECHO_T}$mr_enable_mod_proxy65" >&6; } -cat >>confdefs.h <<\_ACEOF -#define const -_ACEOF + + + +mod_pubsub= +make_mod_pubsub= +{ echo "$as_me:$LINENO: checking whether build mod_pubsub" >&5 +echo $ECHO_N "checking whether build mod_pubsub... $ECHO_C" >&6; } +# Check whether --enable-mod_pubsub was given. +if test "${enable_mod_pubsub+set}" = set; then + enableval=$enable_mod_pubsub; mr_enable_mod_pubsub="$enableval" +else + mr_enable_mod_pubsub=yes fi +if test "$mr_enable_mod_pubsub" = "yes"; then +mod_pubsub=mod_pubsub +make_mod_pubsub=mod_pubsub/Makefile +fi +{ echo "$as_me:$LINENO: result: $mr_enable_mod_pubsub" >&5 +echo "${ECHO_T}$mr_enable_mod_pubsub" >&6; } -# Check Erlang headers are installed -#AC_CHECK_HEADER(erl_driver.h,,[AC_MSG_ERROR([cannot find Erlang header files])]) -# Change default prefix -# Checks for library functions. -for ac_header in stdlib.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +eldap= +make_eldap= +{ echo "$as_me:$LINENO: checking whether build eldap" >&5 +echo $ECHO_N "checking whether build eldap... $ECHO_C" >&6; } +# Check whether --enable-eldap was given. +if test "${enable_eldap+set}" = set; then + enableval=$enable_eldap; mr_enable_eldap="$enableval" +else + mr_enable_eldap=yes fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } + +if test "$mr_enable_eldap" = "yes"; then +eldap=eldap +make_eldap=eldap/Makefile +fi +{ echo "$as_me:$LINENO: result: $mr_enable_eldap" >&5 +echo "${ECHO_T}$mr_enable_eldap" >&6; } + + + + + +odbc= +make_odbc= +{ echo "$as_me:$LINENO: checking whether build odbc" >&5 +echo $ECHO_N "checking whether build odbc... $ECHO_C" >&6; } +# Check whether --enable-odbc was given. +if test "${enable_odbc+set}" = set; then + enableval=$enable_odbc; mr_enable_odbc="$enableval" else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + mr_enable_odbc=no +fi + +if test "$mr_enable_odbc" = "yes"; then +odbc=odbc +make_odbc=odbc/Makefile +fi +{ echo "$as_me:$LINENO: result: $mr_enable_odbc" >&5 +echo "${ECHO_T}$mr_enable_odbc" >&6; } + + + + + +tls= +make_tls= +{ echo "$as_me:$LINENO: checking whether build tls" >&5 +echo $ECHO_N "checking whether build tls... $ECHO_C" >&6; } +# Check whether --enable-tls was given. +if test "${enable_tls+set}" = set; then + enableval=$enable_tls; mr_enable_tls="$enableval" else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + mr_enable_tls=yes +fi - ac_header_compiler=no +if test "$mr_enable_tls" = "yes"; then +tls=tls +make_tls=tls/Makefile fi +{ echo "$as_me:$LINENO: result: $mr_enable_tls" >&5 +echo "${ECHO_T}$mr_enable_tls" >&6; } -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + + + +web= +make_web= +{ echo "$as_me:$LINENO: checking whether build web" >&5 +echo $ECHO_N "checking whether build web... $ECHO_C" >&6; } +# Check whether --enable-web was given. +if test "${enable_web+set}" = set; then + enableval=$enable_web; mr_enable_web="$enableval" else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + mr_enable_web=yes +fi - ac_header_preproc=no +if test "$mr_enable_web" = "yes"; then +web=web +make_web=web/Makefile fi +{ echo "$as_me:$LINENO: result: $mr_enable_web" >&5 +echo "${ECHO_T}$mr_enable_web" >&6; } -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## --------------------------------------- ## -## Report this to ejabberd@process-one.net ## -## --------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + + + + +ejabberd_zlib= +make_ejabberd_zlib= +{ echo "$as_me:$LINENO: checking whether build ejabberd_zlib" >&5 +echo $ECHO_N "checking whether build ejabberd_zlib... $ECHO_C" >&6; } +# Check whether --enable-ejabberd_zlib was given. +if test "${enable_ejabberd_zlib+set}" = set; then + enableval=$enable_ejabberd_zlib; mr_enable_ejabberd_zlib="$enableval" else - eval "$as_ac_Header=\$ac_header_preproc" + mr_enable_ejabberd_zlib=yes fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +if test "$mr_enable_ejabberd_zlib" = "yes"; then +ejabberd_zlib=ejabberd_zlib +make_ejabberd_zlib=ejabberd_zlib/Makefile fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +{ echo "$as_me:$LINENO: result: $mr_enable_ejabberd_zlib" >&5 +echo "${ECHO_T}$mr_enable_ejabberd_zlib" >&6; } + + + +#locating zlib + +# Check whether --with-zlib was given. +if test "${with_zlib+set}" = set; then + withval=$with_zlib; fi -done -{ echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 -echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6; } -if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then +if test x"$ejabberd_zlib" != x; then + ZLIB_CFLAGS= + ZLIB_LIBS= + if test x"$with_zlib" != x; then + ZLIB_CFLAGS="-I$with_zlib/include" + ZLIB_LIBS="-L$with_zlib/lib" + fi + + { echo "$as_me:$LINENO: checking for gzgets in -lz" >&5 +echo $ECHO_N "checking for gzgets in -lz... $ECHO_C" >&6; } +if test "${ac_cv_lib_z_gzgets+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then - ac_cv_func_malloc_0_nonnull=no -else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz "$ZLIB_LIBS" $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *malloc (); -#endif +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gzgets (); int main () { -return ! malloc (0); +return gzgets (); ; return 0; } _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_malloc_0_nonnull=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_z_gzgets=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_func_malloc_0_nonnull=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + ac_cv_lib_z_gzgets=no fi - +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 -echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6; } -if test $ac_cv_func_malloc_0_nonnull = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MALLOC 1 -_ACEOF - +{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_gzgets" >&5 +echo "${ECHO_T}$ac_cv_lib_z_gzgets" >&6; } +if test $ac_cv_lib_z_gzgets = yes; then + ZLIB_LIBS="$ZLIB_LIBS -lz" + zlib_found=yes else - cat >>confdefs.h <<\_ACEOF -#define HAVE_MALLOC 0 -_ACEOF - - case " $LIBOBJS " in - *" malloc.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS malloc.$ac_objext" - ;; -esac - - -cat >>confdefs.h <<\_ACEOF -#define malloc rpl_malloc -_ACEOF - + zlib_found=no fi + if test $zlib_found = no; then + { { echo "$as_me:$LINENO: error: Could not find development files of zlib library. Install them or disable \`ejabberd_zlib' with: --disable-ejabberd_zlib" >&5 +echo "$as_me: error: Could not find development files of zlib library. Install them or disable \`ejabberd_zlib' with: --disable-ejabberd_zlib" >&2;} + { (exit 1); exit 1; }; } + fi + zlib_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $ZLIB_CFLAGS" + zlib_save_CPPFLAGS="$CFLAGS" + CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS" - -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } -if test "${ac_cv_header_stdc+set}" = set; then +for ac_header in zlib.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} +$ac_includes_default +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -5076,359 +5047,395 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no + ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} +/* end confdefs.h. */ +#include <$ac_header> _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } - -mod_pubsub= -make_mod_pubsub= -{ echo "$as_me:$LINENO: checking whether build mod_pubsub" >&5 -echo $ECHO_N "checking whether build mod_pubsub... $ECHO_C" >&6; } -# Check whether --enable-mod_pubsub was given. -if test "${enable_mod_pubsub+set}" = set; then - enableval=$enable_mod_pubsub; mr_enable_mod_pubsub="$enableval" +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## --------------------------------------- ## +## Report this to ejabberd@process-one.net ## +## --------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - mr_enable_mod_pubsub=yes + eval "$as_ac_Header=\$ac_header_preproc" fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } -if test "$mr_enable_mod_pubsub" = "yes"; then -mod_pubsub=mod_pubsub -make_mod_pubsub=mod_pubsub/Makefile fi -{ echo "$as_me:$LINENO: result: $mr_enable_mod_pubsub" >&5 -echo "${ECHO_T}$mr_enable_mod_pubsub" >&6; } - - - - +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF -mod_irc= -make_mod_irc= -{ echo "$as_me:$LINENO: checking whether build mod_irc" >&5 -echo $ECHO_N "checking whether build mod_irc... $ECHO_C" >&6; } -# Check whether --enable-mod_irc was given. -if test "${enable_mod_irc+set}" = set; then - enableval=$enable_mod_irc; mr_enable_mod_irc="$enableval" else - mr_enable_mod_irc=yes -fi - -if test "$mr_enable_mod_irc" = "yes"; then -mod_irc=mod_irc -make_mod_irc=mod_irc/Makefile + zlib_found=no fi -{ echo "$as_me:$LINENO: result: $mr_enable_mod_irc" >&5 -echo "${ECHO_T}$mr_enable_mod_irc" >&6; } - +done + if test $zlib_found = no; then + { { echo "$as_me:$LINENO: error: Could not find zlib.h. Install it or disable \`ejabberd_zlib' with: --disable-ejabberd_zlib" >&5 +echo "$as_me: error: Could not find zlib.h. Install it or disable \`ejabberd_zlib' with: --disable-ejabberd_zlib" >&2;} + { (exit 1); exit 1; }; } + fi + CFLAGS="$zlib_save_CFLAGS" + CPPFLAGS="$zlib_save_CPPFLAGS" -mod_muc= -make_mod_muc= -{ echo "$as_me:$LINENO: checking whether build mod_muc" >&5 -echo $ECHO_N "checking whether build mod_muc... $ECHO_C" >&6; } -# Check whether --enable-mod_muc was given. -if test "${enable_mod_muc+set}" = set; then - enableval=$enable_mod_muc; mr_enable_mod_muc="$enableval" -else - mr_enable_mod_muc=yes -fi -if test "$mr_enable_mod_muc" = "yes"; then -mod_muc=mod_muc -make_mod_muc=mod_muc/Makefile fi -{ echo "$as_me:$LINENO: result: $mr_enable_mod_muc" >&5 -echo "${ECHO_T}$mr_enable_mod_muc" >&6; } - - -mod_proxy65= -make_mod_proxy65= -{ echo "$as_me:$LINENO: checking whether build mod_proxy65" >&5 -echo $ECHO_N "checking whether build mod_proxy65... $ECHO_C" >&6; } -# Check whether --enable-mod_proxy65 was given. -if test "${enable_mod_proxy65+set}" = set; then - enableval=$enable_mod_proxy65; mr_enable_mod_proxy65="$enableval" +pam= +make_pam= +{ echo "$as_me:$LINENO: checking whether build pam" >&5 +echo $ECHO_N "checking whether build pam... $ECHO_C" >&6; } +# Check whether --enable-pam was given. +if test "${enable_pam+set}" = set; then + enableval=$enable_pam; mr_enable_pam="$enableval" else - mr_enable_mod_proxy65=yes + mr_enable_pam=no fi -if test "$mr_enable_mod_proxy65" = "yes"; then -mod_proxy65=mod_proxy65 -make_mod_proxy65=mod_proxy65/Makefile +if test "$mr_enable_pam" = "yes"; then +pam=pam +make_pam=pam/Makefile fi -{ echo "$as_me:$LINENO: result: $mr_enable_mod_proxy65" >&5 -echo "${ECHO_T}$mr_enable_mod_proxy65" >&6; } - +{ echo "$as_me:$LINENO: result: $mr_enable_pam" >&5 +echo "${ECHO_T}$mr_enable_pam" >&6; } -eldap= -make_eldap= -{ echo "$as_me:$LINENO: checking whether build eldap" >&5 -echo $ECHO_N "checking whether build eldap... $ECHO_C" >&6; } -# Check whether --enable-eldap was given. -if test "${enable_eldap+set}" = set; then - enableval=$enable_eldap; mr_enable_eldap="$enableval" -else - mr_enable_eldap=yes -fi +#locating PAM -if test "$mr_enable_eldap" = "yes"; then -eldap=eldap -make_eldap=eldap/Makefile +# Check whether --with-pam was given. +if test "${with_pam+set}" = set; then + withval=$with_pam; fi -{ echo "$as_me:$LINENO: result: $mr_enable_eldap" >&5 -echo "${ECHO_T}$mr_enable_eldap" >&6; } - - +if test x"$pam" != x; then + PAM_CFLAGS= + PAM_LIBS= + if test x"$with_pam" != x; then + PAM_CFLAGS="-I$with_pam/include" + PAM_LIBS="-L$with_pam/lib" + fi + { echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5 +echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6; } +if test "${ac_cv_lib_pam_pam_start+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpam "$PAM_LIBS" $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -pam= -make_pam= -{ echo "$as_me:$LINENO: checking whether build pam" >&5 -echo $ECHO_N "checking whether build pam... $ECHO_C" >&6; } -# Check whether --enable-pam was given. -if test "${enable_pam+set}" = set; then - enableval=$enable_pam; mr_enable_pam="$enableval" +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pam_start (); +int +main () +{ +return pam_start (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_pam_pam_start=yes else - mr_enable_pam=no -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test "$mr_enable_pam" = "yes"; then -pam=pam -make_pam=pam/Makefile + ac_cv_lib_pam_pam_start=no fi -{ echo "$as_me:$LINENO: result: $mr_enable_pam" >&5 -echo "${ECHO_T}$mr_enable_pam" >&6; } - - - - -web= -make_web= -{ echo "$as_me:$LINENO: checking whether build web" >&5 -echo $ECHO_N "checking whether build web... $ECHO_C" >&6; } -# Check whether --enable-web was given. -if test "${enable_web+set}" = set; then - enableval=$enable_web; mr_enable_web="$enableval" -else - mr_enable_web=yes +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi - -if test "$mr_enable_web" = "yes"; then -web=web -make_web=web/Makefile +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5 +echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6; } +if test $ac_cv_lib_pam_pam_start = yes; then + PAM_LIBS="$PAM_LIBS -lpam" + pam_found=yes +else + pam_found=no fi -{ echo "$as_me:$LINENO: result: $mr_enable_web" >&5 -echo "${ECHO_T}$mr_enable_web" >&6; } - - - + if test $pam_found = no; then + { { echo "$as_me:$LINENO: error: Could not find development files of PAM library. Install them or disable \`pam' with: --disable-pam" >&5 +echo "$as_me: error: Could not find development files of PAM library. Install them or disable \`pam' with: --disable-pam" >&2;} + { (exit 1); exit 1; }; } + fi + pam_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PAM_CFLAGS" + pam_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $PAM_CFLAGS" -tls= -make_tls= -{ echo "$as_me:$LINENO: checking whether build tls" >&5 -echo $ECHO_N "checking whether build tls... $ECHO_C" >&6; } -# Check whether --enable-tls was given. -if test "${enable_tls+set}" = set; then - enableval=$enable_tls; mr_enable_tls="$enableval" -else - mr_enable_tls=yes +for ac_header in security/pam_appl.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test "$mr_enable_tls" = "yes"; then -tls=tls -make_tls=tls/Makefile + ac_header_compiler=no fi -{ echo "$as_me:$LINENO: result: $mr_enable_tls" >&5 -echo "${ECHO_T}$mr_enable_tls" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } -odbc= -make_odbc= -{ echo "$as_me:$LINENO: checking whether build odbc" >&5 -echo $ECHO_N "checking whether build odbc... $ECHO_C" >&6; } -# Check whether --enable-odbc was given. -if test "${enable_odbc+set}" = set; then - enableval=$enable_odbc; mr_enable_odbc="$enableval" +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## --------------------------------------- ## +## Report this to ejabberd@process-one.net ## +## --------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - mr_enable_odbc=no + eval "$as_ac_Header=\$ac_header_preproc" fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } -if test "$mr_enable_odbc" = "yes"; then -odbc=odbc -make_odbc=odbc/Makefile fi -{ echo "$as_me:$LINENO: result: $mr_enable_odbc" >&5 -echo "${ECHO_T}$mr_enable_odbc" >&6; } - - - - +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF -ejabberd_zlib= -make_ejabberd_zlib= -{ echo "$as_me:$LINENO: checking whether build ejabberd_zlib" >&5 -echo $ECHO_N "checking whether build ejabberd_zlib... $ECHO_C" >&6; } -# Check whether --enable-ejabberd_zlib was given. -if test "${enable_ejabberd_zlib+set}" = set; then - enableval=$enable_ejabberd_zlib; mr_enable_ejabberd_zlib="$enableval" else - mr_enable_ejabberd_zlib=yes + pam_found=no fi -if test "$mr_enable_ejabberd_zlib" = "yes"; then -ejabberd_zlib=ejabberd_zlib -make_ejabberd_zlib=ejabberd_zlib/Makefile -fi -{ echo "$as_me:$LINENO: result: $mr_enable_ejabberd_zlib" >&5 -echo "${ECHO_T}$mr_enable_ejabberd_zlib" >&6; } +done + + if test $pam_found = no; then + { { echo "$as_me:$LINENO: error: Could not find security/pam_appl.h. Install it or disable \`pam' with: --disable-pam" >&5 +echo "$as_me: error: Could not find security/pam_appl.h. Install it or disable \`pam' with: --disable-pam" >&2;} + { (exit 1); exit 1; }; } + fi + CFLAGS="$pam_save_CFLAGS" + CPPFLAGS="$pam_save_CPPFLAGS" +fi # Check whether --enable-hipe was given. @@ -5754,8 +5761,8 @@ done fi done if test x${have_openssl} != xyes; then - { { echo "$as_me:$LINENO: error: openssl library cannot be found. Install openssl or disable \`tls' module (--disable-tls)." >&5 -echo "$as_me: error: openssl library cannot be found. Install openssl or disable \`tls' module (--disable-tls)." >&2;} + { { echo "$as_me:$LINENO: error: Could not find development files of OpenSSL library. Install them or disable \`tls' with: --disable-tls" >&5 +echo "$as_me: error: Could not find development files of OpenSSL library. Install them or disable \`tls' with: --disable-tls" >&2;} { (exit 1); exit 1; }; } fi @@ -6620,31 +6627,31 @@ GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim EXPAT_CFLAGS!$EXPAT_CFLAGS$ac_delim EXPAT_LIBS!$EXPAT_LIBS$ac_delim -ZLIB_CFLAGS!$ZLIB_CFLAGS$ac_delim -ZLIB_LIBS!$ZLIB_LIBS$ac_delim -PAM_CFLAGS!$PAM_CFLAGS$ac_delim -PAM_LIBS!$PAM_LIBS$ac_delim LIBOBJS!$LIBOBJS$ac_delim -mod_pubsub!$mod_pubsub$ac_delim -make_mod_pubsub!$make_mod_pubsub$ac_delim mod_irc!$mod_irc$ac_delim make_mod_irc!$make_mod_irc$ac_delim mod_muc!$mod_muc$ac_delim make_mod_muc!$make_mod_muc$ac_delim mod_proxy65!$mod_proxy65$ac_delim make_mod_proxy65!$make_mod_proxy65$ac_delim +mod_pubsub!$mod_pubsub$ac_delim +make_mod_pubsub!$make_mod_pubsub$ac_delim eldap!$eldap$ac_delim make_eldap!$make_eldap$ac_delim -pam!$pam$ac_delim -make_pam!$make_pam$ac_delim -web!$web$ac_delim -make_web!$make_web$ac_delim -tls!$tls$ac_delim -make_tls!$make_tls$ac_delim odbc!$odbc$ac_delim make_odbc!$make_odbc$ac_delim +tls!$tls$ac_delim +make_tls!$make_tls$ac_delim +web!$web$ac_delim +make_web!$make_web$ac_delim ejabberd_zlib!$ejabberd_zlib$ac_delim make_ejabberd_zlib!$make_ejabberd_zlib$ac_delim +ZLIB_CFLAGS!$ZLIB_CFLAGS$ac_delim +ZLIB_LIBS!$ZLIB_LIBS$ac_delim +pam!$pam$ac_delim +make_pam!$make_pam$ac_delim +PAM_CFLAGS!$PAM_CFLAGS$ac_delim +PAM_LIBS!$PAM_LIBS$ac_delim hipe!$hipe$ac_delim roster_gateway_workaround!$roster_gateway_workaround$ac_delim db_type!$db_type$ac_delim diff --git a/src/configure.ac b/src/configure.ac index ba6384633..c325c3f54 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -18,10 +18,6 @@ AM_WITH_ERLANG AM_ICONV #locating libexpat AM_WITH_EXPAT -#locating zlib -AM_WITH_ZLIB -#locating PAM -AM_WITH_PAM # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -36,16 +32,22 @@ AC_PREFIX_DEFAULT(/) AC_FUNC_MALLOC AC_HEADER_STDC -AC_MOD_ENABLE(mod_pubsub, yes) AC_MOD_ENABLE(mod_irc, yes) AC_MOD_ENABLE(mod_muc, yes) AC_MOD_ENABLE(mod_proxy65, yes) +AC_MOD_ENABLE(mod_pubsub, yes) AC_MOD_ENABLE(eldap, yes) -AC_MOD_ENABLE(pam, no) -AC_MOD_ENABLE(web, yes) -AC_MOD_ENABLE(tls, yes) AC_MOD_ENABLE(odbc, no) +AC_MOD_ENABLE(tls, yes) +AC_MOD_ENABLE(web, yes) + AC_MOD_ENABLE(ejabberd_zlib, yes) +#locating zlib +AM_WITH_ZLIB + +AC_MOD_ENABLE(pam, no) +#locating PAM +AM_WITH_PAM AC_ARG_ENABLE(hipe, [AC_HELP_STRING([--enable-hipe], [compile natively with HiPE, not recommended (default: no)])],