diff -ur ndoutils-1.4b7.original/Makefile.in ndoutils-1.4b7/Makefile.in --- ndoutils-1.4b7.original/Makefile.in 2007-10-03 20:58:48.000000000 +0200 +++ ndoutils-1.4b7/Makefile.in 2008-03-13 10:12:41.584839656 +0100 @@ -10,15 +10,15 @@ SRC_INCLUDE=./include/ all: - cd $(SRC_BASE); $(MAKE) ; cd .. + cd $(SRC_BASE) && $(MAKE) clean: - cd $(SRC_BASE); $(MAKE) $@ ; cd .. + cd $(SRC_BASE) && $(MAKE) $@ rm -f core rm -f *~ */*~ include/nagios-*/*~ distclean: clean - cd $(SRC_BASE); $(MAKE) $@ ; cd .. + cd $(SRC_BASE) && $(MAKE) $@ rm -f config.log config.status config.cache $(SRC_INCLUDE)/config.h rm -f Makefile rm -f init-script.suse subst Only in ndoutils-1.4b7: Makefile.in.orig diff -ur ndoutils-1.4b7.original/configure.in ndoutils-1.4b7/configure.in --- ndoutils-1.4b7.original/configure.in 2007-10-31 19:17:03.000000000 +0100 +++ ndoutils-1.4b7/configure.in 2008-03-13 10:16:06.417753976 +0100 @@ -170,56 +170,20 @@ AC_ARG_ENABLE(pgsql,--enable-pgsql enables PostgreSQL database support) AS_IF([test x$enable_pgsql = xno], [USE_PGSQL=no]) -dnl Optional MySQL library and include paths -AC_ARG_WITH(mysql-lib,--with-mysql-lib=DIR sets location of the MySQL client library,[ - DBLDFLAGS="-L${withval}" - LD_RUN_PATH="${withval}${LD_RUN_PATH:+:}${LD_RUN_PATH}" - ]) -if test "$withval" = "" ; then - dnl If no library path specified, add default (RedHat) path for good measure - DBLDFLAGS="$LDFLAGS -L/usr/lib/mysql" -fi -AC_ARG_WITH(mysql-inc,--with-mysql-inc=DIR sets location of the MySQL client include files,[ - DBCFLAGS="${DBCFLAGS} -I${withval}" - ]) - -dnl Optional PostgreSQL library and include paths -AC_ARG_WITH(pgsql-lib,--with-pgsql-lib=DIR sets location of the PostgreSQL client library,[ - DBLDFLAGS="-L${withval}" - LD_RUN_PATH="${withval}${LD_RUN_PATH:+:}${LD_RUN_PATH}" - ]) -AC_ARG_WITH(pgsql-inc,--with-pgsql-inc=DIR sets location of the PostgreSQL client include files,[ - DBCFLAGS="${DBCFLAGS} -I${withval}" - ]) - -save_LDFLAGS="$LDFLAGS" -LDFLAGS="${LDFLAGS} ${DBLDFLAGS}" -save_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="${DBCFLAGS}" -save_CFLAGS="$CFLAGS" -CFLAGS="${DBCFLAGS}" dnl Are we using any MySQL routines? if test $USE_MYSQL = yes; then - MYSQLLIBFOUND=no - - dnl check compress lib for Mac OSX as well... - AC_CHECK_LIB(z,compress) - dnl AC_CHECK_LIB(mysqlclient,mysql_store_result,MYSQLLIBFOUND=yes,MYSQLLIBFOUND=no) - AC_CHECK_LIB(mysqlclient,mysql_store_result,MYSQLLIBFOUND=yes,) - AC_CHECK_LIB(mysqlclient,mysql_connect,MYSQLLIBFOUND=yes,) - - dnl Did we find the MySQL libraries? - if test x$MYSQLLIBFOUND = xno; then + np_mysqlclient + if test $with_mysql = "no"; then echo "" echo "" echo "*** MySQL library could not be located... **************************" echo "" echo "You chose to compile NDBXT with MySQL support, but I was unable to" echo "locate the MySQL library on your system. If the library is" - echo "installed, use the --with-mysql-lib argument to specify the" - echo "location of the MySQL library." + echo "installed, use the --with-mysql=DIR argument to specify the" + echo "location of the MySQL library. We assume mysql_config is in DIR/bin" echo "" echo "NOTE: After you install the necessary libraries on your system:" echo " 1. Make sure /etc/ld.so.conf has an entry for the directory in" @@ -231,44 +195,37 @@ echo "" echo "TIP: Try the following...." echo "" - echo " ./configure --with-mysql-lib=/usr/lib/mysql" + echo " ./configure --with-mysql=/usr/lib/mysql" echo "" echo "********************************************************************" echo "" echo "" USE_MYSQL=no - fi - - AC_CHECK_HEADER(mysql/mysql.h,MYSQLINCFOUND=yes,MYSQLINCFOUND=no) - - dnl Did we find the MySQL header files? - if test x$MYSQLINCFOUND = xno; then - echo "" - echo "" - echo "*** MySQL include file could not be located... **********************" - echo "" - echo "You chose to compile NDBXT with MySQL support, but I was unable to" - echo "locate on your system. If the include file is" - echo "installed, use the --with-mysql-inc argument to specify the location" - echo "of the MySQL include file." - echo "" - echo "********************************************************************" - echo "" - echo "" - - USE_MYSQL=no - - fi - - dnl We found the MySQL lib! - if test x$USE_MYSQL = xyes; then + else echo "MySQL library and include file(s) were found!" AC_DEFINE_UNQUOTED(USE_MYSQL) - DBLIBS="$DBLIBS -lmysqlclient" + DBLIBS="$DBLIBS $np_mysql_libs" + CFLAGS="$np_mysql_include" fi fi +dnl Optional PostgreSQL library and include paths +AC_ARG_WITH(pgsql-lib,--with-pgsql-lib=DIR sets location of the PostgreSQL client library,[ + DBLDFLAGS="-L${withval}" + LD_RUN_PATH="${withval}${LD_RUN_PATH:+:}${LD_RUN_PATH}" + ]) +AC_ARG_WITH(pgsql-inc,--with-pgsql-inc=DIR sets location of the PostgreSQL client include files,[ + DBCFLAGS="${DBCFLAGS} -I${withval}" + ]) + +save_LDFLAGS="$LDFLAGS" +LDFLAGS="${LDFLAGS} ${DBLDFLAGS}" +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="${DBCFLAGS}" +save_CFLAGS="$CFLAGS" +CFLAGS="${DBCFLAGS}" + dnl Are we using any PostgreSQL routines? if test $USE_PGSQL = yes; then Only in ndoutils-1.4b7: configure.in.orig Only in ndoutils-1.4b7: configure.in.rej diff -ur ndoutils-1.4b7.original/include/config.h.in ndoutils-1.4b7/include/config.h.in --- ndoutils-1.4b7.original/include/config.h.in 2007-10-31 19:17:05.000000000 +0100 +++ ndoutils-1.4b7/include/config.h.in 2008-03-13 10:12:41.586839352 +0100 @@ -257,8 +257,8 @@ #undef HAVE_MYSQL #ifdef USE_MYSQL #define HAVE_MYSQL 1 -#include -#include +#include "mysql.h" +#include "errmsg.h" #endif #undef USE_PGSQL Only in ndoutils-1.4b7/include: config.h.in.orig Only in ndoutils-1.4b7/src: Makefile.in.rej