Continue build even if libmysqlclient.so link does not exist (but the actual library...
authorZdeněk Šustr <sustr4@cesnet.cz>
Tue, 10 Feb 2009 14:02:36 +0000 (14:02 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Tue, 10 Feb 2009 14:02:36 +0000 (14:02 +0000)
org.glite.lbjp-common.db/Makefile

index f9cec18..1daa9b6 100644 (file)
@@ -32,7 +32,7 @@ ifeq (${host_cpu},x86_64)
        archlib:=lib64
 endif   
 
-MYSQL_SONAME:=$(shell lib=""; for dir in ${archlib} ${archlib}/mysql lib lib/mysql; do l=${mysql_prefix}/$$dir/libmysqlclient.so; [ -f $$l ] && { lib=$$l; break;} ; done; if [ x != x$$lib ]; then readelf -d $$lib | grep SONAME | sed 's/.*\(libmysqlclient.so.[0-9]\{1,\}\).*/\1/'; else echo notfound; fi )
+MYSQL_SONAME:=$(shell lib=""; for dir in ${archlib} ${archlib}/mysql lib lib/mysql; do l=$(shell find ${mysql_prefix}/$$dir -name libmysqlclient.so* | head -n 1); [ -f $$l ] && { lib=$$l; break;} ; done; if [ x != x$$lib ]; then readelf -d $$lib | grep SONAME | sed 's/.*\(libmysqlclient.so.[0-9]\{1,\}\).*/\1/'; else echo notfound; fi )
 
 MYSQL_CPPFLAGS:=-I${mysql_prefix}/include -I${mysql_prefix}/include/mysql -DMYSQL_SONAME=\"${MYSQL_SONAME}\"
 MYSQL_LIBS=-lz