Skip to content

Commit e028f13

Browse files
committed
Build: simplify and update deprecated libtool/ltdl integration
To name a few pain points in the former version: - pacemaker is not distributed with "libltdl.tar" for the past few years and it's unclear if it ever was or if it's just the heartbeat legacy; definitely no recipe to prepare such a file was found - custom mechanism to use bundled libltdl is redundant (and inferior in parameterization) compared to options automatically available to configure script thanks to newly introduced LTDL_INIT macro (--with-ltdl-lib DIR, --with-included-ltdl) - "INCLTDL" was likely a typo for "LTDLINCL"
1 parent 391a18b commit e028f13

File tree

4 files changed

+6
-49
lines changed

4 files changed

+6
-49
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ configure
3838
depcomp
3939
install-sh
4040
include/stamp-*
41-
libltdl.tar
4241
libtool
4342
libtool.m4
4443
ltdl.m4

GNUmakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ check: clang cppcheck
363363

364364
# Extra cppcheck options: --enable=all --inconclusive --std=posix
365365
cppcheck:
366-
for d in $(LIBLTDL_DIR) replace lib mcp attrd pengine cib crmd fencing lrmd tools; do cppcheck -q $$d; done
366+
for d in replace lib mcp attrd pengine cib crmd fencing lrmd tools; do cppcheck -q $$d; done
367367

368368
clang:
369369
test -e $(CLANG_analyzer)

Makefile.am

+3-6
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1919
#
2020

21-
EXTRA_DIST = autogen.sh ConfigureMe README.in libltdl.tar m4/gnulib-cache.m4
21+
EXTRA_DIST = autogen.sh ConfigureMe README.in m4/gnulib-cache.m4
2222

2323
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure DRF/config-h.in \
24-
DRF/stamp-h.in libtool.m4 ltdl.m4 libltdl.tar
24+
DRF/stamp-h.in libtool.m4 ltdl.m4
2525

26-
CORE = $(LIBLTDL_DIR) replace include lib mcp attrd pengine cib crmd fencing lrmd tools xml
26+
CORE = replace include lib mcp attrd pengine cib crmd fencing lrmd tools xml
2727
SUBDIRS = $(CORE) extra doc
2828

2929
doc_DATA = README.markdown COPYING
@@ -79,6 +79,3 @@ clean-generic:
7979

8080
dist-clean-local:
8181
rm -f autoconf automake autoheader
82-
83-
maintainer-clean-local:
84-
rm -f libltdl.tar

configure.ac

+2-41
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,8 @@ AC_PROG_CC_STDC
9292
gl_EARLY
9393
gl_INIT
9494

95-
AC_LIBTOOL_DLOPEN dnl Enable dlopen support...
96-
AC_LIBLTDL_CONVENIENCE dnl make libltdl a convenience lib
97-
AC_PROG_LIBTOOL
95+
LT_INIT([dlopen])
96+
LTDL_INIT([convenience])
9897

9998
AC_PROG_YACC
10099
AM_PROG_LEX
@@ -180,10 +179,6 @@ AC_ARG_ENABLE([quiet],
180179
Supress make output unless there is an error
181180
[default=no]])
182181

183-
AC_ARG_ENABLE([bundled-ltdl],
184-
[ --enable-bundled-ltdl Configure, build and install the standalone ltdl library bundled with ${PACKAGE} [default=no]])
185-
LTDL_LIBS=""
186-
187182
AC_ARG_ENABLE([no-stack],
188183
[ --enable-no-stack
189184
Only build the Policy Engine and pieces needed to support it [default=no]])
@@ -846,38 +841,6 @@ AC_CHECK_FUNCS(g_log_set_default_handler)
846841
AC_CHECK_FUNCS(getopt, AC_DEFINE(HAVE_DECL_GETOPT, 1, [Have getopt function]))
847842
AC_CHECK_FUNCS(nanosleep, AC_DEFINE(HAVE_DECL_NANOSLEEP, 1, [Have nanosleep function]))
848843

849-
dnl ========================================================================
850-
dnl ltdl
851-
dnl ========================================================================
852-
853-
AC_CHECK_LIB(ltdl, lt_dlopen, [LTDL_foo=1])
854-
if test "x${enable_bundled_ltdl}" = "xyes"; then
855-
if test $ac_cv_lib_ltdl_lt_dlopen = yes; then
856-
AC_MSG_NOTICE([Disabling usage of installed ltdl])
857-
fi
858-
ac_cv_lib_ltdl_lt_dlopen=no
859-
fi
860-
861-
LIBLTDL_DIR=""
862-
if test $ac_cv_lib_ltdl_lt_dlopen != yes ; then
863-
AC_MSG_NOTICE([Installing local ltdl])
864-
LIBLTDL_DIR=libltdl
865-
( cd $srcdir ; $TAR -xvf libltdl.tar )
866-
if test "$?" -ne 0; then
867-
AC_MSG_ERROR([$TAR of libltdl.tar in $srcdir failed])
868-
fi
869-
AC_CONFIG_SUBDIRS(libltdl)
870-
else
871-
LIBS="$LIBS -lltdl"
872-
AC_MSG_NOTICE([Using installed ltdl])
873-
INCLTDL=""
874-
LIBLTDL=""
875-
fi
876-
877-
AC_SUBST(INCLTDL)
878-
AC_SUBST(LIBLTDL)
879-
AC_SUBST(LIBLTDL_DIR)
880-
881844
dnl ========================================================================
882845
dnl bzip2
883846
dnl ========================================================================
@@ -2169,8 +2132,6 @@ if test $SUPPORT_PLUGIN = 1; then
21692132
AC_MSG_RESULT([ Corosync Plugins = ${LCRSODIR}])
21702133
fi
21712134
AC_MSG_RESULT([])
2172-
AC_MSG_RESULT([ Use system LTDL = ${ac_cv_lib_ltdl_lt_dlopen}])
2173-
AC_MSG_RESULT([])
21742135
AC_MSG_RESULT([ HA group name = ${CRM_DAEMON_GROUP}])
21752136
AC_MSG_RESULT([ HA user name = ${CRM_DAEMON_USER}])
21762137
AC_MSG_RESULT([])

0 commit comments

Comments
 (0)