package/unixodbc: add optional dependency to libtool
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sat, 4 Feb 2017 16:43:27 +0000 (17:43 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 4 Feb 2017 22:55:20 +0000 (23:55 +0100)
To get reproducible builds of unixodbc add libtool as optional
dependency.

Without libtool:

$ host/usr/bin/x86_64-linux-readelf -a target/usr/lib/libodbc.so.2.0.0 | grep NEEDED
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.0]

With libtool:

$ host/usr/bin/x86_64-linux-readelf -a target/usr/lib/libodbc.so.2.0.0 | grep NEEDED
 0x0000000000000001 (NEEDED)             Shared library: [libltdl.so.7]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.0]

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/unixodbc/unixodbc.mk

index f66daab4a8b9ac4eaf36f21c5cd6ee638ddf19b4..280fe579136b171c68f7c0d79a18b7191e451ee0 100644 (file)
@@ -20,6 +20,13 @@ else
 UNIXODBC_CONF_OPTS += --disable-iconv
 endif
 
+ifeq ($(BR2_PACKAGE_LIBTOOL),y)
+UNIXODBC_CONF_OPTS += --without-included-ltdl
+UNIXODBC_DEPENDENCIES += libtool
+else
+UNIXODBC_CONF_OPTS += --with-included-ltdl
+endif
+
 ifeq ($(BR2_PACKAGE_READLINE),y)
 UNIXODBC_CONF_OPTS += --enable-readline
 UNIXODBC_DEPENDENCIES += readline