[svn r247] Fixes problem when searching for MySQL libraries.
1.1 --- a/gmyth/configure.ac Fri Jan 05 20:24:44 2007 +0000
1.2 +++ b/gmyth/configure.ac Tue Jan 09 16:46:43 2007 +0000
1.3 @@ -63,6 +63,9 @@
1.4
1.5 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
1.6
1.7 +CFLAGS="$CFLAGS -I/usr/include"
1.8 +LDFLAGS="$LDFLAGS -L/usr/lib"
1.9 +
1.10 # Checks required packages
1.11
1.12 dnl Test if --disable-debug given
1.13 @@ -193,47 +196,52 @@
1.14 #
1.15 # mysql libraries
1.16 #
1.17 +MYSQL_CFLAGS="$CFLAGS -DBIG_JOINS=1"
1.18 +MYSQL_LIBS="$LIBS -L/usr/lib"
1.19 +
1.20 AC_CHECK_LIB( mysqlclient, mysql_init,
1.21 [
1.22 - MYSQL_CFLAGS="$CFLAGS -DBIG_JOINS=1"
1.23 - MYSQL_LIBS="$LIBS -lmysqlclient"
1.24 + MYSQL_CFLAGS="$MYSQL_CFLAGS -DBIG_JOINS=1"
1.25 + MYSQL_LIBS="$MYSQL_LIBS -L/usr/lib -lmysqlclient"
1.26 ], AC_MSG_ERROR([Could not find mysqlclient library. Make sure the mysql client libraries are installed] ) )
1.27
1.28 AC_CHECK_LIB( z, deflate,
1.29 [
1.30 MYSQL_LIBS="$MYSQL_LIBS -lz"
1.31 - ], AC_MSG_ERROR([Could not find a mysqlclient library dependency - Z. Make sure the mysql client libraries are installed]) )
1.32 + ], AC_MSG_WARN([Could not find a mysqlclient library dependency - Z. Make sure the mysql client libraries are installed]) )
1.33
1.34 AC_CHECK_LIB( crypt, encrypt,
1.35 [
1.36 MYSQL_LIBS="$MYSQL_LIBS -lcrypt"
1.37 - ], AC_MSG_ERROR([Could not find a mysqlclient library dependency - Crypt library. Make sure the mysql client libraries are installed]) )
1.38 + ], AC_MSG_WARN([Could not find a mysqlclient library dependency - Crypt library. Make sure the mysql client libraries are installed]) )
1.39
1.40 AC_CHECK_LIB( nsl, yp_all,
1.41 [
1.42 MYSQL_LIBS="$MYSQL_LIBS -lnsl"
1.43 - ], AC_MSG_ERROR([Could not find a mysqlclient library dependency - NSL library. Make sure the mysql client libraries are installed]) )
1.44 + ], AC_MSG_WARN([Could not find a mysqlclient library dependency - NSL library. Make sure the mysql client libraries are installed]) )
1.45
1.46 AC_CHECK_LIB( m, ccos,
1.47 [
1.48 MYSQL_LIBS="$MYSQL_LIBS -lm"
1.49 - ], AC_MSG_ERROR([Could not find a mysqlclient library dependency - M library. Make sure the mysql client libraries are installed]) )
1.50 + ], AC_MSG_WARN([Could not find a mysqlclient library dependency - M library. Make sure the mysql client libraries are installed]) )
1.51
1.52 -AC_CHECK_HEADERS( [mysql.h mysql_version.h], [ AC_MSG_NOTICE([Found MySQL headers!]) ],
1.53 - [ AC_MSG_WARN([Could not find mysqlclient headers, but it will work fine instead of this...]) ] )
1.54 +AC_CHECK_HEADERS( [mysql/mysql.h mysql/mysql_version.h], [ AC_MSG_NOTICE([Found MySQL headers!]) ],
1.55 + [ AC_MSG_WARN([Could not find mysqlclient headers, but it will work fine instead of this...]) ],
1.56 + [
1.57 + #include <mysql/mysql.h>
1.58 + ])
1.59
1.60 AC_SUBST(MYSQL_CFLAGS)
1.61 AC_SUBST(MYSQL_LIBS)
1.62
1.63 -
1.64 -AC_MSG_NOTICE([Checking for the UPnP CyberLink for C library...])
1.65 dnl ========== Check for Cyberlink UPnP Libraries
1.66 AC_ARG_ENABLE(upnp,
1.67 - [AC_HELP_STRING([--disable-upnp], [disable building UPnP related stuff])],
1.68 + [AC_HELP_STRING([--enable-upnp], [enable building UPnP related stuff])],
1.69 enable_upnp="$enableval",
1.70 - enable_upnp=yes)
1.71 + enable_upnp=no)
1.72
1.73 if test "x$enable_upnp" = "xyes" ; then
1.74 + AC_MSG_NOTICE([Checking for the UPnP CyberLink for C library...])
1.75 PKG_CHECK_MODULES(CYBERLINK,
1.76 clinkc,
1.77 HAVE_CYBERLINK=yes, HAVE_CYBERLINK=no)
1.78 @@ -242,7 +250,7 @@
1.79 if test "x$HAVE_CYBERLINK" = "xyes"; then
1.80 AC_DEFINE(WITH_UPNP, 1, [build with upnp related stuff])
1.81 else
1.82 - AC_MSG_RESULT(no)
1.83 + AC_MSG_RESULT([UPnP features (using clinkc library) will not be added.])
1.84 fi
1.85
1.86 AM_CONDITIONAL(WITH_UPNP, test "x$HAVE_CYBERLINK" = "xyes")
1.87 @@ -254,6 +262,10 @@
1.88 #dnl Enable gtk-doc
1.89 #GTK_DOC_CHECK(1.4)
1.90
1.91 +AC_SUBST(CFLAGS)
1.92 +AC_SUBST(LDFLAGS)
1.93 +AC_SUBST(LIBS)
1.94 +
1.95 AC_OUTPUT([
1.96 Makefile
1.97 src/Makefile