25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

* src/configure.ac: autoconf improvements (thanks to Tony Finch) (EJAB-204).

* src/aclocal.m4: Likewise.

SVN Revision: 741
This commit is contained in:
Mickaël Rémond 2007-03-10 16:27:17 +00:00
parent 48c073abd2
commit 2f11e6beac
4 changed files with 52 additions and 51 deletions

View File

@ -1,5 +1,8 @@
2007-03-10 Mickael Remond <mickael.remond@process-one.net>
* src/configure.ac: autoconf improvements (thanks to Tony Finch) (EJAB-204).
* src/aclocal.m4: Likewise.
* src/odbc/ejabberd_odbc.erl: ejabberd admin can now choose the
relational database port to user from ejabberd configuration
file (EJAB-195).

12
src/aclocal.m4 vendored
View File

@ -19,11 +19,14 @@ AC_DEFUN(AM_WITH_EXPAT,
fi
expat_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $EXPAT_CFLAGS"
expat_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $EXPAT_CFLAGS"
AC_CHECK_HEADERS(expat.h, , expat_found=no)
if test $expat_found = no; then
AC_MSG_ERROR([Could not find expat.h])
fi
CFLAGS="$expat_save_CFLAGS"
CPPFLAGS="$expat_save_CPPFLAGS"
AC_SUBST(EXPAT_CFLAGS)
AC_SUBST(EXPAT_LIBS)
@ -50,11 +53,14 @@ AC_DEFUN(AM_WITH_ZLIB,
fi
zlib_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $ZLIB_CFLAGS"
zlib_save_CPPFLAGS="$CFLAGS"
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])
fi
CFLAGS="$zlib_save_CFLAGS"
CPPFLAGS="$zlib_save_CPPFLAGS"
AC_SUBST(ZLIB_CFLAGS)
AC_SUBST(ZLIB_LIBS)
@ -265,19 +271,19 @@ have_openssl=no
if test x"$tls" != x; then
for ssl_prefix in $withval /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr; do
printf "looking for openssl in $ssl_prefix...\n"
SSL_CFLAGS="-I$ssl_prefix/include/openssl"
SSL_CFLAGS="-I$ssl_prefix/include"
SSL_LIBS="-L$ssl_prefix/lib -lcrypto"
AC_CHECK_LIB(ssl, SSL_new, [ have_openssl=yes ], [ have_openssl=no ], [ $SSL_LIBS $SSL_CFLAGS ])
if test x"$have_openssl" = xyes; then
save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="-I$ssl_prefix/lib $CPPFLAGS"
CPPFLAGS="-I$ssl_prefix/include $CPPFLAGS"
AC_CHECK_HEADERS(openssl/ssl.h, have_openssl_h=yes)
CPPFLAGS=$save_CPPFLAGS
if test x"$have_openssl_h" = xyes; then
have_openssl=yes
printf "openssl found in $ssl_prefix\n";
SSL_LIBS="-L$ssl_prefix/lib -lssl -lcrypto"
CPPFLAGS="-I$ssl_prefix/lib $CPPFLAGS"
CPPFLAGS="-I$ssl_prefix/include $CPPFLAGS"
SSL_CFLAGS="-DHAVE_SSL"
break
fi

84
src/configure vendored
View File

