summaryrefslogtreecommitdiffstats
path: root/web/attachments/67988-autoconf.dif
blob: 53972e61542585ef6e721411c42e2fae79592b9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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=<dir> 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=<dir> 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