diff -Naur nagios-plugins-1.3.1/configure.in nagios-plugins-1.3.1_autoconf_change/configure.in --- nagios-plugins-1.3.1/configure.in 2003-07-11 08:12:23.000000000 +0200 +++ nagios-plugins-1.3.1_autoconf_change/configure.in 2003-11-19 10:57:36.000000000 +0100 @@ -176,9 +176,19 @@ _SAVEDLIBS="$LIBS" _SAVEDCPPFLAGS="$CPPFLAGS" AC_ARG_WITH(mysql,--with-mysql= sets path to mysql installation (assumes lib/mysql and include subdirs),[MYSQL=$withval]) -if test -n "$MYSQL"; then - MYSQLLIBDIR=$MYSQL/lib/mysql - CPPFLAGS="-I$MYSQL/include" +AC_ARG_WITH(mysqllibdir,--with-mysqllibdir= sets the path to the mysql libraries,[MYSQLLIBDIR=$withval]) +if test -n "$MYSQL" -o -n "$MYSQLLIBDIR" ; then + + dnl set default library if not supplied + if test -z "$MYSQLLIBDIR" ; then + MYSQLLIBDIR=$MYSQL/lib/mysql + fi + + dnl set default include + if test -n "$MYSQL" ; then + CPPFLAGS="-I$MYSQL/include" + fi + AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR ",,-L$MYSQLLIBDIR -lz) AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient") elif test -f /usr/lib/libmysqlclient.so; then