autotools: cleaned up configure.ac and Makefile.am
This commit is contained in:
committed by
Dmitry Podgorny
parent
97c6e6d8d4
commit
46f371b311
@@ -5,7 +5,7 @@ AM_CFLAGS = -g -Wall
|
|||||||
PARSER_CFLAGS=@PARSER_CFLAGS@
|
PARSER_CFLAGS=@PARSER_CFLAGS@
|
||||||
PARSER_LIBS=@PARSER_LIBS@
|
PARSER_LIBS=@PARSER_LIBS@
|
||||||
|
|
||||||
SSL_LIBS = -lssl -lcrypto -lz
|
SSL_LIBS = @openssl_LIBS@
|
||||||
|
|
||||||
STROPHE_FLAGS = -I$(top_srcdir)
|
STROPHE_FLAGS = -I$(top_srcdir)
|
||||||
STROPHE_LIBS = libstrophe.la
|
STROPHE_LIBS = libstrophe.la
|
||||||
|
|||||||
20
configure.ac
20
configure.ac
@@ -4,14 +4,14 @@ LT_INIT([dlopen])
|
|||||||
|
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
|
PKG_PROG_PKG_CONFIG
|
||||||
|
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
PLATFORM="unknown"
|
|
||||||
AS_CASE([$host_os],
|
AS_CASE([$host_os],
|
||||||
[freebsd*], [PLATFORM="freebsd"],
|
[freebsd*], [PLATFORM="freebsd"],
|
||||||
[PLATFORM="nix"])
|
[PLATFORM="nix"])
|
||||||
|
|
||||||
AC_CHECK_HEADER(openssl/ssl.h, [], [AC_MSG_ERROR([couldn't find openssl headers, openssl required])])
|
PKG_CHECK_MODULES([openssl], [openssl], [], [AC_MSG_ERROR([openssl not found; openssl required])])
|
||||||
PKG_CHECK_MODULES([check], [check >= 0.9.4], [], [AC_MSG_WARN([libcheck not found; unit tests will not be compilable])])
|
PKG_CHECK_MODULES([check], [check >= 0.9.4], [], [AC_MSG_WARN([libcheck not found; unit tests will not be compilable])])
|
||||||
|
|
||||||
AC_ARG_WITH([libxml2],
|
AC_ARG_WITH([libxml2],
|
||||||
@@ -24,26 +24,26 @@ if test "x$with_libxml2" != xno; then
|
|||||||
[with_libxml2=yes], [dummy=1])
|
[with_libxml2=yes], [dummy=1])
|
||||||
if test "x$with_libxml2" != xyes; then
|
if test "x$with_libxml2" != xyes; then
|
||||||
old_CFLAGS=$CFLAGS
|
old_CFLAGS=$CFLAGS
|
||||||
CFLAGS="-I /usr/include/libxml2"
|
CFLAGS="-I${includedir}/libxml2"
|
||||||
AC_CHECK_HEADER([libxml/parser.h],
|
AC_CHECK_HEADER([libxml/parser.h],
|
||||||
[with_libxml2=yes; libxml2_CFLAGS="-I /usr/include/libxml2"; libxml2_LIBS="-lxml2"],
|
[with_libxml2=yes; libxml2_CFLAGS="-I${includedir}/libxml2"; libxml2_LIBS="-lxml2"],
|
||||||
[AC_MSG_ERROR([couldn't find libxml2])])
|
[AC_MSG_ERROR([libxml2 not found.])])
|
||||||
CFLAGS=$old_CFLAGS
|
CFLAGS=$old_CFLAGS
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
AC_CHECK_HEADER(expat.h, [], [AC_MSG_ERROR([couldn't find expat headers; expat required])])
|
PKG_CHECK_MODULES([expat], [expat >= 2.0.0], [], [AC_MSG_ERROR([expat not found; expat required.])])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$with_libxml2" = xyes; then
|
if test "x$with_libxml2" = xyes; then
|
||||||
with_parser=libxml2
|
with_parser=libxml2
|
||||||
PARSER_NAME=libxml2
|
PARSER_NAME=libxml2
|
||||||
PARSER_CFLAGS=\$\(libxml2_CFLAGS\)
|
PARSER_CFLAGS=$libxml2_CFLAGS
|
||||||
PARSER_LIBS=\$\(libxml2_LIBS\)
|
PARSER_LIBS=$libxml2_LIBS
|
||||||
else
|
else
|
||||||
with_parser=expat
|
with_parser=expat
|
||||||
PARSER_NAME=expat
|
PARSER_NAME=expat
|
||||||
PARSER_CFLAGS=
|
PARSER_CFLAGS=$expat_CFLAGS
|
||||||
PARSER_LIBS=-lexpat
|
PARSER_LIBS=$expat_LIBS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_NOTICE([libstrophe will use the $with_parser XML parser])
|
AC_MSG_NOTICE([libstrophe will use the $with_parser XML parser])
|
||||||
|
|||||||
Reference in New Issue
Block a user