This is much cleaner, methinks.
authorSean Bright <sean@malleable.com>
Thu, 2 Oct 2008 15:28:48 +0000 (15:28 +0000)
committerSean Bright <sean@malleable.com>
Thu, 2 Oct 2008 15:28:48 +0000 (15:28 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145771 65c4cc65-6c06-0410-ace0-fbb531ad65f3

configure
configure.ac

index f41effc..f973f53 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 136819 .
+# From configure.ac Revision: 145692 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for asterisk 1.6.
 #
@@ -45341,7 +45341,7 @@ fi
            GMIME_INCLUDE=$(${CONFIG_GMIME} $A)
            if test x"" = x ; then A=--libs ; else A="" ; fi
            GMIME_LIB=$(${CONFIG_GMIME} $A)
-           if test x"" != x ; then
+           if test x"#include <gmime/gmime.h>" != x ; then
                saved_cppflags="${CPPFLAGS}"
                if test "x${GMIME_DIR}" != "x"; then
                    GMIME_INCLUDE="-I${GMIME_DIR}/include"
@@ -45357,11 +45357,11 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
+ #include <gmime/gmime.h>
 int
 main ()
 {
- ;
+ gboolean q = g_mime_check_version(0,0,0);;
 
   ;
   return 0;
@@ -45416,78 +45416,6 @@ _ACEOF
     fi
 
 
-if test "$PBX_GMIME" = "1";
-then
-   saved_libs="${LIBS}"
-   saved_cflags="${CFLAGS}"
-   LIBS="${LIBS} ${GMIME_LIB}"
-   CFLAGS="${CFLAGS} ${GMIME_INCLUDE}"
-   { echo "$as_me:$LINENO: checking for g_mime_check_version" >&5
-echo $ECHO_N "checking for g_mime_check_version... $ECHO_C" >&6; }
-   cat >conftest.$ac_ext <<_ACEOF
-
-       /* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gmime/gmime.h>
-int
-main ()
-{
-gboolean q = g_mie_check_version(0,0,0);
-  ;
-  return 0;
-}
-
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-               PBX_GMIME=1
-
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               { echo "$as_me:$LINENO: ***" >&5
-echo "$as_me: ***" >&6;}
-               { echo "$as_me:$LINENO: *** It appears that you do not have the gmime development package installed." >&5
-echo "$as_me: *** It appears that you do not have the gmime development package installed." >&6;}
-               { echo "$as_me:$LINENO: *** Please install it to include ${GMIME_DESCRIP} support." >&5
-echo "$as_me: *** Please install it to include ${GMIME_DESCRIP} support." >&6;}
-               { echo "$as_me:$LINENO: ***" >&5
-echo "$as_me: ***" >&6;}
-               PBX_GMIME=0
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-   LIBS="${saved_libs}"
-   CFLAGS="${saved_cflags}"
-fi
-
 
 if test "x${PBX_HOARD}" != "x1" -a "${USE_HOARD}" != "no"; then
    pbxlibdir=""
index 337f6aa..1b75f31 100644 (file)
@@ -1435,35 +1435,7 @@ then
     AST_EXT_LIB_CHECK([OSPTK], [osptk], [OSPPCryptoDecrypt], [osp/osp.h], [-lcrypto -lssl])
 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_TOOL_CHECK([GMIME], [gmime], [], [], [#include <gmime/gmime.h>], [gboolean q = g_mime_check_version(0,0,0);])
 
 AST_EXT_LIB_CHECK([HOARD], [hoard], [malloc], [])