mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
* src/aclocal.m4: Better expat and openssl detection (thanks to
Anton Vanin) * src/**/Makefile.in: Updated (thanks to Anton Vanin) * src/configure.ac: Likewise SVN Revision: 267
This commit is contained in:
parent
4e7e67c8b5
commit
cbcb2bd3a6
@ -1,3 +1,11 @@
|
||||
2004-09-26 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/aclocal.m4: Better expat and openssl detection (thanks to
|
||||
Anton Vanin)
|
||||
|
||||
* src/**/Makefile.in: Updated (thanks to Anton Vanin)
|
||||
* src/configure.ac: Likewise
|
||||
|
||||
2004-09-25 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/jlib.hrl: Added namespace for iq-register stream feature
|
||||
|
@ -1,10 +1,16 @@
|
||||
# $Id$
|
||||
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@ @ERLANG_CFLAGS@ @EXPAT_CFLAGS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@ @ERLANG_LIBS@ @EXPAT_LIBS@
|
||||
LIBS = @LIBS@
|
||||
|
||||
EXPAT_CFLAGS = @EXPAT_CFLAGS@
|
||||
ERLANG_CFLAGS= @ERLANG_CFLAGS@
|
||||
|
||||
EXPAT_LIBS = @EXPAT_LIBS@
|
||||
ERLANG_LIBS = @ERLANG_LIBS@
|
||||
|
||||
prefix = @prefix@
|
||||
|
||||
@ -40,10 +46,9 @@ mostlyclean-recursive maintainer-clean-recursive:
|
||||
$(ERLSHLIBS): %.so: %.c
|
||||
gcc -Wall $(CFLAGS) $(LDFLAGS) $(LIBS) \
|
||||
$(subst ../,,$(subst .so,.c,$@)) \
|
||||
-lexpat \
|
||||
-lerl_interface \
|
||||
-lei \
|
||||
-o $@ -fpic -shared \
|
||||
$(EXPAT_LIBS) $(EXPAT_CFLAGS) \
|
||||
$(ERLANG_LIBS) $(ERLANG_CFLAGS) \
|
||||
-o $@ -fpic -shared
|
||||
|
||||
install: all
|
||||
install -d $(BEAMDIR)
|
||||
|
51
src/aclocal.m4
vendored
51
src/aclocal.m4
vendored
@ -1,15 +1,14 @@
|
||||
AC_DEFUN(AM_WITH_EXPAT,
|
||||
[ AC_ARG_WITH(expat,
|
||||
[ --with-expat=PREFIX prefix where EXPAT is installed],
|
||||
, with_expat=no)
|
||||
[ --with-expat=PREFIX prefix where EXPAT is installed])
|
||||
|
||||
EXPAT_CFLAGS=
|
||||
EXPAT_LIBS=
|
||||
if test $with_expat != no; then
|
||||
if test $with_expat != yes; then
|
||||
if test x"$with_expat" != x; then
|
||||
EXPAT_CFLAGS="-I$with_expat/include"
|
||||
EXPAT_LIBS="-L$with_expat/lib"
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(expat, XML_ParserCreate,
|
||||
[ EXPAT_LIBS="$EXPAT_LIBS -lexpat"
|
||||
expat_found=yes ],
|
||||
@ -25,7 +24,6 @@ AC_DEFUN(AM_WITH_EXPAT,
|
||||
AC_MSG_ERROR([Could not find expat.h])
|
||||
fi
|
||||
CFLAGS="$expat_save_CFLAGS"
|
||||
fi
|
||||
|
||||
AC_SUBST(EXPAT_CFLAGS)
|
||||
AC_SUBST(EXPAT_LIBS)
|
||||
@ -75,7 +73,7 @@ _EOF
|
||||
ERLANG_DIR=`cat conftest.out | tail -n 1`
|
||||
|
||||
ERLANG_CFLAGS="-I$ERLANG_EI_DIR/include -I$ERLANG_DIR/usr/include"
|
||||
ERLANG_LIBS="-L$ERLANG_EI_DIR/lib"
|
||||
ERLANG_LIBS="-L$ERLANG_EI_DIR/lib -lerl_interface -lei"
|
||||
|
||||
AC_SUBST(ERLANG_CFLAGS)
|
||||
AC_SUBST(ERLANG_LIBS)
|
||||
@ -197,36 +195,31 @@ dnl <openssl>
|
||||
AC_DEFUN(AM_WITH_OPENSSL,
|
||||
[ AC_ARG_WITH(openssl,
|
||||
[ --with-openssl=PREFIX prefix where OPENSSL is installed ])
|
||||
|
||||
unset SSL_LIBS;
|
||||
unset SSL_CFLAGS;
|
||||
have_openssl=no
|
||||
if test x"$tls" != x; then
|
||||
if test "x$with_openssl" == x; then
|
||||
ssl_prefix=/usr
|
||||
else
|
||||
ssl_prefix=$with_openssl
|
||||
fi
|
||||
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_LIBS="-L$ssl_prefix/lib"
|
||||
AC_CHECK_LIB(ssl, SSL_new, [ have_openssl=yes ], [ have_openssl=no ], "-lcrypto")
|
||||
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
|
||||
AC_CHECK_HEADERS(openssl/ssl.h, have_openssl_h=yes)
|
||||
AC_CHECK_HEADERS($ssl_prefix/include/openssl/ssl.h, have_openssl_h=yes)
|
||||
if test x"$have_openssl_h" = xyes; then
|
||||
with_openssl=yes
|
||||
SSL_LIBS="$SSL_LIBS -lssl -lcrypto"
|
||||
else
|
||||
unset SSL_LIBS
|
||||
unset SSL_CFLAGS
|
||||
with_openssl=no
|
||||
have_openssl=yes
|
||||
printf "openssl found in $ssl_prefix\n";
|
||||
SSL_LIBS="-L$ssl_prefix/lib -lssl -lcrypto"
|
||||
SSL_CFLAGS="-I$ssl_prefix/include/openssl -DHAVE_SSL"
|
||||
break
|
||||
fi
|
||||
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).])
|
||||
fi
|
||||
fi
|
||||
echo -n openssl support ..... : $with_openssl
|
||||
if test x"$with_openssl" != xno; then
|
||||
echo , libs: $SSL_LIBS, includes: $SSL_CFLAGS
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(SSL_LIBS)
|
||||
AC_SUBST(SSL_CFLAGS)
|
||||
fi
|
||||
])
|
||||
dnl <openssl/>
|
||||
|
50
src/configure
vendored
50
src/configure
vendored
@ -2226,7 +2226,7 @@ echo "$as_me: error: erlang program was not properly executed, (conftest.out was
|
||||
ERLANG_DIR=`cat conftest.out | tail -n 1`
|
||||
|
||||
ERLANG_CFLAGS="-I$ERLANG_EI_DIR/include -I$ERLANG_DIR/usr/include"
|
||||
ERLANG_LIBS="-L$ERLANG_EI_DIR/lib"
|
||||
ERLANG_LIBS="-L$ERLANG_EI_DIR/lib -lerl_interface -lei"
|
||||
|
||||
|
||||
|
||||
@ -2883,17 +2883,15 @@ done
|
||||
if test "${with_expat+set}" = set; then
|
||||
withval="$with_expat"
|
||||
|
||||
else
|
||||
with_expat=no
|
||||
fi;
|
||||
|
||||
EXPAT_CFLAGS=
|
||||
EXPAT_LIBS=
|
||||
if test $with_expat != no; then
|
||||
if test $with_expat != yes; then
|
||||
if test x"$with_expat" != x; then
|
||||
EXPAT_CFLAGS="-I$with_expat/include"
|
||||
EXPAT_LIBS="-L$with_expat/lib"
|
||||
fi
|
||||
|
||||
echo "$as_me:$LINENO: checking for XML_ParserCreate in -lexpat" >&5
|
||||
echo $ECHO_N "checking for XML_ParserCreate in -lexpat... $ECHO_C" >&6
|
||||
if test "${ac_cv_lib_expat_XML_ParserCreate+set}" = set; then
|
||||
@ -3085,7 +3083,6 @@ echo "$as_me: error: Could not find expat.h" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
CFLAGS="$expat_save_CFLAGS"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@ -3749,22 +3746,21 @@ if test "${with_openssl+set}" = set; then
|
||||
withval="$with_openssl"
|
||||
|
||||
fi;
|
||||
|
||||
unset SSL_LIBS;
|
||||
unset SSL_CFLAGS;
|
||||
have_openssl=no
|
||||
if test x"$tls" != x; then
|
||||
if test "x$with_openssl" == x; then
|
||||
ssl_prefix=/usr
|
||||
else
|
||||
ssl_prefix=$with_openssl
|
||||
fi
|
||||
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_LIBS="-L$ssl_prefix/lib"
|
||||
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
|
||||
if test "${ac_cv_lib_ssl_SSL_new+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lssl "-lcrypto" $LIBS"
|
||||
LIBS="-lssl $SSL_LIBS $SSL_CFLAGS $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
#include "confdefs.h"
|
||||
@ -3821,7 +3817,7 @@ fi
|
||||
|
||||
if test x"$have_openssl" = xyes; then
|
||||
|
||||
for ac_header in openssl/ssl.h
|
||||
for ac_header in $ssl_prefix/include/openssl/ssl.h
|
||||
do
|
||||
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||||
@ -3935,26 +3931,22 @@ fi
|
||||
done
|
||||
|
||||
if test x"$have_openssl_h" = xyes; then
|
||||
with_openssl=yes
|
||||
SSL_LIBS="$SSL_LIBS -lssl -lcrypto"
|
||||
else
|
||||
unset SSL_LIBS
|
||||
unset SSL_CFLAGS
|
||||
with_openssl=no
|
||||
have_openssl=yes
|
||||
printf "openssl found in $ssl_prefix\n";
|
||||
SSL_LIBS="-L$ssl_prefix/lib -lssl -lcrypto"
|
||||
SSL_CFLAGS="-I$ssl_prefix/include/openssl -DHAVE_SSL"
|
||||
break
|
||||
fi
|
||||
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;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
fi
|
||||
echo -n openssl support ..... : $with_openssl
|
||||
if test x"$with_openssl" != xno; then
|
||||
echo , libs: $SSL_LIBS, includes: $SSL_CFLAGS
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
|
@ -1,18 +1,13 @@
|
||||
# $Id$
|
||||
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAGS = @CFLAGS@ @ERLANG_CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
|
||||
INCLUDES = @ERLANG_CFLAGS@
|
||||
|
||||
LIBDIRS = @ERLANG_LIBS@
|
||||
LIBS = @LIBS@ @ERLANG_LIBS@
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
|
||||
OUTDIR = ..
|
||||
EFLAGS = -I .. -pz ..
|
||||
OBJS = \
|
||||
|
@ -1,21 +1,15 @@
|
||||
# $Id$
|
||||
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAGS = @CFLAGS@ @ERLANG_CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
|
||||
INCLUDES = @ERLANG_CFLAGS@
|
||||
|
||||
LIBDIRS = @ERLANG_LIBS@
|
||||
LIBS = @LIBS@ @ERLANG_LIBS@ @LIBICONV@
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
ERLSHLIBS = ../iconv_erl.so
|
||||
|
||||
|
||||
|
||||
OUTDIR = ..
|
||||
EFLAGS = -I .. -pz ..
|
||||
OBJS = \
|
||||
@ -28,17 +22,13 @@ all: $(OBJS) $(ERLSHLIBS)
|
||||
$(OUTDIR)/%.beam: %.erl
|
||||
erlc -W $(EFLAGS) -o $(OUTDIR) $<
|
||||
|
||||
|
||||
|
||||
#all: $(ERLSHLIBS)
|
||||
# erl -s make all report "{outdir, \"..\"}" -noinput -s erlang halt
|
||||
|
||||
$(ERLSHLIBS): ../%.so: %.c
|
||||
$(CC) -Wall $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(LIBDIRS) \
|
||||
$(subst ../,,$(subst .so,.c,$@)) \
|
||||
-lerl_interface @LIBICONV@ \
|
||||
-lei \
|
||||
-o $@ -fpic -shared \
|
||||
$(CC) -Wall $(INCLUDES) $(CFLAGS) $(LDFLAGS) \
|
||||
$(subst ../,,$(subst .so,.c,$@)) $(LIBS) \
|
||||
-o $@ -fpic -shared
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) $(ERLSHLIBS)
|
||||
|
@ -1,18 +1,13 @@
|
||||
# $Id$
|
||||
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAGS = @CFLAGS@ @ERLANG_CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
|
||||
INCLUDES = @ERLANG_CFLAGS@
|
||||
|
||||
LIBDIRS = @ERLANG_LIBS@
|
||||
LIBS = @LIBS@ @ERLANG_LIBS@
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
|
||||
OUTDIR = ..
|
||||
EFLAGS = -I .. -pz ..
|
||||
OBJS = \
|
||||
@ -24,7 +19,6 @@ all: $(OBJS)
|
||||
$(OUTDIR)/%.beam: %.erl
|
||||
erlc -W $(EFLAGS) -o $(OUTDIR) $<
|
||||
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
|
||||
|
@ -1,18 +1,13 @@
|
||||
# $Id$
|
||||
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAGS = @CFLAGS@ @ERLANG_CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
|
||||
INCLUDES = @ERLANG_CFLAGS@
|
||||
|
||||
LIBDIRS = @ERLANG_LIBS@
|
||||
LIBS = @LIBS@ @ERLANG_LIBS@
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
|
||||
OUTDIR = ..
|
||||
EFLAGS = -I .. -pz ..
|
||||
OBJS = \
|
||||
@ -23,7 +18,6 @@ all: $(OBJS)
|
||||
$(OUTDIR)/%.beam: %.erl
|
||||
erlc -W $(EFLAGS) -o $(OUTDIR) $<
|
||||
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
|
||||
|
@ -1,23 +1,15 @@
|
||||
# $Id$
|
||||
|
||||
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAGS = @CFLAGS@ @ERLANG_CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
|
||||
INCLUDES = @ERLANG_CFLAGS@
|
||||
|
||||
LIBDIRS = @ERLANG_LIBS@
|
||||
LIBS = @LIBS@ @ERLANG_LIBS@
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
|
||||
ERLSHLIBS = ../stringprep_drv.so
|
||||
|
||||
|
||||
|
||||
OUTDIR = ..
|
||||
EFLAGS = -I .. -pz ..
|
||||
OBJS = \
|
||||
@ -28,17 +20,13 @@ all: $(OBJS) $(ERLSHLIBS)
|
||||
$(OUTDIR)/%.beam: %.erl
|
||||
erlc -W $(EFLAGS) -o $(OUTDIR) $<
|
||||
|
||||
|
||||
|
||||
#all: $(ERLSHLIBS)
|
||||
# erl -s make all report "{outdir, \"..\"}" -noinput -s erlang halt
|
||||
|
||||
$(ERLSHLIBS): ../%.so: %.c uni_data.c uni_norm.c
|
||||
gcc -Wall -O2 $(INCLUDES) $(LIBDIRS) \
|
||||
$(subst ../,,$(subst .so,.c,$@)) \
|
||||
-lerl_interface \
|
||||
-lei \
|
||||
-o $@ -fpic -shared \
|
||||
gcc -Wall -O2 $(CFLAGS) $(LDFLAGS) $(INCLUDES) \
|
||||
$(subst ../,,$(subst .so,.c,$@)) $(LIBS) \
|
||||
-o $@ -fpic -shared
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) $(ERLSHLIBS)
|
||||
|
@ -24,11 +24,9 @@ $(OUTDIR)/%.beam: %.erl
|
||||
# erl -s make all report "{outdir, \"..\"}" -noinput -s erlang halt
|
||||
|
||||
$(ERLSHLIBS): ../%.so: %.c
|
||||
$(CC) -Wall $(CFLAGS) $(LDFLAGS) $(LIBS) \
|
||||
$(subst ../,,$(subst .so,.c,$@)) \
|
||||
-lerl_interface @LIBICONV@ \
|
||||
-lei \
|
||||
-o $@ -fpic -shared \
|
||||
$(CC) -Wall $(CFLAGS) $(LDFLAGS) \
|
||||
$(subst ../,,$(subst .so,.c,$@)) $(LIBS) \
|
||||
-o $@ -fpic -shared
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) $(ERLSHLIBS)
|
||||
@ -38,4 +36,3 @@ distclean: clean
|
||||
|
||||
TAGS:
|
||||
etags *.erl
|
||||
|
||||
|
@ -1,14 +1,10 @@
|
||||
# $Id$
|
||||
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAGS = @CFLAGS@ @ERLANG_CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
|
||||
INCLUDES = @ERLANG_CFLAGS@
|
||||
|
||||
LIBDIRS = @ERLANG_LIBS@
|
||||
LIBS = @LIBS@ @ERLANG_LIBS@
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user