Patch to compile check_mysql on 64bit systems
Frank Wittig
fw at weisshuhn.de
Wed Dec 7 14:51:25 CET 2005
Hello List!
check_mysql fails to build on 64bit systems because of a static path in
the configure scripts. I don't have fixed the underlaying problem but my
patch will make it build.
--- begin patch ----------
diff -Naur nagios-plugins-1.4.2/configure nagios-plugins-1.4.2.wwk/configure
--- nagios-plugins-1.4.2/configure 2005-09-19 15:58:16.000000000 +0200
+++ nagios-plugins-1.4.2.wwk/configure 2005-12-07 13:54:55.712029170 +0100
@@ -869,7 +869,7 @@
--with-trusted-path=PATH sets trusted path for executables called by
scripts (default=/bin:/sbin:/usr/bin:/usr/sbin)
--with-perl=PATH sets path to perl executable
--with-pgsql=DIR sets path to pgsql installation
- --with-mysql=DIR sets path to mysql installation (assumes
lib/mysql and include subdirs
+ --with-mysql=DIR sets path to mysql installation (assumes
lib64/mysql and include subdirs
--with-lwres=DIR use lwres library for getaddrinfo (default=no)
--with-openssl=DIR sets path to openssl installation
--without-openssl disable openssl
@@ -9363,7 +9363,7 @@
MYSQL=$withval
fi;
if test -n "$MYSQL"; then
- MYSQLLIBDIR=$MYSQL/lib/mysql
+ MYSQLLIBDIR=$MYSQL/lib64/mysql
CPPFLAGS="-I$MYSQL/include"
echo "$as_me:$LINENO: checking for mysql_init in -lmysqlclient" >&5
echo $ECHO_N "checking for mysql_init in -lmysqlclient... $ECHO_C" >&6
@@ -9775,14 +9775,14 @@
MYSQLLIBS="-lmysqlclient"
fi
-elif test -f /usr/lib/mysql/libmysqlclient.so; then
+elif test -f /usr/lib64/mysql/libmysqlclient.so; then
echo "$as_me:$LINENO: checking for mysql_init in -lmysqlclient" >&5
echo $ECHO_N "checking for mysql_init in -lmysqlclient... $ECHO_C" >&6
if test "${ac_cv_lib_mysqlclient_mysql_init+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmysqlclient -L/usr/lib/mysql -lz $LIBS"
+LIBS="-lmysqlclient -L/usr/lib64/mysql -lz $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -9841,7 +9841,7 @@
echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_mysql_init" >&5
echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_init" >&6
if test $ac_cv_lib_mysqlclient_mysql_init = yes; then
- MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L/usr/lib/mysql"
+ MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L/usr/lib64/mysql"
fi
echo "$as_me:$LINENO: checking for mysql_close in -lmysqlclient" >&5
@@ -9850,7 +9850,7 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmysqlclient -L/usr/lib/mysql $LIBS"
+LIBS="-lmysqlclient -L/usr/lib64/mysql $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -9909,17 +9909,17 @@
echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_mysql_close" >&5
echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_close" >&6
if test $ac_cv_lib_mysqlclient_mysql_close = yes; then
- MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql"
+ MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib64/mysql"
fi
-elif test -f /usr/lib/mysql/libmysqlclient.a; then
+elif test -f /usr/lib64/mysql/libmysqlclient.a; then
echo "$as_me:$LINENO: checking for mysql_init in -lmysqlclient" >&5
echo $ECHO_N "checking for mysql_init in -lmysqlclient... $ECHO_C" >&6
if test "${ac_cv_lib_mysqlclient_mysql_init+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmysqlclient -L/usr/lib/mysql -lz $LIBS"
+LIBS="-lmysqlclient -L/usr/lib64/mysql -lz $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -9978,7 +9978,7 @@
echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_mysql_init" >&5
echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_init" >&6
if test $ac_cv_lib_mysqlclient_mysql_init = yes; then
- MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L/usr/lib/mysql"
+ MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L/usr/lib64/mysql"
fi
echo "$as_me:$LINENO: checking for mysql_close in -lmysqlclient" >&5
@@ -9987,7 +9987,7 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmysqlclient -L/usr/lib/mysql $LIBS"
+LIBS="-lmysqlclient -L/usr/lib64/mysql $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -10046,7 +10046,7 @@
echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_mysql_close" >&5
echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_close" >&6
if test $ac_cv_lib_mysqlclient_mysql_close = yes; then
- MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql"
+ MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib64/mysql"
fi
fi
diff -Naur nagios-plugins-1.4.2/configure.in
nagios-plugins-1.4.2.wwk/configure.in
--- nagios-plugins-1.4.2/configure.in 2005-09-19 15:51:19.000000000 +0200
+++ nagios-plugins-1.4.2.wwk/configure.in 2005-12-07 13:55:03.419871325
+0100
@@ -229,10 +229,10 @@
_SAVEDCPPFLAGS="$CPPFLAGS"
AC_ARG_WITH(mysql,
ACX_HELP_STRING([--with-mysql=DIR],
- [sets path to mysql installation (assumes lib/mysql and include
subdirs]),
+ [sets path to mysql installation (assumes lib64/mysql and include
subdirs]),
MYSQL=$withval,)
if test -n "$MYSQL"; then
- MYSQLLIBDIR=$MYSQL/lib/mysql
+ MYSQLLIBDIR=$MYSQL/lib64/mysql
CPPFLAGS="-I$MYSQL/include"
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")
@@ -242,12 +242,12 @@
elif test -f /usr/lib/libmysqlclient.a; then
AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz)
AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient")
-elif test -f /usr/lib/mysql/libmysqlclient.so; then
- AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz"
check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql -lz)
- AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient"
check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql)
-elif test -f /usr/lib/mysql/libmysqlclient.a; then
- AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz"
check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql -lz)
- AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient"
check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql)
+elif test -f /usr/lib64/mysql/libmysqlclient.so; then
+ AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz"
check_mysql_LDFLAGS="-L/usr/lib64/mysql",,-L/usr/lib64/mysql -lz)
+ AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient"
check_mysql_LDFLAGS="-L/usr/lib64/mysql",,-L/usr/lib64/mysql)
+elif test -f /usr/lib64/mysql/libmysqlclient.a; then
+ AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz"
check_mysql_LDFLAGS="-L/usr/lib64/mysql",,-L/usr/lib64/mysql -lz)
+ AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient"
check_mysql_LDFLAGS="-L/usr/lib64/mysql",,-L/usr/lib64/mysql)
fi
if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o
"$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then
AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h,
MYSQLINCLUDE="-I$MYSQL/include" )
--- end patch ----------
Greetings,
Frank Wittig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20051207/f84d93fc/attachment.sig>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20051207/f84d93fc/attachment-0001.sig>
More information about the Developers
mailing list