[Asterisk-code-review] BuildSystem: Remove unused dependency on libltdl. (asterisk[13])
Joshua Colp
asteriskteam at digium.com
Tue Mar 20 06:22:54 CDT 2018
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/8558 )
Change subject: BuildSystem: Remove unused dependency on libltdl.
......................................................................
BuildSystem: Remove unused dependency on libltdl.
Asterisk does not need the development package of libltdl, because it does not
use any symbol of -lltdl directly. Instead, it uses the runtime package via the
shared library -lodbc. On the supported platforms, that shared library declares
its dependency on -lltdl correctly, otherwise AST_EXT_LIB_CHECK would have
failed.
ASTERISK-27745
Change-Id: Icd315809b8e7978203431f3afb66240dd3a040ba
---
M apps/app_voicemail.c
M build_tools/menuselect-deps.in
M configure
M configure.ac
M contrib/scripts/install_prereq
M include/asterisk/autoconfig.h.in
M res/res_odbc.c
7 files changed, 7 insertions(+), 153 deletions(-)
Approvals:
George Joseph: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved; Approved for Submit
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 95d0e8d..1e7a1d8 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -63,7 +63,6 @@
</member>
<member name="ODBC_STORAGE" displayname="Storage of Voicemail using ODBC">
<depend>generic_odbc</depend>
- <depend>ltdl</depend>
<conflict>IMAP_STORAGE</conflict>
<conflict>FILE_STORAGE</conflict>
<defaultenabled>no</defaultenabled>
diff --git a/build_tools/menuselect-deps.in b/build_tools/menuselect-deps.in
index 69e5f03..2c2bd53 100644
--- a/build_tools/menuselect-deps.in
+++ b/build_tools/menuselect-deps.in
@@ -32,7 +32,6 @@
LIBXML2=@PBX_LIBXML2@
XMLSTARLET=@PBX_XMLSTARLET@
BASH=@PBX_BASH@
-LTDL=@PBX_LTDL@
LUA=@PBX_LUA@
MISDN=@PBX_MISDN@
MYSQLCLIENT=@PBX_MYSQLCLIENT@
diff --git a/configure b/configure
index eeb7467..08b8df1 100755
--- a/configure
+++ b/configure
@@ -1019,10 +1019,6 @@
LUA_DIR
LUA_INCLUDE
LUA_LIB
-PBX_LTDL
-LTDL_DIR
-LTDL_INCLUDE
-LTDL_LIB
PBX_LIBXSLT_CLEANUP
LIBXSLT_CLEANUP_DIR
LIBXSLT_CLEANUP_INCLUDE
@@ -1376,7 +1372,6 @@
with_libedit
with_libxml2
with_libxslt
-with_ltdl
with_lua
with_misdn
with_mysqlclient
@@ -2129,7 +2124,6 @@
'internal' Editline otherwise
--with-libxml2=PATH use LibXML2 files in PATH
--with-libxslt=PATH use LibXSLT files in PATH
- --with-ltdl=PATH use libtool files in PATH
--with-lua=PATH use Lua files in PATH
--with-misdn=PATH use mISDN user files in PATH
--with-mysqlclient=PATH use MySQL client files in PATH
@@ -10720,38 +10714,6 @@
LIBXSLT_CLEANUP_DIR=${LIBXSLT_DIR}
PBX_LIBXSLT_CLEANUP=0
-
-
-
-
-
-
-
- LTDL_DESCRIP="libtool"
- LTDL_OPTION="ltdl"
- PBX_LTDL=0
-
-# Check whether --with-ltdl was given.
-if test "${with_ltdl+set}" = set; then :
- withval=$with_ltdl;
- case ${withval} in
- n|no)
- USE_LTDL=no
- # -1 is a magic value used by menuselect to know that the package
- # was disabled, other than 'not found'
- PBX_LTDL=-1
- ;;
- y|ye|yes)
- ac_mandatory_list="${ac_mandatory_list} LTDL"
- ;;
- *)
- LTDL_DIR="${withval}"
- ac_mandatory_list="${ac_mandatory_list} LTDL"
- ;;
- esac
-
-fi
-
@@ -22136,104 +22098,6 @@
fi
done
-
-
-# Needed by unixodbc
-
-if test "x${PBX_LTDL}" != "x1" -a "${USE_LTDL}" != "no"; then
- pbxlibdir=""
- # if --with-LTDL=DIR has been specified, use it.
- if test "x${LTDL_DIR}" != "x"; then
- if test -d ${LTDL_DIR}/lib; then
- pbxlibdir="-L${LTDL_DIR}/lib"
- else
- pbxlibdir="-L${LTDL_DIR}"
- fi
- fi
-
- ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
- CFLAGS="${CFLAGS} "
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
-$as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
-if ${ac_cv_lib_ltdl_lt_dlinit+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lltdl ${pbxlibdir} $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char lt_dlinit ();
-int
-main ()
-{
-return lt_dlinit ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_ltdl_lt_dlinit=yes
-else
- ac_cv_lib_ltdl_lt_dlinit=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
-$as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
-if test "x$ac_cv_lib_ltdl_lt_dlinit" = xyes; then :
- AST_LTDL_FOUND=yes
-else
- AST_LTDL_FOUND=no
-fi
-
- CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-
-
- # now check for the header.
- if test "${AST_LTDL_FOUND}" = "yes"; then
- LTDL_LIB="${pbxlibdir} -lltdl "
- # if --with-LTDL=DIR has been specified, use it.
- if test "x${LTDL_DIR}" != "x"; then
- LTDL_INCLUDE="-I${LTDL_DIR}/include"
- fi
- LTDL_INCLUDE="${LTDL_INCLUDE} "
-
- # check for the header
- ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
- CPPFLAGS="${CPPFLAGS} ${LTDL_INCLUDE}"
- ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
-if test "x$ac_cv_header_ltdl_h" = xyes; then :
- LTDL_HEADER_FOUND=1
-else
- LTDL_HEADER_FOUND=0
-fi
-
-
- CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-
- if test "x${LTDL_HEADER_FOUND}" = "x0" ; then
- LTDL_LIB=""
- LTDL_INCLUDE=""
- else
-
- PBX_LTDL=1
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LTDL 1
-_ACEOF
-
- fi
- fi
-fi
-
diff --git a/configure.ac b/configure.ac
index c920bae..785ce1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -484,7 +484,6 @@
AST_EXT_LIB_SETUP([LIBXML2], [LibXML2], [libxml2])
AST_EXT_LIB_SETUP([LIBXSLT], [LibXSLT], [libxslt])
AST_EXT_LIB_SETUP_OPTIONAL([LIBXSLT_CLEANUP], [LibXSLT Library Cleanup Function], [LIBXSLT], [libxslt])
-AST_EXT_LIB_SETUP([LTDL], [libtool], [ltdl])
AST_EXT_LIB_SETUP([LUA], [Lua], [lua])
AST_EXT_LIB_SETUP([MISDN], [mISDN user], [misdn])
AST_EXT_LIB_SETUP([MYSQLCLIENT], [MySQL client], [mysqlclient])
@@ -2102,9 +2101,6 @@
# 64-bit version of kevent (from kqueue) on OS X
AC_CHECK_FUNCS([kevent64])
-
-# Needed by unixodbc
-AST_EXT_LIB_CHECK([LTDL], [ltdl], [lt_dlinit], [ltdl.h], [])
AST_EXT_LIB_CHECK([LDAP], [ldap], [ldap_initialize], [ldap.h])
diff --git a/contrib/scripts/install_prereq b/contrib/scripts/install_prereq
index da04988..f01b332 100755
--- a/contrib/scripts/install_prereq
+++ b/contrib/scripts/install_prereq
@@ -24,7 +24,7 @@
PACKAGES_DEBIAN="$PACKAGES_DEBIAN libedit-dev libjansson-dev libsqlite3-dev uuid-dev libxml2-dev"
# Asterisk: for addons:
PACKAGES_DEBIAN="$PACKAGES_DEBIAN libspeex-dev libspeexdsp-dev libogg-dev libvorbis-dev libasound2-dev portaudio19-dev libcurl4-openssl-dev xmlstarlet bison flex"
-PACKAGES_DEBIAN="$PACKAGES_DEBIAN libpq-dev unixodbc-dev libltdl-dev libneon27-dev libgmime-2.6-dev liblua5.2-dev liburiparser-dev libxslt1-dev libssl-dev"
+PACKAGES_DEBIAN="$PACKAGES_DEBIAN libpq-dev unixodbc-dev libneon27-dev libgmime-2.6-dev liblua5.2-dev liburiparser-dev libxslt1-dev libssl-dev"
PACKAGES_DEBIAN="$PACKAGES_DEBIAN libvpb-dev libmysqlclient-dev libbluetooth-dev libradcli-dev freetds-dev libosptk-dev libjack-jackd2-dev bash"
PACKAGES_DEBIAN="$PACKAGES_DEBIAN libsnmp-dev libiksemel-dev libcorosync-common-dev libcpg-dev libcfg-dev libnewt-dev libpopt-dev libical-dev libspandsp-dev"
PACKAGES_DEBIAN="$PACKAGES_DEBIAN libresample1-dev libc-client2007e-dev binutils-dev libsrtp0-dev libsrtp2-dev libgsm1-dev doxygen graphviz zlib1g-dev libldap2-dev"
@@ -39,7 +39,7 @@
PACKAGES_RH="$PACKAGES_RH libedit-devel jansson-devel libuuid-devel sqlite-devel libxml2-devel"
# Asterisk: for addons:
PACKAGES_RH="$PACKAGES_RH speex-devel speexdsp-devel libogg-devel libvorbis-devel alsa-lib-devel portaudio-devel libcurl-devel xmlstarlet bison flex"
-PACKAGES_RH="$PACKAGES_RH postgresql-devel unixODBC-devel libtool-ltdl-devel neon-devel gmime-devel lua-devel uriparser-devel libxslt-devel openssl-devel"
+PACKAGES_RH="$PACKAGES_RH postgresql-devel unixODBC-devel neon-devel gmime-devel lua-devel uriparser-devel libxslt-devel openssl-devel"
PACKAGES_RH="$PACKAGES_RH mysql-devel bluez-libs-devel radcli-devel freetds-devel jack-audio-connection-kit-devel bash"
PACKAGES_RH="$PACKAGES_RH net-snmp-devel iksemel-devel corosynclib-devel newt-devel popt-devel libical-devel spandsp-devel"
PACKAGES_RH="$PACKAGES_RH libresample-devel uw-imap-devel binutils-devel libsrtp-devel gsm-devel doxygen graphviz zlib-devel openldap-devel hoard"
@@ -54,7 +54,7 @@
PACKAGES_SUSE="$PACKAGES_SUSE libedit-devel libjansson-devel libuuid-devel sqlite3-devel libxml2-devel"
# Asterisk: for addons:
PACKAGES_SUSE="$PACKAGES_SUSE speex-devel speexdsp-devel libogg-devel libvorbis-devel alsa-devel portaudio-devel libcurl-devel xmlstarlet bison flex"
-PACKAGES_SUSE="$PACKAGES_SUSE postgresql-devel unixODBC-devel libtool libneon-devel gmime-devel lua-devel liburiparser-devel libxslt-devel libopenssl-devel"
+PACKAGES_SUSE="$PACKAGES_SUSE postgresql-devel unixODBC-devel libneon-devel gmime-devel lua-devel liburiparser-devel libxslt-devel libopenssl-devel"
PACKAGES_SUSE="$PACKAGES_SUSE libmysqlclient-devel bluez-devel freeradius-client-devel freetds-devel bash"
PACKAGES_SUSE="$PACKAGES_SUSE net-snmp-devel iksemel-devel libcorosync-devel newt-devel popt-devel libical-devel spandsp-devel"
PACKAGES_SUSE="$PACKAGES_SUSE imap-devel libsrtp2-devel libgsm-devel doxygen graphviz zlib-devel openldap2-devel"
@@ -69,7 +69,7 @@
PACKAGES_ARCH="$PACKAGES_ARCH libedit jansson libutil-linux libxml2 sqlite"
# Asterisk: for addons:
PACKAGES_ARCH="$PACKAGES_ARCH speex speexdsp libogg libvorbis alsa-lib portaudio curl xmlstarlet bison flex"
-PACKAGES_ARCH="$PACKAGES_ARCH postgresql-libs unixodbc libtool neon gmime lua uriparser libxslt openssl"
+PACKAGES_ARCH="$PACKAGES_ARCH postgresql-libs unixodbc neon gmime lua uriparser libxslt openssl"
PACKAGES_ARCH="$PACKAGES_ARCH libmariadbclient bluez-libs radcli freetds bash"
PACKAGES_ARCH="$PACKAGES_ARCH net-snmp libnewt popt libical spandsp"
PACKAGES_ARCH="$PACKAGES_ARCH c-client binutils libsrtp gsm doxygen graphviz zlib libldap"
@@ -84,7 +84,7 @@
PACKAGES_NBSD="$PACKAGES_NBSD editline jansson sqlite3 libuuid libxml2"
# Asterisk: for addons:
PACKAGES_NBSD="$PACKAGES_NBSD speex speexdsp libogg libvorbis alsa-lib portaudio-devel curl bison flex"
-PACKAGES_NBSD="$PACKAGES_NBSD postgresql10-client unixodbc libltdl neon gmime lua52 uriparser libxslt openssl"
+PACKAGES_NBSD="$PACKAGES_NBSD postgresql10-client unixodbc neon gmime lua52 uriparser libxslt openssl"
PACKAGES_NBSD="$PACKAGES_NBSD mysql-client radiusclient-ng freetds bash"
PACKAGES_NBSD="$PACKAGES_NBSD net-snmp iksemel popt libical spandsp"
PACKAGES_NBSD="$PACKAGES_NBSD imap-uw srtp gsm doxygen graphviz libzip openldap-client"
@@ -99,7 +99,7 @@
PACKAGES_OBSD="$PACKAGES_OBSD libxml sqlite3 e2fsprogs jansson"
# Asterisk: for addons:
PACKAGES_OBSD="$PACKAGES_OBSD speex speexdsp libogg libvorbis portaudio-svn curl xmlstarlet bison"
-PACKAGES_OBSD="$PACKAGES_OBSD postgresql-client iodbc libltdl neon gmime lua%5.2 uriparser libxslt"
+PACKAGES_OBSD="$PACKAGES_OBSD postgresql-client iodbc neon gmime lua%5.2 uriparser libxslt"
PACKAGES_OBSD="$PACKAGES_OBSD mariadb-client radcli freetds"
PACKAGES_OBSD="$PACKAGES_OBSD net-snmp iksemel popt libical spandsp"
PACKAGES_OBSD="$PACKAGES_OBSD c-client libsrtp gsm doxygen graphviz"
@@ -114,7 +114,7 @@
PACKAGES_FBSD="$PACKAGES_FBSD libedit jansson e2fsprogs-libuuid sqlite3 libxml2"
# Asterisk: for addons:
PACKAGES_FBSD="$PACKAGES_FBSD speex speexdsp libogg libvorbis alsa-lib portaudio curl xmlstarlet bison flex"
-PACKAGES_FBSD="$PACKAGES_FBSD postgresql10-client unixODBC libltdl neon gmime26 lua52 uriparser libxslt openssl"
+PACKAGES_FBSD="$PACKAGES_FBSD postgresql10-client unixODBC neon gmime26 lua52 uriparser libxslt openssl"
PACKAGES_FBSD="$PACKAGES_FBSD mysql57-client radcli freetds"
PACKAGES_FBSD="$PACKAGES_FBSD net-snmp iksemel corosync newt popt libical spandsp"
PACKAGES_FBSD="$PACKAGES_FBSD cclient libbfd libsrtp gsm libilbc doxygen graphviz libzip openldap-client libhoard"
diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in
index 5c3bb67..e5cf7f9 100644
--- a/include/asterisk/autoconfig.h.in
+++ b/include/asterisk/autoconfig.h.in
@@ -459,9 +459,6 @@
than `double'. */
#undef HAVE_LONG_DOUBLE_WIDER
-/* Define to 1 if you have the libtool library. */
-#undef HAVE_LTDL
-
/* Define to 1 if you have the Lua library. */
#undef HAVE_LUA
diff --git a/res/res_odbc.c b/res/res_odbc.c
index 7395449..36e4829 100644
--- a/res/res_odbc.c
+++ b/res/res_odbc.c
@@ -42,7 +42,6 @@
/*** MODULEINFO
<depend>generic_odbc</depend>
<depend>res_odbc_transaction</depend>
- <depend>ltdl</depend>
<support_level>core</support_level>
***/
--
To view, visit https://gerrit.asterisk.org/8558
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: Icd315809b8e7978203431f3afb66240dd3a040ba
Gerrit-Change-Number: 8558
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180320/18030a39/attachment-0001.html>
More information about the asterisk-code-review
mailing list