diff options
author | Sean Bright <sean@malleable.com> | 2008-10-01 23:48:16 +0000 |
---|---|---|
committer | Sean Bright <sean@malleable.com> | 2008-10-01 23:48:16 +0000 |
commit | 2640afa40fa0adacaa4f18360510cc1022574d9d (patch) | |
tree | 5c04ed17dc1efad108964d780e94ca5b706a7fd2 /configure.ac | |
parent | 529874de7bf5ca57b2f6c662a9cb4cbfa28dbd74 (diff) |
Try a test compile using the GMime library. Some distros install gmime-config
in the base package instead of the -devel package. Now we print a notice and
disable GMime support instead of bombing during the main compilation.
(closes issue #13583)
Reported by: arkadia
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index b0dee0f35..337f6aa81 100644 --- a/configure.ac +++ b/configure.ac @@ -1437,6 +1437,34 @@ fi AST_EXT_TOOL_CHECK([GMIME], [gmime]) +if test "$PBX_GMIME" = "1"; +then + saved_libs="${LIBS}" + saved_cflags="${CFLAGS}" + LIBS="${LIBS} ${GMIME_LIB}" + CFLAGS="${CFLAGS} ${GMIME_INCLUDE}" + AC_MSG_CHECKING(for g_mime_check_version) + AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM( + [#include <gmime/gmime.h>], + [gboolean q = g_mime_check_version(0,0,0);]) + ], + [ AC_MSG_RESULT(yes) + PBX_GMIME=1 + ], + [ AC_MSG_RESULT(no) + AC_MSG_NOTICE([***]) + AC_MSG_NOTICE([*** It appears that you do not have the gmime development package installed.]) + AC_MSG_NOTICE([*** Please install it to include ${GMIME_DESCRIP} support.]) + AC_MSG_NOTICE([***]) + PBX_GMIME=0 + ] + ) + LIBS="${saved_libs}" + CFLAGS="${saved_cflags}" +fi + AST_EXT_LIB_CHECK([HOARD], [hoard], [malloc], []) AST_EXT_LIB_CHECK([FREETDS], [sybdb], [dbinit], [sybdb.h]) |