Pass libraries in LIBS, not LDFLAGS.
authorTilghman Lesher <tilghman@meg.abyt.es>
Mon, 4 May 2009 18:42:56 +0000 (18:42 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Mon, 4 May 2009 18:42:56 +0000 (18:42 +0000)
(closes issue #14671)
 Reported by: Chainsaw
 Patches:
       asterisk-1.6.0.6-toolcheck-libs-not-ldflags.patch uploaded by Chainsaw (license 723)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192132 65c4cc65-6c06-0410-ace0-fbb531ad65f3

autoconf/ast_ext_tool_check.m4

index a8db547..22ea17b 100644 (file)
@@ -20,8 +20,8 @@ AC_DEFUN([AST_EXT_TOOL_CHECK],
                fi
                CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}"
 
-               saved_ldflags="${LDFLAGS}"
-               LDFLAGS="${$1_LIB}"
+               saved_libs="${LIBS}"
+               LIBS="${$1_LIB}"
 
                AC_LINK_IFELSE(
                    [ AC_LANG_PROGRAM( [ $5 ],
@@ -33,7 +33,7 @@ AC_DEFUN([AST_EXT_TOOL_CHECK],
                    []
                )
                CPPFLAGS="${saved_cppflags}"
-               LDFLAGS="${saved_ldflags}"
+               LIBS="${saved_libs}"
            else
                PBX_$1=1
                AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 libraries.])