BuildSystem: Remove unused dependency on libltdl.
authorAlexander Traud <pabstraud@compuserve.com>
Sat, 17 Mar 2018 10:00:06 +0000 (11:00 +0100)
committerAlexander Traud <pabstraud@compuserve.com>
Sat, 17 Mar 2018 10:00:06 +0000 (11:00 +0100)
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

apps/app_voicemail.c
build_tools/menuselect-deps.in
configure
configure.ac
contrib/scripts/install_prereq
include/asterisk/autoconfig.h.in
res/res_odbc.c

index 82fa3b3..8d598b7 100644 (file)
@@ -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>
index afea01f..e62c183 100644 (file)
@@ -34,7 +34,6 @@ LIBEDIT=@PBX_LIBEDIT@
 LIBXML2=@PBX_LIBXML2@
 XMLSTARLET=@PBX_XMLSTARLET@
 BASH=@PBX_BASH@
-LTDL=@PBX_LTDL@
 LUA=@PBX_LUA@
 MISDN=@PBX_MISDN@
 MYSQLCLIENT=@PBX_MYSQLCLIENT@
index afe61aa..098ef2b 100755 (executable)
--- a/configure
+++ b/configure
@@ -1046,10 +1046,6 @@ PBX_LUA
 LUA_DIR
 LUA_INCLUDE
 LUA_LIB
-PBX_LTDL
-LTDL_DIR
-LTDL_INCLUDE
-LTDL_LIB
 PBX_LIBXSLT_CLEANUP
 LIBXSLT_CLEANUP_DIR
 LIBXSLT_CLEANUP_INCLUDE
@@ -1408,7 +1404,6 @@ with_libcurl
 with_libedit
 with_libxml2
 with_libxslt
-with_ltdl
 with_lua
 with_misdn
 with_mysqlclient
@@ -2165,7 +2160,6 @@ Optional Packages:
   --with-libedit=PATH     use NetBSD Editline library files in PATH
   --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
@@ -10802,38 +10796,6 @@ 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
-
-
-
-
-
-
-
-
     LUA_DESCRIP="Lua"
     LUA_OPTION="lua"
     PBX_LUA=0
 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
-
-
-
 
 if test "x${PBX_LDAP}" != "x1" -a "${USE_LDAP}" != "no"; then
    pbxlibdir=""
index 4b9b830..b15462b 100644 (file)
@@ -484,7 +484,6 @@ AST_EXT_LIB_SETUP_OPTIONAL([LIBEDIT_IS_UNICODE], [Libedit compiled for unicode],
 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])
@@ -2133,9 +2132,6 @@ AST_EXT_LIB_CHECK([KQUEUE], [c], [kqueue], [sys/event.h])
 # 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])
 
 AST_EXT_LIB_CHECK([MISDN], [mISDN], [mISDN_open], [mISDNuser/mISDNlib.h])
index e588d5c..887c5e2 100755 (executable)
@@ -24,7 +24,7 @@ PACKAGES_DEBIAN="build-essential pkg-config"
 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"
@@ -40,7 +40,7 @@ PACKAGES_RH="make gcc gcc-c++ pkgconfig"
 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"
@@ -56,7 +56,7 @@ PACKAGES_SUSE="make gcc gcc-c++ pkg-config"
 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"
@@ -72,7 +72,7 @@ PACKAGES_ARCH="make gcc pkg-config"
 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"
@@ -88,7 +88,7 @@ PACKAGES_NBSD="gmake pkg-config"
 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"
@@ -104,7 +104,7 @@ PACKAGES_OBSD="gmake"
 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"
@@ -120,7 +120,7 @@ PACKAGES_FBSD="gmake pkgconf"
 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"
index 6d747ae..5e9ba60 100644 (file)
    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
 
index 4a5411e..3ee8cba 100644 (file)
@@ -42,7 +42,6 @@
 /*** MODULEINFO
        <depend>generic_odbc</depend>
        <depend>res_odbc_transaction</depend>
-       <depend>ltdl</depend>
        <support_level>core</support_level>
  ***/