--- configure.orig	2014-06-03 01:28:41.000000000 -0700
+++ configure	2014-06-26 06:42:01.000000000 -0700
@@ -24039,112 +24039,13 @@
 if test "${with_mysql+set}" = set; then :
   withval=$with_mysql;
   if test "$withval" != "no"; then
-        if test "$withval" = "yes"; then
-#
-# This code is very broken on older systems
-#
-#           MYSQL_CONFIG=`which mysql_config 2>/dev/null`
-#           if test "x${MYSQL_CONFIG}" != x; then
-#              MYSQL_BINDIR="${MYSQL_CONFIG%/*}"
-#              ${MYSQL_CONFIG} --variable=pkglibdir > /dev/null 2>&1
-#              if test $? = 0 ; then
-#                 MYSQL_LIBDIR=`${MYSQL_CONFIG} --variable=pkglibdir`
-#                 MYSQL_INCDIR=`${MYSQL_CONFIG} --variable=pkgincludedir`
-#              else
-#                 MYSQL_LIBDIR=`${MYSQL_CONFIG} --libs | sed -e 's/.*-L//' -e 's/ .*//'`
-#                 MYSQL_INCDIR=`${MYSQL_CONFIG} --include | sed -e 's/-I//'`
-#              fi
-#           elif test -f /usr/local/mysql/include/mysql/mysql.h; then
-           if test -f /usr/local/mysql/include/mysql/mysql.h; then
-              MYSQL_INCDIR=/usr/local/mysql/include/mysql
-              if test -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.a \
-                      -o -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.so; then
-                 MYSQL_LIBDIR=/usr/local/mysql/lib64/mysql
-              else
-                 MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
-              fi
-              MYSQL_BINDIR=/usr/local/mysql/bin
-           elif test -f /usr/include/mysql/mysql.h; then
-              MYSQL_INCDIR=/usr/include/mysql
-              if test -f /usr/lib64/mysql/libmysqlclient_r.a \
-                      -o -f /usr/lib64/mysql/libmysqlclient_r.so; then
-                 MYSQL_LIBDIR=/usr/lib64/mysql
-              elif test -f /usr/lib64/libmysqlclient_r.a \
-                        -o -f /usr/lib64/libmysqlclient_r.so; then
-                 MYSQL_LIBDIR=/usr/lib64
-              elif test -f /usr/lib/x86_64-linux-gnu/libmysqlclient_r.a \
-                        -o -f /usr/lib/x86_64-linux-gnu/libmysqlclient_r.so; then
-                 MYSQL_LIBDIR=/usr/lib/x86_64-linux-gnu
-              elif test -f /usr/lib/mysql/libmysqlclient_r.a \
-                        -o -f /usr/lib/mysql/libmysqlclient_r.so; then
-                 MYSQL_LIBDIR=/usr/lib/mysql
-              else
-                 MYSQL_LIBDIR=/usr/lib
-              fi
-              MYSQL_BINDIR=/usr/bin
-           elif test -f /usr/include/mysql.h; then
-              MYSQL_INCDIR=/usr/include
-              if test -f /usr/lib64/libmysqlclient_r.a \
-                      -o -f /usr/lib64/libmysqlclient_r.so; then
-                 MYSQL_LIBDIR=/usr/lib64
-              else
-                 MYSQL_LIBDIR=/usr/lib
-              fi
-              MYSQL_BINDIR=/usr/bin
-           elif test -f /usr/local/include/mysql/mysql.h; then
-              MYSQL_INCDIR=/usr/local/include/mysql
-              if test -f /usr/local/lib64/mysql/libmysqlclient_r.a \
-                      -o -f /usr/local/lib64/mysql/libmysqlclient_r.so; then
-                 MYSQL_LIBDIR=/usr/local/lib64/mysql
-              else
-                 MYSQL_LIBDIR=/usr/local/lib/mysql
-              fi
-              MYSQL_BINDIR=/usr/local/bin
-           elif test -f /usr/local/include/mysql.h; then
-              MYSQL_INCDIR=/usr/local/include
-              if test -f /usr/local/lib64/libmysqlclient_r.a \
-                      -o -f /usr/local/lib64/libmysqlclient_r.so; then
-                 MYSQL_LIBDIR=/usr/local/lib64
-              else
-                 MYSQL_LIBDIR=/usr/local/lib
-              fi
-              MYSQL_BINDIR=/usr/local/bin
-           else
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-              as_fn_error $? "Unable to find mysql.h in standard locations" "$LINENO" 5
-           fi
-        else
-           if test -f $withval/include/mysql/mysql.h; then
-              MYSQL_INCDIR=$withval/include/mysql
-              if test -f $withval/lib64/mysql/libmysqlclient_r.a \
-                   -o -f $withval/lib64/mysql/libmysqlclient_r.so; then
-                 MYSQL_LIBDIR=$withval/lib64/mysql
-              elif test -f $withval/lib64/libmysqlclient_r.a \
-                   -o -f $withval/lib64/libmysqlclient_r.so; then
-                 MYSQL_LIBDIR=$withval/lib64
-              elif test -f $withval/lib/libmysqlclient_r.a \
-                   -o -f $withval/lib/libmysqlclient_r.so; then
-                 MYSQL_LIBDIR=$withval/lib
-              else
-                 MYSQL_LIBDIR=$withval/lib/mysql
-              fi
-              MYSQL_BINDIR=$withval/bin
-           elif test -f $withval/include/mysql.h; then
-              MYSQL_INCDIR=$withval/include
-              if test -f $withval/lib64/libmysqlclient_r.a \
-                   -o -f $withval/lib64/libmysqlclient_r.so; then
-                 MYSQL_LIBDIR=$withval/lib64
-              else
-                 MYSQL_LIBDIR=$withval/lib
-              fi
-              MYSQL_BINDIR=$withval/bin
-           else
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-              as_fn_error $? "Invalid MySQL directory $withval - unable to find mysql.h under $withval" "$LINENO" 5
-           fi
-        fi
+
+     ## replaced by macports start
+     MYSQL_INCDIR=/opt/local/include/mysql55/mysql
+     MYSQL_LIBDIR=/opt/local/lib/mysql55/mysql
+     MYSQL_BINDIR=/opt/local/lib/mysql55/bin
+     ## replaced by macports end
+
      MYSQL_INCLUDE=-I$MYSQL_INCDIR
      if test -f $MYSQL_LIBDIR/libmysqlclient_r.a \
           -o -f $MYSQL_LIBDIR/libmysqlclient_r.so; then