mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 01:37:01 +00:00
[8396] Misc cleanup patches to configure.ac
* Use pkg-config for ACE (req. ACE 5.5.2 or later), in mangos included 5.6.6. * Use pkg-config for OpenSSL * Enable silent builds with >=automake-1.11 Note: possible you will need install pkg-config tool at your Unix/Linux Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
4d0eee5393
commit
ddf54081d0
2 changed files with 13 additions and 37 deletions
48
configure.ac
48
configure.ac
|
|
@ -22,7 +22,9 @@ AC_CONFIG_SRCDIR([src/shared/Base.cpp])
|
||||||
## Prelude, basic settings for Automake
|
## Prelude, basic settings for Automake
|
||||||
# Turn on all warnings and error messages, and enforce GNU
|
# Turn on all warnings and error messages, and enforce GNU
|
||||||
# standards for the package.
|
# standards for the package.
|
||||||
AM_INIT_AUTOMAKE([-Wall -Werror gnu tar-pax])
|
AM_INIT_AUTOMAKE([foreign -Wall -Werror gnu tar-pax])
|
||||||
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||||
|
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
## Prevent the configure script from continuing any further if
|
## Prevent the configure script from continuing any further if
|
||||||
|
|
@ -69,6 +71,7 @@ AC_PROG_CXX
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
AC_PROG_LIBTOOL
|
AC_PROG_LIBTOOL
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
|
PKG_PROG_PKG_CONFIG
|
||||||
|
|
||||||
# Check for doxygen
|
# Check for doxygen
|
||||||
AC_ARG_ENABLE(doxygen, AC_HELP_STRING([--enable-doxygen], [turn on generating documentation]))
|
AC_ARG_ENABLE(doxygen, AC_HELP_STRING([--enable-doxygen], [turn on generating documentation]))
|
||||||
|
|
@ -94,7 +97,7 @@ AC_CHECK_LIB( pthread, pthread_create, [],
|
||||||
])
|
])
|
||||||
AC_CHECK_LIB( z, compress, [ZLIB=-lz],[AC_MSG_ERROR([Missing zlib])] )
|
AC_CHECK_LIB( z, compress, [ZLIB=-lz],[AC_MSG_ERROR([Missing zlib])] )
|
||||||
AC_CHECK_LIB( compat, ftime, [COMPATLIB=-lcompat] )
|
AC_CHECK_LIB( compat, ftime, [COMPATLIB=-lcompat] )
|
||||||
AC_CHECK_LIB( crypto, SHA1_Init, [SSLLIB=-lssl], [AC_MSG_ERROR([Missing openssl])])
|
PKG_CHECK_MODULES(OPENSSL, [openssl], [], [AC_MSG_ERROR([Missing openssl])])
|
||||||
|
|
||||||
AC_ARG_WITH(postgresql,
|
AC_ARG_WITH(postgresql,
|
||||||
[ --with-postgresql Use PostgreSQL as a backend (default: no)],
|
[ --with-postgresql Use PostgreSQL as a backend (default: no)],
|
||||||
|
|
@ -121,7 +124,7 @@ AC_MSG_CHECKING(whether to build/link POSTGRESQL)
|
||||||
if test "x$DO_POSTGRESQL" = "xyes"; then
|
if test "x$DO_POSTGRESQL" = "xyes"; then
|
||||||
DO_MYSQL=no
|
DO_MYSQL=no
|
||||||
POSTGRE_INCLUDES="-I/usr/include/postgresql $POSTGRE_INCLUDES"
|
POSTGRE_INCLUDES="-I/usr/include/postgresql $POSTGRE_INCLUDES"
|
||||||
POSTGRE_LIBS="-L/usr/lib/postresql -lpq -lz -lpthread -lcrypt -lnsl -lm -lpthread -L/usr/lib -lssl -lcrypto $POSTGRE_LIBS "
|
POSTGRE_LIBS="-L/usr/lib/postresql -lpq -lz -lpthread -lcrypt -lnsl -lm -lpthread -L/usr/lib $OPENSSL_LIBS $POSTGRE_LIBS "
|
||||||
CXXFLAGS="-DDO_POSTGRESQL $CXXFLAGS"
|
CXXFLAGS="-DDO_POSTGRESQL $CXXFLAGS"
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT($DO_POSTGRESQL)
|
AC_MSG_RESULT($DO_POSTGRESQL)
|
||||||
|
|
@ -174,7 +177,6 @@ AC_HEADER_DIRENT
|
||||||
AC_CHECK_HEADERS([ arpa/inet.h fcntl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/socket.h sys/timeb.h sys/time.h termios.h unistd.h ])
|
AC_CHECK_HEADERS([ arpa/inet.h fcntl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/socket.h sys/timeb.h sys/time.h termios.h unistd.h ])
|
||||||
|
|
||||||
AC_CHECK_HEADERS([pthread.h])
|
AC_CHECK_HEADERS([pthread.h])
|
||||||
AC_CHECK_HEADERS([openssl/md5.h openssl/rand.h openssl/ssl.h openssl/sha.h openssl/bn.h])
|
|
||||||
AC_CHECK_HEADERS([mysql.h mysql/mysql.h])
|
AC_CHECK_HEADERS([mysql.h mysql/mysql.h])
|
||||||
AC_CHECK_HEADERS([libpq-fe.h])
|
AC_CHECK_HEADERS([libpq-fe.h])
|
||||||
AC_CHECK_HEADERS([zlib.h])
|
AC_CHECK_HEADERS([zlib.h])
|
||||||
|
|
@ -199,36 +201,10 @@ AC_TYPE_SIGNAL
|
||||||
AC_FUNC_VPRINTF
|
AC_FUNC_VPRINTF
|
||||||
AC_CHECK_FUNCS([atexit ftime gethostbyaddr gethostbyname gethostname gettimeofday memmove memset pow realpath select socket sqrt strchr strdup strerror strstr])
|
AC_CHECK_FUNCS([atexit ftime gethostbyaddr gethostbyname gethostname gettimeofday memmove memset pow realpath select socket sqrt strchr strdup strerror strstr])
|
||||||
|
|
||||||
## Check what to do with ACE library
|
PKG_CHECK_MODULES(ACE, [ACE >= 5.5.2], [need_to_build_ace=no], [need_to_build_ace=yes])
|
||||||
AC_LANG_PUSH([C++])
|
if test X$need_to_build_ace = Xyes ; then
|
||||||
AC_CHECK_HEADER([ace/Reactor.h], [have_ace_headers=yes], [have_ace_headers=no])
|
ACE_INCLUDES="-I\$(top_srcdir)/dep/ACE_wrappers -I\$(top_builddir)/dep/ACE_wrappers"
|
||||||
AC_CHECK_LIB([ACE], [main], [have_ace_lib=yes], [have_ace_lib=no])
|
ACE_LIBS="\$(top_builddir)/dep/ACE_wrappers/ace/libACE.la"
|
||||||
AC_LANG_POP([C++])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether to build ACE])
|
|
||||||
if test X$have_ace_headers = Xyes -a X$have_ace_lib = Xyes;
|
|
||||||
then
|
|
||||||
need_to_build_ace=no
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
else
|
|
||||||
if test X$have_ace_headers = Xno -a X$have_ace_lib = Xno; then
|
|
||||||
need_to_build_ace=yes
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
else
|
|
||||||
if test X$have_ace_headers = Xyes; then
|
|
||||||
AC_MSG_ERROR([looks like you have ACE headers, but you do not have ACE libs installed])
|
|
||||||
else
|
|
||||||
need_to_build_ace=yes
|
|
||||||
AC_MSG_RESULT([yes, over-install])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test X$need_to_build_ace = Xyes; then
|
|
||||||
MANGOS_INCLUDES="-I\$(top_srcdir)/dep/ACE_wrappers -I\$(top_builddir)/dep/ACE_wrappers $MANGOS_INCLUDES"
|
|
||||||
MANGOS_LIBS="\$(top_builddir)/dep/ACE_wrappers/ace/libACE.la $MANGOS_LIBS"
|
|
||||||
else
|
|
||||||
MANGOS_LIBS="-lACE $MANGOS_LIBS"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL([MANGOS_BUILD_ACE], [test X$need_to_build_ace = Xyes])
|
AM_CONDITIONAL([MANGOS_BUILD_ACE], [test X$need_to_build_ace = Xyes])
|
||||||
|
|
@ -238,8 +214,8 @@ AC_CHECK_HEADERS([ace/Stack_Trace.h])
|
||||||
|
|
||||||
## Unify all additional includes/libs in one variable.
|
## Unify all additional includes/libs in one variable.
|
||||||
# TODO this looks kinda ugly, but when we add m4 folder I will make it look very pritey ( by Derex ).
|
# TODO this looks kinda ugly, but when we add m4 folder I will make it look very pritey ( by Derex ).
|
||||||
MANGOS_INCLUDES="$POSTGRE_INCLUDES $MYSQL_INCLUDES $MANGOS_INCLUDES"
|
MANGOS_INCLUDES="$ACE_INCLUDES $POSTGRE_INCLUDES $MYSQL_INCLUDES $OPENSSL_INCLUDES $MANGOS_INCLUDES"
|
||||||
MANGOS_LIBS="$POSTGRE_LIBS $MYSQL_LIBS $ZLIB $COMPATLIB $SSLLIB $MANGOS_LIBS"
|
MANGOS_LIBS="$ACE_LIBS $POSTGRE_LIBS $MYSQL_LIBS $ZLIB $COMPATLIB $OPENSSL_LIBS $MANGOS_LIBS"
|
||||||
|
|
||||||
## Export defined variables
|
## Export defined variables
|
||||||
AC_SUBST(DOXYGEN)
|
AC_SUBST(DOXYGEN)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8395"
|
#define REVISION_NR "8396"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue