The db2 checking script incorrectly uses CPPFLAGS to set linked libraries. As result the db2 library is listed in gcc parameters before the source file and it does not load the required symbols, which causes configure to fail with IBM DB2 library not found error
      This patch fixes it:

      Index: m4/ax_lib_ibm_db2.m4
      ===================================================================
      --- m4/ax_lib_ibm_db2.m4	(revision 49735)
      +++ m4/ax_lib_ibm_db2.m4	(working copy)
      @@ -46,7 +46,9 @@
               IBM_DB2_LIBS="-ldb2"
       
               saved_CPPFLAGS="$CPPFLAGS"
      -        CPPFLAGS="$CPPFLAGS $IBM_DB2_CPPFLAGS $IBM_DB2_LDFLAGS $IBM_DB2_LIBS"
      +	saved_LIBS="$LIBS"
      +        CPPFLAGS="$CPPFLAGS $IBM_DB2_CPPFLAGS $IBM_DB2_LDFLAGS"
      +	LIBS="$IBM_DB2_LIBS"
       
               AC_MSG_CHECKING([for IBM DB2 CLI libraries])
               AC_TRY_LINK([#include <sqlcli1.h>],
      @@ -60,5 +62,6 @@
                       AC_MSG_RESULT(no))
       
               CPPFLAGS="$saved_CPPFLAGS"
      +	LIBS="$saved_LIBS"
           fi
       ])
      

            Unassigned Unassigned
            wiper Andris Zeila
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: