diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/configure.in b/configure.in index 7255204..a9ffeb1 100644 --- a/configure.in +++ b/configure.in | |||
@@ -155,13 +155,18 @@ else | |||
155 | fi | 155 | fi |
156 | LIBS="$_SAVEDLIBS" | 156 | LIBS="$_SAVEDLIBS" |
157 | 157 | ||
158 | |||
158 | dnl Check for mysql libraries | 159 | dnl Check for mysql libraries |
159 | _SAVEDLIBS="$LIBS" | 160 | _SAVEDLIBS="$LIBS" |
160 | _SAVEDCPPFLAGS="$CPPFLAGS" | 161 | _SAVEDCPPFLAGS="$CPPFLAGS" |
161 | CPPFLAGS="-I/usr/include" | 162 | dnl CPPFLAGS="-I/usr/include" |
162 | AC_ARG_WITH(mysqllibdir,--with-mysqllibdir=<dir> sets path to mysql libraries,[MYSQLLIBDIR=$withval]) | 163 | |
163 | if test -n "$MYSQLLIBDIR"; then | 164 | AC_ARG_WITH(mysql,--with-mysql=<dir> sets path to mysql installation (assumes lib/mysql and include subdirs),[MYSQL=$withval]) |
164 | AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR",,-L$MYSQLLIBDIR -lz) | 165 | if test -n "$MYSQL"; then |
166 | MYSQLLIBDIR=$MYSQL/lib/mysql | ||
167 | CPPFLAGS="-I$MYSQL/include" | ||
168 | AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR ",,-L$MYSQLLIBDIR -lz) | ||
169 | AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient") | ||
165 | elif test -f /usr/lib/libmysqlclient.so; then | 170 | elif test -f /usr/lib/libmysqlclient.so; then |
166 | AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz) | 171 | AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz) |
167 | AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient") | 172 | AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient") |
@@ -176,21 +181,23 @@ elif test -f /usr/lib/mysql/libmysqlclient.a; then | |||
176 | AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql) | 181 | AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql) |
177 | fi | 182 | fi |
178 | if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then | 183 | if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then |
179 | AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h) | 184 | AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h, MYSQLINCLUDE="-I$MYSQL/include" ) |
180 | if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then | 185 | if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then |
181 | EXTRAS="$EXTRAS check_mysql" | 186 | EXTRAS="$EXTRAS check_mysql" |
187 | CPPFLAGS="$_SAVEDCPPFLAGS -I$MYSQL/include" | ||
182 | AC_SUBST(MYSQLLIBS) | 188 | AC_SUBST(MYSQLLIBS) |
183 | AC_SUBST(check_mysql_LDFLAGS) | 189 | AC_SUBST(check_mysql_LDFLAGS) |
184 | else | 190 | else |
185 | AC_MSG_WARN([Skipping mysql plugin]) | 191 | AC_MSG_WARN([Skipping mysql plugin]) |
186 | AC_MSG_WARN([install mysql client headers to compile this plugin (see Requirements).]) | 192 | AC_MSG_WARN([install mysql client headers to compile this plugin (see Requirements).]) |
193 | CPPFLAGS="$_SAVEDCPPFLAGS" | ||
187 | fi | 194 | fi |
188 | else | 195 | else |
189 | AC_MSG_WARN([Skipping mysql plugin]) | 196 | AC_MSG_WARN([Skipping mysql plugin]) |
190 | AC_MSG_WARN([install mysql client libs to compile this plugin (see Requirements).]) | 197 | AC_MSG_WARN([install mysql client libs to compile this plugin (see Requirements).]) |
198 | CPPFLAGS="$_SAVEDCPPFLAGS" | ||
191 | fi | 199 | fi |
192 | LIBS="$_SAVEDLIBS" | 200 | LIBS="$_SAVEDLIBS" |
193 | CPPFLAGS="$_SAVEDCPPFLAGS" | ||
194 | 201 | ||
195 | dnl Check for OpenSSL location | 202 | dnl Check for OpenSSL location |
196 | AC_PATH_PROG(OPENSSL,openssl) | 203 | AC_PATH_PROG(OPENSSL,openssl) |