24042 | | if test "$withval" = "yes"; then |
24043 | | # |
24044 | | # This code is very broken on older systems |
24045 | | # |
24046 | | # MYSQL_CONFIG=`which mysql_config 2>/dev/null` |
24047 | | # if test "x${MYSQL_CONFIG}" != x; then |
24048 | | # MYSQL_BINDIR="${MYSQL_CONFIG%/*}" |
24049 | | # ${MYSQL_CONFIG} --variable=pkglibdir > /dev/null 2>&1 |
24050 | | # if test $? = 0 ; then |
24051 | | # MYSQL_LIBDIR=`${MYSQL_CONFIG} --variable=pkglibdir` |
24052 | | # MYSQL_INCDIR=`${MYSQL_CONFIG} --variable=pkgincludedir` |
24053 | | # else |
24054 | | # MYSQL_LIBDIR=`${MYSQL_CONFIG} --libs | sed -e 's/.*-L//' -e 's/ .*//'` |
24055 | | # MYSQL_INCDIR=`${MYSQL_CONFIG} --include | sed -e 's/-I//'` |
24056 | | # fi |
24057 | | # elif test -f /usr/local/mysql/include/mysql/mysql.h; then |
24058 | | if test -f /usr/local/mysql/include/mysql/mysql.h; then |
24059 | | MYSQL_INCDIR=/usr/local/mysql/include/mysql |
24060 | | if test -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.a \ |
24061 | | -o -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.so; then |
24062 | | MYSQL_LIBDIR=/usr/local/mysql/lib64/mysql |
24063 | | else |
24064 | | MYSQL_LIBDIR=/usr/local/mysql/lib/mysql |
24065 | | fi |
24066 | | MYSQL_BINDIR=/usr/local/mysql/bin |
24067 | | elif test -f /usr/include/mysql/mysql.h; then |
24068 | | MYSQL_INCDIR=/usr/include/mysql |
24069 | | if test -f /usr/lib64/mysql/libmysqlclient_r.a \ |
24070 | | -o -f /usr/lib64/mysql/libmysqlclient_r.so; then |
24071 | | MYSQL_LIBDIR=/usr/lib64/mysql |
24072 | | elif test -f /usr/lib64/libmysqlclient_r.a \ |
24073 | | -o -f /usr/lib64/libmysqlclient_r.so; then |
24074 | | MYSQL_LIBDIR=/usr/lib64 |
24075 | | elif test -f /usr/lib/x86_64-linux-gnu/libmysqlclient_r.a \ |
24076 | | -o -f /usr/lib/x86_64-linux-gnu/libmysqlclient_r.so; then |
24077 | | MYSQL_LIBDIR=/usr/lib/x86_64-linux-gnu |
24078 | | elif test -f /usr/lib/mysql/libmysqlclient_r.a \ |
24079 | | -o -f /usr/lib/mysql/libmysqlclient_r.so; then |
24080 | | MYSQL_LIBDIR=/usr/lib/mysql |
24081 | | else |
24082 | | MYSQL_LIBDIR=/usr/lib |
24083 | | fi |
24084 | | MYSQL_BINDIR=/usr/bin |
24085 | | elif test -f /usr/include/mysql.h; then |
24086 | | MYSQL_INCDIR=/usr/include |
24087 | | if test -f /usr/lib64/libmysqlclient_r.a \ |
24088 | | -o -f /usr/lib64/libmysqlclient_r.so; then |
24089 | | MYSQL_LIBDIR=/usr/lib64 |
24090 | | else |
24091 | | MYSQL_LIBDIR=/usr/lib |
24092 | | fi |
24093 | | MYSQL_BINDIR=/usr/bin |
24094 | | elif test -f /usr/local/include/mysql/mysql.h; then |
24095 | | MYSQL_INCDIR=/usr/local/include/mysql |
24096 | | if test -f /usr/local/lib64/mysql/libmysqlclient_r.a \ |
24097 | | -o -f /usr/local/lib64/mysql/libmysqlclient_r.so; then |
24098 | | MYSQL_LIBDIR=/usr/local/lib64/mysql |
24099 | | else |
24100 | | MYSQL_LIBDIR=/usr/local/lib/mysql |
24101 | | fi |
24102 | | MYSQL_BINDIR=/usr/local/bin |
24103 | | elif test -f /usr/local/include/mysql.h; then |
24104 | | MYSQL_INCDIR=/usr/local/include |
24105 | | if test -f /usr/local/lib64/libmysqlclient_r.a \ |
24106 | | -o -f /usr/local/lib64/libmysqlclient_r.so; then |
24107 | | MYSQL_LIBDIR=/usr/local/lib64 |
24108 | | else |
24109 | | MYSQL_LIBDIR=/usr/local/lib |
24110 | | fi |
24111 | | MYSQL_BINDIR=/usr/local/bin |
24112 | | else |
24113 | | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
24114 | | $as_echo "no" >&6; } |
24115 | | as_fn_error $? "Unable to find mysql.h in standard locations" "$LINENO" 5 |
24116 | | fi |
24117 | | else |
24118 | | if test -f $withval/include/mysql/mysql.h; then |
24119 | | MYSQL_INCDIR=$withval/include/mysql |
24120 | | if test -f $withval/lib64/mysql/libmysqlclient_r.a \ |
24121 | | -o -f $withval/lib64/mysql/libmysqlclient_r.so; then |
24122 | | MYSQL_LIBDIR=$withval/lib64/mysql |
24123 | | elif test -f $withval/lib64/libmysqlclient_r.a \ |
24124 | | -o -f $withval/lib64/libmysqlclient_r.so; then |
24125 | | MYSQL_LIBDIR=$withval/lib64 |
24126 | | elif test -f $withval/lib/libmysqlclient_r.a \ |
24127 | | -o -f $withval/lib/libmysqlclient_r.so; then |
24128 | | MYSQL_LIBDIR=$withval/lib |
24129 | | else |
24130 | | MYSQL_LIBDIR=$withval/lib/mysql |
24131 | | fi |
24132 | | MYSQL_BINDIR=$withval/bin |
24133 | | elif test -f $withval/include/mysql.h; then |
24134 | | MYSQL_INCDIR=$withval/include |
24135 | | if test -f $withval/lib64/libmysqlclient_r.a \ |
24136 | | -o -f $withval/lib64/libmysqlclient_r.so; then |
24137 | | MYSQL_LIBDIR=$withval/lib64 |
24138 | | else |
24139 | | MYSQL_LIBDIR=$withval/lib |
24140 | | fi |
24141 | | MYSQL_BINDIR=$withval/bin |
24142 | | else |
24143 | | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
24144 | | $as_echo "no" >&6; } |
24145 | | as_fn_error $? "Invalid MySQL directory $withval - unable to find mysql.h under $withval" "$LINENO" 5 |
24146 | | fi |
24147 | | fi |
| 24042 | |
| 24043 | ## replaced by macports start |
| 24044 | MYSQL_INCDIR=/opt/local/include/mysql55/mysql |
| 24045 | MYSQL_LIBDIR=/opt/local/lib/mysql55/mysql |
| 24046 | MYSQL_BINDIR=/opt/local/lib/mysql55/bin |
| 24047 | ## replaced by macports end |
| 24048 | |