@ -1,8 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for FULL-PACKAGE-NAME VERSION.
#
# Report bugs to <BUG-REPORT-ADDRESS>.
# Generated by GNU Autoconf 2.59.
#
# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
@ -267,12 +265,13 @@ SHELL=${CONFIG_SHELL-/bin/sh}
: ${ac_max_here_lines=38}
# Identity of this package.
PACKAGE_NAME='FULL-PACKAGE-NAME'
PACKAGE_TARNAME='full-package-name'
PACKAGE_VERSION='VERSION'
PACKAGE_STRING='FULL-PACKAGE-NAME VERSION'
PACKAGE_BUGREPORT='BUG-REPORT-ADDRESS'
PACKAGE_NAME=
PACKAGE_TARNAME=
PACKAGE_VERSION=
PACKAGE_STRING=
PACKAGE_BUGREPORT=
ac_unique_file="ejabberd.erl"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
@ -310,7 +309,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_default_prefix=
ac_default_prefix=/
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT SET_MAKE ERLC ac_pt_ERLC ERL ac_pt_ERL ERLANG_CFLAGS ERLANG_LIBS LIBICONV CPP EGREP EXPAT_CFLAGS EXPAT_LIBS ZLIB_CFLAGS ZLIB_LIBS LIBOBJS mod_pubsub make_mod_pubsub mod_irc make_mod_irc mod_muc make_mod_muc mod_proxy65 make_mod_proxy65 eldap make_eldap web make_web tls make_tls odbc make_odbc ejabberd_zlib make_ejabberd_zlib roster_gateway_workaround db_type SSL_LIBS SSL_CFLAGS LTLIBOBJS'
ac_subst_files=''
@ -780,7 +779,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures FULL-PACKAGE-NAME VERSION to adapt to many kinds of systems.
\`configure' configures this package to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -836,9 +835,7 @@ _ACEOF
fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of FULL-PACKAGE-NAME VERSION:";;
esac
cat <<\_ACEOF
Optional Features:
@ -877,7 +874,6 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <BUG-REPORT-ADDRESS>.
_ACEOF
fi
@ -973,8 +969,6 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
FULL-PACKAGE-NAME configure VERSION
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
@ -987,7 +981,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by FULL-PACKAGE-NAME $as_me VERSION, which was
It was created by $as_me, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@ -1308,14 +1302,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
@ -3419,6 +3405,8 @@ echo "$as_me: error: Could not find the Expat library" >&2;}
fi
expat_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $EXPAT_CFLAGS"
expat_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $EXPAT_CFLAGS"
for ac_header in expat.h
do
@ -3541,9 +3529,9 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## --------------------------------- ##
## Report this to BUG-REPORT-ADDRESS ##
## --------------------------------- ##
## ------------------------------------------ ##
## Report this to the AC_PACKAGE_NAME lists. ##
## ------------------------------------------ ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
@ -3577,6 +3565,7 @@ echo "$as_me: error: Could not find expat.h" >&2;}
{ (exit 1); exit 1; }; }
fi
CFLAGS="$expat_save_CFLAGS"
CPPFLAGS="$expat_save_CPPFLAGS"
@ -3674,6 +3663,8 @@ echo "$as_me: error: Could not find the zlib library" >&2;}
fi
zlib_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $ZLIB_CFLAGS"
zlib_save_CPPFLAGS="$CFLAGS"
CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"
for ac_header in zlib.h
do
@ -3796,9 +3787,9 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## --------------------------------- ##
## Report this to BUG-REPORT-ADDRESS ##
## --------------------------------- ##
## ------------------------------------------ ##
## Report this to the AC_PACKAGE_NAME lists. ##
## ------------------------------------------ ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
@ -3832,6 +3823,7 @@ echo "$as_me: error: Could not find zlib.h" >&2;}
{ (exit 1); exit 1; }; }
fi
CFLAGS="$zlib_save_CFLAGS"
CPPFLAGS="$zlib_save_CPPFLAGS"
@ -3947,7 +3939,7 @@ fi
# Change default prefix
/
# Checks for library functions.
@ -4072,9 +4064,9 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## --------------------------------- ##
## Report this to BUG-REPORT-ADDRESS ##
## --------------------------------- ##
## ------------------------------------------ ##
## Report this to the AC_PACKAGE_NAME lists. ##
## ------------------------------------------ ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
@ -4592,7 +4584,7 @@ have_openssl=no
if test x"$tls" != x; then
for ssl_prefix in $withval /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr; do
printf "looking for openssl in $ssl_prefix...\n"
SSL_CFLAGS="-I$ssl_prefix/include/openssl"
SSL_CFLAGS="-I$ssl_prefix/include"
SSL_LIBS="-L$ssl_prefix/lib -lcrypto"
echo "$as_me:$LINENO: checking for SSL_new in -lssl" >&5
echo $ECHO_N "checking for SSL_new in -lssl... $ECHO_C" >&6
@ -4666,7 +4658,7 @@ fi
if test x"$have_openssl" = xyes; then
save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="-I$ssl_prefix/lib $CPPFLAGS"
CPPFLAGS="-I$ssl_prefix/include $CPPFLAGS"
for ac_header in openssl/ssl.h
do
@ -4789,9 +4781,9 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## --------------------------------- ##
## Report this to BUG-REPORT-ADDRESS ##
## --------------------------------- ##
## ------------------------------------------ ##
## Report this to the AC_PACKAGE_NAME lists. ##
## ------------------------------------------ ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
@ -4822,7 +4814,7 @@ done
have_openssl=yes
printf "openssl found in $ssl_prefix\n";
SSL_LIBS="-L$ssl_prefix/lib -lssl -lcrypto"
CPPFLAGS="-I$ssl_prefix/lib $CPPFLAGS"
CPPFLAGS="-I$ssl_prefix/include $CPPFLAGS"
SSL_CFLAGS="-DHAVE_SSL"
break
fi
@ -4969,9 +4961,9 @@ echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## --------------------------------- ##
## Report this to BUG-REPORT-ADDRESS ##
## --------------------------------- ##
## ------------------------------------------ ##
## Report this to the AC_PACKAGE_NAME lists. ##
## ------------------------------------------ ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
@ -5384,7 +5376,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
This file was extended by FULL-PACKAGE-NAME $as_me VERSION, which was
This file was extended by $as_me, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -5439,7 +5431,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
FULL-PACKAGE-NAME config.status VERSION
config.status
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"

View File

@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.53)
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
AC_INIT(ejabberd.erl,, ejabberd@process-one.net)
# Checks for programs.
AC_PROG_CC
@ -21,7 +21,7 @@ AM_WITH_ZLIB
AC_C_CONST
# Change default prefix
AC_PREFIX_DEFAULT /
AC_PREFIX_DEFAULT(/)
# Checks for library functions.
AC_FUNC_MALLOC