# HG changeset patch # User rosfran # Date 1168361203 0 # Node ID 8d602d9e22a40a58f6c8979758edbea1c04b2888 # Parent f9329edd3b5e45222ca612006d706ba0a8086c67 [svn r247] Fixes problem when searching for MySQL libraries. diff -r f9329edd3b5e -r 8d602d9e22a4 gmyth/configure.ac --- a/gmyth/configure.ac Fri Jan 05 20:24:44 2007 +0000 +++ b/gmyth/configure.ac Tue Jan 09 16:46:43 2007 +0000 @@ -63,6 +63,9 @@ AM_INIT_AUTOMAKE($PACKAGE, $VERSION) +CFLAGS="$CFLAGS -I/usr/include" +LDFLAGS="$LDFLAGS -L/usr/lib" + # Checks required packages dnl Test if --disable-debug given @@ -193,47 +196,52 @@ # # mysql libraries # +MYSQL_CFLAGS="$CFLAGS -DBIG_JOINS=1" +MYSQL_LIBS="$LIBS -L/usr/lib" + AC_CHECK_LIB( mysqlclient, mysql_init, [ - MYSQL_CFLAGS="$CFLAGS -DBIG_JOINS=1" - MYSQL_LIBS="$LIBS -lmysqlclient" + MYSQL_CFLAGS="$MYSQL_CFLAGS -DBIG_JOINS=1" + MYSQL_LIBS="$MYSQL_LIBS -L/usr/lib -lmysqlclient" ], AC_MSG_ERROR([Could not find mysqlclient library. Make sure the mysql client libraries are installed] ) ) AC_CHECK_LIB( z, deflate, [ MYSQL_LIBS="$MYSQL_LIBS -lz" - ], AC_MSG_ERROR([Could not find a mysqlclient library dependency - Z. Make sure the mysql client libraries are installed]) ) + ], AC_MSG_WARN([Could not find a mysqlclient library dependency - Z. Make sure the mysql client libraries are installed]) ) AC_CHECK_LIB( crypt, encrypt, [ MYSQL_LIBS="$MYSQL_LIBS -lcrypt" - ], AC_MSG_ERROR([Could not find a mysqlclient library dependency - Crypt library. Make sure the mysql client libraries are installed]) ) + ], AC_MSG_WARN([Could not find a mysqlclient library dependency - Crypt library. Make sure the mysql client libraries are installed]) ) AC_CHECK_LIB( nsl, yp_all, [ MYSQL_LIBS="$MYSQL_LIBS -lnsl" - ], AC_MSG_ERROR([Could not find a mysqlclient library dependency - NSL library. Make sure the mysql client libraries are installed]) ) + ], AC_MSG_WARN([Could not find a mysqlclient library dependency - NSL library. Make sure the mysql client libraries are installed]) ) AC_CHECK_LIB( m, ccos, [ MYSQL_LIBS="$MYSQL_LIBS -lm" - ], AC_MSG_ERROR([Could not find a mysqlclient library dependency - M library. Make sure the mysql client libraries are installed]) ) + ], AC_MSG_WARN([Could not find a mysqlclient library dependency - M library. Make sure the mysql client libraries are installed]) ) -AC_CHECK_HEADERS( [mysql.h mysql_version.h], [ AC_MSG_NOTICE([Found MySQL headers!]) ], - [ AC_MSG_WARN([Could not find mysqlclient headers, but it will work fine instead of this...]) ] ) +AC_CHECK_HEADERS( [mysql/mysql.h mysql/mysql_version.h], [ AC_MSG_NOTICE([Found MySQL headers!]) ], + [ AC_MSG_WARN([Could not find mysqlclient headers, but it will work fine instead of this...]) ], + [ + #include + ]) AC_SUBST(MYSQL_CFLAGS) AC_SUBST(MYSQL_LIBS) - -AC_MSG_NOTICE([Checking for the UPnP CyberLink for C library...]) dnl ========== Check for Cyberlink UPnP Libraries AC_ARG_ENABLE(upnp, - [AC_HELP_STRING([--disable-upnp], [disable building UPnP related stuff])], + [AC_HELP_STRING([--enable-upnp], [enable building UPnP related stuff])], enable_upnp="$enableval", - enable_upnp=yes) + enable_upnp=no) if test "x$enable_upnp" = "xyes" ; then + AC_MSG_NOTICE([Checking for the UPnP CyberLink for C library...]) PKG_CHECK_MODULES(CYBERLINK, clinkc, HAVE_CYBERLINK=yes, HAVE_CYBERLINK=no) @@ -242,7 +250,7 @@ if test "x$HAVE_CYBERLINK" = "xyes"; then AC_DEFINE(WITH_UPNP, 1, [build with upnp related stuff]) else - AC_MSG_RESULT(no) + AC_MSG_RESULT([UPnP features (using clinkc library) will not be added.]) fi AM_CONDITIONAL(WITH_UPNP, test "x$HAVE_CYBERLINK" = "xyes") @@ -254,6 +262,10 @@ #dnl Enable gtk-doc #GTK_DOC_CHECK(1.4) +AC_SUBST(CFLAGS) +AC_SUBST(LDFLAGS) +AC_SUBST(LIBS) + AC_OUTPUT([ Makefile src/Makefile