1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
Multilib: Remove hardcoded lib where lib might be lib32, and lib64 is correct.
On a variety of multilib systems, /lib might not exist, or might contain
(directly or via a symlink) 32-bit library content. If the objective is to
build a 64-bit MySQL, we need to explicitly tell mysql how to look for external
libraries. We add an option --with-LIBDIR that takes the basename for the
library directory to resolve this problem.
Signed-off-by: Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
diff -urN mysql-orig//config/ac-macros/ha_ndbcluster.m4 mysql/config/ac-macros/ha_ndbcluster.m4
--- mysql-orig//config/ac-macros/ha_ndbcluster.m4 2011-04-17 02:29:26.660000016 +0000
+++ mysql/config/ac-macros/ha_ndbcluster.m4 2011-04-17 02:33:40.293333350 +0000
@@ -24,7 +24,7 @@
AC_HELP_STRING([--with-ndb-sci=DIR],
[Provide MySQL with a custom location of
sci library. Given DIR, sci library is
- assumed to be in $DIR/lib and header files
+ assumed to be in $DIR/${LIBDIR} and header files
in $DIR/include.]),
[mysql_sci_dir=${withval}],
[mysql_sci_dir=""])
@@ -35,19 +35,19 @@
AC_MSG_RESULT([-- not including sci transporter])
;;
* )
- if test -f "$mysql_sci_dir/lib/libsisci.a" -a \
+ if test -f "$mysql_sci_dir/${LIBDIR}/libsisci.a" -a \
-f "$mysql_sci_dir/include/sisci_api.h"; then
NDB_SCI_INCLUDES="-I$mysql_sci_dir/include"
- NDB_SCI_LIBS="$mysql_sci_dir/lib/libsisci.a"
+ NDB_SCI_LIBS="$mysql_sci_dir/${LIBDIR}/libsisci.a"
AC_MSG_RESULT([-- including sci transporter])
AC_DEFINE([NDB_SCI_TRANSPORTER], [1],
[Including Ndb Cluster DB sci transporter])
AC_SUBST(NDB_SCI_INCLUDES)
AC_SUBST(NDB_SCI_LIBS)
have_ndb_sci="yes"
- AC_MSG_RESULT([found sci transporter in $mysql_sci_dir/{include, lib}])
+ AC_MSG_RESULT([found sci transporter in $mysql_sci_dir/{include, ${LIBDIR}}])
else
- AC_MSG_RESULT([could not find sci transporter in $mysql_sci_dir/{include, lib}])
+ AC_MSG_RESULT([could not find sci transporter in $mysql_sci_dir/{include, {LIBDIR}}])
fi
;;
esac
diff -urN mysql-orig//config/ac-macros/ssl.m4 mysql/config/ac-macros/ssl.m4
--- mysql-orig//config/ac-macros/ssl.m4 2011-04-17 02:29:26.660000016 +0000
+++ mysql/config/ac-macros/ssl.m4 2011-04-17 02:32:26.143333350 +0000
@@ -111,7 +111,7 @@
#
# Try to link with openSSL libs in <location>
#
- openssl_libs="-L$location/lib/ -lssl -lcrypto"
+ openssl_libs="-L$location/${LIBDIR}/ -lssl -lcrypto"
MYSQL_CHECK_SSL_DIR([$openssl_includes], [$openssl_libs])
if test "$mysql_ssl_found" == "no"
@@ -163,7 +163,7 @@
dnl bundled along with MySQL sources
dnl - ssl location prefix - given location prefix, the macro expects
dnl to find the header files in $prefix/include/, and libraries in
-dnl $prefix/lib. If headers or libraries weren't found at $prefix, the
+dnl $prefix/${LIBDIR}. If headers or libraries weren't found at $prefix, the
dnl macro bails out with error.
dnl
dnl ------------------------------------------------------------------------
diff -urN mysql-orig//config/ac-macros/zlib.m4 mysql/config/ac-macros/zlib.m4
--- mysql-orig//config/ac-macros/zlib.m4 2011-04-17 02:29:26.660000016 +0000
+++ mysql/config/ac-macros/zlib.m4 2011-04-17 02:33:10.790000017 +0000
@@ -51,12 +51,12 @@
dnl bundled zlib
dnl - zlib location prefix - given location prefix, the macro expects
dnl to find the library headers in $prefix/include, and binaries in
-dnl $prefix/lib. If zlib headers or binaries weren't found at $prefix, the
+dnl $prefix/${LIBDIR}. If zlib headers or binaries weren't found at $prefix, the
dnl macro bails out with error.
dnl
dnl If the library was found, this function #defines HAVE_COMPRESS
dnl and configure variables ZLIB_INCLUDES (i.e. -I/path/to/zlib/include),
-dnl ZLIB_LIBS (i. e. -L/path/to/zlib/lib -lz) and ZLIB_DEPS which is
+dnl ZLIB_LIBS (i. e. -L/path/to/zlib/${LIBDIR} -lz) and ZLIB_DEPS which is
dnl used in mysql_config and is always the same as ZLIB_LIBS except to
dnl when we use the bundled zlib. In the latter case ZLIB_LIBS points to the
dnl build dir ($top_builddir/zlib), while mysql_config must point to the
@@ -78,7 +78,7 @@
AC_HELP_STRING([--with-zlib-dir=no|bundled|DIR],
[Provide MySQL with a custom location of
compression library. Given DIR, zlib binary is
- assumed to be in $DIR/lib and header files
+ assumed to be in $DIR/${LIBDIR} and header files
in $DIR/include.]),
[mysql_zlib_dir=${withval}],
[mysql_zlib_dir=""])
@@ -102,13 +102,13 @@
;;
*)
# Test for libz using all known library file endings
- if test \( -f "$mysql_zlib_dir/lib/libz.a" -o \
- -f "$mysql_zlib_dir/lib/libz.so" -o \
- -f "$mysql_zlib_dir/lib/libz.sl" -o \
- -f "$mysql_zlib_dir/lib/libz.dylib" \) \
+ if test \( -f "$mysql_zlib_dir/${LIBDIR}/libz.a" -o \
+ -f "$mysql_zlib_dir/${LIBDIR}/libz.so" -o \
+ -f "$mysql_zlib_dir/${LIBDIR}/libz.sl" -o \
+ -f "$mysql_zlib_dir/${LIBDIR}/libz.dylib" \) \
-a -f "$mysql_zlib_dir/include/zlib.h"; then
ZLIB_INCLUDES="-I$mysql_zlib_dir/include"
- ZLIB_LIBS="-L$mysql_zlib_dir/lib -lz"
+ ZLIB_LIBS="-L$mysql_zlib_dir/${LIBDIR} -lz"
MYSQL_CHECK_ZLIB_DIR
fi
if test "x$mysql_cv_compress" != "xyes"; then
diff -urN mysql-orig//configure.in mysql/configure.in
--- mysql-orig//configure.in 2011-04-17 02:29:26.650000015 +0000
+++ mysql/configure.in 2011-04-17 02:58:57.133333350 +0000
@@ -64,6 +64,14 @@
MYSQL_TCP_PORT_DEFAULT=3306
MYSQL_UNIX_ADDR_DEFAULT="/tmp/mysql.sock"
+AC_ARG_WITH(LIBDIR,
+[AS_HELP_STRING([--with-LIBDIR],[base name of the library dirs])],
+[LIBDIR=$withval],
+[LIBDIR=lib]
+)
+
+AC_SUBST([LIBDIR])
+
dnl Include m4
sinclude(config/ac-macros/maintainer.m4)
sinclude(config/ac-macros/alloca.m4)
|