Hi Julien, On Tue, Jan 08, 2013 at 10:37:45PM +0100, Julien Cristau wrote:
> 2) this thing should just use AC_CHECK_LIBS already. how about the atteched one? The debdiff is against -3.2 in testing. It's pretty aggressive and kills --with-mysql-* settings (thinking of those, I should remove them alltogether then). Does it look good enough for you? Regards Evgeni
diff -Nru motion-3.2.12/debian/changelog motion-3.2.12/debian/changelog --- motion-3.2.12/debian/changelog 2012-06-06 12:25:16.000000000 +0200 +++ motion-3.2.12/debian/changelog 2013-01-26 20:51:08.000000000 +0100 @@ -1,3 +1,23 @@ +motion (3.2.12-3.4) unstable; urgency=low + + * Non-maintainer upload. + * Revert changes done in -3.3. + * Find MySQL using AC_CHECK_HEADER/AC_CHECK_LIB. + Closes: #697221 + + -- Evgeni Golov <evg...@debian.org> Sat, 26 Jan 2013 15:48:31 +0100 + +motion (3.2.12-3.3) unstable; urgency=low + + * Non-maintainer upload. + * Properly find MySQL in /usr/lib/$(DEB_HOST_MULTIARCH). + + Build-Depend on dpkg-dev >= 1.16 + + Get DEB_HOST_MULTIARCH from dpkg-architecture. + + Pass --with-mysql-dir=/usr/lib/$(DEB_HOST_MULTIARCH) to configure. + Closes: #697221 + + -- Evgeni Golov <evg...@debian.org> Thu, 03 Jan 2013 12:00:38 +0100 + motion (3.2.12-3.2) unstable; urgency=medium * Non-maintainer upload. diff -Nru motion-3.2.12/debian/patches/proper-mysql-configure.patch motion-3.2.12/debian/patches/proper-mysql-configure.patch --- motion-3.2.12/debian/patches/proper-mysql-configure.patch 1970-01-01 01:00:00.000000000 +0100 +++ motion-3.2.12/debian/patches/proper-mysql-configure.patch 2013-01-26 20:46:48.000000000 +0100 @@ -0,0 +1,126 @@ +From: Evgeni Golov <evg...@debian.org> +Subject: Use AC_CHECK_HEADER/AC_CHECK_LIB to find MySQL libraries +Bug-Debian: http://bugs.debian.org/697221 +Last-Update: 2013-01-26 + +Index: motion-3.2.12/configure.in +=================================================================== +--- motion-3.2.12.orig/configure.in 2013-01-26 16:11:57.000000000 +0100 ++++ motion-3.2.12/configure.in 2013-01-26 16:40:50.235894896 +0100 +@@ -502,108 +502,14 @@ + AC_MSG_RESULT(skipped) + else + AC_MSG_RESULT(testing) +- # ******* Search mysql headers ******* +- +- if test "${MYSQL_HEADERS}" = "yes"; then +- AC_MSG_CHECKING(autodect mysql headers) +- # Autodetect +- for w in /usr/include /usr/local/include /usr/mysql /usr/local/mysql /usr/local/mysql/include /opt /opt/mysql; do +- # check for plain setups +- if test -f $w/mysql.h; then +- MYSQL_INCDIR=$w +- break +- fi +- # check for "/usr/include/<packagename>" type setups +- if test -f $w/mysql/mysql.h; then +- MYSQL_INCDIR=$w/mysql +- break +- fi +- # check for "/usr/<packagename>/include" type setups +- if test -f $w/mysql/include/mysql.h; then +- MYSQL_INCDIR=$w/mysql/include +- break +- fi +- done +- elif test "${MYSQL_HEADERS}" = "no"; then +- AC_MSG_CHECKING(for mysql headers) +- AC_MSG_RESULT(skipped) +- else +- AC_MSG_CHECKING(for mysql headers in $MYSQL_HEADERS) +- # Manual detection for <withval> +- if test -f $MYSQL_HEADERS/mysql.h; then +- MYSQL_INCDIR=$MYSQL_HEADERS +- fi +- fi +- +- if test -z "$MYSQL_INCDIR" ; then +- MYSQL_HEADERS="no" +- AC_MSG_RESULT(not found) +- echo "Invalid MySQL directory - unable to find mysql.h." +- else +- AC_MSG_RESULT(yes) +- MYSQL_HEADERS="yes" +- fi +- +- +- if test "${MYSQL_HEADERS}" = "yes"; then +- +- # ******* Search mysql libs ********* +- if test "${MYSQL_LIBS}" = "yes"; then +- AC_MSG_CHECKING(autodect mysql libs) +- # Autodetect +- for w in /usr/lib64 /usr/lib /usr/local/lib /usr/mysql /usr/local/mysql /usr/local/mysql/lib /opt /opt/mysql; do +- # check for plain setups +- if test -f $w/libmysqlclient.a -o -f $w/libmysqlclient.so; then +- MYSQL_LIBDIR=$w +- break +- fi +- # check for "/usr/lib/<packagename>" type setups +- if test -f $w/mysql/libmysqlclient.a -o -f $w/mysql/libmysqlclient.so; then +- MYSQL_LIBDIR=$w/mysql +- break +- fi +- # check for "/usr/<packagename>/lib" type setups +- if test -f $w/mysql/lib/libmysqlclient.a -o -f $w/mysql/lib/libmysqlclient.so; then +- MYSQL_LIBDIR=$w/mysql/lib +- break +- fi +- done +- elif test "${MYSQL_LIBS}" = "no"; then +- AC_MSG_CHECKING(for mysql libs) +- AC_MSG_RESULT(skipped) +- else +- AC_MSG_CHECKING(for mysql libs in $MYSQL_LIBS) +- # Manual detection for <withval> +- if test -f $MYSQL_LIBS/libmysqlclient.a -o -f $MYSQL_LIBS/libmysqlclient.so; then +- MYSQL_LIBDIR=$MYSQL_LIBS +- fi +- fi +- +- +- if test -z "$MYSQL_LIBDIR" ; then +- AC_MSG_RESULT(not found) +- echo "Invalid MySQL directory - unable to find libmysqlclient.a or libmysqlclient.so." +- else +- AC_MSG_RESULT($MYSQL_LIBDIR) +- #LDFLAGS="-L$MYSQL_LIBDIR" +- saved_CFLAGS=$CFLAGS +- saved_LIBS=$LIBS +- CFLAGS="-I$MYSQL_INCDIR" +- LIBS="-L$MYSQL_LIBDIR" +- AC_CHECK_LIB(mysqlclient,mysql_init,[ +- TEMP_LIBS="$TEMP_LIBS -L$MYSQL_LIBDIR -lmysqlclient -lz" +- TEMP_CFLAGS="$TEMP_CFLAGS -I$MYSQL_INCDIR" +- MYSQL_SUPPORT="yes" +- AC_DEFINE([HAVE_MYSQL],1,[Define to 1 if you have MySQL support]) +- ], +- AC_MSG_ERROR(MySQL support can't build without MySQL libraries)) +- CFLAGS=$saved_CFLAGS +- LIBS=$saved_LIBS +- fi +- +- # end mysql-include , mysql-libs +- fi +- ++ AC_CHECK_HEADER([mysql/mysql.h], [ ++ AC_CHECK_LIB([mysqlclient], [mysql_init], [ ++ TEMP_LIBS="$TEMP_LIBS -lmysqlclient" ++ TEMP_CFLAGS="$TEMP_CFLAGS -I/usr/include/mysql" ++ MYSQL_SUPPORT="yes" ++ AC_DEFINE([HAVE_MYSQL],1,[Define to 1 if you have MySQL support]) ++ ], []) ++ ], []) + # end Mysql detection + fi + diff -Nru motion-3.2.12/debian/patches/series motion-3.2.12/debian/patches/series --- motion-3.2.12/debian/patches/series 2012-02-12 22:16:11.000000000 +0100 +++ motion-3.2.12/debian/patches/series 2013-01-26 20:47:49.000000000 +0100 @@ -4,3 +4,4 @@ 020111027~5dd9ed4.patch 01_videodev.h.diff 02_libav_multiarch.patch +proper-mysql-configure.patch